diff options
18 files changed, 2513 insertions, 88 deletions
diff --git a/media-libs/mesa/Manifest b/media-libs/mesa/Manifest index 490bafc..ec9d02e 100644 --- a/media-libs/mesa/Manifest +++ b/media-libs/mesa/Manifest @@ -8,7 +8,11 @@ AUX eselect-mesa.conf.8.1 1622 SHA256 a7a4306084885dc624304a8893ca4f5645f7f1fe31 AUX eselect-mesa.conf.9.2 1676 SHA256 bcf5f77140b4695f147d4cd3c2db4b954fb57eccfd4475c7f7c4866edda8436e SHA512 d0061359638c0d9729ba1035fd7740c84d59f538adc11af2ee671b5ddbc83c420159efbefcc39ea680f06d20507f1e1d76b528712a07baeca901a413ba7b55df WHIRLPOOL 0fc650223a1910305bb2c4b7b946ac8b83b5b1ba0b79b586a96303a369b30c9c03dc658a6e8e9a29c5c4605f3865e245be0a0e6a27c40ac37402e8a2616b3ace AUX glx_ro_text_segm.patch 731 SHA256 e36af5b530fdbe2b0e62a035bf4bf4baef267c3dc56133d1a58e56899ebffc5c SHA512 90d04d1268cc90e1c5596b49b143895eba99d4e7f7d9bb5f699725c1308e3995edac44e3f61536c7ce70ebf5df84a5a22c18fa84fb54fbddb339f908975bb43c WHIRLPOOL 42171ef67930bebdcfdfcb0c9370234791c6125be760b6419abfff44bd65899982167d6da4d6eb4198383438e6376b4b695109af158083b903071c545160d883 AUX mesa-10.2-dont-require-llvm-for-r300.patch 547 SHA256 83cfeae33b1e8c84b37ed59c353000eb775978ae3d9035ba8ce4f63a167756fc SHA512 d1cb5a989aa001c99f353d27ab5b28ac05d60050614bbfd76ca5d312e00efcc2b1a2459d30d697b68119310c69512b4195afce6c0ed7f31fb9cf14689a740e27 WHIRLPOOL c06669942d275a9d9f132ec8f51d3ecf23d33cb89cb607ba3a7861f209f283b39a9568513b07e22f0dfcc99339a307d7b2a6b03f261ed583fd4518d3b4d0b464 +AUX mesa-10.2-sysfs-instead-of-libudev.patch 9568 SHA256 e0b7fea7bbf4883dae58c816f1b680f0f1396e83c9717c8b22805c1616214af2 SHA512 6302fdd0c94c1ddca4bd73d05ee6e12664a78978efbd7233d0d4c0d9706c23b716d78e5a31eef87c0606fdf65f49be8f21f8adbeb086660a0053c600bf5ee2d3 WHIRLPOOL 982b2d722f281ce2e5b20f835a53d93d1cad500668fc367e45c10293bfb5e045f8ea5679229edf5f84b3fcc2d07c650159191e3514d444c1d832048522b35041 AUX mesa-10.2.4-optional-gl-headers.patch 1614 SHA256 3acebe6dce302a1c46040a73424ba275ca94bd8d99cf98f46c928816ec995931 SHA512 32d030c0c163d64d3313ecbd2771a5282a097eb678dc62371083cd14a94b515440ebd1b28932cbb54536f899d08f75142beee686513974589671ba695b068a68 WHIRLPOOL ffe0783af517eb87c3413c687f901dc38c050cf318244c575aabc82377ff44c2e340c1e9cf95fc980056a89060b6296a9133ce5e8427295b8322821ec993bb93 +AUX mesa-10.3.7-dont-use-clrsb.patch 1140 SHA256 23626c6bf1e502f17f4b9236b512063b41bf52be64f56252f0fc5ce456824d58 SHA512 2d9dd9a56c3bab02e8ec1a1ab4d88c2855746d8243548f197cb43de6e980554447c75e53c07dcd270de7e1c282cf7fdf996e5102a24e47b75e484a18f99092e0 WHIRLPOOL 47b222fb61427bbe2a63ac4b738608e9c3491e6373c33e1d68c79198a111d7668b4cafbac9e58820e8cefae55dffca46ab57dbe91ad819feeb734c32f01020f0 +AUX mesa-10.3.7-format_utils.c.patch 34839 SHA256 81ec8d547d798aa5ef5dfc9f0685291af04f95882608f8e9db39a867f44ab431 SHA512 777597b41c37ced0fb375048cc30c4cac701c6020c70bd0f6fbbc2d6f2c1ac9ece0f6d411d81dd042be7f2fbc17e0536176d8230b93f9eed7d7ddf205ac98bb8 WHIRLPOOL 51a213c415d81250a2bc3ad117581b62c4eed13152a9550b2214a9c63f85a6559b1504e013ae0d8e56d5adcaff053c753aa833d7acbe10185d468fdfed5e1b72 +AUX mesa-10.5.1-fstat-include.patch 1008 SHA256 4d44da3882ae9ae7c5d255189e5ca86569337a53d6aece4c65344c753aa588d3 SHA512 6df3167efe198955198b4eb3e1c883f307ebbeb5ebaa63836f8bddf70173382454de6b0d9cb626bb20a5a649fe355a7d25ed5ce27348d5234df27fb9c920b4b4 WHIRLPOOL b05dee0366e35105a7eac143bd4b59e146b0ca369b522e58d2e9a08c8c35b79e929edeacf90154d826dc7ff40ebc7161cc3a6b663e0418388b8f5f5254747066 AUX mesa-8.0-dont-require-llvm-for-r300.patch 916 SHA256 560f224a12b47fb86bd2ecbe7dc32c79e2be9a26321a79921f83527656ed553a SHA512 ce637b9210517375ae2c77981e0882d161e2027801356b80ec31d50157e52eecdb2ca3b9dc3787c789b39005fcd4cf73290e0879bd5e25638d33ef2cd5e443b8 WHIRLPOOL a14401c13deb209f0ce2e72c360a33ece1d87bd62be79ca8fcef46db29d75f0f4e60b5ef0527bf0bf6196d99a6d2f11da332537beb8c7627b1d7e810a3cfb2e8 AUX mesa-8.0.4-configure-bsd.patch 482 SHA256 5e217191f37a49b56d0404605b51a88f0a3ee0a271a74fd8d25e7b6685e57017 SHA512 efc924315b461c310e632068ec31520048e9d22fe6c35fa47e2c650e778114c6757ff9e4095094d6fa0bb4f82f45217ed9f5320a58de1a2559776a159b722631 WHIRLPOOL 46353a6eb942037d20e07007f7dbe68350d3131d58d4065db133b5655fe9cc88142b6d3c7797602d764d40f622830bf578c559f8868965b240a4bf911bafa034 AUX mesa-8.1-dont-require-llvm-for-r300.patch 861 SHA256 7ca0a7135834448ea7ca27903a40bf3b0a39325613f8a66a718407aa28504fbf SHA512 a2e7ed3b9b51c3a9a98d83c8fdeb8b777a4877fac25e969b01ff92d6971c10dda9f64e6310c739597ad7ba04106c72925ee5931417f2b8d764f9bd799efd2142 WHIRLPOOL a82863366507835ec0a6562f70389e0d050fd23ea25e7c113ef4a0e1298a1543afa8c1fa51c90ece83f41ac6f3bda6083fd50b8f1292b863cd320186fba8f732 @@ -19,6 +23,8 @@ AUX mesa-9999-gallium-llvm-DisablePrettyStackTrace.patch 988 SHA256 1cb1cc6ae6f2 AUX mesa-9999-llvm-configure.patch 607 SHA256 f2b445f0c86ab8726ea71eb9070361b1028967cf2fa705980391d5db1e1eeb51 SHA512 bd507fa4a463eae66856f8cfb8b6c07728229d769551d3ba3f055fa73a59035c0c74cc097ec81c2c6d2d469df5294b0a35d7b271d8f3ff93b9d6870af785779e WHIRLPOOL b4b24be587e6d593a871ddcb349ec388674f8aad5bca9f08f0a5977016dc583c0fd6cc8d03d03fcbe9755c93a5dde6e9f006a29f1d16bc7910aa134634b1ef55 DIST MesaLib-10.2.4.tar.bz2 7128555 SHA256 06a2341244eb85c283f59f70161e06ded106f835ed9b6be1ef0243bd9344811a SHA512 b74e9dd8e013b3f1f5bf4d51116e4ed2cb053a91135c57eed10cc87398169665b8e5f83076742da9ea4612f7340e9defd6d2ca2a49d456068cbe81ee3695d24d WHIRLPOOL 9c12021cace338d90fa476517b442a203d833fb8c8203906c3f13d9eb06e11e5109d88954dc36cd61f8898565fe4a076767fb8915190e9c4877faaff762ba292 DIST MesaLib-9.1.6.tar.bz2 6134267 SHA256 e632dff0acafad0a59dc208d16dedb37f7bd58f94c5d58c4b51912e41d005e3d SHA512 b23d0cc3515b56636f73c4d3247212f8c731c967f5ecf8c247a3bd359038ed374c23eb1bb0da17a9152f8b8d984acd134fa9823d9349285287e58676419b4d40 WHIRLPOOL 4e3c07c893060f77cade242d904c1ec4c1c2982b6b3d9ff188b3d809ad8592408c34bd71276f0e8dfa38bce58a82e146b25064cfa50d3ce6d52a7b69a694690a +DIST mesa-10.5.2.tar.xz 6975500 SHA256 2f4b6fb77c3e7d6f861558d0884a3073f575e1e673dad8d1b0624e78e9c4dd44 SHA512 306c242ea0df54cf3e491bafa85da5687c0be35ffa24c5fde8bff5134b0b952667677e3f83fa68aa44a47fd298e2072ad5a7e7e1ad0b79f56bc1d88b8738e614 WHIRLPOOL f08d0e5afc97c98ac479d33a5a9a6f5665da83f173413b9e8b7f0fc0eec8e9bb0eb1e34884c62b561185bfb708966df93579025d21918108d59dbc9d654deaa0 EBUILD mesa-10.2.4.ebuild 14775 SHA256 48a17fca4d23f458d7964cb40560d7affcfafa11e946676dd79c2341469a4222 SHA512 64ce876a10966eb63e5d330c3a437773de08ef5d7fa1a267eebd53b7d49d670379a3fbf08fb079ce1d2583d8fa1044c459717975fea3d78067f6ed63b9b71604 WHIRLPOOL 51623b3495f6f0a6ca3b5a0e0a72707dbc813a3adc7edf8c9e3fd84e131477e60ca828470369eef05df07fd5c89d946d89c474109d8bd3e357ebed01d3c0cca1 +EBUILD mesa-10.5.2.ebuild 12529 SHA256 b64c7585cb6d58e105064bd6d0ff8e89bb6f9ef999bebaa6ba7f25e62e602066 SHA512 fb83282cb94aeb8a63fd3d2a7a21344c05d032e054321bc306542890f6b4a522d185a705fb692ee64821c8907f52d42d6cd23c2f6624af6f91a50f1b4bcb0509 WHIRLPOOL de49be709fb17bc17018d343b3d41dfa7dd9f2faa92910629b584a3ac73729e5f0de0afbfc9f500cb61879e99691758aa96a5f589f1d5ea3d9d895c65f25b119 EBUILD mesa-9.1.6-r100.ebuild 11215 SHA256 1d82be7ea0113b263ade762b21235d87c2732d1afdf7a945d4fe17adec80bd3b SHA512 89f35c0043818e4cb828c066b5759fa59ec528a7397b241a85075da15f66323be6b24ec4473e82f78164bf61788758cc226c6b79133d7de750e94d53bac8e659 WHIRLPOOL e77104786a5321ec122a753d2c68a68d797ed20e88d9b59032cc553fbfd5ef827795f7c276cde88e6e91326bf9afbc259c5c7b92f5bbd4888fe75ae027d5ab59 -EBUILD mesa-9999.ebuild 14918 SHA256 8392343c324c5ddb5e220748f091443d278da5622f529c2ae9ef797d4fc1612d SHA512 bf147afcd1b17faab514a7385dddcd33829748a33c81335e9a6e43dbc6e84a80e0a70dc0a7022f3c86ea33736418425dec97b7e234ec8babc70ffec84ce0dabc WHIRLPOOL f9d8e698aa72df9ad41dc7ce48f9b8479a090d73657dec410f78d6c5d2b6c62b382812d51ea9ec7aa0aed3b38b119a411fbf4584afbd69385d15997495bca769 +EBUILD mesa-9999.ebuild 14924 SHA256 a5d3d9294f1d24a430611de5684a93ed33fdb8273f69f55a659da4dc3c0ef8b9 SHA512 833849256c9ffbaa36cd5a237b7f0dafd3cfdac4a4a5a9302cf197aa70fb607a2b319579f9bc9484c5e7b7e7346d0d508605e8c1de9d9252ba0a669a6abe7dc1 WHIRLPOOL 0f0e447674c11ea00eb59cbcc773d7db04b1d28fe8cfdd6d7d477dcbe16f7d0bcfb1d9b247aac466b4749450adf6bc1b61652401ce29d118d1f6fb350f61c673 diff --git a/media-libs/mesa/files/mesa-10.2-sysfs-instead-of-libudev.patch b/media-libs/mesa/files/mesa-10.2-sysfs-instead-of-libudev.patch new file mode 100644 index 0000000..6eed6ac --- /dev/null +++ b/media-libs/mesa/files/mesa-10.2-sysfs-instead-of-libudev.patch @@ -0,0 +1,378 @@ +From 85b6f36ca5238dd3fec7c5fcacb8b7074ce53c8e Mon Sep 17 00:00:00 2001 +From: Gary Wong <gtw@gnu.org> +Date: Wed, 21 May 2014 21:07:42 -0600 +Subject: loader: add optional /sys filesystem method for PCI identification. + +Introduce a simple PCI identification method of looking up the answer +the /sys filesystem (available on Linux). Attempted after libudev, but +before DRM. + +Disabled by default (available only when the --enable-sysfs configure +option is specified). + +Signed-off-by: Gary Wong <gtw@gnu.org> +Acked-by: Emil Velikov <emil.l.velikov@gmail.com> + +Backported to mesa-10.2.8 by Ian Stakenvicius <axs@gentoo.org> + +--- a/configure.ac ++++ b/configure.ac +@@ -870,14 +870,21 @@ fi + + case "$host_os" in + linux*) +- need_libudev=yes ;; ++ need_pci_id=yes ;; + *) +- need_libudev=no ;; ++ need_pci_id=no ;; + esac + + PKG_CHECK_MODULES([LIBUDEV], [libudev >= $LIBUDEV_REQUIRED], + have_libudev=yes, have_libudev=no) + ++AC_ARG_ENABLE([sysfs], ++ [AS_HELP_STRING([--enable-sysfs], ++ [enable /sys PCI identification @<:@default=disabled@:>@])], ++ [have_sysfs="$enableval"], ++ [have_sysfs=no] ++) ++ + if test "x$enable_dri" = xyes; then + if test "$enable_static" = yes; then + AC_MSG_ERROR([Cannot use static libraries for DRI drivers]) +@@ -973,8 +980,15 @@ xyesno) + ;; + esac + ++have_pci_id=no + if test "$have_libudev" = yes; then + DEFINES="$DEFINES -DHAVE_LIBUDEV" ++ have_pci_id=yes ++fi ++ ++if test "$have_sysfs" = yes; then ++ DEFINES="$DEFINES -DHAVE_SYSFS" ++ have_pci_id=yes + fi + + # This is outside the case (above) so that it is invoked even for non-GLX +@@ -1076,8 +1090,8 @@ if test "x$enable_dri" = xyes; then + DEFINES="$DEFINES -DHAVE_DRI3" + fi + +- if test "x$have_libudev" != xyes; then +- AC_MSG_ERROR([libudev-dev required for building DRI]) ++ if test "x$have_pci_id" != xyes; then ++ AC_MSG_ERROR([libudev-dev or sysfs required for building DRI]) + fi + + case "$host_cpu" in +@@ -1252,8 +1266,8 @@ if test "x$enable_gbm" = xauto; then + esac + fi + if test "x$enable_gbm" = xyes; then +- if test "x$need_libudev$have_libudev" = xyesno; then +- AC_MSG_ERROR([gbm requires udev >= $LIBUDEV_REQUIRED]) ++ if test "x$need_pci_id$have_pci_id" = xyesno; then ++ AC_MSG_ERROR([gbm requires udev >= $LIBUDEV_REQUIRED or sysfs]) + fi + + if test "x$enable_dri" = xyes; then +@@ -1271,7 +1285,7 @@ if test "x$enable_gbm" = xyes; then + fi + fi + AM_CONDITIONAL(HAVE_GBM, test "x$enable_gbm" = xyes) +-if test "x$need_libudev" = xyes; then ++if test "x$need_pci_id$have_libudev" = xyesyes; then + GBM_PC_REQ_PRIV="libudev >= $LIBUDEV_REQUIRED" + else + GBM_PC_REQ_PRIV="" +@@ -1560,9 +1574,9 @@ for plat in $egl_platforms; do + ;; + esac + +- case "$plat$need_libudev$have_libudev" in ++ case "$plat$need_pci_id$have_pci_id" in + waylandyesno|drmyesno) +- AC_MSG_ERROR([cannot build $plat platform without udev >= $LIBUDEV_REQUIRED]) ;; ++ AC_MSG_ERROR([cannot build $plat platform without udev >= $LIBUDEV_REQUIRED or sysfs]) ;; + esac + done + +@@ -1843,8 +1857,8 @@ gallium_require_llvm() { + + gallium_require_drm_loader() { + if test "x$enable_gallium_loader" = xyes; then +- if test "x$need_libudev$have_libudev" = xyesno; then +- AC_MSG_ERROR([Gallium drm loader requires libudev >= $LIBUDEV_REQUIRED]) ++ if test "x$need_pci_id$have_pci_id" = xyesno; then ++ AC_MSG_ERROR([Gallium drm loader requires libudev >= $LIBUDEV_REQUIRED or sysfs]) + fi + if test "x$have_libdrm" != xyes; then + AC_MSG_ERROR([Gallium drm loader requires libdrm >= $LIBDRM_REQUIRED]) +--- a/src/loader/loader.c 2014-09-19 13:03:22.000000000 -0400 ++++ b/src/loader/loader.c 2014-11-25 12:46:51.412249717 -0500 +@@ -71,6 +71,10 @@ + #include <assert.h> + #include <dlfcn.h> + #endif ++#ifdef HAVE_SYSFS ++#include <sys/stat.h> ++#include <sys/types.h> ++#endif + #include "loader.h" + + #ifndef __NOT_HAVE_DRM_H +@@ -113,8 +117,8 @@ + udev_handle = dlopen("libudev.so.0", RTLD_LOCAL | RTLD_LAZY); + + if (!udev_handle) { +- log_(_LOADER_FATAL, "Couldn't dlopen libudev.so.1 or libudev.so.0, " +- "driver detection may be broken.\n"); ++ log_(_LOADER_WARNING, "Couldn't dlopen libudev.so.1 or " ++ "libudev.so.0, driver detection may be broken.\n"); + } + } + } +@@ -122,16 +126,19 @@ + return udev_handle; + } + ++static int dlsym_failed = 0; ++ + static void * +-asserted_dlsym(void *dlopen_handle, const char *name) ++checked_dlsym(void *dlopen_handle, const char *name) + { + void *result = dlsym(dlopen_handle, name); +- assert(result); ++ if (!result) ++ dlsym_failed = 1; + return result; + } + + #define UDEV_SYMBOL(ret, name, args) \ +- ret (*name) args = asserted_dlsym(udev_dlopen_handle(), #name); ++ ret (*name) args = checked_dlsym(udev_dlopen_handle(), #name); + + + static inline struct udev_device * +@@ -142,6 +149,9 @@ + UDEV_SYMBOL(struct udev_device *, udev_device_new_from_devnum, + (struct udev *udev, char type, dev_t devnum)); + ++ if (dlsym_failed) ++ return NULL; ++ + if (fstat(fd, &buf) < 0) { + log_(_LOADER_WARNING, "MESA-LOADER: failed to stat fd %d\n", fd); + return NULL; +@@ -157,8 +167,8 @@ + return device; + } + +-int +-loader_get_pci_id_for_fd(int fd, int *vendor_id, int *chip_id) ++static int ++libudev_get_pci_id_for_fd(int fd, int *vendor_id, int *chip_id) + { + struct udev *udev = NULL; + struct udev_device *device = NULL, *parent; +@@ -174,6 +184,9 @@ + + *chip_id = -1; + ++ if (dlsym_failed) ++ return 0; ++ + udev = udev_new(); + device = udev_device_new_from_fd(udev, fd); + if (!device) +@@ -201,16 +214,76 @@ + + return (*chip_id >= 0); + } ++#endif ++ ++#if defined(HAVE_SYSFS) ++static int ++dev_node_from_fd(int fd, unsigned int *maj, unsigned int *min) ++{ ++ struct stat buf; ++ ++ if (fstat(fd, &buf) < 0) { ++ log_(_LOADER_WARNING, "MESA-LOADER: failed to stat fd %d\n", fd); ++ return -1; ++ } ++ ++ if (!S_ISCHR(buf.st_mode)) { ++ log_(_LOADER_WARNING, "MESA-LOADER: fd %d not a character device\n", fd); ++ return -1; ++ } ++ ++ *maj = major(buf.st_rdev); ++ *min = minor(buf.st_rdev); ++ ++ return 0; ++} ++ ++static int ++sysfs_get_pci_id_for_fd(int fd, int *vendor_id, int *chip_id) ++{ ++ unsigned int maj, min; ++ FILE *f; ++ char buf[0x40]; + +-#elif !defined(__NOT_HAVE_DRM_H) ++ if (dev_node_from_fd(fd, &maj, &min) < 0) { ++ *chip_id = -1; ++ return 0; ++ } + ++ snprintf(buf, sizeof(buf), "/sys/dev/char/%d:%d/device/vendor", maj, min); ++ if (!(f = fopen(buf, "r"))) { ++ *chip_id = -1; ++ return 0; ++ } ++ if (fscanf(f, "%x", vendor_id) != 1) { ++ *chip_id = -1; ++ fclose(f); ++ return 0; ++ } ++ fclose(f); ++ snprintf(buf, sizeof(buf), "/sys/dev/char/%d:%d/device/device", maj, min); ++ if (!(f = fopen(buf, "r"))) { ++ *chip_id = -1; ++ return 0; ++ } ++ if (fscanf(f, "%x", chip_id) != 1) { ++ *chip_id = -1; ++ fclose(f); ++ return 0; ++ } ++ fclose(f); ++ return 1; ++} ++#endif ++ ++#if !defined(__NOT_HAVE_DRM_H) + /* for i915 */ + #include <i915_drm.h> + /* for radeon */ + #include <radeon_drm.h> + +-int +-loader_get_pci_id_for_fd(int fd, int *vendor_id, int *chip_id) ++static int ++drm_get_pci_id_for_fd(int fd, int *vendor_id, int *chip_id) + { + drmVersionPtr version; + +@@ -272,23 +345,33 @@ + + return (*chip_id >= 0); + } ++#endif + +-#else + + int + loader_get_pci_id_for_fd(int fd, int *vendor_id, int *chip_id) + { ++#if HAVE_LIBUDEV ++ if (libudev_get_pci_id_for_fd(fd, vendor_id, chip_id)) ++ return 1; ++#endif ++#if HAVE_SYSFS ++ if (sysfs_get_pci_id_for_fd(fd, vendor_id, chip_id)) ++ return 1; ++#endif ++#if !defined(__NOT_HAVE_DRM_H) ++ if (drm_get_pci_id_for_fd(fd, vendor_id, chip_id)) ++ return 1; ++#endif + return 0; + } + +-#endif +- + +-char * +-loader_get_device_name_for_fd(int fd) ++#ifdef HAVE_LIBUDEV ++static char * ++libudev_get_device_name_for_fd(int fd) + { + char *device_name = NULL; +-#ifdef HAVE_LIBUDEV + struct udev *udev; + struct udev_device *device; + const char *const_device_name; +@@ -312,9 +395,66 @@ + out: + udev_device_unref(device); + udev_unref(udev); ++ return device_name; ++} + #endif ++ ++ ++#if HAVE_SYSFS ++static char * ++sysfs_get_device_name_for_fd(int fd) ++{ ++ char *device_name = NULL; ++ unsigned int maj, min; ++ FILE *f; ++ char buf[0x40]; ++ static const char match[9] = "\0DEVNAME="; ++ int expected = 1; ++ ++ if (dev_node_from_fd(fd, &maj, &min) < 0) ++ return NULL; ++ ++ snprintf(buf, sizeof(buf), "/sys/dev/char/%d:%d/uevent", maj, min); ++ if (!(f = fopen(buf, "r"))) ++ return NULL; ++ ++ while (expected < sizeof(match)) { ++ int c = getc(f); ++ ++ if (c == EOF) { ++ fclose(f); ++ return NULL; ++ } else if (c == match[expected] ) ++ expected++; ++ else ++ expected = 0; ++ } ++ ++ strcpy(buf, "/dev/"); ++ if (fgets(buf + 5, sizeof(buf) - 5, f)) ++ device_name = strdup(buf); ++ ++ fclose(f); + return device_name; + } ++#endif ++ ++ ++char * ++loader_get_device_name_for_fd(int fd) ++{ ++ char *result = NULL; ++ ++#if HAVE_LIBUDEV ++ if ((result = libudev_get_device_name_for_fd(fd))) ++ return result; ++#endif ++#if HAVE_SYSFS ++ if ((result = sysfs_get_device_name_for_fd(fd))) ++ return result; ++#endif ++ return result; ++} + + char * + loader_get_driver_for_fd(int fd, unsigned driver_types) diff --git a/media-libs/mesa/files/mesa-10.3.7-dont-use-clrsb.patch b/media-libs/mesa/files/mesa-10.3.7-dont-use-clrsb.patch new file mode 100644 index 0000000..c38757d --- /dev/null +++ b/media-libs/mesa/files/mesa-10.3.7-dont-use-clrsb.patch @@ -0,0 +1,36 @@ +From 32e98e8ef06f0bb6ad55f9fb5858be77c03367b0 Mon Sep 17 00:00:00 2001 +From: Matt Turner <mattst88@gmail.com> +Date: Mon, 2 Feb 2015 17:26:49 -0800 +Subject: [PATCH] gallium/util: Don't use __builtin_clrsb in util_last_bit(). + +Unclear circumstances lead to undefined symbols on x86. + +Bugzilla: https://bugs.gentoo.org/show_bug.cgi?id=536916 +Cc: mesa-stable@lists.freedesktop.org +Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu> +--- + src/gallium/auxiliary/util/u_math.h | 4 ---- + 1 file changed, 4 deletions(-) + +diff --git a/src/gallium/auxiliary/util/u_math.h b/src/gallium/auxiliary/util/u_math.h +index 19c7343..ca6d0f1 100644 +--- a/src/gallium/auxiliary/util/u_math.h ++++ b/src/gallium/auxiliary/util/u_math.h +@@ -561,14 +561,10 @@ util_last_bit(unsigned u) + static INLINE unsigned + util_last_bit_signed(int i) + { +-#if defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 407) && !defined(__INTEL_COMPILER) +- return 31 - __builtin_clrsb(i); +-#else + if (i >= 0) + return util_last_bit(i); + else + return util_last_bit(~(unsigned)i); +-#endif + } + + /* Destructively loop over all of the bits in a mask as in: +-- +2.0.4 + diff --git a/media-libs/mesa/files/mesa-10.3.7-format_utils.c.patch b/media-libs/mesa/files/mesa-10.3.7-format_utils.c.patch new file mode 100644 index 0000000..e1fba03 --- /dev/null +++ b/media-libs/mesa/files/mesa-10.3.7-format_utils.c.patch @@ -0,0 +1,1089 @@ +From cfeb394224f2daeb2139cf4ec489a4dd8297a44d Mon Sep 17 00:00:00 2001 +From: Brian Paul <brianp@vmware.com> +Date: Fri, 12 Sep 2014 08:31:15 -0600 +Subject: [PATCH] mesa: break up _mesa_swizzle_and_convert() to reduce compile + time + +This reduces gcc -O3 compile time to 1/4 of what it was on my system. +Reduces MSVC release build time too. + +Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com> +--- + src/mesa/main/format_utils.c | 1030 ++++++++++++++++++++++-------------------- + 1 file changed, 550 insertions(+), 480 deletions(-) + +diff --git a/src/mesa/main/format_utils.c b/src/mesa/main/format_utils.c +index 240e3bc..29d779a 100644 +--- a/src/mesa/main/format_utils.c ++++ b/src/mesa/main/format_utils.c +@@ -352,9 +352,14 @@ swizzle_convert_try_memcpy(void *dst, GLenum dst_type, int num_dst_channels, + */ + #define SWIZZLE_CONVERT(DST_TYPE, SRC_TYPE, CONV) \ + do { \ ++ const uint8_t swizzle_x = swizzle[0]; \ ++ const uint8_t swizzle_y = swizzle[1]; \ ++ const uint8_t swizzle_z = swizzle[2]; \ ++ const uint8_t swizzle_w = swizzle[3]; \ + const SRC_TYPE *typed_src = void_src; \ + DST_TYPE *typed_dst = void_dst; \ + DST_TYPE tmp[7]; \ ++ int s, j; \ + tmp[4] = 0; \ + tmp[5] = one; \ + switch (num_dst_channels) { \ +@@ -423,7 +428,527 @@ swizzle_convert_try_memcpy(void *dst, GLenum dst_type, int num_dst_channels, + } \ + break; \ + } \ +- } while (0); ++ } while (0) ++ ++ ++static void ++convert_float(void *void_dst, int num_dst_channels, ++ const void *void_src, GLenum src_type, int num_src_channels, ++ const uint8_t swizzle[4], bool normalized, int count) ++{ ++ const float one = 1.0f; ++ ++ switch (src_type) { ++ case GL_FLOAT: ++ SWIZZLE_CONVERT(float, float, src); ++ break; ++ case GL_HALF_FLOAT: ++ SWIZZLE_CONVERT(float, uint16_t, _mesa_half_to_float(src)); ++ break; ++ case GL_UNSIGNED_BYTE: ++ if (normalized) { ++ SWIZZLE_CONVERT(float, uint8_t, unorm_to_float(src, 8)); ++ } else { ++ SWIZZLE_CONVERT(float, uint8_t, src); ++ } ++ break; ++ case GL_BYTE: ++ if (normalized) { ++ SWIZZLE_CONVERT(float, int8_t, snorm_to_float(src, 8)); ++ } else { ++ SWIZZLE_CONVERT(float, int8_t, src); ++ } ++ break; ++ case GL_UNSIGNED_SHORT: ++ if (normalized) { ++ SWIZZLE_CONVERT(float, uint16_t, unorm_to_float(src, 16)); ++ } else { ++ SWIZZLE_CONVERT(float, uint16_t, src); ++ } ++ break; ++ case GL_SHORT: ++ if (normalized) { ++ SWIZZLE_CONVERT(float, int16_t, snorm_to_float(src, 16)); ++ } else { ++ SWIZZLE_CONVERT(float, int16_t, src); ++ } ++ break; ++ case GL_UNSIGNED_INT: ++ if (normalized) { ++ SWIZZLE_CONVERT(float, uint32_t, unorm_to_float(src, 32)); ++ } else { ++ SWIZZLE_CONVERT(float, uint32_t, src); ++ } ++ break; ++ case GL_INT: ++ if (normalized) { ++ SWIZZLE_CONVERT(float, int32_t, snorm_to_float(src, 32)); ++ } else { ++ SWIZZLE_CONVERT(float, int32_t, src); ++ } ++ break; ++ default: ++ assert(!"Invalid channel type combination"); ++ } ++} ++ ++ ++static void ++convert_half_float(void *void_dst, int num_dst_channels, ++ const void *void_src, GLenum src_type, int num_src_channels, ++ const uint8_t swizzle[4], bool normalized, int count) ++{ ++ const uint16_t one = _mesa_float_to_half(1.0f); ++ ++ switch (src_type) { ++ case GL_FLOAT: ++ SWIZZLE_CONVERT(uint16_t, float, _mesa_float_to_half(src)); ++ break; ++ case GL_HALF_FLOAT: ++ SWIZZLE_CONVERT(uint16_t, uint16_t, src); ++ break; ++ case GL_UNSIGNED_BYTE: ++ if (normalized) { ++ SWIZZLE_CONVERT(uint16_t, uint8_t, unorm_to_half(src, 8)); ++ } else { ++ SWIZZLE_CONVERT(uint16_t, uint8_t, _mesa_float_to_half(src)); ++ } ++ break; ++ case GL_BYTE: ++ if (normalized) { ++ SWIZZLE_CONVERT(uint16_t, int8_t, snorm_to_half(src, 8)); ++ } else { ++ SWIZZLE_CONVERT(uint16_t, int8_t, _mesa_float_to_half(src)); ++ } ++ break; ++ case GL_UNSIGNED_SHORT: ++ if (normalized) { ++ SWIZZLE_CONVERT(uint16_t, uint16_t, unorm_to_half(src, 16)); ++ } else { ++ SWIZZLE_CONVERT(uint16_t, uint16_t, _mesa_float_to_half(src)); ++ } ++ break; ++ case GL_SHORT: ++ if (normalized) { ++ SWIZZLE_CONVERT(uint16_t, int16_t, snorm_to_half(src, 16)); ++ } else { ++ SWIZZLE_CONVERT(uint16_t, int16_t, _mesa_float_to_half(src)); ++ } ++ break; ++ case GL_UNSIGNED_INT: ++ if (normalized) { ++ SWIZZLE_CONVERT(uint16_t, uint32_t, unorm_to_half(src, 32)); ++ } else { ++ SWIZZLE_CONVERT(uint16_t, uint32_t, _mesa_float_to_half(src)); ++ } ++ break; ++ case GL_INT: ++ if (normalized) { ++ SWIZZLE_CONVERT(uint16_t, int32_t, snorm_to_half(src, 32)); ++ } else { ++ SWIZZLE_CONVERT(uint16_t, int32_t, _mesa_float_to_half(src)); ++ } ++ break; ++ default: ++ assert(!"Invalid channel type combination"); ++ } ++} ++ ++ ++static void ++convert_ubyte(void *void_dst, int num_dst_channels, ++ const void *void_src, GLenum src_type, int num_src_channels, ++ const uint8_t swizzle[4], bool normalized, int count) ++{ ++ const uint8_t one = normalized ? UINT8_MAX : 1; ++ ++ switch (src_type) { ++ case GL_FLOAT: ++ if (normalized) { ++ SWIZZLE_CONVERT(uint8_t, float, float_to_unorm(src, 8)); ++ } else { ++ SWIZZLE_CONVERT(uint8_t, float, (src < 0) ? 0 : src); ++ } ++ break; ++ case GL_HALF_FLOAT: ++ if (normalized) { ++ SWIZZLE_CONVERT(uint8_t, uint16_t, half_to_unorm(src, 8)); ++ } else { ++ SWIZZLE_CONVERT(uint8_t, uint16_t, half_to_uint(src)); ++ } ++ break; ++ case GL_UNSIGNED_BYTE: ++ SWIZZLE_CONVERT(uint8_t, uint8_t, src); ++ break; ++ case GL_BYTE: ++ if (normalized) { ++ SWIZZLE_CONVERT(uint8_t, int8_t, snorm_to_unorm(src, 8, 8)); ++ } else { ++ SWIZZLE_CONVERT(uint8_t, int8_t, (src < 0) ? 0 : src); ++ } ++ break; ++ case GL_UNSIGNED_SHORT: ++ if (normalized) { ++ SWIZZLE_CONVERT(uint8_t, uint16_t, unorm_to_unorm(src, 16, 8)); ++ } else { ++ SWIZZLE_CONVERT(uint8_t, uint16_t, src); ++ } ++ break; ++ case GL_SHORT: ++ if (normalized) { ++ SWIZZLE_CONVERT(uint8_t, int16_t, snorm_to_unorm(src, 16, 8)); ++ } else { ++ SWIZZLE_CONVERT(uint8_t, int16_t, (src < 0) ? 0 : src); ++ } ++ break; ++ case GL_UNSIGNED_INT: ++ if (normalized) { ++ SWIZZLE_CONVERT(uint8_t, uint32_t, unorm_to_unorm(src, 32, 8)); ++ } else { ++ SWIZZLE_CONVERT(uint8_t, uint32_t, src); ++ } ++ break; ++ case GL_INT: ++ if (normalized) { ++ SWIZZLE_CONVERT(uint8_t, int32_t, snorm_to_unorm(src, 32, 8)); ++ } else { ++ SWIZZLE_CONVERT(uint8_t, int32_t, (src < 0) ? 0 : src); ++ } ++ break; ++ default: ++ assert(!"Invalid channel type combination"); ++ } ++} ++ ++ ++static void ++convert_byte(void *void_dst, int num_dst_channels, ++ const void *void_src, GLenum src_type, int num_src_channels, ++ const uint8_t swizzle[4], bool normalized, int count) ++{ ++ const int8_t one = normalized ? INT8_MAX : 1; ++ ++ switch (src_type) { ++ case GL_FLOAT: ++ if (normalized) { ++ SWIZZLE_CONVERT(uint8_t, float, float_to_snorm(src, 8)); ++ } else { ++ SWIZZLE_CONVERT(uint8_t, float, src); ++ } ++ break; ++ case GL_HALF_FLOAT: ++ if (normalized) { ++ SWIZZLE_CONVERT(uint8_t, uint16_t, half_to_snorm(src, 8)); ++ } else { ++ SWIZZLE_CONVERT(uint8_t, uint16_t, _mesa_half_to_float(src)); ++ } ++ break; ++ case GL_UNSIGNED_BYTE: ++ if (normalized) { ++ SWIZZLE_CONVERT(int8_t, uint8_t, unorm_to_snorm(src, 8, 8)); ++ } else { ++ SWIZZLE_CONVERT(int8_t, uint8_t, src); ++ } ++ break; ++ case GL_BYTE: ++ SWIZZLE_CONVERT(int8_t, int8_t, src); ++ break; ++ case GL_UNSIGNED_SHORT: ++ if (normalized) { ++ SWIZZLE_CONVERT(int8_t, uint16_t, unorm_to_snorm(src, 16, 8)); ++ } else { ++ SWIZZLE_CONVERT(int8_t, uint16_t, src); ++ } ++ break; ++ case GL_SHORT: ++ if (normalized) { ++ SWIZZLE_CONVERT(int8_t, int16_t, snorm_to_snorm(src, 16, 8)); ++ } else { ++ SWIZZLE_CONVERT(int8_t, int16_t, src); ++ } ++ break; ++ case GL_UNSIGNED_INT: ++ if (normalized) { ++ SWIZZLE_CONVERT(int8_t, uint32_t, unorm_to_snorm(src, 32, 8)); ++ } else { ++ SWIZZLE_CONVERT(int8_t, uint32_t, src); ++ } ++ break; ++ case GL_INT: ++ if (normalized) { ++ SWIZZLE_CONVERT(int8_t, int32_t, snorm_to_snorm(src, 32, 8)); ++ } else { ++ SWIZZLE_CONVERT(int8_t, int32_t, src); ++ } ++ break; ++ default: ++ assert(!"Invalid channel type combination"); ++ } ++} ++ ++ ++static void ++convert_ushort(void *void_dst, int num_dst_channels, ++ const void *void_src, GLenum src_type, int num_src_channels, ++ const uint8_t swizzle[4], bool normalized, int count) ++{ ++ const uint16_t one = normalized ? UINT16_MAX : 1; ++ ++ switch (src_type) { ++ case GL_FLOAT: ++ if (normalized) { ++ SWIZZLE_CONVERT(uint16_t, float, float_to_unorm(src, 16)); ++ } else { ++ SWIZZLE_CONVERT(uint16_t, float, (src < 0) ? 0 : src); ++ } ++ break; ++ case GL_HALF_FLOAT: ++ if (normalized) { ++ SWIZZLE_CONVERT(uint16_t, uint16_t, half_to_unorm(src, 16)); ++ } else { ++ SWIZZLE_CONVERT(uint16_t, uint16_t, half_to_uint(src)); ++ } ++ break; ++ case GL_UNSIGNED_BYTE: ++ if (normalized) { ++ SWIZZLE_CONVERT(uint16_t, uint8_t, unorm_to_unorm(src, 8, 16)); ++ } else { ++ SWIZZLE_CONVERT(uint16_t, uint8_t, src); ++ } ++ break; ++ case GL_BYTE: ++ if (normalized) { ++ SWIZZLE_CONVERT(uint16_t, int8_t, snorm_to_unorm(src, 8, 16)); ++ } else { ++ SWIZZLE_CONVERT(uint16_t, int8_t, (src < 0) ? 0 : src); ++ } ++ break; ++ case GL_UNSIGNED_SHORT: ++ SWIZZLE_CONVERT(uint16_t, uint16_t, src); ++ break; ++ case GL_SHORT: ++ if (normalized) { ++ SWIZZLE_CONVERT(uint16_t, int16_t, snorm_to_unorm(src, 16, 16)); ++ } else { ++ SWIZZLE_CONVERT(uint16_t, int16_t, (src < 0) ? 0 : src); ++ } ++ break; ++ case GL_UNSIGNED_INT: ++ if (normalized) { ++ SWIZZLE_CONVERT(uint16_t, uint32_t, unorm_to_unorm(src, 32, 16)); ++ } else { ++ SWIZZLE_CONVERT(uint16_t, uint32_t, src); ++ } ++ break; ++ case GL_INT: ++ if (normalized) { ++ SWIZZLE_CONVERT(uint16_t, int32_t, snorm_to_unorm(src, 32, 16)); ++ } else { ++ SWIZZLE_CONVERT(uint16_t, int32_t, (src < 0) ? 0 : src); ++ } ++ break; ++ default: ++ assert(!"Invalid channel type combination"); ++ } ++} ++ ++ ++static void ++convert_short(void *void_dst, int num_dst_channels, ++ const void *void_src, GLenum src_type, int num_src_channels, ++ const uint8_t swizzle[4], bool normalized, int count) ++{ ++ const int16_t one = normalized ? INT16_MAX : 1; ++ ++ switch (src_type) { ++ case GL_FLOAT: ++ if (normalized) { ++ SWIZZLE_CONVERT(uint16_t, float, float_to_snorm(src, 16)); ++ } else { ++ SWIZZLE_CONVERT(uint16_t, float, src); ++ } ++ break; ++ case GL_HALF_FLOAT: ++ if (normalized) { ++ SWIZZLE_CONVERT(uint16_t, uint16_t, half_to_snorm(src, 16)); ++ } else { ++ SWIZZLE_CONVERT(uint16_t, uint16_t, _mesa_half_to_float(src)); ++ } ++ break; ++ case GL_UNSIGNED_BYTE: ++ if (normalized) { ++ SWIZZLE_CONVERT(int16_t, uint8_t, unorm_to_snorm(src, 8, 16)); ++ } else { ++ SWIZZLE_CONVERT(int16_t, uint8_t, src); ++ } ++ break; ++ case GL_BYTE: ++ if (normalized) { ++ SWIZZLE_CONVERT(int16_t, int8_t, snorm_to_snorm(src, 8, 16)); ++ } else { ++ SWIZZLE_CONVERT(int16_t, int8_t, src); ++ } ++ break; ++ case GL_UNSIGNED_SHORT: ++ if (normalized) { ++ SWIZZLE_CONVERT(int16_t, uint16_t, unorm_to_snorm(src, 16, 16)); ++ } else { ++ SWIZZLE_CONVERT(int16_t, uint16_t, src); ++ } ++ break; ++ case GL_SHORT: ++ SWIZZLE_CONVERT(int16_t, int16_t, src); ++ break; ++ case GL_UNSIGNED_INT: ++ if (normalized) { ++ SWIZZLE_CONVERT(int16_t, uint32_t, unorm_to_snorm(src, 32, 16)); ++ } else { ++ SWIZZLE_CONVERT(int16_t, uint32_t, src); ++ } ++ break; ++ case GL_INT: ++ if (normalized) { ++ SWIZZLE_CONVERT(int16_t, int32_t, snorm_to_snorm(src, 32, 16)); ++ } else { ++ SWIZZLE_CONVERT(int16_t, int32_t, src); ++ } ++ break; ++ default: ++ assert(!"Invalid channel type combination"); ++ } ++} ++ ++static void ++convert_uint(void *void_dst, int num_dst_channels, ++ const void *void_src, GLenum src_type, int num_src_channels, ++ const uint8_t swizzle[4], bool normalized, int count) ++{ ++ const uint32_t one = normalized ? UINT32_MAX : 1; ++ ++ switch (src_type) { ++ case GL_FLOAT: ++ if (normalized) { ++ SWIZZLE_CONVERT(uint32_t, float, float_to_unorm(src, 32)); ++ } else { ++ SWIZZLE_CONVERT(uint32_t, float, (src < 0) ? 0 : src); ++ } ++ break; ++ case GL_HALF_FLOAT: ++ if (normalized) { ++ SWIZZLE_CONVERT(uint32_t, uint16_t, half_to_unorm(src, 32)); ++ } else { ++ SWIZZLE_CONVERT(uint32_t, uint16_t, half_to_uint(src)); ++ } ++ break; ++ case GL_UNSIGNED_BYTE: ++ if (normalized) { ++ SWIZZLE_CONVERT(uint32_t, uint8_t, unorm_to_unorm(src, 8, 32)); ++ } else { ++ SWIZZLE_CONVERT(uint32_t, uint8_t, src); ++ } ++ break; ++ case GL_BYTE: ++ if (normalized) { ++ SWIZZLE_CONVERT(uint32_t, int8_t, snorm_to_unorm(src, 8, 32)); ++ } else { ++ SWIZZLE_CONVERT(uint32_t, int8_t, (src < 0) ? 0 : src); ++ } ++ break; ++ case GL_UNSIGNED_SHORT: ++ if (normalized) { ++ SWIZZLE_CONVERT(uint32_t, uint16_t, unorm_to_unorm(src, 16, 32)); ++ } else { ++ SWIZZLE_CONVERT(uint32_t, uint16_t, src); ++ } ++ break; ++ case GL_SHORT: ++ if (normalized) { ++ SWIZZLE_CONVERT(uint32_t, int16_t, snorm_to_unorm(src, 16, 32)); ++ } else { ++ SWIZZLE_CONVERT(uint32_t, int16_t, (src < 0) ? 0 : src); ++ } ++ break; ++ case GL_UNSIGNED_INT: ++ SWIZZLE_CONVERT(uint32_t, uint32_t, src); ++ break; ++ case GL_INT: ++ if (normalized) { ++ SWIZZLE_CONVERT(uint32_t, int32_t, snorm_to_unorm(src, 32, 32)); ++ } else { ++ SWIZZLE_CONVERT(uint32_t, int32_t, (src < 0) ? 0 : src); ++ } ++ break; ++ default: ++ assert(!"Invalid channel type combination"); ++ } ++} ++ ++ ++static void ++convert_int(void *void_dst, int num_dst_channels, ++ const void *void_src, GLenum src_type, int num_src_channels, ++ const uint8_t swizzle[4], bool normalized, int count) ++{ ++ const int32_t one = normalized ? INT32_MAX : 12; ++ ++ switch (src_type) { ++ case GL_FLOAT: ++ if (normalized) { ++ SWIZZLE_CONVERT(uint32_t, float, float_to_snorm(src, 32)); ++ } else { ++ SWIZZLE_CONVERT(uint32_t, float, src); ++ } ++ break; ++ case GL_HALF_FLOAT: ++ if (normalized) { ++ SWIZZLE_CONVERT(uint32_t, uint16_t, half_to_snorm(src, 32)); ++ } else { ++ SWIZZLE_CONVERT(uint32_t, uint16_t, _mesa_half_to_float(src)); ++ } ++ break; ++ case GL_UNSIGNED_BYTE: ++ if (normalized) { ++ SWIZZLE_CONVERT(int32_t, uint8_t, unorm_to_snorm(src, 8, 32)); ++ } else { ++ SWIZZLE_CONVERT(int32_t, uint8_t, src); ++ } ++ break; ++ case GL_BYTE: ++ if (normalized) { ++ SWIZZLE_CONVERT(int32_t, int8_t, snorm_to_snorm(src, 8, 32)); ++ } else { ++ SWIZZLE_CONVERT(int32_t, int8_t, src); ++ } ++ break; ++ case GL_UNSIGNED_SHORT: ++ if (normalized) { ++ SWIZZLE_CONVERT(int32_t, uint16_t, unorm_to_snorm(src, 16, 32)); ++ } else { ++ SWIZZLE_CONVERT(int32_t, uint16_t, src); ++ } ++ break; ++ case GL_SHORT: ++ if (normalized) { ++ SWIZZLE_CONVERT(int32_t, int16_t, snorm_to_snorm(src, 16, 32)); ++ } else { ++ SWIZZLE_CONVERT(int32_t, int16_t, src); ++ } ++ break; ++ case GL_UNSIGNED_INT: ++ if (normalized) { ++ SWIZZLE_CONVERT(int32_t, uint32_t, unorm_to_snorm(src, 32, 32)); ++ } else { ++ SWIZZLE_CONVERT(int32_t, uint32_t, src); ++ } ++ break; ++ case GL_INT: ++ SWIZZLE_CONVERT(int32_t, int32_t, src); ++ break; ++ default: ++ assert(!"Invalid channel type combination"); ++ } ++} ++ + + /** + * Convert between array-based color formats. +@@ -478,499 +1003,44 @@ _mesa_swizzle_and_convert(void *void_dst, GLenum dst_type, int num_dst_channels, + const void *void_src, GLenum src_type, int num_src_channels, + const uint8_t swizzle[4], bool normalized, int count) + { +- int s, j; +- register uint8_t swizzle_x, swizzle_y, swizzle_z, swizzle_w; +- + if (swizzle_convert_try_memcpy(void_dst, dst_type, num_dst_channels, + void_src, src_type, num_src_channels, + swizzle, normalized, count)) + return; + +- swizzle_x = swizzle[0]; +- swizzle_y = swizzle[1]; +- swizzle_z = swizzle[2]; +- swizzle_w = swizzle[3]; +- + switch (dst_type) { + case GL_FLOAT: +- { +- const float one = 1.0f; +- switch (src_type) { +- case GL_FLOAT: +- SWIZZLE_CONVERT(float, float, src) +- break; +- case GL_HALF_FLOAT: +- SWIZZLE_CONVERT(float, uint16_t, _mesa_half_to_float(src)) +- break; +- case GL_UNSIGNED_BYTE: +- if (normalized) { +- SWIZZLE_CONVERT(float, uint8_t, unorm_to_float(src, 8)) +- } else { +- SWIZZLE_CONVERT(float, uint8_t, src) +- } +- break; +- case GL_BYTE: +- if (normalized) { +- SWIZZLE_CONVERT(float, int8_t, snorm_to_float(src, 8)) +- } else { +- SWIZZLE_CONVERT(float, int8_t, src) +- } +- break; +- case GL_UNSIGNED_SHORT: +- if (normalized) { +- SWIZZLE_CONVERT(float, uint16_t, unorm_to_float(src, 16)) +- } else { +- SWIZZLE_CONVERT(float, uint16_t, src) +- } +- break; +- case GL_SHORT: +- if (normalized) { +- SWIZZLE_CONVERT(float, int16_t, snorm_to_float(src, 16)) +- } else { +- SWIZZLE_CONVERT(float, int16_t, src) +- } +- break; +- case GL_UNSIGNED_INT: +- if (normalized) { +- SWIZZLE_CONVERT(float, uint32_t, unorm_to_float(src, 32)) +- } else { +- SWIZZLE_CONVERT(float, uint32_t, src) +- } +- break; +- case GL_INT: +- if (normalized) { +- SWIZZLE_CONVERT(float, int32_t, snorm_to_float(src, 32)) +- } else { +- SWIZZLE_CONVERT(float, int32_t, src) +- } +- break; +- default: +- assert(!"Invalid channel type combination"); +- } +- } +- break; ++ convert_float(void_dst, num_dst_channels, void_src, src_type, ++ num_src_channels, swizzle, normalized, count); ++ break; + case GL_HALF_FLOAT: +- { +- const uint16_t one = _mesa_float_to_half(1.0f); +- switch (src_type) { +- case GL_FLOAT: +- SWIZZLE_CONVERT(uint16_t, float, _mesa_float_to_half(src)) +- break; +- case GL_HALF_FLOAT: +- SWIZZLE_CONVERT(uint16_t, uint16_t, src) +- break; +- case GL_UNSIGNED_BYTE: +- if (normalized) { +- SWIZZLE_CONVERT(uint16_t, uint8_t, unorm_to_half(src, 8)) +- } else { +- SWIZZLE_CONVERT(uint16_t, uint8_t, _mesa_float_to_half(src)) +- } +- break; +- case GL_BYTE: +- if (normalized) { +- SWIZZLE_CONVERT(uint16_t, int8_t, snorm_to_half(src, 8)) +- } else { +- SWIZZLE_CONVERT(uint16_t, int8_t, _mesa_float_to_half(src)) +- } +- break; +- case GL_UNSIGNED_SHORT: +- if (normalized) { +- SWIZZLE_CONVERT(uint16_t, uint16_t, unorm_to_half(src, 16)) +- } else { +- SWIZZLE_CONVERT(uint16_t, uint16_t, _mesa_float_to_half(src)) +- } +- break; +- case GL_SHORT: +- if (normalized) { +- SWIZZLE_CONVERT(uint16_t, int16_t, snorm_to_half(src, 16)) +- } else { +- SWIZZLE_CONVERT(uint16_t, int16_t, _mesa_float_to_half(src)) +- } +- break; +- case GL_UNSIGNED_INT: +- if (normalized) { +- SWIZZLE_CONVERT(uint16_t, uint32_t, unorm_to_half(src, 32)) +- } else { +- SWIZZLE_CONVERT(uint16_t, uint32_t, _mesa_float_to_half(src)) +- } +- break; +- case GL_INT: +- if (normalized) { +- SWIZZLE_CONVERT(uint16_t, int32_t, snorm_to_half(src, 32)) +- } else { +- SWIZZLE_CONVERT(uint16_t, int32_t, _mesa_float_to_half(src)) +- } +- break; +- default: +- assert(!"Invalid channel type combination"); +- } +- } +- break; ++ convert_half_float(void_dst, num_dst_channels, void_src, src_type, ++ num_src_channels, swizzle, normalized, count); ++ break; + case GL_UNSIGNED_BYTE: +- { +- const uint8_t one = normalized ? UINT8_MAX : 1; +- switch (src_type) { +- case GL_FLOAT: +- if (normalized) { +- SWIZZLE_CONVERT(uint8_t, float, float_to_unorm(src, 8)) +- } else { +- SWIZZLE_CONVERT(uint8_t, float, (src < 0) ? 0 : src) +- } +- break; +- case GL_HALF_FLOAT: +- if (normalized) { +- SWIZZLE_CONVERT(uint8_t, uint16_t, half_to_unorm(src, 8)) +- } else { +- SWIZZLE_CONVERT(uint8_t, uint16_t, half_to_uint(src)) +- } +- break; +- case GL_UNSIGNED_BYTE: +- SWIZZLE_CONVERT(uint8_t, uint8_t, src) +- break; +- case GL_BYTE: +- if (normalized) { +- SWIZZLE_CONVERT(uint8_t, int8_t, snorm_to_unorm(src, 8, 8)) +- } else { +- SWIZZLE_CONVERT(uint8_t, int8_t, (src < 0) ? 0 : src) +- } +- break; +- case GL_UNSIGNED_SHORT: +- if (normalized) { +- SWIZZLE_CONVERT(uint8_t, uint16_t, unorm_to_unorm(src, 16, 8)) +- } else { +- SWIZZLE_CONVERT(uint8_t, uint16_t, src) +- } +- break; +- case GL_SHORT: +- if (normalized) { +- SWIZZLE_CONVERT(uint8_t, int16_t, snorm_to_unorm(src, 16, 8)) +- } else { +- SWIZZLE_CONVERT(uint8_t, int16_t, (src < 0) ? 0 : src) +- } +- break; +- case GL_UNSIGNED_INT: +- if (normalized) { +- SWIZZLE_CONVERT(uint8_t, uint32_t, unorm_to_unorm(src, 32, 8)) +- } else { +- SWIZZLE_CONVERT(uint8_t, uint32_t, src) +- } +- break; +- case GL_INT: +- if (normalized) { +- SWIZZLE_CONVERT(uint8_t, int32_t, snorm_to_unorm(src, 32, 8)) +- } else { +- SWIZZLE_CONVERT(uint8_t, int32_t, (src < 0) ? 0 : src) +- } +- break; +- default: +- assert(!"Invalid channel type combination"); +- } +- } +- break; ++ convert_ubyte(void_dst, num_dst_channels, void_src, src_type, ++ num_src_channels, swizzle, normalized, count); ++ break; + case GL_BYTE: +- { +- const int8_t one = normalized ? INT8_MAX : 1; +- switch (src_type) { +- case GL_FLOAT: +- if (normalized) { +- SWIZZLE_CONVERT(uint8_t, float, float_to_snorm(src, 8)) +- } else { +- SWIZZLE_CONVERT(uint8_t, float, src) +- } +- break; +- case GL_HALF_FLOAT: +- if (normalized) { +- SWIZZLE_CONVERT(uint8_t, uint16_t, half_to_snorm(src, 8)) +- } else { +- SWIZZLE_CONVERT(uint8_t, uint16_t, _mesa_half_to_float(src)) +- } +- break; +- case GL_UNSIGNED_BYTE: +- if (normalized) { +- SWIZZLE_CONVERT(int8_t, uint8_t, unorm_to_snorm(src, 8, 8)) +- } else { +- SWIZZLE_CONVERT(int8_t, uint8_t, src) +- } +- break; +- case GL_BYTE: +- SWIZZLE_CONVERT(int8_t, int8_t, src) +- break; +- case GL_UNSIGNED_SHORT: +- if (normalized) { +- SWIZZLE_CONVERT(int8_t, uint16_t, unorm_to_snorm(src, 16, 8)) +- } else { +- SWIZZLE_CONVERT(int8_t, uint16_t, src) +- } +- break; +- case GL_SHORT: +- if (normalized) { +- SWIZZLE_CONVERT(int8_t, int16_t, snorm_to_snorm(src, 16, 8)) +- } else { +- SWIZZLE_CONVERT(int8_t, int16_t, src) +- } +- break; +- case GL_UNSIGNED_INT: +- if (normalized) { +- SWIZZLE_CONVERT(int8_t, uint32_t, unorm_to_snorm(src, 32, 8)) +- } else { +- SWIZZLE_CONVERT(int8_t, uint32_t, src) +- } +- break; +- case GL_INT: +- if (normalized) { +- SWIZZLE_CONVERT(int8_t, int32_t, snorm_to_snorm(src, 32, 8)) +- } else { +- SWIZZLE_CONVERT(int8_t, int32_t, src) +- } +- break; +- default: +- assert(!"Invalid channel type combination"); +- } +- } +- break; ++ convert_byte(void_dst, num_dst_channels, void_src, src_type, ++ num_src_channels, swizzle, normalized, count); ++ break; + case GL_UNSIGNED_SHORT: +- { +- const uint16_t one = normalized ? UINT16_MAX : 1; +- switch (src_type) { +- case GL_FLOAT: +- if (normalized) { +- SWIZZLE_CONVERT(uint16_t, float, float_to_unorm(src, 16)) +- } else { +- SWIZZLE_CONVERT(uint16_t, float, (src < 0) ? 0 : src) +- } +- break; +- case GL_HALF_FLOAT: +- if (normalized) { +- SWIZZLE_CONVERT(uint16_t, uint16_t, half_to_unorm(src, 16)) +- } else { +- SWIZZLE_CONVERT(uint16_t, uint16_t, half_to_uint(src)) +- } +- break; +- case GL_UNSIGNED_BYTE: +- if (normalized) { +- SWIZZLE_CONVERT(uint16_t, uint8_t, unorm_to_unorm(src, 8, 16)) +- } else { +- SWIZZLE_CONVERT(uint16_t, uint8_t, src) +- } +- break; +- case GL_BYTE: +- if (normalized) { +- SWIZZLE_CONVERT(uint16_t, int8_t, snorm_to_unorm(src, 8, 16)) +- } else { +- SWIZZLE_CONVERT(uint16_t, int8_t, (src < 0) ? 0 : src) +- } +- break; +- case GL_UNSIGNED_SHORT: +- SWIZZLE_CONVERT(uint16_t, uint16_t, src) +- break; +- case GL_SHORT: +- if (normalized) { +- SWIZZLE_CONVERT(uint16_t, int16_t, snorm_to_unorm(src, 16, 16)) +- } else { +- SWIZZLE_CONVERT(uint16_t, int16_t, (src < 0) ? 0 : src) +- } +- break; +- case GL_UNSIGNED_INT: +- if (normalized) { +- SWIZZLE_CONVERT(uint16_t, uint32_t, unorm_to_unorm(src, 32, 16)) +- } else { +- SWIZZLE_CONVERT(uint16_t, uint32_t, src) +- } +- break; +- case GL_INT: +- if (normalized) { +- SWIZZLE_CONVERT(uint16_t, int32_t, snorm_to_unorm(src, 32, 16)) +- } else { +- SWIZZLE_CONVERT(uint16_t, int32_t, (src < 0) ? 0 : src) +- } +- break; +- default: +- assert(!"Invalid channel type combination"); +- } +- } +- break; ++ convert_ushort(void_dst, num_dst_channels, void_src, src_type, ++ num_src_channels, swizzle, normalized, count); ++ break; + case GL_SHORT: +- { +- const int16_t one = normalized ? INT16_MAX : 1; +- switch (src_type) { +- case GL_FLOAT: +- if (normalized) { +- SWIZZLE_CONVERT(uint16_t, float, float_to_snorm(src, 16)) +- } else { +- SWIZZLE_CONVERT(uint16_t, float, src) +- } +- break; +- case GL_HALF_FLOAT: +- if (normalized) { +- SWIZZLE_CONVERT(uint16_t, uint16_t, half_to_snorm(src, 16)) +- } else { +- SWIZZLE_CONVERT(uint16_t, uint16_t, _mesa_half_to_float(src)) +- } +- break; +- case GL_UNSIGNED_BYTE: +- if (normalized) { +- SWIZZLE_CONVERT(int16_t, uint8_t, unorm_to_snorm(src, 8, 16)) +- } else { +- SWIZZLE_CONVERT(int16_t, uint8_t, src) +- } +- break; +- case GL_BYTE: +- if (normalized) { +- SWIZZLE_CONVERT(int16_t, int8_t, snorm_to_snorm(src, 8, 16)) +- } else { +- SWIZZLE_CONVERT(int16_t, int8_t, src) +- } +- break; +- case GL_UNSIGNED_SHORT: +- if (normalized) { +- SWIZZLE_CONVERT(int16_t, uint16_t, unorm_to_snorm(src, 16, 16)) +- } else { +- SWIZZLE_CONVERT(int16_t, uint16_t, src) +- } +- break; +- case GL_SHORT: +- SWIZZLE_CONVERT(int16_t, int16_t, src) +- break; +- case GL_UNSIGNED_INT: +- if (normalized) { +- SWIZZLE_CONVERT(int16_t, uint32_t, unorm_to_snorm(src, 32, 16)) +- } else { +- SWIZZLE_CONVERT(int16_t, uint32_t, src) +- } +- break; +- case GL_INT: +- if (normalized) { +- SWIZZLE_CONVERT(int16_t, int32_t, snorm_to_snorm(src, 32, 16)) +- } else { +- SWIZZLE_CONVERT(int16_t, int32_t, src) +- } +- break; +- default: +- assert(!"Invalid channel type combination"); +- } +- } +- break; ++ convert_short(void_dst, num_dst_channels, void_src, src_type, ++ num_src_channels, swizzle, normalized, count); ++ break; + case GL_UNSIGNED_INT: +- { +- const uint32_t one = normalized ? UINT32_MAX : 1; +- switch (src_type) { case GL_FLOAT: +- if (normalized) { +- SWIZZLE_CONVERT(uint32_t, float, float_to_unorm(src, 32)) +- } else { +- SWIZZLE_CONVERT(uint32_t, float, (src < 0) ? 0 : src) +- } +- break; +- case GL_HALF_FLOAT: +- if (normalized) { +- SWIZZLE_CONVERT(uint32_t, uint16_t, half_to_unorm(src, 32)) +- } else { +- SWIZZLE_CONVERT(uint32_t, uint16_t, half_to_uint(src)) +- } +- break; +- case GL_UNSIGNED_BYTE: +- if (normalized) { +- SWIZZLE_CONVERT(uint32_t, uint8_t, unorm_to_unorm(src, 8, 32)) +- } else { +- SWIZZLE_CONVERT(uint32_t, uint8_t, src) +- } +- break; +- case GL_BYTE: +- if (normalized) { +- SWIZZLE_CONVERT(uint32_t, int8_t, snorm_to_unorm(src, 8, 32)) +- } else { +- SWIZZLE_CONVERT(uint32_t, int8_t, (src < 0) ? 0 : src) +- } +- break; +- case GL_UNSIGNED_SHORT: +- if (normalized) { +- SWIZZLE_CONVERT(uint32_t, uint16_t, unorm_to_unorm(src, 16, 32)) +- } else { +- SWIZZLE_CONVERT(uint32_t, uint16_t, src) +- } +- break; +- case GL_SHORT: +- if (normalized) { +- SWIZZLE_CONVERT(uint32_t, int16_t, snorm_to_unorm(src, 16, 32)) +- } else { +- SWIZZLE_CONVERT(uint32_t, int16_t, (src < 0) ? 0 : src) +- } +- break; +- case GL_UNSIGNED_INT: +- SWIZZLE_CONVERT(uint32_t, uint32_t, src) +- break; +- case GL_INT: +- if (normalized) { +- SWIZZLE_CONVERT(uint32_t, int32_t, snorm_to_unorm(src, 32, 32)) +- } else { +- SWIZZLE_CONVERT(uint32_t, int32_t, (src < 0) ? 0 : src) +- } +- break; +- default: +- assert(!"Invalid channel type combination"); +- } +- } +- break; ++ convert_uint(void_dst, num_dst_channels, void_src, src_type, ++ num_src_channels, swizzle, normalized, count); ++ break; + case GL_INT: +- { +- const int32_t one = normalized ? INT32_MAX : 1; +- switch (src_type) { +- case GL_FLOAT: +- if (normalized) { +- SWIZZLE_CONVERT(uint32_t, float, float_to_snorm(src, 32)) +- } else { +- SWIZZLE_CONVERT(uint32_t, float, src) +- } +- break; +- case GL_HALF_FLOAT: +- if (normalized) { +- SWIZZLE_CONVERT(uint32_t, uint16_t, half_to_snorm(src, 32)) +- } else { +- SWIZZLE_CONVERT(uint32_t, uint16_t, _mesa_half_to_float(src)) +- } +- break; +- case GL_UNSIGNED_BYTE: +- if (normalized) { +- SWIZZLE_CONVERT(int32_t, uint8_t, unorm_to_snorm(src, 8, 32)) +- } else { +- SWIZZLE_CONVERT(int32_t, uint8_t, src) +- } +- break; +- case GL_BYTE: +- if (normalized) { +- SWIZZLE_CONVERT(int32_t, int8_t, snorm_to_snorm(src, 8, 32)) +- } else { +- SWIZZLE_CONVERT(int32_t, int8_t, src) +- } +- break; +- case GL_UNSIGNED_SHORT: +- if (normalized) { +- SWIZZLE_CONVERT(int32_t, uint16_t, unorm_to_snorm(src, 16, 32)) +- } else { +- SWIZZLE_CONVERT(int32_t, uint16_t, src) +- } +- break; +- case GL_SHORT: +- if (normalized) { +- SWIZZLE_CONVERT(int32_t, int16_t, snorm_to_snorm(src, 16, 32)) +- } else { +- SWIZZLE_CONVERT(int32_t, int16_t, src) +- } +- break; +- case GL_UNSIGNED_INT: +- if (normalized) { +- SWIZZLE_CONVERT(int32_t, uint32_t, unorm_to_snorm(src, 32, 32)) +- } else { +- SWIZZLE_CONVERT(int32_t, uint32_t, src) +- } +- break; +- case GL_INT: +- SWIZZLE_CONVERT(int32_t, int32_t, src) +- break; +- default: +- assert(!"Invalid channel type combination"); +- } +- } +- break; ++ convert_int(void_dst, num_dst_channels, void_src, src_type, ++ num_src_channels, swizzle, normalized, count); ++ break; + default: + assert(!"Invalid channel type"); + } +-- +2.0.5 + diff --git a/media-libs/mesa/files/mesa-10.5.1-fstat-include.patch b/media-libs/mesa/files/mesa-10.5.1-fstat-include.patch new file mode 100644 index 0000000..212d00d --- /dev/null +++ b/media-libs/mesa/files/mesa-10.5.1-fstat-include.patch @@ -0,0 +1,37 @@ +From 771cd266b9d00bdcf2cf7acaa3c8363c358d7478 Mon Sep 17 00:00:00 2001 +From: Emil Velikov <emil.l.velikov@gmail.com> +Date: Wed, 11 Mar 2015 19:12:35 +0000 +Subject: loader: include <sys/stat.h> for non-sysfs builds + +Required by fstat(), otherwise we'll error out due to implicit function +declaration. + +Cc: "10.4 10.5" <mesa-stable@lists.freedesktop.org> +Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89530 +Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> +Reported-by: Vadim Rutkovsky <vrutkovs@redhat.com> +Tested-by: Vadim Rutkovsky <vrutkovs@redhat.com> + +diff --git a/src/loader/loader.c b/src/loader/loader.c +index 9ff5115..17bf133 100644 +--- a/src/loader/loader.c ++++ b/src/loader/loader.c +@@ -64,6 +64,7 @@ + * Rob Clark <robclark@freedesktop.org> + */ + ++#include <sys/stat.h> + #include <stdarg.h> + #include <stdio.h> + #include <string.h> +@@ -80,7 +81,6 @@ + #endif + #endif + #ifdef HAVE_SYSFS +-#include <sys/stat.h> + #include <sys/types.h> + #endif + #include "loader.h" +-- +cgit v0.10.2 + diff --git a/media-libs/mesa/mesa-10.5.2.ebuild b/media-libs/mesa/mesa-10.5.2.ebuild new file mode 100644 index 0000000..2b54a6f --- /dev/null +++ b/media-libs/mesa/mesa-10.5.2.ebuild @@ -0,0 +1,457 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=5 + +EGIT_REPO_URI="git://anongit.freedesktop.org/mesa/mesa" + +if [[ ${PV} = 9999* ]]; then + GIT_ECLASS="git-r3" + EXPERIMENTAL="true" +fi + +PYTHON_COMPAT=( python{2_6,2_7} ) + +inherit autotools multilib-minimal python-any-r1 pax-utils ${GIT_ECLASS} + +OPENGL_DIR="xorg-x11" + +MY_P="${P/_/-}" +FOLDER="${PV/_rc*/}" + +DESCRIPTION="OpenGL-like graphic library for Linux" +HOMEPAGE="http://mesa3d.sourceforge.net/" + +if [[ $PV == 9999* ]]; then + SRC_URI="" +else + SRC_URI="ftp://ftp.freedesktop.org/pub/mesa/${FOLDER}/${MY_P}.tar.xz" +fi + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris" +RESTRICT="!bindist? ( bindist )" + +INTEL_CARDS="i915 i965 ilo intel" +RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi" +VIDEO_CARDS="${INTEL_CARDS} ${RADEON_CARDS} freedreno nouveau tegra vmware" +for card in ${VIDEO_CARDS}; do + IUSE_VIDEO_CARDS+=" video_cards_${card}" +done + +IUSE="${IUSE_VIDEO_CARDS} + bindist +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 gles2 +llvm + +nptl opencl osmesa pax_kernel openmax pic selinux +udev vaapi vdpau + wayland xvmc xa kernel_FreeBSD" + +REQUIRED_USE=" + d3d9? ( dri3 gallium ) + llvm? ( gallium ) + opencl? ( gallium llvm ) + openmax? ( gallium ) + gles1? ( egl ) + gles2? ( egl ) + vaapi? ( gallium ) + vdpau? ( gallium ) + wayland? ( egl gbm ) + xa? ( gallium ) + video_cards_freedreno? ( gallium ) + video_cards_tegra? ( gallium ) + video_cards_intel? ( classic ) + video_cards_i915? ( || ( classic gallium ) ) + video_cards_i965? ( classic ) + video_cards_ilo? ( gallium ) + video_cards_nouveau? ( || ( classic gallium ) ) + video_cards_radeon? ( || ( classic gallium ) ) + video_cards_r100? ( classic ) + video_cards_r200? ( classic ) + video_cards_r300? ( gallium ) + video_cards_r600? ( gallium ) + video_cards_radeonsi? ( gallium llvm ) + video_cards_vmware? ( gallium ) + ${PYTHON_REQUIRED_USE} +" + +LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.57" +# keep correct libdrm and dri2proto dep +# keep blocks in rdepend for binpkg +RDEPEND=" + !<x11-base/xorg-server-1.7 + !<=x11-proto/xf86driproto-2.0.3 + abi_x86_32? ( !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)] ) + classic? ( app-eselect/eselect-mesa ) + gallium? ( app-eselect/eselect-mesa ) + >=app-eselect/eselect-opengl-1.3.0 + udev? ( kernel_linux? ( >=virtual/libudev-215:=[${MULTILIB_USEDEP}] ) ) + >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}] + gbm? ( >=virtual/libudev-215:=[${MULTILIB_USEDEP}] ) + dri3? ( >=virtual/libudev-215:=[${MULTILIB_USEDEP}] ) + >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}] + >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}] + >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}] + >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}] + >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}] + >=x11-libs/libxcb-1.9.3:=[${MULTILIB_USEDEP}] + x11-libs/libXfixes:=[${MULTILIB_USEDEP}] + llvm? ( + video_cards_radeonsi? ( || ( + >=dev-libs/elfutils-0.155-r1:=[${MULTILIB_USEDEP}] + >=dev-libs/libelf-0.8.13-r2:=[${MULTILIB_USEDEP}] + ) ) + !video_cards_r600? ( + video_cards_radeon? ( || ( + >=dev-libs/elfutils-0.155-r1:=[${MULTILIB_USEDEP}] + >=dev-libs/libelf-0.8.13-r2:=[${MULTILIB_USEDEP}] + ) ) + ) + >=sys-devel/llvm-3.4.2:=[${MULTILIB_USEDEP}] + ) + opencl? ( + app-eselect/eselect-opencl + dev-libs/libclc + || ( + >=dev-libs/elfutils-0.155-r1:=[${MULTILIB_USEDEP}] + >=dev-libs/libelf-0.8.13-r2:=[${MULTILIB_USEDEP}] + ) + ) + openmax? ( >=media-libs/libomxil-bellagio-0.9.3:=[${MULTILIB_USEDEP}] ) + vaapi? ( >=x11-libs/libva-0.35.0:=[${MULTILIB_USEDEP}] ) + vdpau? ( >=x11-libs/libvdpau-0.7:=[${MULTILIB_USEDEP}] ) + wayland? ( >=dev-libs/wayland-1.2.0:=[${MULTILIB_USEDEP}] ) + xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] ) + ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_tegra?,video_cards_nouveau?,video_cards_vmware?,${MULTILIB_USEDEP}] +" +for card in ${INTEL_CARDS}; do + RDEPEND="${RDEPEND} + video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_intel] ) + " +done + +for card in ${RADEON_CARDS}; do + RDEPEND="${RDEPEND} + video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] ) + " +done + +DEPEND="${RDEPEND} + llvm? ( + video_cards_radeonsi? ( sys-devel/llvm[video_cards_radeon] ) + ) + opencl? ( + >=sys-devel/llvm-3.4.2:=[${MULTILIB_USEDEP}] + >=sys-devel/clang-3.4.2:=[${MULTILIB_USEDEP}] + >=sys-devel/gcc-4.6 + ) + sys-devel/gettext + virtual/pkgconfig + >=x11-proto/dri2proto-2.8-r1:=[${MULTILIB_USEDEP}] + dri3? ( + >=x11-proto/dri3proto-1.0:=[${MULTILIB_USEDEP}] + >=x11-proto/presentproto-1.0:=[${MULTILIB_USEDEP}] + ) + >=x11-proto/glproto-1.4.17-r1:=[${MULTILIB_USEDEP}] + >=x11-proto/xextproto-7.2.1-r1:=[${MULTILIB_USEDEP}] + >=x11-proto/xf86driproto-2.1.1-r1:=[${MULTILIB_USEDEP}] + >=x11-proto/xf86vidmodeproto-2.3.1-r1:=[${MULTILIB_USEDEP}] + ${PYTHON_DEPS} + $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]") +" +[[ ${PV} == "9999" ]] && DEPEND+=" + sys-devel/bison + sys-devel/flex +" + +S="${WORKDIR}/${MY_P}" +EGIT_CHECKOUT_DIR=${S} + +# It is slow without texrels, if someone wants slow +# mesa without texrels +pic use is worth the shot +QA_EXECSTACK="usr/lib*/libGL.so*" +QA_WX_LOAD="usr/lib*/libGL.so*" + +pkg_setup() { + # warning message for bug 459306 + if use llvm && has_version sys-devel/llvm[!debug=]; then + ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm" + ewarn "detected! This can cause problems. For details, see bug 459306." + fi + + python-any-r1_pkg_setup +} + +src_prepare() { + # fix for hardened pax_kernel, bug 240956 + [[ ${PV} != 9999* ]] && epatch "${FILESDIR}"/glx_ro_text_segm.patch + + eautoreconf +} + +multilib_src_configure() { + local myconf + + if use classic; then + # Configurable DRI drivers + driver_enable swrast + + # Intel code + driver_enable video_cards_i915 i915 + driver_enable video_cards_i965 i965 + if ! use video_cards_i915 && \ + ! use video_cards_i965; then + driver_enable video_cards_intel i915 i965 + fi + + # Nouveau code + driver_enable video_cards_nouveau nouveau + + # ATI code + driver_enable video_cards_r100 radeon + driver_enable video_cards_r200 r200 + if ! use video_cards_r100 && \ + ! use video_cards_r200; then + driver_enable video_cards_radeon radeon r200 + fi + fi + + if use egl; then + myconf+="--with-egl-platforms=x11$(use wayland && echo ",wayland")$(use gbm && echo ",drm") " + fi + + if use gallium; then + myconf+=" + $(use_enable d3d9 nine) + $(use_enable llvm gallium-llvm) + $(use_enable openmax omx) + $(use_enable vaapi va) + $(use_enable vdpau) + $(use_enable xa) + $(use_enable xvmc) + " + gallium_enable swrast + gallium_enable video_cards_vmware svga + gallium_enable video_cards_nouveau nouveau + gallium_enable video_cards_i915 i915 + gallium_enable video_cards_ilo ilo + if ! use video_cards_i915 && \ + ! use video_cards_i965; then + gallium_enable video_cards_intel i915 + fi + + gallium_enable video_cards_r300 r300 + gallium_enable video_cards_r600 r600 + gallium_enable video_cards_radeonsi radeonsi + if ! use video_cards_r300 && \ + ! use video_cards_r600; then + gallium_enable video_cards_radeon r300 r600 + fi + + gallium_enable video_cards_freedreno freedreno + gallium_enable video_cards_tegra tegra + # opencl stuff + if use opencl; then + myconf+=" + $(use_enable opencl) + --with-clang-libdir="${EPREFIX}/usr/lib" + " + fi + fi + + # x86 hardened pax_kernel needs glx-rts, bug 240956 + if use pax_kernel; then + myconf+=" + $(use_enable x86 glx-rts) + " + fi + + # on abi_x86_32 hardened we need to have asm disable + if [[ ${ABI} == x86* ]] && use pic; then + myconf+=" --disable-asm" + fi + + # build fails with BSD indent, bug #428112 + use userland_GNU || export INDENT=cat + + ECONF_SOURCE="${S}" \ + econf \ + --enable-dri \ + --enable-glx \ + --enable-shared-glapi \ + $(use_enable !bindist texture-float) \ + $(use_enable d3d9 nine) \ + $(use_enable debug) \ + $(use_enable dri3) \ + $(use_enable egl) \ + $(use_enable gbm) \ + $(use_enable gles1) \ + $(use_enable gles2) \ + $(use_enable nptl glx-tls) \ + $(use_enable osmesa) \ + $(use_enable !udev sysfs) \ + --enable-llvm-shared-libs \ + --with-dri-drivers=${DRI_DRIVERS} \ + --with-gallium-drivers=${GALLIUM_DRIVERS} \ + PYTHON2="${PYTHON}" \ + ${myconf} +} + +multilib_src_install() { + emake install DESTDIR="${D}" + + if use classic || use gallium; then + ebegin "Moving DRI/Gallium drivers for dynamic switching" + local gallium_drivers=( i915_dri.so i965_dri.so r300_dri.so r600_dri.so swrast_dri.so ) + keepdir /usr/$(get_libdir)/dri + dodir /usr/$(get_libdir)/mesa + for x in ${gallium_drivers[@]}; do + if [ -f "$(get_libdir)/gallium/${x}" ]; then + mv -f "${ED}/usr/$(get_libdir)/dri/${x}" "${ED}/usr/$(get_libdir)/dri/${x/_dri.so/g_dri.so}" \ + || die "Failed to move ${x}" + fi + done + if use classic; then + emake -C "${BUILD_DIR}/src/mesa/drivers/dri" DESTDIR="${D}" install + fi + for x in "${ED}"/usr/$(get_libdir)/dri/*.so; do + if [ -f ${x} -o -L ${x} ]; then + mv -f "${x}" "${x/dri/mesa}" \ + || die "Failed to move ${x}" + fi + done + pushd "${ED}"/usr/$(get_libdir)/dri || die "pushd failed" + ln -s ../mesa/*.so . || die "Creating symlink failed" + # remove symlinks to drivers known to eselect + for x in ${gallium_drivers[@]}; do + if [ -f ${x} -o -L ${x} ]; then + rm "${x}" || die "Failed to remove ${x}" + fi + done + popd + eend $? + fi + if use opencl; then + ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching" + local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa" + dodir ${cl_dir}/{lib,include} + if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then + mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \ + "${ED}"${cl_dir} + fi + if [ -f "${ED}/usr/include/CL/opencl.h" ]; then + mv -f "${ED}"/usr/include/CL \ + "${ED}"${cl_dir}/include + fi + eend $? + fi + + if use openmax; then + echo "XDG_DATA_DIRS=\"${EPREFIX}/usr/share/mesa/xdg\"" > "${T}/99mesaxdgomx" + doenvd "${T}"/99mesaxdgomx + keepdir /usr/share/mesa/xdg + fi +} + +multilib_src_install_all() { + prune_libtool_files --all + einstalldocs + + if use !bindist; then + dodoc docs/patents.txt + fi + + # Install config file for eselect mesa + insinto /usr/share/mesa + newins "${FILESDIR}/eselect-mesa.conf.9.2" eselect-mesa.conf +} + +multilib_src_test() { + if use llvm; then + local llvm_tests='lp_test_arit lp_test_arit lp_test_blend lp_test_blend lp_test_conv lp_test_conv lp_test_format lp_test_format lp_test_printf lp_test_printf' + pushd src/gallium/drivers/llvmpipe >/dev/null || die + emake ${llvm_tests} + pax-mark m ${llvm_tests} + popd >/dev/null || die + fi + emake check +} + +pkg_postinst() { + # Switch to the xorg implementation. + echo + eselect opengl set --use-old ${OPENGL_DIR} + + # Select classic/gallium drivers + if use classic || use gallium; then + eselect mesa set --auto + fi + + # Switch to mesa opencl + if use opencl; then + eselect opencl set --use-old ${PN} + fi + + # run omxregister-bellagio to make the OpenMAX drivers known system-wide + if use openmax; then + ebegin "Registering OpenMAX drivers" + BELLAGIO_SEARCH_PATH="${EPREFIX}/usr/$(get_libdir)/libomxil-bellagio0" \ + OMX_BELLAGIO_REGISTRY=${EPREFIX}/usr/share/mesa/xdg/.omxregister \ + omxregister-bellagio + eend $? + fi + + # warn about patent encumbered texture-float + if use !bindist; then + elog "USE=\"bindist\" was not set. Potentially patent encumbered code was" + elog "enabled. Please see patents.txt for an explanation." + fi + + if ! has_version media-libs/libtxc_dxtn; then + elog "Note that in order to have full S3TC support, it is necessary to install" + elog "media-libs/libtxc_dxtn as well. This may be necessary to get nice" + elog "textures in some apps, and some others even require this to run." + fi +} + +pkg_prerm() { + if use openmax; then + rm "${EPREFIX}"/usr/share/mesa/xdg/.omxregister + fi +} + +# $1 - VIDEO_CARDS flag +# other args - names of DRI drivers to enable +# TODO: avoid code duplication for a more elegant implementation +driver_enable() { + case $# in + # for enabling unconditionally + 1) + DRI_DRIVERS+=",$1" + ;; + *) + if use $1; then + shift + for i in $@; do + DRI_DRIVERS+=",${i}" + done + fi + ;; + esac +} + +gallium_enable() { + case $# in + # for enabling unconditionally + 1) + GALLIUM_DRIVERS+=",$1" + ;; + *) + if use $1; then + shift + for i in $@; do + GALLIUM_DRIVERS+=",${i}" + done + fi + ;; + esac +} diff --git a/media-libs/mesa/mesa-9999.ebuild b/media-libs/mesa/mesa-9999.ebuild index df730ed..f0fe12e 100644 --- a/media-libs/mesa/mesa-9999.ebuild +++ b/media-libs/mesa/mesa-9999.ebuild @@ -93,9 +93,9 @@ RDEPEND=" !<x11-base/xorg-server-1.7 !<=x11-proto/xf86driproto-2.0.3 abi_x86_32? ( !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)] ) - classic? ( app-admin/eselect-mesa ) - gallium? ( app-admin/eselect-mesa ) - >=app-admin/eselect-opengl-1.2.7 + classic? ( app-eselect/eselect-mesa ) + gallium? ( app-eselect/eselect-mesa ) + >=app-eselect/eselect-opengl-1.2.7 >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}] gbm? ( >=virtual/libudev-215:=[${MULTILIB_USEDEP}] ) dri3? ( >=virtual/libudev-215:=[${MULTILIB_USEDEP}] ) diff --git a/x11-base/xorg-drivers/Manifest b/x11-base/xorg-drivers/Manifest index 46bc758..3a6fa88 100644 --- a/x11-base/xorg-drivers/Manifest +++ b/x11-base/xorg-drivers/Manifest @@ -1,2 +1,2 @@ EBUILD xorg-drivers-1.14.ebuild 6107 SHA256 a27ff3330aa1a216bfbe8a90bcc840b443f0e1929b07664f52a7b5ccdc0af77f SHA512 2d03a12b5b6dcd52f78150339ca09a93ee597e634bdcdc27dc8f09520d0a7a3ca4fe26dd55b2a1de5c44fc9742d30a63803052eb7e980c16725943d6a317bdbe WHIRLPOOL 86aa81b8d9c3126061532a0eeb1d97d73e9a24f7e17be65fdeaf3fd3380c50bff3f91f32fa7753a9e8b4271a971da1981d25453e210bf01de256f459a01bc975 -EBUILD xorg-drivers-9999.ebuild 5997 SHA256 407d8bc2f42dc51ca3cd9c5b6605d124f18c62a0bb6690b16c3726c2d5b4da05 SHA512 a7a62f5098d7090e8bed070046160104254ee2f8c2a708b0f5e26ffb5f66b74370052213a1cb3d270c1d8aa3c795d368eec5334f17c94ba22922fc86183a0d02 WHIRLPOOL 4fc4a8f4c4426e0351fd483f6499ef354607d47ec0efbfa852b760a174c84b0effc8921b3d2467b2b88a48b56b7e2a24abdd474ce5a6b9c7071c15dbc079c228 +EBUILD xorg-drivers-9999.ebuild 6418 SHA256 01ce3db0b23354d4b28e4f019a51235b004d6023897128ff8d1f1ecc1d6f0464 SHA512 a2af78d00f9c8f680ed1412f28903b6ee8d58d546011aec2c9071d3e7f04ef1011eca8e9985f27f805e3cd0ec40975d23c318b6a3aa249b400b7d6496e56b026 WHIRLPOOL 55980bf097f0f28a3f18b53de5c589fa5110455826ccf6d627ceb309341c30cd69114e6d890e035b81c3f812e4e0085e24db0b72b98ded2ceb9c139937344910 diff --git a/x11-base/xorg-drivers/xorg-drivers-9999.ebuild b/x11-base/xorg-drivers/xorg-drivers-9999.ebuild index 9b4de0a..fe8a6af 100644 --- a/x11-base/xorg-drivers/xorg-drivers-9999.ebuild +++ b/x11-base/xorg-drivers/xorg-drivers-9999.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2013 Gentoo Foundation +# Copyright 1999-2015 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: $ +# $Header: /var/cvsroot/gentoo-x86/x11-base/xorg-drivers/xorg-drivers-1.17.ebuild,v 1.2 2015/03/03 10:56:50 dlan Exp $ EAPI=5 @@ -10,7 +10,7 @@ SRC_URI="" LICENSE="metapackage" SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux" IUSE_INPUT_DEVICES=" input_devices_acecad @@ -21,6 +21,7 @@ IUSE_INPUT_DEVICES=" input_devices_hyperpen input_devices_joystick input_devices_keyboard + input_devices_libinput input_devices_mouse input_devices_mutouch input_devices_penmount @@ -39,6 +40,7 @@ IUSE_VIDEO_CARDS=" video_cards_dummy video_cards_epson video_cards_fbdev + video_cards_freedreno video_cards_geode video_cards_glint video_cards_i128 @@ -47,6 +49,7 @@ IUSE_VIDEO_CARDS=" video_cards_mach64 video_cards_mga video_cards_modesetting + video_cards_neomagic video_cards_nouveau video_cards_nv video_cards_omap @@ -54,7 +57,9 @@ IUSE_VIDEO_CARDS=" video_cards_qxl video_cards_r128 video_cards_radeon + video_cards_radeonsi video_cards_rendition + video_cards_s3 video_cards_s3virge video_cards_savage video_cards_siliconmotion @@ -71,7 +76,6 @@ IUSE_VIDEO_CARDS=" video_cards_tga video_cards_trident video_cards_tseng - video_cards_v4l video_cards_vesa video_cards_via video_cards_virtualbox @@ -92,6 +96,7 @@ PDEPEND=" input_devices_hyperpen? ( x11-drivers/xf86-input-hyperpen ) input_devices_joystick? ( x11-drivers/xf86-input-joystick ) input_devices_keyboard? ( x11-drivers/xf86-input-keyboard ) + input_devices_libinput? ( x11-drivers/xf86-input-libinput ) input_devices_mouse? ( x11-drivers/xf86-input-mouse ) input_devices_mutouch? ( x11-drivers/xf86-input-mutouch ) input_devices_penmount? ( x11-drivers/xf86-input-penmount ) @@ -108,6 +113,7 @@ PDEPEND=" video_cards_cirrus? ( x11-drivers/xf86-video-cirrus ) video_cards_dummy? ( x11-drivers/xf86-video-dummy ) video_cards_fbdev? ( x11-drivers/xf86-video-fbdev ) + video_cards_freedreno? ( x11-drivers/xf86-video-freedreno ) video_cards_geode? ( x11-drivers/xf86-video-geode ) video_cards_glint? ( x11-drivers/xf86-video-glint ) video_cards_i128? ( x11-drivers/xf86-video-i128 ) @@ -116,6 +122,7 @@ PDEPEND=" video_cards_mach64? ( x11-drivers/xf86-video-mach64 ) video_cards_mga? ( x11-drivers/xf86-video-mga ) video_cards_modesetting? ( x11-drivers/xf86-video-modesetting ) + video_cards_neomagic? ( x11-drivers/xf86-video-neomagic ) video_cards_nouveau? ( x11-drivers/xf86-video-nouveau ) video_cards_nv? ( x11-drivers/xf86-video-nv ) video_cards_omap? ( x11-drivers/xf86-video-omap ) @@ -125,7 +132,9 @@ PDEPEND=" video_cards_fglrx? ( x11-drivers/ati-drivers ) video_cards_r128? ( x11-drivers/xf86-video-r128 ) video_cards_radeon? ( x11-drivers/xf86-video-ati ) + video_cards_radeonsi? ( x11-drivers/xf86-video-ati[glamor] ) video_cards_rendition? ( x11-drivers/xf86-video-rendition ) + video_cards_s3? ( x11-drivers/xf86-video-s3 ) video_cards_s3virge? ( x11-drivers/xf86-video-s3virge ) video_cards_savage? ( x11-drivers/xf86-video-savage ) video_cards_siliconmotion? ( x11-drivers/xf86-video-siliconmotion ) @@ -141,7 +150,6 @@ PDEPEND=" video_cards_tga? ( x11-drivers/xf86-video-tga ) video_cards_trident? ( x11-drivers/xf86-video-trident ) video_cards_tseng? ( x11-drivers/xf86-video-tseng ) - video_cards_v4l? ( x11-drivers/xf86-video-v4l ) video_cards_vesa? ( x11-drivers/xf86-video-vesa ) video_cards_via? ( x11-drivers/xf86-video-openchrome ) video_cards_virtualbox? ( x11-drivers/xf86-video-virtualbox ) @@ -154,8 +162,7 @@ PDEPEND=" !x11-drivers/xf86-video-nsc !x11-drivers/xf86-video-sunbw2 !<=x11-drivers/xf86-video-ark-0.7.5 - !<=x11-drivers/xf86-video-neomagic-1.2.7 !<=x11-drivers/xf86-video-newport-0.2.4 - !<=x11-drivers/xf86-video-s3-0.6.5 !<=x11-drivers/xf86-video-sis-0.10.7 + !<=x11-drivers/xf86-video-v4l-0.2.0 " diff --git a/x11-base/xorg-server/Manifest b/x11-base/xorg-server/Manifest index a6ef71c..c2749bc 100644 --- a/x11-base/xorg-server/Manifest +++ b/x11-base/xorg-server/Manifest @@ -16,14 +16,19 @@ AUX xorg-server-1.12-ia64-fix_inx_outx.patch 1737 SHA256 bf996a01faf3d1e6f00f12b AUX xorg-server-1.12-unloadsubmodule.patch 1373 SHA256 c68c4c0749b9229c3ca11c72b5ca98b58c7dbaf5c7311ce45890204bdc637c3c SHA512 a6a8ebbb1005f2ea9cfdfc928209a23fe213caab31a889c3290f14bcae0a9afd40176330e2e56cb5ff986d522505e7fb98fa0c71187f403e2afd33c9c919780e WHIRLPOOL 7e9dce7dc4e064567e68697a2966f87cef756670db7e49da50c8d9a5379d7930c3f9642913b8482b8c7597067ef9098e1989284986b5ec605aca6a536329c05c AUX xorg-server-1.13-arm32.patch 505 SHA256 65de94d463e2d6fc61486f747e94d0b4fa23e217f793389303c4f3c8ad7a68e2 SHA512 669dd457f0e127b188baa942991f22d1143c42b59ab4754770119e6a78561854aa42e952ac9cf51bf85e8151f22baf6f2938b25234057eb3c0079bb60aa57b33 WHIRLPOOL 20f4f7d38b9917ce3c0b47f3b3461c91850715e73079f6fcb5d9653b83b6344aff61426845db540ff059c8046ee4fe069af7c8ce2d830448fbb4c2f09093b305 AUX xorg-server-1.13-ia64-asm.patch 1166 SHA256 525fc255734f062758877ad45a29862dfeb1fb8e7b3a476d9410a6f0d73420a2 SHA512 51b8695af30988f99a480d2ecadc6dbe7cb46d4d9461fa006d9001200dfc1bed7390025fd1ebbadc936aee90444bb5cfd892d41c5260d5c33347ee2bdc88e78e WHIRLPOOL 46d8b55b67c82118e2a36a01c739217c6e6dd02228b0a0e730b44372b77b476f4a76fcfa8a584550cdfc87db22c26839890b7719318678aaedba7db761a39c6c +AUX xorg-server-1.17-cve-2015-0255-0.patch 3454 SHA256 eab604a006dca644132fcc98db36cb184422b16d1e0f6becd94b311565d0f79d SHA512 dcca4037cb0278fc508f8c4a9b33b8e1f21a4be7d22fb6345b2b2c30956dfd9c9e574fb1dba7e1dadd7f312c033e76286b5f94b1edb058a37e704e3b2b27f241 WHIRLPOOL 75aede9cb62103108b08ea2e5f281c2077acc692c5b503f9f4cca55348aa29c2f3dfcf04065105715c57ae3d994bb7c6942405806aba276d4e14a9d6c1dc8b06 +AUX xorg-server-1.17-cve-2015-0255-1.patch 4715 SHA256 dbd9f973ef3fab04f3889cd8a44aeacae87bf463a74209d36f014055495fdbab SHA512 493e55bfb8bf3792af91ceb5ca270f7bad9b885e1eda94e61e9c1837c837906b1134864f000610f0e79acba24a55cd1b948b866cfe634c704cc2e19d4258f5b5 WHIRLPOOL c9bcd9a84e00a466efdfe6b954592c166c6758da124b5d866f25e6ad8f77a3b3cc46c30aa7fc6a6eafa2e70af47e2cd800109ec6ed8f67d04c41db7d53b740a3 +AUX xorg-server-1.17-ia64-fix_inx_outx.patch 1539 SHA256 4c844b2d41b6412304b8a918e3cd93d8f2ab8dad8e6a22310cd87d1f3d8f5e95 SHA512 1db65132bb04eff380d38ccc8441f9f9e5286d7a47956495c0a7de7978107d15e5638d05df0aabbcd11687dd03189a7ac50fca51d755d082869aed71e66dbda1 WHIRLPOOL 8f7f3d107e2f8ce5e07d5dac9bf68b7547425943c3e6b6db92eab8bebc0194da53384c953f5e823a5284025e1bbcf18000b497d31de7c5d46e43f9cc02999915 +AUX xorg-server-1.17-support-multiple-Files-sections.patch 2256 SHA256 1cc57d2e8449d50737c507005df348610bb68241fe36e997e4803b3b8b3e6d86 SHA512 e3141727c993e02b2e067095807e96ef0cc82e2e7c8b65664d0530ef05a0f7b9170272e4e1e3523ede3f1cc23b00c4776785b8299e0b58a6e7fd56062aecefb6 WHIRLPOOL 078a5e30777a8f6e908421a1c7cc4a7e63c23f57b600bb1117bc1e8de2db0e6440870f811e65283acaa48da06fcc5666434d2bdce257709344e8f584d1525623 AUX xorg-server-1.9-cve-2013-1940.patch 1159 SHA256 2ddde47a5b80b28d5240e51a33862722787d37cf7621aa919d2966b7bdaa7f7c SHA512 744abfda3defd3746783e2e71501c769ee7a09160efbed8fa37d3dc02eea89151de36ff7ad47f8a5cb5c56fa960cf7ea68a09a2ef45e0d0bfb49e9296a9571da WHIRLPOOL c446c7e4a2aad2ee1960d1fab142d1df84fca4822e1bec37e1851576be6fa85522eea64977565303e144d8bd55df866f6a38991575878034f762f883b4706f01 AUX xorg-server-1.9-cve-2013-4396.patch 915 SHA256 a1686c0bd07337991eba7edf769790be30b33d1295a22a847fd139f4573379cb SHA512 e8a4fb8c4097662d0e4188fec3d6ab827addd7edb0122ddb94f66795ebc8e0ef18bba899da8fd76e918556a625ffa0c0d19c650182683ff6216faa7655aa8d11 WHIRLPOOL 98b4999c932669047094f6063b007d673957547180507dfe714943d21eda5f2371d97424efb97be6b9039aeba8d2b9282efc6023ae3edbfa9d5c8fc63fac848f AUX xorg-server-1.9-nouveau-default.patch 916 SHA256 a7ff421dd928e3025194279f9afb7cc033a896b3417abe339741e9c6ed4b54ea SHA512 fe91ff469c2569aaf6e2ceb0decf44c46ec4be4314dcb94c42b107adf2aaa8592c84b78b1621856acfd51e604e012c35c0609a3651930999829c7040d4b46ed3 WHIRLPOOL 18ced96c233b537634ee32a5aad186764d8796c5cadc398e9406457c8ace02c6608dc7378ca37fd09ecb178c5564c16f602d46772472166ca3fcb56ac9a04e52 AUX xorg-server-disable-acpi.patch 663 SHA256 5b3cc7c8bea18fe3ba81851d2846d19ffd8fab9cdf5d8f3a274846847e734200 SHA512 0f741e3dac610ba75c3f22cb9412d93e6d8422216100bce886be5f8d6dc49a94e0dab525039247d7af668f162b02fdab302aeb55b02a949ebf56c1f455fa68cf WHIRLPOOL 69e7425e3fbb1154b64568261ab17dc513d561a0d92558fad4e1281869b43132892f14eb89443dc11003cc62bacb4a80f86f592d9dc4bdd873f29fd970c25558 AUX xorg-server-glapi_c.patch 2215 SHA256 5f59b883d49f53d2f6f71cbbf5e4ef74bdf545238afd61fa3011e0eb311cfb3b SHA512 77ccf8cf5732930affd41c3631a945e768becf504e507c1140d2d4d55f0fb49fb787fd9ace14463c22173c95c3187c985712cba79b53c3f1472be08ea46401d4 WHIRLPOOL f284f2fb5b04d6ae3a0cb781a7e78ba8763d3fe75efb738a0643783d77685bc1606b8fc940e66c89c1ee41a5f2ffdba1698b8d11b0c59550f4f40dab4716a219 +AUX xorg-server-support-multiple-files-sections.patch 2256 SHA256 1cc57d2e8449d50737c507005df348610bb68241fe36e997e4803b3b8b3e6d86 SHA512 e3141727c993e02b2e067095807e96ef0cc82e2e7c8b65664d0530ef05a0f7b9170272e4e1e3523ede3f1cc23b00c4776785b8299e0b58a6e7fd56062aecefb6 WHIRLPOOL 078a5e30777a8f6e908421a1c7cc4a7e63c23f57b600bb1117bc1e8de2db0e6440870f811e65283acaa48da06fcc5666434d2bdce257709344e8f584d1525623 AUX xorg-sets.conf 199 SHA256 1201d0337ac69d9715f4454a86dfb8a7bd1ae6f4c2578042fc08f283a997597c SHA512 910fe28f20909243044f079ff35136942b8790f4f28ac42ffc64a76b7f03cd22057087fa5e4e01192080b52c0d89000ea96d5a807c6f11f680d3f43312c5be41 WHIRLPOOL 4acac88e1688ea71df59a86a8a188b5369ad05f61e1369cd620eecd754511578e961a537ff6d0b22156f671d3485289cbc941dfe83bea24a27329b7bebb46c7d DIST xorg-server-1.13.4.tar.bz2 5506293 SHA256 a2c969887f3c7b0f3f7d31e2ee8e91fa73ce81ba3c16d82da9150ffa302c98cf SHA512 600fe0fc77a9d6c242ec264f74624cddf5e3dd0e2eacaa65d475be638e2b4d9497bc555d753b43b24845bd6f446a811e387446f94fa98d3e75f664063a7a3d3d WHIRLPOOL 68ca7d6f121496d3a371fb4242c4e9c8fa77eae5c79a13dfec2cdbfd8f0ed82b9a97aa607923674f2e17f3380ec9a8c82d3aab9b2d8b829457a29b8330970f54 DIST xorg-server-1.14.3.tar.bz2 5502845 SHA256 02125ae13a443dcbb55f964d5c37f1da2f58ad54c2102356037bec23c1b84f5e SHA512 d5379e2f52e93985ab2636ca02f503baadd359a4ec05bed80162213392e16d433a2b7308e90cdd18c1a0bd283429f2c8b8758b5a2c585923533cced6245de989 WHIRLPOOL 241feac891f48bdc7470891d54abec0e13921cc127898b083665778ab87920d2bf10088536ac05b9db200cc2cc8b002307873786223995624aa70098370ba183 EBUILD xorg-server-1.13.4-r1.ebuild 7251 SHA256 e576dad35350a559abbd02a6b940942f8f46f5c0ebe2e80a20ebebaf7cedc477 SHA512 445721c6661eab6eaa7cabe915f24f266fcc96bac25de210ff65a0afad12e82391a59f292165861bdfcf695a92ab2c72b06fbd5d8f5f498ca9c044911fd6f0aa WHIRLPOOL eaa2f10fde8ea6304ac6eefa77255f4943263f0ec9d1430e462b3067b4deeee0eba4741e883fe1195892b4a56a3ec11cf01534db427cc026700d96a6430dd800 EBUILD xorg-server-1.14.3-r100.ebuild 7174 SHA256 2f1b89b85528f0b69a656fb1f590c8ecc3afcf4ee59980eee631c0f42d68c2ff SHA512 b59002047aa8a52f656a3e128a8d44c60d433da135008bde5fcddd2b108e1a2c50fe7c511e71ac71e8a8cfea861a041ff02348924716fa3d5af49529a054f8bd WHIRLPOOL f2dba2e9335f650ab0247a7357b55eaf4828f81529a18a6c63ed371111691ceeb5731d5cb338731992027f607333d37d9c8f1b3a59b009132fbd635869df51b6 -EBUILD xorg-server-9999.ebuild 7589 SHA256 d5f99e3f80fcc612ca35daf1f77587c5696190bf421136fc44c3c538e2967661 SHA512 653d51d4bd3c3c9cb265ca18582de30043e170e5b88a4e7fdd9480b0b3cfdc3516967c999a30191fa34b23efc84bff7692138801e307876e1ac1d8f64978a94b WHIRLPOOL 42ec655ac607d453d4b9d49fa6dbd02bf76d5694df7b0b59f9d8ee46ad4e3db59333f4b22f2f4c4014b5d872bd8f4e294be61fc35c177c16f84ff807dda39a50 +EBUILD xorg-server-9999.ebuild 6364 SHA256 a936d0ac291f1a716a64dcda91e328eae1f3101f7ffa05817264bffd031b145a SHA512 9fda998c7d24c3497309ab8c17f2517aecb63f627154c4ef8cd2f4eec8c657757d59a0fb33f812066bf23fb937a27f8a06a6541db7def31618b06b94d7b9552e WHIRLPOOL 897145192ca48acf0b265aa9eb89e5fc620de26f3bc79811b1c1cd2de2a0a5c71b301ad9658c7363364eee728bf0be6e43dbaffb4379a42055586f85b601c6a7 diff --git a/x11-base/xorg-server/files/xorg-server-1.17-cve-2015-0255-0.patch b/x11-base/xorg-server/files/xorg-server-1.17-cve-2015-0255-0.patch new file mode 100644 index 0000000..9540e31 --- /dev/null +++ b/x11-base/xorg-server/files/xorg-server-1.17-cve-2015-0255-0.patch @@ -0,0 +1,102 @@ +From 81c90dc8f0aae3b65730409b1b615b5fa7280ebd Mon Sep 17 00:00:00 2001 +From: Olivier Fourdan <ofourdan@redhat.com> +Date: Fri, 16 Jan 2015 20:08:59 +0100 +Subject: xkb: Don't swap XkbSetGeometry data in the input buffer + +The XkbSetGeometry request embeds data which needs to be swapped when the +server and the client have different endianess. + +_XkbSetGeometry() invokes functions that swap these data directly in the +input buffer. + +However, ProcXkbSetGeometry() may call _XkbSetGeometry() more than once +(if there is more than one keyboard), thus causing on swapped clients the +same data to be swapped twice in memory, further causing a server crash +because the strings lengths on the second time are way off bounds. + +To allow _XkbSetGeometry() to run reliably more than once with swapped +clients, do not swap the data in the buffer, use variables instead. + +Signed-off-by: Olivier Fourdan <ofourdan@redhat.com> +Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +diff --git a/xkb/xkb.c b/xkb/xkb.c +index 15c7f34..b9a3ac4 100644 +--- a/xkb/xkb.c ++++ b/xkb/xkb.c +@@ -4961,14 +4961,13 @@ static char * + _GetCountedString(char **wire_inout, Bool swap) + { + char *wire, *str; +- CARD16 len, *plen; ++ CARD16 len; + + wire = *wire_inout; +- plen = (CARD16 *) wire; ++ len = *(CARD16 *) wire; + if (swap) { +- swaps(plen); ++ swaps(&len); + } +- len = *plen; + str = malloc(len + 1); + if (str) { + memcpy(str, &wire[2], len); +@@ -4985,25 +4984,28 @@ _CheckSetDoodad(char **wire_inout, + { + char *wire; + xkbDoodadWireDesc *dWire; ++ xkbAnyDoodadWireDesc any; ++ xkbTextDoodadWireDesc text; + XkbDoodadPtr doodad; + + dWire = (xkbDoodadWireDesc *) (*wire_inout); ++ any = dWire->any; + wire = (char *) &dWire[1]; + if (client->swapped) { +- swapl(&dWire->any.name); +- swaps(&dWire->any.top); +- swaps(&dWire->any.left); +- swaps(&dWire->any.angle); ++ swapl(&any.name); ++ swaps(&any.top); ++ swaps(&any.left); ++ swaps(&any.angle); + } + CHK_ATOM_ONLY(dWire->any.name); +- doodad = XkbAddGeomDoodad(geom, section, dWire->any.name); ++ doodad = XkbAddGeomDoodad(geom, section, any.name); + if (!doodad) + return BadAlloc; + doodad->any.type = dWire->any.type; + doodad->any.priority = dWire->any.priority; +- doodad->any.top = dWire->any.top; +- doodad->any.left = dWire->any.left; +- doodad->any.angle = dWire->any.angle; ++ doodad->any.top = any.top; ++ doodad->any.left = any.left; ++ doodad->any.angle = any.angle; + switch (doodad->any.type) { + case XkbOutlineDoodad: + case XkbSolidDoodad: +@@ -5026,12 +5028,13 @@ _CheckSetDoodad(char **wire_inout, + dWire->text.colorNdx); + return BadMatch; + } ++ text = dWire->text; + if (client->swapped) { +- swaps(&dWire->text.width); +- swaps(&dWire->text.height); ++ swaps(&text.width); ++ swaps(&text.height); + } +- doodad->text.width = dWire->text.width; +- doodad->text.height = dWire->text.height; ++ doodad->text.width = text.width; ++ doodad->text.height = text.height; + doodad->text.color_ndx = dWire->text.colorNdx; + doodad->text.text = _GetCountedString(&wire, client->swapped); + doodad->text.font = _GetCountedString(&wire, client->swapped); +-- +cgit v0.10.2 + diff --git a/x11-base/xorg-server/files/xorg-server-1.17-cve-2015-0255-1.patch b/x11-base/xorg-server/files/xorg-server-1.17-cve-2015-0255-1.patch new file mode 100644 index 0000000..be131c2 --- /dev/null +++ b/x11-base/xorg-server/files/xorg-server-1.17-cve-2015-0255-1.patch @@ -0,0 +1,138 @@ +From 20079c36cf7d377938ca5478447d8b9045cb7d43 Mon Sep 17 00:00:00 2001 +From: Olivier Fourdan <ofourdan@redhat.com> +Date: Fri, 16 Jan 2015 08:44:45 +0100 +Subject: xkb: Check strings length against request size + +Ensure that the given strings length in an XkbSetGeometry request remain +within the limits of the size of the request. + +Signed-off-by: Olivier Fourdan <ofourdan@redhat.com> +Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> +Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +diff --git a/xkb/xkb.c b/xkb/xkb.c +index b9a3ac4..f3988f9 100644 +--- a/xkb/xkb.c ++++ b/xkb/xkb.c +@@ -4957,25 +4957,29 @@ ProcXkbGetGeometry(ClientPtr client) + + /***====================================================================***/ + +-static char * +-_GetCountedString(char **wire_inout, Bool swap) ++static Status ++_GetCountedString(char **wire_inout, ClientPtr client, char **str) + { +- char *wire, *str; ++ char *wire, *next; + CARD16 len; + + wire = *wire_inout; + len = *(CARD16 *) wire; +- if (swap) { ++ if (client->swapped) { + swaps(&len); + } +- str = malloc(len + 1); +- if (str) { +- memcpy(str, &wire[2], len); +- str[len] = '\0'; +- } +- wire += XkbPaddedSize(len + 2); +- *wire_inout = wire; +- return str; ++ next = wire + XkbPaddedSize(len + 2); ++ /* Check we're still within the size of the request */ ++ if (client->req_len < ++ bytes_to_int32(next - (char *) client->requestBuffer)) ++ return BadValue; ++ *str = malloc(len + 1); ++ if (!*str) ++ return BadAlloc; ++ memcpy(*str, &wire[2], len); ++ *(*str + len) = '\0'; ++ *wire_inout = next; ++ return Success; + } + + static Status +@@ -4987,6 +4991,7 @@ _CheckSetDoodad(char **wire_inout, + xkbAnyDoodadWireDesc any; + xkbTextDoodadWireDesc text; + XkbDoodadPtr doodad; ++ Status status; + + dWire = (xkbDoodadWireDesc *) (*wire_inout); + any = dWire->any; +@@ -5036,8 +5041,14 @@ _CheckSetDoodad(char **wire_inout, + doodad->text.width = text.width; + doodad->text.height = text.height; + doodad->text.color_ndx = dWire->text.colorNdx; +- doodad->text.text = _GetCountedString(&wire, client->swapped); +- doodad->text.font = _GetCountedString(&wire, client->swapped); ++ status = _GetCountedString(&wire, client, &doodad->text.text); ++ if (status != Success) ++ return status; ++ status = _GetCountedString(&wire, client, &doodad->text.font); ++ if (status != Success) { ++ free (doodad->text.text); ++ return status; ++ } + break; + case XkbIndicatorDoodad: + if (dWire->indicator.onColorNdx >= geom->num_colors) { +@@ -5072,7 +5083,9 @@ _CheckSetDoodad(char **wire_inout, + } + doodad->logo.color_ndx = dWire->logo.colorNdx; + doodad->logo.shape_ndx = dWire->logo.shapeNdx; +- doodad->logo.logo_name = _GetCountedString(&wire, client->swapped); ++ status = _GetCountedString(&wire, client, &doodad->logo.logo_name); ++ if (status != Success) ++ return status; + break; + default: + client->errorValue = _XkbErrCode2(0x4F, dWire->any.type); +@@ -5304,18 +5317,20 @@ _CheckSetGeom(XkbGeometryPtr geom, xkbSetGeometryReq * req, ClientPtr client) + char *wire; + + wire = (char *) &req[1]; +- geom->label_font = _GetCountedString(&wire, client->swapped); ++ status = _GetCountedString(&wire, client, &geom->label_font); ++ if (status != Success) ++ return status; + + for (i = 0; i < req->nProperties; i++) { + char *name, *val; + +- name = _GetCountedString(&wire, client->swapped); +- if (!name) +- return BadAlloc; +- val = _GetCountedString(&wire, client->swapped); +- if (!val) { ++ status = _GetCountedString(&wire, client, &name); ++ if (status != Success) ++ return status; ++ status = _GetCountedString(&wire, client, &val); ++ if (status != Success) { + free(name); +- return BadAlloc; ++ return status; + } + if (XkbAddGeomProperty(geom, name, val) == NULL) { + free(name); +@@ -5349,9 +5364,9 @@ _CheckSetGeom(XkbGeometryPtr geom, xkbSetGeometryReq * req, ClientPtr client) + for (i = 0; i < req->nColors; i++) { + char *name; + +- name = _GetCountedString(&wire, client->swapped); +- if (!name) +- return BadAlloc; ++ status = _GetCountedString(&wire, client, &name); ++ if (status != Success) ++ return status; + if (!XkbAddGeomColor(geom, name, geom->num_colors)) { + free(name); + return BadAlloc; +-- +cgit v0.10.2 + diff --git a/x11-base/xorg-server/files/xorg-server-1.17-ia64-fix_inx_outx.patch b/x11-base/xorg-server/files/xorg-server-1.17-ia64-fix_inx_outx.patch new file mode 100644 index 0000000..84485c9 --- /dev/null +++ b/x11-base/xorg-server/files/xorg-server-1.17-ia64-fix_inx_outx.patch @@ -0,0 +1,59 @@ +diff --git a/hw/xfree86/common/compiler.h b/hw/xfree86/common/compiler.h +index 1653574..fe881ee 100644 +--- a/hw/xfree86/common/compiler.h ++++ b/hw/xfree86/common/compiler.h +@@ -286,6 +286,54 @@ extern _X_EXPORT unsigned int inl(unsigned int port); + #include <machine/pio.h> + #endif /* __NetBSD__ */ + ++#elif defined(linux) && defined(__ia64__) ++/* for Linux on ia64, we use the LIBC _inx/_outx routines */ ++/* note that the appropriate setup via "ioperm" needs to be done */ ++/* *before* any inx/outx is done. */ ++ ++extern _X_EXPORT void _outb(unsigned char val, unsigned long port); ++extern _X_EXPORT void _outw(unsigned short val, unsigned long port); ++extern _X_EXPORT void _outl(unsigned int val, unsigned long port); ++extern _X_EXPORT unsigned int _inb(unsigned long port); ++extern _X_EXPORT unsigned int _inw(unsigned long port); ++extern _X_EXPORT unsigned int _inl(unsigned long port); ++ ++static __inline__ void ++outb(unsigned long port, unsigned char val) ++{ ++ _outb(val, port); ++} ++ ++static __inline__ void ++outw(unsigned long port, unsigned short val) ++{ ++ _outw(val, port); ++} ++ ++static __inline__ void ++outl(unsigned long port, unsigned int val) ++{ ++ _outl(val, port); ++} ++ ++static __inline__ unsigned int ++inb(unsigned long port) ++{ ++ return _inb(port); ++} ++ ++static __inline__ unsigned int ++inw(unsigned long port) ++{ ++ return _inw(port); ++} ++ ++static __inline__ unsigned int ++inl(unsigned long port) ++{ ++ return _inl(port); ++} ++ + #elif defined(__amd64__) + + #include <inttypes.h> diff --git a/x11-base/xorg-server/files/xorg-server-1.17-support-multiple-Files-sections.patch b/x11-base/xorg-server/files/xorg-server-1.17-support-multiple-Files-sections.patch new file mode 100644 index 0000000..789a118 --- /dev/null +++ b/x11-base/xorg-server/files/xorg-server-1.17-support-multiple-Files-sections.patch @@ -0,0 +1,65 @@ +From a140d7ce3f37f30b4fed27c5a70ebcc4ed13c612 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org> +Date: Tue, 24 Feb 2015 12:57:24 +0100 +Subject: [PATCH] config: Support multiple 'Files' sections + +--- + hw/xfree86/parser/Files.c | 8 ++++++-- + hw/xfree86/parser/configProcs.h | 2 +- + hw/xfree86/parser/read.c | 2 +- + 3 files changed, 8 insertions(+), 4 deletions(-) + +diff --git a/hw/xfree86/parser/Files.c b/hw/xfree86/parser/Files.c +index 849bf92..5cc3ec7 100644 +--- a/hw/xfree86/parser/Files.c ++++ b/hw/xfree86/parser/Files.c +@@ -76,14 +76,18 @@ static xf86ConfigSymTabRec FilesTab[] = { + #define CLEANUP xf86freeFiles + + XF86ConfFilesPtr +-xf86parseFilesSection(void) ++xf86parseFilesSection(XF86ConfFilesPtr ptr) + { + int i, j; + int k, l; + char *str; + int token; + +- parsePrologue(XF86ConfFilesPtr, XF86ConfFilesRec) ++ if (!ptr) { ++ if( (ptr=calloc(1,sizeof(XF86ConfFilesRec))) == NULL ) { ++ return NULL; ++ } ++ } + + while ((token = xf86getToken(FilesTab)) != ENDSECTION) { + switch (token) { +diff --git a/hw/xfree86/parser/configProcs.h b/hw/xfree86/parser/configProcs.h +index 774e2a2..b9fdebb 100644 +--- a/hw/xfree86/parser/configProcs.h ++++ b/hw/xfree86/parser/configProcs.h +@@ -37,7 +37,7 @@ void xf86freeDeviceList(XF86ConfDevicePtr ptr); + int xf86validateDevice(XF86ConfigPtr p); + + /* Files.c */ +-XF86ConfFilesPtr xf86parseFilesSection(void); ++XF86ConfFilesPtr xf86parseFilesSection(XF86ConfFilesPtr ptr); + void xf86printFileSection(FILE * cf, XF86ConfFilesPtr ptr); + void xf86freeFiles(XF86ConfFilesPtr p); + +diff --git a/hw/xfree86/parser/read.c b/hw/xfree86/parser/read.c +index 327c02a..e0d6139 100644 +--- a/hw/xfree86/parser/read.c ++++ b/hw/xfree86/parser/read.c +@@ -110,7 +110,7 @@ xf86readConfigFile(void) + if (xf86nameCompare(xf86_lex_val.str, "files") == 0) { + free(xf86_lex_val.str); + xf86_lex_val.str = NULL; +- HANDLE_RETURN(conf_files, xf86parseFilesSection()); ++ HANDLE_RETURN(conf_files, xf86parseFilesSection(ptr->conf_files)); + } + else if (xf86nameCompare(xf86_lex_val.str, "serverflags") == 0) { + free(xf86_lex_val.str); +-- +2.3.0 + diff --git a/x11-base/xorg-server/files/xorg-server-support-multiple-files-sections.patch b/x11-base/xorg-server/files/xorg-server-support-multiple-files-sections.patch new file mode 100644 index 0000000..789a118 --- /dev/null +++ b/x11-base/xorg-server/files/xorg-server-support-multiple-files-sections.patch @@ -0,0 +1,65 @@ +From a140d7ce3f37f30b4fed27c5a70ebcc4ed13c612 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org> +Date: Tue, 24 Feb 2015 12:57:24 +0100 +Subject: [PATCH] config: Support multiple 'Files' sections + +--- + hw/xfree86/parser/Files.c | 8 ++++++-- + hw/xfree86/parser/configProcs.h | 2 +- + hw/xfree86/parser/read.c | 2 +- + 3 files changed, 8 insertions(+), 4 deletions(-) + +diff --git a/hw/xfree86/parser/Files.c b/hw/xfree86/parser/Files.c +index 849bf92..5cc3ec7 100644 +--- a/hw/xfree86/parser/Files.c ++++ b/hw/xfree86/parser/Files.c +@@ -76,14 +76,18 @@ static xf86ConfigSymTabRec FilesTab[] = { + #define CLEANUP xf86freeFiles + + XF86ConfFilesPtr +-xf86parseFilesSection(void) ++xf86parseFilesSection(XF86ConfFilesPtr ptr) + { + int i, j; + int k, l; + char *str; + int token; + +- parsePrologue(XF86ConfFilesPtr, XF86ConfFilesRec) ++ if (!ptr) { ++ if( (ptr=calloc(1,sizeof(XF86ConfFilesRec))) == NULL ) { ++ return NULL; ++ } ++ } + + while ((token = xf86getToken(FilesTab)) != ENDSECTION) { + switch (token) { +diff --git a/hw/xfree86/parser/configProcs.h b/hw/xfree86/parser/configProcs.h +index 774e2a2..b9fdebb 100644 +--- a/hw/xfree86/parser/configProcs.h ++++ b/hw/xfree86/parser/configProcs.h +@@ -37,7 +37,7 @@ void xf86freeDeviceList(XF86ConfDevicePtr ptr); + int xf86validateDevice(XF86ConfigPtr p); + + /* Files.c */ +-XF86ConfFilesPtr xf86parseFilesSection(void); ++XF86ConfFilesPtr xf86parseFilesSection(XF86ConfFilesPtr ptr); + void xf86printFileSection(FILE * cf, XF86ConfFilesPtr ptr); + void xf86freeFiles(XF86ConfFilesPtr p); + +diff --git a/hw/xfree86/parser/read.c b/hw/xfree86/parser/read.c +index 327c02a..e0d6139 100644 +--- a/hw/xfree86/parser/read.c ++++ b/hw/xfree86/parser/read.c +@@ -110,7 +110,7 @@ xf86readConfigFile(void) + if (xf86nameCompare(xf86_lex_val.str, "files") == 0) { + free(xf86_lex_val.str); + xf86_lex_val.str = NULL; +- HANDLE_RETURN(conf_files, xf86parseFilesSection()); ++ HANDLE_RETURN(conf_files, xf86parseFilesSection(ptr->conf_files)); + } + else if (xf86nameCompare(xf86_lex_val.str, "serverflags") == 0) { + free(xf86_lex_val.str); +-- +2.3.0 + diff --git a/x11-base/xorg-server/xorg-server-9999.ebuild b/x11-base/xorg-server/xorg-server-9999.ebuild index 008e696..5885a3d 100644 --- a/x11-base/xorg-server/xorg-server-9999.ebuild +++ b/x11-base/xorg-server/xorg-server-9999.ebuild @@ -1,33 +1,28 @@ -# Copyright 1999-2014 Gentoo Foundation +# Copyright 1999-2015 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ EAPI=5 -XORG_EAUTORECONF=yes XORG_DOC=doc inherit xorg-2 multilib versionator flag-o-matic EGIT_REPO_URI="git://anongit.freedesktop.org/git/xorg/xserver" -# commit: Bump release to 1.15.99.901 -#EGIT_COMMIT="300458fb8ad0a7957e941cd65f47d204c7886e22" -EGIT_BRANCH="server-1.15-branch" - DESCRIPTION="X.Org X servers" SLOT="0/${PV}" -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux" -IUSE_SERVERS="dmx kdrive xnest xorg xvfb" -IUSE="${IUSE_SERVERS} ipv6 minimal nptl selinux +suid tslib +udev unwind wayland" +IUSE_SERVERS="dmx kdrive xephyr xnest xorg xvfb" +IUSE="${IUSE_SERVERS} glamor ipv6 minimal nptl selinux +suid systemd tslib +udev unwind wayland" -RDEPEND=">=app-admin/eselect-opengl-1.0.8 +CDEPEND=">=app-eselect/eselect-opengl-1.3.0 dev-libs/openssl media-libs/freetype >=x11-apps/iceauth-1.0.2 >=x11-apps/rgb-1.0.3 >=x11-apps/xauth-1.0.3 x11-apps/xkbcomp - >=x11-libs/libdrm-2.4.20 + >=x11-libs/libdrm-2.4.46 >=x11-libs/libpciaccess-0.12.901 >=x11-libs/libXau-1.0.4 >=x11-libs/libXdmcp-1.0.2 @@ -35,7 +30,7 @@ RDEPEND=">=app-admin/eselect-opengl-1.0.8 >=x11-libs/libxkbfile-1.0.4 >=x11-libs/libxshmfence-1.1 >=x11-libs/pixman-0.27.2 - >=x11-libs/xtrans-1.3.2 + >=x11-libs/xtrans-1.3.5 >=x11-misc/xbitmaps-1.0.1 >=x11-misc/xkeyboard-config-2.4.1-r3 dmx? ( @@ -51,33 +46,49 @@ RDEPEND=">=app-admin/eselect-opengl-1.0.8 >=x11-libs/libXres-1.0.3 >=x11-libs/libXtst-1.0.99.2 ) + glamor? ( + media-libs/libepoxy + >=media-libs/mesa-10.3.4-r1[egl,gbm] + !x11-libs/glamor + ) kdrive? ( >=x11-libs/libXext-1.0.5 x11-libs/libXv ) + xephyr? ( + x11-libs/libxcb + x11-libs/xcb-util + x11-libs/xcb-util-image + x11-libs/xcb-util-keysyms + x11-libs/xcb-util-renderutil + x11-libs/xcb-util-wm + ) !minimal? ( >=x11-libs/libX11-1.1.5 >=x11-libs/libXext-1.0.5 - >=media-libs/mesa-9.2.0[nptl=] + >=media-libs/mesa-10.3.4-r1[nptl=] ) tslib? ( >=x11-libs/tslib-1.0 ) udev? ( >=virtual/udev-150 ) unwind? ( sys-libs/libunwind ) wayland? ( - dev-libs/wayland + >=dev-libs/wayland-1.3.0 media-libs/libepoxy ) - >=x11-apps/xinit-1.3 - selinux? ( sec-policy/selinux-xserver )" + >=x11-apps/xinit-1.3.3-r1 + systemd? ( + sys-apps/dbus + sys-apps/systemd + )" -DEPEND="${RDEPEND} +DEPEND="${CDEPEND} sys-devel/flex >=x11-proto/bigreqsproto-1.1.0 >=x11-proto/compositeproto-0.4 >=x11-proto/damageproto-1.1 >=x11-proto/fixesproto-5.0 - >=x11-proto/fontsproto-2.0.2 - >=x11-proto/glproto-1.4.17 + >=x11-proto/fontsproto-2.1.3 + >=x11-proto/glproto-1.4.17-r1 >=x11-proto/inputproto-2.2.99.1 >=x11-proto/kbproto-1.0.3 >=x11-proto/randrproto-1.4.0 @@ -93,7 +104,7 @@ DEPEND="${RDEPEND} >=x11-proto/xf86rushproto-1.1.2 >=x11-proto/xf86vidmodeproto-2.2.99.1 >=x11-proto/xineramaproto-1.1.3 - >=x11-proto/xproto-7.0.22 + >=x11-proto/xproto-7.0.26 >=x11-proto/presentproto-1.0 >=x11-proto/dri3proto-1.0 dmx? ( @@ -111,12 +122,18 @@ DEPEND="${RDEPEND} >=x11-proto/dri2proto-2.8 )" +RDEPEND="${CDEPEND} + selinux? ( sec-policy/selinux-xserver ) + !x11-drivers/xf86-video-modesetting +" + PDEPEND=" xorg? ( >=x11-base/xorg-drivers-$(get_version_component_range 1-2) )" REQUIRED_USE="!minimal? ( || ( ${IUSE_SERVERS} ) - )" + ) + xephyr? ( kdrive )" #UPSTREAMED_PATCHES=( # "${WORKDIR}/patches/" @@ -124,8 +141,10 @@ REQUIRED_USE="!minimal? ( PATCHES=( "${UPSTREAMED_PATCHES[@]}" - "${FILESDIR}"/${PN}-1.12-ia64-fix_inx_outx.patch + "${FILESDIR}"/${PN}-1.17-ia64-fix_inx_outx.patch "${FILESDIR}"/${PN}-1.12-unloadsubmodule.patch + # needed for new eselect-opengl, bug #541232 + "${FILESDIR}"/${PN}-1.17-support-multiple-Files-sections.patch ) pkg_pretend() { @@ -135,7 +154,8 @@ pkg_pretend() { } src_configure() { - use arm && append-cppflags -D__arm32__ + # might still be needed + #use arm && append-cppflags -D__arm32__ # localstatedir is used for the log location; we need to override the default # from ebuild.sh @@ -145,6 +165,7 @@ src_configure() { XORG_CONFIGURE_OPTIONS=( $(use_enable ipv6) $(use_enable dmx) + $(use_enable glamor) $(use_enable kdrive) $(use_enable kdrive kdrive-kbd) $(use_enable kdrive kdrive-mouse) @@ -159,6 +180,7 @@ src_configure() { $(use_enable !minimal dri) $(use_enable !minimal dri2) $(use_enable !minimal glx) + $(use_enable xephyr) $(use_enable xnest) $(use_enable xorg) $(use_enable xvfb) @@ -166,6 +188,8 @@ src_configure() { $(use_enable udev config-udev) $(use_with doc doxygen) $(use_with doc xmlto) + $(use_with systemd systemd-daemon) + $(use_enable systemd systemd-logind) --enable-libdrm --sysconfdir="${EPREFIX}"/etc/X11 --localstatedir="${EPREFIX}"/var @@ -176,27 +200,15 @@ src_configure() { --without-dtrace --without-fop --with-os-vendor=Gentoo + --with-sha1=libcrypto ) - # Xorg-server requires includes from OS mesa which are not visible for - # users of binary drivers. - mkdir -p "${T}/mesa-symlinks/GL" - for i in gl glx glxmd glxproto glxtokens; do - ln -s "${EROOT}usr/$(get_libdir)/opengl/xorg-x11/include/$i.h" "${T}/mesa-symlinks/GL/$i.h" || die - done - for i in glext glxext; do - ln -s "${EROOT}usr/$(get_libdir)/opengl/global/include/$i.h" "${T}/mesa-symlinks/GL/$i.h" || die - done - append-cppflags "-I${T}/mesa-symlinks" - xorg-2_src_configure } src_install() { xorg-2_src_install - dynamic_libgl_install - server_based_install if ! use minimal && use xorg; then @@ -205,7 +217,7 @@ src_install() { fi newinitd "${FILESDIR}"/xdm-setup.initd-1 xdm-setup - newinitd "${FILESDIR}"/xdm.initd-10 xdm + newinitd "${FILESDIR}"/xdm.initd-11 xdm newconfd "${FILESDIR}"/xdm.confd-4 xdm # install the @x11-module-rebuild set for Portage @@ -216,25 +228,6 @@ src_install() { pkg_postinst() { # sets up libGL and DRI2 symlinks if needed (ie, on a fresh install) eselect opengl set xorg-x11 --use-old - - if [[ ${PV} != 9999 && $(get_version_component_range 2 ${REPLACING_VERSIONS}) != $(get_version_component_range 2 ${PV}) ]]; then - elog "You should consider reading upgrade guide for this release:" - elog " http://www.gentoo.org/proj/en/desktop/x/x11/xorg-server-$(get_version_component_range 1-2)-upgrade-guide.xml" - echo - ewarn "You must rebuild all drivers if upgrading from <xorg-server-$(get_version_component_range 1-2)" - ewarn "because the ABI changed. If you cannot start X because" - ewarn "of module version mismatch errors, this is your problem." - - echo - ewarn "You can rebuild all installed packages in the x11-drivers" - ewarn "category using this command:" - ewarn " emerge @x11-module-rebuild" - fi - - if use udev && has_version virtual/udev[-keymap]; then - ewarn "virtual/udev was built without keymap support. This may cause input device" - ewarn "autoconfiguration to fail." - fi } pkg_postrm() { @@ -244,19 +237,6 @@ pkg_postrm() { fi } -dynamic_libgl_install() { - # next section is to setup the dynamic libGL stuff - ebegin "Moving GL files for dynamic switching" - dodir /usr/$(get_libdir)/opengl/xorg-x11/extensions - local x="" - for x in "${ED}"/usr/$(get_libdir)/xorg/modules/extensions/lib{glx,dri,dri2}*; do - if [ -f ${x} -o -L ${x} ]; then - mv -f ${x} "${ED}"/usr/$(get_libdir)/opengl/xorg-x11/extensions - fi - done - eend 0 -} - server_based_install() { if ! use xorg; then rm "${ED}"/usr/share/man/man1/Xserver.1x \ diff --git a/x11-libs/libdrm/Manifest b/x11-libs/libdrm/Manifest index 4f05986..d189571 100644 --- a/x11-libs/libdrm/Manifest +++ b/x11-libs/libdrm/Manifest @@ -3,4 +3,4 @@ AUX libdrm-2.4.58-solaris.patch 2690 SHA256 70c8c0f8834d639ae3264ca33fd4e2cde449 AUX libdrm-arm-update.patch 1314 SHA256 62093ac1c1919828e12bc4b10cbadf6ed675fc8d755931a4365744fba683c7ac SHA512 5bad10d19b1fd534620654cd4d23a66e94f35951010867f6addf55d9a668519a78a75c03eb1428b9a275d598b0e3898c02023548101b5265c254c4a6345bc1d2 WHIRLPOOL e6b68936223232169b0774189a3c14b4ddc042ca1e5e6ce2feefdcc69b19afd1775356dc0afb53a22af0c9ee1a6babc56d66ea3a016494d5689c072dc4aedc2f DIST libdrm-2.4.58.tar.bz2 573202 SHA256 b155fae6b9c9a3b02ef8b77f58c7c219194c996a4018dc55ba66c03996a365dd SHA512 26776b3f93fe173f4e0f94668813ec1a756d9f15385d1cad70c7af8d4d5d503aef00e14081c76f6fcac6e0c606e106e47ddf76038f8601b71fc380306536f937 WHIRLPOOL 36d8915b3189fd0722f96698ce5e7a94188859c7372631c4126b0e09e8fa6dbd4e34de5e9d62e053c36e9f431d84d68d327be307d69caf92e1016893e77cf190 EBUILD libdrm-2.4.58.ebuild 1825 SHA256 6274a3180336d62cf10397628114ff49204243ccb0f670095540d123a57dbceb SHA512 f86c12a8102ef47b76112b20db92f7d23a80c847bab3b0512c92272869cf0c373df5f2095c60e7ddc18dbbc42294c238bb67a8cdab5cea33216457a35d40a104 WHIRLPOOL 4b5c150eaa8f266eda43145a2f9a6d06320378876dae9340e65b0fe1faae10e69e26004cd790abf537e6d26c59def4b552d9af450bfdec6c3d04a65d3fc33c9d -EBUILD libdrm-9999.ebuild 1825 SHA256 6274a3180336d62cf10397628114ff49204243ccb0f670095540d123a57dbceb SHA512 f86c12a8102ef47b76112b20db92f7d23a80c847bab3b0512c92272869cf0c373df5f2095c60e7ddc18dbbc42294c238bb67a8cdab5cea33216457a35d40a104 WHIRLPOOL 4b5c150eaa8f266eda43145a2f9a6d06320378876dae9340e65b0fe1faae10e69e26004cd790abf537e6d26c59def4b552d9af450bfdec6c3d04a65d3fc33c9d +EBUILD libdrm-9999.ebuild 1837 SHA256 5c2a7759a3b077eadf94d093d66bed3730aed72a8217508f10e1fdd788c6b47c SHA512 c3b996124656afce538a3f3da2d9ffd0a43ffc5c01368be69fda8c0dadcc30aa755477fcde2504a5000d83eec0e06edcc83e962bf08da07f675d6f90b93def8a WHIRLPOOL 3b495b407a05dcbce832fb1e83c99435942c89ecb5f095c85811895fb082720b3f7ea6a3cb2c664d060bcddbd2710b4fd31a9c6fd5bfee0a2928b09165cb3226 diff --git a/x11-libs/libdrm/libdrm-9999.ebuild b/x11-libs/libdrm/libdrm-9999.ebuild index c0bec60..526786a 100644 --- a/x11-libs/libdrm/libdrm-9999.ebuild +++ b/x11-libs/libdrm/libdrm-9999.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2014 Gentoo Foundation +# Copyright 1999-2015 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ @@ -15,7 +15,7 @@ else SRC_URI="http://dri.freedesktop.org/${PN}/${P}.tar.bz2" fi -KEYWORDS="~alpha amd64 ~arm hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc x86 ~amd64-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~amd64-linux ~arm-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~amd64-linux ~arm-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris" VIDEO_CARDS="exynos freedreno intel nouveau omap radeon tegra vmware" for card in ${VIDEO_CARDS}; do IUSE_VIDEO_CARDS+=" video_cards_${card}" @@ -30,7 +30,6 @@ RDEPEND=">=dev-libs/libpthread-stubs-0.3-r1:=[${MULTILIB_USEDEP}] DEPEND="${RDEPEND}" PATCHES=( - "${FILESDIR}"/${PN}-2.4.58-solaris.patch "${FILESDIR}"/${PN}-arm-update.patch ) @@ -44,9 +43,11 @@ src_prepare() { src_configure() { XORG_CONFIGURE_OPTIONS=( - --enable-udev + # Udev is only used by tests now. + --disable-udev + --disable-cairo-tests $(use_enable video_cards_exynos exynos-experimental-api) - $(use_enable video_cards_freedreno freedreno-experimental-api) + $(use_enable video_cards_freedreno freedreno) $(use_enable video_cards_intel intel) $(use_enable video_cards_nouveau nouveau) $(use_enable video_cards_omap omap-experimental-api) |