diff --git a/media-libs/mesa/Manifest b/media-libs/mesa/Manifest index 32bd7c4..13b4475 100644 --- a/media-libs/mesa/Manifest +++ b/media-libs/mesa/Manifest @@ -1 +1,2 @@ -DIST mesa-13.0.2.tar.xz 9159100 SHA256 a6ed622645f4ed61da418bf65adde5bcc4bb79023c36ba7d6b45b389da4416d5 SHA512 e4e2b9d685910f9b1d70958c50f54d059263623865571a92c3aa185914f4f7aa745d74afc9706b64ecd1f8d04c603ad03a78365d976382e2664284dc6a8351be WHIRLPOOL 49cb109e3b97f491f7682155a3194fd3df8808235a45a18539a8ecf55d2e3a9ba13dabb13f819822e256b272b4145efad029e38e7c666a5bf7abe7906528f6d2 +DIST mesa-13.0.2.tar.xz 9159100 BLAKE2B bed844db8474a16f210503789fef94f0c7874f468030d8a4b3e2e899b731030d116876d29d5854f9dfb0e48d2b70e9f06fb9b181320c15d85cd5526230398124 SHA512 e4e2b9d685910f9b1d70958c50f54d059263623865571a92c3aa185914f4f7aa745d74afc9706b64ecd1f8d04c603ad03a78365d976382e2664284dc6a8351be +DIST mesa-13.0.6.tar.xz 9179236 BLAKE2B d28d54f1d6fe1a55932760f7b70ef0b8e21d99c3ec8da3e524e6d4681c0c4f631a5e6ffb3362ccf9ea1651624c22e54d1cfd9db60faf9f33368fa2e1239c00a9 SHA512 2455e044647f674c2f1dd524143b61b8630713fa929bbf6fe1c981436a9c08dc933553d638a22b32d2799afb77be746355b48b1b20af172141c5b63891e94441 diff --git a/media-libs/mesa/mesa-13.0.6.ebuild b/media-libs/mesa/mesa-13.0.6.ebuild new file mode 100644 index 0000000..1311cfd --- /dev/null +++ b/media-libs/mesa/mesa-13.0.6.ebuild @@ -0,0 +1,510 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +EGIT_REPO_URI="git://anongit.freedesktop.org/mesa/mesa" + +if [[ ${PV} = 9999 ]]; then + GIT_ECLASS="git-r3" + EXPERIMENTAL="true" +fi + +PYTHON_COMPAT=( python2_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="https://www.mesa3d.org/" + +if [[ $PV == 9999 ]]; then + SRC_URI="" +else + SRC_URI="ftp://ftp.freedesktop.org/pub/mesa/${FOLDER}/${MY_P}.tar.xz" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris" +fi + +LICENSE="MIT" +SLOT="0" +RESTRICT="!bindist? ( bindist )" + +INTEL_CARDS="i915 i965 intel" +RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi" +VIDEO_CARDS="${INTEL_CARDS} ${RADEON_CARDS} freedreno nouveau vc4 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 gcrypt gles1 gles2 + libressl +llvm +nettle +nptl opencl osmesa pax_kernel openmax openssl pic + selinux vaapi valgrind vdpau vulkan wayland xvmc xa" + +REQUIRED_USE=" + || ( gcrypt libressl nettle openssl ) + d3d9? ( dri3 gallium ) + llvm? ( gallium ) + opencl? ( gallium llvm ) + openmax? ( gallium ) + gles1? ( egl ) + gles2? ( egl ) + vaapi? ( gallium ) + vdpau? ( gallium ) + vulkan? ( || ( video_cards_i965 video_cards_radeonsi ) ) + wayland? ( egl gbm ) + xa? ( gallium ) + video_cards_freedreno? ( gallium ) + video_cards_intel? ( classic ) + video_cards_i915? ( || ( classic gallium ) ) + video_cards_i965? ( classic ) + video_cards_nouveau? ( || ( classic gallium ) ) + video_cards_radeon? ( || ( classic gallium ) + gallium? ( x86? ( llvm ) amd64? ( llvm ) ) ) + video_cards_r100? ( classic ) + video_cards_r200? ( classic ) + video_cards_r300? ( gallium x86? ( llvm ) amd64? ( llvm ) ) + video_cards_r600? ( gallium ) + video_cards_radeonsi? ( gallium llvm ) + video_cards_vmware? ( gallium ) + ${PYTHON_REQUIRED_USE} +" + +LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.72" +# keep correct libdrm and dri2proto dep +# keep blocks in rdepend for binpkg +RDEPEND=" + !=app-eselect/eselect-opengl-1.3.0 + >=dev-libs/expat-2.1.0-r3:=[${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? ( + virtual/libelf:0=[${MULTILIB_USEDEP}] + ) + video_cards_r600? ( + virtual/libelf:0=[${MULTILIB_USEDEP}] + ) + video_cards_radeon? ( + virtual/libelf:0=[${MULTILIB_USEDEP}] + ) + >=sys-devel/llvm-3.6.0:0=[${MULTILIB_USEDEP}] + ) + nettle? ( dev-libs/nettle:=[${MULTILIB_USEDEP}] ) + !nettle? ( + gcrypt? ( dev-libs/libgcrypt:=[${MULTILIB_USEDEP}] ) + !gcrypt? ( + libressl? ( dev-libs/libressl:=[${MULTILIB_USEDEP}] ) + !libressl? ( dev-libs/openssl:=[${MULTILIB_USEDEP}] ) + ) + ) + opencl? ( + app-eselect/eselect-opencl + dev-libs/libclc + virtual/libelf:0=[${MULTILIB_USEDEP}] + ) + openmax? ( >=media-libs/libomxil-bellagio-0.9.3:=[${MULTILIB_USEDEP}] ) + vaapi? ( + >=x11-libs/libva-1.6.0:=[${MULTILIB_USEDEP}] + video_cards_nouveau? ( !<=x11-libs/libva-vdpau-driver-0.7.4-r3 ) + ) + vdpau? ( >=x11-libs/libvdpau-1.1:=[${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_nouveau?,video_cards_vc4?,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 +RDEPEND="${RDEPEND} + video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] ) +" + +# FIXME: kill the sys-devel/llvm[video_cards_radeon] compat once +# LLVM < 3.9 is out of the game +DEPEND="${RDEPEND} + llvm? ( + video_cards_radeonsi? ( || ( + sys-devel/llvm[llvm_targets_AMDGPU] + sys-devel/llvm[video_cards_radeon] + ) ) + ) + opencl? ( + >=sys-devel/llvm-3.4.2:0=[${MULTILIB_USEDEP}] + >=sys-devel/clang-3.4.2:0=[${MULTILIB_USEDEP}] + >=sys-devel/gcc-4.6 + ) + sys-devel/gettext + virtual/pkgconfig + valgrind? ( dev-util/valgrind ) + >=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}] +" +[[ ${PV} == 9999 ]] && DEPEND+=" + sys-devel/bison + sys-devel/flex + ${PYTHON_DEPS} + $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]") +" + +S="${WORKDIR}/${MY_P}" +EGIT_CHECKOUT_DIR=${S} + +QA_WX_LOAD=" +x86? ( + !pic? ( + usr/lib*/libglapi.so.0.0.0 + usr/lib*/libGLESv1_CM.so.1.1.0 + usr/lib*/libGLESv2.so.2.0.0 + usr/lib*/libGL.so.1.2.0 + usr/lib*/libOSMesa.so.8.0.0 + ) +)" + +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() { + epatch "${FILESDIR}/mesa-13.0.2-liverpool.patch" + [[ ${PV} == 9999 ]] && 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) + " + use vaapi && myconf+=" --with-va-libdir=/usr/$(get_libdir)/va/drivers" + + gallium_enable swrast + gallium_enable video_cards_vc4 vc4 + gallium_enable video_cards_vmware svga + gallium_enable video_cards_nouveau nouveau + gallium_enable video_cards_i915 i915 + 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 + # opencl stuff + if use opencl; then + myconf+=" + $(use_enable opencl) + --with-clang-libdir="${EPREFIX}/usr/lib" + " + fi + fi + + if use vulkan; then + vulkan_enable video_cards_i965 intel + + # radv is disabled due to dependence on >=llvm-3.9, bug 607660 + vulkan_enable video_cards_radeonsi radeon + fi + + # x86 hardened pax_kernel needs glx-rts, bug 240956 + if [[ ${ABI} == x86 ]]; then + myconf+=" $(use_enable pax_kernel glx-read-only-text)" + fi + + # on abi_x86_32 hardened we need to have asm disable + if [[ ${ABI} == x86* ]] && use pic; then + myconf+=" --disable-asm" + fi + + if use gallium; then + myconf+=" $(use_enable osmesa gallium-osmesa)" + else + myconf+=" $(use_enable osmesa)" + 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 \ + --disable-shader-cache \ + $(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) \ + --enable-valgrind=$(usex valgrind auto no) \ + --enable-llvm-shared-libs \ + --with-dri-drivers=${DRI_DRIVERS} \ + --with-gallium-drivers=${GALLIUM_DRIVERS} \ + --with-vulkan-drivers=${VULKAN_DRIVERS} \ + --with-sha1=$(usex nettle libnettle $(usex gcrypt libgcrypt libcrypto)) \ + 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 + + # Mesa should not install these + if use vulkan; then + rm "${ED}"/usr/include/vulkan/{vulkan.h,vk_platform.h} || die + fi +} + +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 +} + +vulkan_enable() { + case $# in + # for enabling unconditionally + 1) + VULKAN_DRIVERS+=",$1" + ;; + *) + if use $1; then + shift + for i in $@; do + VULKAN_DRIVERS+=",${i}" + done + fi + ;; + esac +} diff --git a/sys-devel/llvm/Manifest b/sys-devel/llvm/Manifest new file mode 100644 index 0000000..d19e3fa --- /dev/null +++ b/sys-devel/llvm/Manifest @@ -0,0 +1,7 @@ +DIST cfe-3.9.1.src.tar.xz 10363080 BLAKE2B 6f6cfe80ea0344342f070d451dabd41b9cf58962ca354f495868821173446f8a08c5a69819f0c5d20b4f49019036fa4a238838b224a1e55d5ac805668fc837d5 SHA512 3f0eea194597e438bbe49ce9ef5fdced81459c21cbdd2653750b2fe02c55a0154d6a33a8cfd02e607b83314a8e35b2c300f944462120ab6de1d4139d85db56b8 +DIST clang-tools-extra-3.9.1.src.tar.xz 456464 BLAKE2B 32cbb7d5282e286e0bf9f8b1e9ecddc5401b78fd088b1302978e0f6cf71fe864ab47eebe81bdea59ccd49122e6d2ef2281b5bd52e97af5eefdbd5d7da9550f5f SHA512 5691fb09f80b519876cdd2e82ad23a20bba32a0bc356e15e6db631b2936763911f15ff55f8bf5f073100b9e4cf217f08fdce90ae98ef0e084274259d3cfe9634 +DIST compiler-rt-3.9.1.src.tar.xz 1376372 BLAKE2B 1c7391a429329591d96e474c9ac5b36672a8d50dc621bd21a9e97035811d85293981e98ada1c3284f9d05115a1113086ba3888073fc3b76e09f83614cd7d37ce SHA512 91a4c78a5e8c1cdd2d6bbcb27d2c34f49ea30a952733444ef4f4a7cc7503c880d4b6924595e87745ef6278851178f49f98d38d2068975d4fb6577fb9e9cdcdbe +DIST lldb-3.9.1.src.tar.xz 13750816 BLAKE2B 40bd2797e1e06f600cdd88ba56af8e3c315cd9f2bc2ca12c3172623ae16750f051f9e6d76df354a3fc0c6a4fb802fa842952e1ff1d47a28f5cd218546da89563 SHA512 e2957a1da60284595b21c205b07fa3db5c474bfad1935ab8e1bc832f30af497e9eb709efeb703591ef62e7dd73a28d22fc21398097a232c8a729946d72eb5df7 +DIST llvm-3.9.0_rc3-manpages.tar.bz2 80007 BLAKE2B e770497834a5863f5c988d3bae8ef0f7e5551a505d2db9557567976c10fbaa68fb6013f9136db2123e626a99046b47ea5c0d62e1ea830d998015a1f67f67eeb9 SHA512 f96c340021de3f096ec3ad7d51a6af2c7a84974122d1df15729a39d4f9d65452f063a85ab38adb064288dc14220d9cc679b31ee19b48424d3d7cde621ff37597 +DIST llvm-3.9.1-patchset.tar.xz 16404 BLAKE2B 9c9d630e6c6a70ba6a026a6ecb7a7d29a567e6b85fc92ce128a8129006ccad44defc07a46351dfa188128a91d419696f6c36a0e184a04f9d1270d5431cbd59f5 SHA512 dcae89ba910b5195bb455924242912f526b6994f0f236571b6364fd594bf9ca03cc74e116a44ae4372e34ce63b21f1351125157e7af7a957aee115f400b54089 +DIST llvm-3.9.1.src.tar.xz 18130436 BLAKE2B 90afd2c06e612132bbc84c29fed59abdfdaed41f8a7590e3f60ba5072179317365f15f301f577ba050b78797f682bef8fa85ebad7391fd3e67b46eb02a5df068 SHA512 50cbe8ee911080f586e77861c442348701bd02e2de0c090c54c34f82ac275ecfcd712af0f41e387c33b4a6057778a4258a27554292fe68ab4af3fd9dd6d90683 diff --git a/sys-devel/llvm/files/3.9.1-r2/0001-cmake-Pass-Wl-z-nodelete-on-Linux-to-prevent-unloadi.patch b/sys-devel/llvm/files/3.9.1-r2/0001-cmake-Pass-Wl-z-nodelete-on-Linux-to-prevent-unloadi.patch new file mode 100644 index 0000000..b857136 --- /dev/null +++ b/sys-devel/llvm/files/3.9.1-r2/0001-cmake-Pass-Wl-z-nodelete-on-Linux-to-prevent-unloadi.patch @@ -0,0 +1,56 @@ +From 937b23b5fffa59deb1dc342cc5602d387d84a762 Mon Sep 17 00:00:00 2001 +From: Michal Gorny +Date: Mon, 27 Nov 2017 22:23:09 +0000 +Subject: [PATCH] [cmake] Pass -Wl,-z,nodelete on Linux to prevent unloading + +Prevent unloading shared libraries on Linux when dlclose() is called. +This is necessary since command-line option parsing API relies on +registering the global option instances in the option parser instance +which can be loaded in a different shared library. + +Given that we can't reliably remove those options when a library is +unloaded, the parser ends up containing dangling references. Since glibc +has relatively complex library unloading rules, some of the LLVM +libraries can be unloaded while others (including the Support library) +stay loaded causing quite a mayhem. To reliably prevent that, just +forbid unloading all libraries -- it's a very bad idea anyway. + +While the issue arguably happens only with BUILD_SHARED_LIBS, it may +affect any library reusing llvm::cl interface. + +Based on patch provided Ross Hayward on https://bugs.gentoo.org/617154. +Previously hit by Fedora back in Feb 2016: +https://lists.freedesktop.org/archives/mesa-dev/2016-February/107242.html + +Differential Revision: https://reviews.llvm.org/D40459 + +git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319105 91177308-0d34-0410-b5e6-96231b3b80d8 +--- + cmake/modules/HandleLLVMOptions.cmake | 8 ++++++++ + unittests/Support/DynamicLibrary/CMakeLists.txt | 7 +++++++ + 2 files changed, 15 insertions(+) + + 4.0.1 backport: removed the unittest part + +diff --git a/cmake/modules/HandleLLVMOptions.cmake b/cmake/modules/HandleLLVMOptions.cmake +index c5390371845..b5059a8a60e 100644 +--- a/cmake/modules/HandleLLVMOptions.cmake ++++ b/cmake/modules/HandleLLVMOptions.cmake +@@ -151,6 +151,14 @@ if(NOT (${CMAKE_SYSTEM_NAME} MATCHES "Darwin" OR WIN32 OR CYGWIN OR + set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-z,defs") + endif() + ++# Pass -Wl,-z,nodelete. This makes sure our shared libraries are not unloaded ++# by dlclose(). We need that since the CLI API relies on cross-references ++# between global objects which became horribly broken when one of the libraries ++# is unloaded. ++if(${CMAKE_SYSTEM_NAME} MATCHES "Linux") ++ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-z,nodelete") ++endif() ++ + + function(append value) + foreach(variable ${ARGN}) +-- +2.15.1 + diff --git a/sys-devel/llvm/llvm-3.9.1-r2.ebuild b/sys-devel/llvm/llvm-3.9.1-r2.ebuild new file mode 100644 index 0000000..1f9036f --- /dev/null +++ b/sys-devel/llvm/llvm-3.9.1-r2.ebuild @@ -0,0 +1,554 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +: ${CMAKE_MAKEFILE_GENERATOR:=emake} +PYTHON_COMPAT=( python2_7 ) + +inherit check-reqs cmake-utils eutils flag-o-matic multilib \ + multilib-minimal python-single-r1 toolchain-funcs pax-utils prefix + +DESCRIPTION="Low Level Virtual Machine" +HOMEPAGE="https://llvm.org/" +SRC_URI="https://llvm.org/releases/${PV}/${P}.src.tar.xz + clang? ( https://llvm.org/releases/${PV}/compiler-rt-${PV}.src.tar.xz + https://llvm.org/releases/${PV}/cfe-${PV}.src.tar.xz + https://llvm.org/releases/${PV}/clang-tools-extra-${PV}.src.tar.xz ) + lldb? ( https://llvm.org/releases/${PV}/lldb-${PV}.src.tar.xz ) + !doc? ( https://dev.gentoo.org/~mgorny/dist/llvm/${PN}-3.9.0_rc3-manpages.tar.bz2 ) + https://dev.gentoo.org/~mgorny/dist/llvm/${P}-patchset.tar.xz" + +# Keep in sync with CMakeLists.txt +ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM BPF Hexagon Mips MSP430 + NVPTX PowerPC Sparc SystemZ X86 XCore ) +ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" ) + +# Additional licenses: +# 1. OpenBSD regex: Henry Spencer's license ('rc' in Gentoo) + BSD. +# 2. ARM backend: LLVM Software Grant by ARM. +# 3. MD5 code: public-domain. +# 4. Tests (not installed): +# a. gtest: BSD. +# b. YAML tests: MIT. + +LICENSE="UoI-NCSA rc BSD public-domain + llvm_targets_ARM? ( LLVM-Grant )" +SLOT="0/${PV}" +KEYWORDS="amd64 ~arm64 x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos" +IUSE="clang debug default-compiler-rt default-libcxx doc gold libedit +libffi + lldb multitarget ncurses ocaml python +sanitize +static-analyzer test xml + elibc_musl kernel_Darwin kernel_FreeBSD ${ALL_LLVM_TARGETS[*]}" + +COMMON_DEPEND=" + sys-libs/zlib:0= + clang? ( + python? ( ${PYTHON_DEPS} ) + static-analyzer? ( + dev-lang/perl:* + ${PYTHON_DEPS} + ) + xml? ( dev-libs/libxml2:2=[${MULTILIB_USEDEP}] ) + ) + gold? ( >=sys-devel/binutils-2.22:*[cxx] ) + libedit? ( dev-libs/libedit:0=[${MULTILIB_USEDEP}] ) + libffi? ( >=virtual/libffi-3.0.13-r1:0=[${MULTILIB_USEDEP}] ) + lldb? ( dev-python/six[${PYTHON_USEDEP}] ) + ncurses? ( >=sys-libs/ncurses-5.9-r3:0=[${MULTILIB_USEDEP}] ) + ocaml? ( + >=dev-lang/ocaml-4.00.0:0= + dev-ml/ocaml-ctypes:= + !!<=sys-devel/llvm-3.7.0-r1[ocaml] )" +# configparser-3.2 breaks the build (3.3 or none at all are fine) +DEPEND="${COMMON_DEPEND} + dev-lang/perl + >=sys-devel/make-3.81 + >=sys-devel/flex-2.5.4 + >=sys-devel/bison-1.875d + || ( >=sys-devel/gcc-3.0 >=sys-devel/llvm-3.5 + ( >=sys-freebsd/freebsd-lib-9.1-r10 sys-libs/libcxx ) + ) + || ( >=sys-devel/binutils-2.18 >=sys-devel/binutils-apple-5.1 ) + kernel_Darwin? ( /dev/null || die + # be able to specify default values for -stdlib and -rtlib at build time + eapply "${WORKDIR}/${P}-patchset"/clang/default-libs.patch + popd >/dev/null || die + + sed -i -e "s^@EPREFIX@^${EPREFIX}^" \ + tools/clang/tools/scan-build/bin/scan-build || die + + # Install clang runtime into /usr/lib/clang + # https://llvm.org/bugs/show_bug.cgi?id=23792 + eapply "${WORKDIR}/${P}-patchset"/clang/0001-Install-clang-runtime-into-usr-lib-without-suffix.patch + eapply "${WORKDIR}/${P}-patchset"/compiler-rt/0001-cmake-Install-compiler-rt-into-usr-lib-without-suffi.patch + + # Make it possible to override CLANG_LIBDIR_SUFFIX + # (that is used only to find LLVMgold.so) + # https://llvm.org/bugs/show_bug.cgi?id=23793 + eapply "${WORKDIR}/${P}-patchset"/clang/0002-cmake-Make-CLANG_LIBDIR_SUFFIX-overridable.patch + + # Fix git-clang-format shebang, bug #562688 + python_fix_shebang tools/clang/tools/clang-format/git-clang-format + + pushd projects/compiler-rt >/dev/null || die + + # Fix WX sections, bug #421527 + find lib/builtins -type f -name '*.S' -exec sed \ + -e '$a\\n#if defined(__linux__) && defined(__ELF__)\n.section .note.GNU-stack,"",%progbits\n#endif' \ + -i {} + || die + + popd >/dev/null || die + fi + + if use lldb; then + # Do not install dummy readline.so module from + # https://llvm.org/bugs/show_bug.cgi?id=18841 + sed -e 's/add_subdirectory(readline)/#&/' \ + -i tools/lldb/scripts/Python/modules/CMakeLists.txt || die + # Do not install bundled six module + eapply "${WORKDIR}/${P}-patchset"/lldb/six.patch + fi + + # User patches + QA + cmake-utils_src_prepare + + # Native libdir is used to hold LLVMgold.so + NATIVE_LIBDIR=$(get_libdir) +} + +multilib_src_configure() { + local ffi_cflags ffi_ldflags + if use libffi; then + ffi_cflags=$($(tc-getPKG_CONFIG) --cflags-only-I libffi) + ffi_ldflags=$($(tc-getPKG_CONFIG) --libs-only-L libffi) + fi + + local libdir=$(get_libdir) + local mycmakeargs=( + -DLLVM_LIBDIR_SUFFIX=${libdir#lib} + + -DBUILD_SHARED_LIBS=ON + -DLLVM_TARGETS_TO_BUILD="${LLVM_TARGETS// /;}" + -DLLVM_BUILD_TESTS=$(usex test) + + -DLLVM_ENABLE_FFI=$(usex libffi) + -DLLVM_ENABLE_TERMINFO=$(usex ncurses) + -DLLVM_ENABLE_ASSERTIONS=$(usex debug) + -DLLVM_ENABLE_EH=ON + -DLLVM_ENABLE_RTTI=ON + + -DWITH_POLLY=OFF # TODO + + -DLLVM_HOST_TRIPLE="${CHOST}" + + -DFFI_INCLUDE_DIR="${ffi_cflags#-I}" + -DFFI_LIBRARY_DIR="${ffi_ldflags#-L}" + + -DHAVE_HISTEDIT_H=$(usex libedit) + ) + + if use clang; then + mycmakeargs+=( + -DCMAKE_DISABLE_FIND_PACKAGE_LibXml2=$(usex !xml) + # libgomp support fails to find headers without explicit -I + # furthermore, it provides only syntax checking + -DCLANG_DEFAULT_OPENMP_RUNTIME=libomp + + # override default stdlib and rtlib + -DCLANG_DEFAULT_CXX_STDLIB=$(usex default-libcxx libc++ "") + -DCLANG_DEFAULT_RTLIB=$(usex default-compiler-rt compiler-rt "") + + # compiler-rt's test cases depend on sanitizer + -DCOMPILER_RT_BUILD_SANITIZERS=$(usex sanitize) + -DCOMPILER_RT_INCLUDE_TESTS=$(usex sanitize) + ) + fi + + if use lldb; then + mycmakeargs+=( + -DLLDB_DISABLE_LIBEDIT=$(usex !libedit) + -DLLDB_DISABLE_CURSES=$(usex !ncurses) + -DLLDB_ENABLE_TERMINFO=$(usex ncurses) + ) + fi + + if ! multilib_is_native_abi || ! use ocaml; then + mycmakeargs+=( + -DOCAMLFIND=NO + ) + fi +# Note: go bindings have no CMake rules at the moment +# but let's kill the check in case they are introduced +# if ! multilib_is_native_abi || ! use go; then + mycmakeargs+=( + -DGO_EXECUTABLE=GO_EXECUTABLE-NOTFOUND + ) +# fi + + if multilib_is_native_abi; then + mycmakeargs+=( + -DLLVM_BUILD_DOCS=$(usex doc) + -DLLVM_ENABLE_SPHINX=$(usex doc) + -DLLVM_ENABLE_DOXYGEN=OFF + -DLLVM_INSTALL_HTML="${EPREFIX}/usr/share/doc/${PF}/html" + -DSPHINX_WARNINGS_AS_ERRORS=OFF + -DLLVM_INSTALL_UTILS=ON + ) + + if use clang; then + mycmakeargs+=( + -DCLANG_INSTALL_HTML="${EPREFIX}/usr/share/doc/${PF}/clang" + ) + fi + + if use gold; then + mycmakeargs+=( + -DLLVM_BINUTILS_INCDIR="${EPREFIX}"/usr/include + ) + fi + + if use lldb; then + mycmakeargs+=( + -DLLDB_DISABLE_PYTHON=$(usex !python) + ) + fi + + else + if use clang; then + mycmakeargs+=( + # disable compiler-rt on non-native ABI because: + # 1. it fails to configure because of -m32 + # 2. it is shared between ABIs so no point building + # it multiple times + -DLLVM_EXTERNAL_COMPILER_RT_BUILD=OFF + -DLLVM_EXTERNAL_CLANG_TOOLS_EXTRA_BUILD=OFF + ) + fi + if use lldb; then + mycmakeargs+=( + # only run swig on native abi + -DLLDB_DISABLE_PYTHON=ON + ) + fi + fi + + if use clang; then + mycmakeargs+=( + -DCLANG_ENABLE_ARCMT=$(usex static-analyzer) + -DCLANG_ENABLE_STATIC_ANALYZER=$(usex static-analyzer) + -DCLANG_LIBDIR_SUFFIX="${NATIVE_LIBDIR#lib}" + ) + + # -- not needed when compiler-rt is built with host compiler -- + # cmake passes host C*FLAGS to compiler-rt build + # which is performed using clang, so we need to filter out + # some flags clang does not support + # (if you know some more flags that don't work, let us know) + #filter-flags -msahf -frecord-gcc-switches + fi + + if tc-is-cross-compiler; then + [[ -x "/usr/bin/llvm-tblgen" ]] \ + || die "/usr/bin/llvm-tblgen not found or usable" + mycmakeargs+=( + -DCMAKE_CROSSCOMPILING=ON + -DLLVM_TABLEGEN=/usr/bin/llvm-tblgen + ) + + if use clang; then + [[ -x "/usr/bin/clang-tblgen" ]] \ + || die "/usr/bin/clang-tblgen not found or usable" + mycmakeargs+=( + -DCLANG_TABLEGEN=/usr/bin/clang-tblgen + ) + fi + fi + + cmake-utils_src_configure +} + +multilib_src_compile() { + cmake-utils_src_compile + # TODO: not sure why this target is not correctly called + multilib_is_native_abi && use doc && use ocaml && cmake-utils_src_make docs/ocaml_doc + + pax-mark m "${BUILD_DIR}"/bin/llvm-rtdyld + pax-mark m "${BUILD_DIR}"/bin/lli + pax-mark m "${BUILD_DIR}"/bin/lli-child-target + + if use test; then + pax-mark m "${BUILD_DIR}"/unittests/ExecutionEngine/Orc/OrcJITTests + pax-mark m "${BUILD_DIR}"/unittests/ExecutionEngine/MCJIT/MCJITTests + pax-mark m "${BUILD_DIR}"/unittests/Support/SupportTests + fi + + # provide a symlink for tests + if [[ $(get_libdir) != lib ]]; then + ln -s "../$(get_libdir)/clang" lib/clang || die + fi +} + +multilib_src_test() { + # respect TMPDIR! + local -x LIT_PRESERVES_TMP=1 + local test_targets=( check ) + # clang tests won't work on non-native ABI because we skip compiler-rt + multilib_is_native_abi && use clang && test_targets+=( check-clang ) + cmake-utils_src_make "${test_targets[@]}" +} + +src_install() { + local MULTILIB_CHOST_TOOLS=( + /usr/bin/llvm-config + ) + + local MULTILIB_WRAPPED_HEADERS=( + /usr/include/llvm/Config/config.h + /usr/include/llvm/Config/llvm-config.h + ) + + if use clang; then + MULTILIB_WRAPPED_HEADERS+=( + /usr/include/clang/Config/config.h + ) + fi + + multilib-minimal_src_install + + if use clang; then + # Apply CHOST and version suffix to clang tools + local clang_version=${PV%.*} + local clang_tools=( clang clang++ clang-cl clang-cpp ) + local abi i + + # cmake gives us: + # - clang-X.Y + # - clang -> clang-X.Y + # - clang++, clang-cl, clang-cpp -> clang + # we want to have: + # - clang-X.Y + # - clang++-X.Y, clang-cl-X.Y, clang-cpp-X.Y -> clang-X.Y + # - clang, clang++, clang-cl, clang-cpp -> clang*-X.Y + # also in CHOST variant + for i in "${clang_tools[@]:1}"; do + rm -f "${ED%/}/usr/bin/${i}" || die + dosym "clang-${clang_version}" "/usr/bin/${i}-${clang_version}" + dosym "${i}-${clang_version}" "/usr/bin/${i}" + done + + # now create target symlinks for all supported ABIs + for abi in $(get_all_abis); do + local abi_chost=$(get_abi_CHOST "${abi}") + for i in "${clang_tools[@]}"; do + dosym "${i}-${clang_version}" \ + "/usr/bin/${abi_chost}-${i}-${clang_version}" + dosym "${abi_chost}-${i}-${clang_version}" \ + "/usr/bin/${abi_chost}-${i}" + done + done + fi + + # Remove unnecessary headers on FreeBSD, bug #417171 + if use kernel_FreeBSD && use clang; then + rm "${ED}"usr/lib/clang/${PV}/include/{std,float,iso,limits,tgmath,varargs}*.h || die + fi +} + +multilib_src_install() { + cmake-utils_src_install + + if multilib_is_native_abi; then + # Symlink the gold plugin. + if use gold; then + dodir "/usr/${CHOST}/binutils-bin/lib/bfd-plugins" + dosym "../../../../$(get_libdir)/LLVMgold.so" \ + "/usr/${CHOST}/binutils-bin/lib/bfd-plugins/LLVMgold.so" + fi + fi +} + +multilib_src_install_all() { + insinto /usr/share/vim/vimfiles + doins -r utils/vim/*/. + # some users may find it useful + dodoc utils/vim/vimrc + + # Install man pages from the prebuilt package + if ! use doc; then + if ! use clang; then + rm "${WORKDIR}"/${PN}-3.9.0_rc3-manpages/{clang,extraclangtools,scan-build}.1 || die + fi + + doman "${WORKDIR}"/${PN}-3.9.0_rc3-manpages/*.1 + fi + + if use clang; then + pushd tools/clang >/dev/null || die + + if use python ; then + pushd bindings/python/clang >/dev/null || die + + python_moduleinto clang + python_domodule *.py + + popd >/dev/null || die + fi + + # AddressSanitizer symbolizer (currently separate) + dobin "${S}"/projects/compiler-rt/lib/asan/scripts/asan_symbolize.py + + popd >/dev/null || die + + python_fix_shebang "${ED}" + if use static-analyzer; then + python_optimize "${ED}"usr/share/scan-view + fi + fi +} diff --git a/x11-drivers/xf86-video-ati/Manifest b/x11-drivers/xf86-video-ati/Manifest index 269bdb3..bb0085e 100644 --- a/x11-drivers/xf86-video-ati/Manifest +++ b/x11-drivers/xf86-video-ati/Manifest @@ -1 +1,2 @@ -DIST xf86-video-ati-7.8.0.tar.bz2 845702 SHA256 401f5de772928f3dc4ce43a885adb0a47a2f61aa4a9e45d2ab3d184136a9d6fa SHA512 e09b7aca819656359d32b11f4314f2ad77b7a28d481b2cf17ea62f2e2385f9b40f568d5c76360c800c60c00671f0262277cdefde4c0744f2ed9b3b2fa90a37a9 WHIRLPOOL b5e8a4cf546bb56f1e481e9dc7da8dc850c4fb231d10c592a7e2ffbfb9da0a64edb1b208b326283a6a94e4c0c5aefe5e4a04a984475e7ac5a5bab757ad0f990b +DIST xf86-video-ati-7.8.0.tar.bz2 845702 BLAKE2B 9c9843f000b5b74c11d7593bdb69bb4da133fbd80edc3f4991d465fefbaebd5f7d141e96ac7b82c0ed8dbe2fbe03e24fdfcaaeb3ca010c5a41d0aaa30a0509b0 SHA512 e09b7aca819656359d32b11f4314f2ad77b7a28d481b2cf17ea62f2e2385f9b40f568d5c76360c800c60c00671f0262277cdefde4c0744f2ed9b3b2fa90a37a9 +DIST xf86-video-ati-7.9.0.tar.bz2 848502 BLAKE2B 0572ef3cba7a3704470b4611f755a29a2551acc6fa544fb03f37a88628d5dfecba8342c8558b8355f245f2582eb46d17fb92b8713378161da3d103215e66d883 SHA512 125e035da6581520d677c56474653ed75aa6d168bf5450cc973248416b5ada3114ea14d0615b44c58029bb1702609453ab532a506273df2a5dd99dd2af4a9d43 diff --git a/x11-drivers/xf86-video-ati/xf86-video-ati-7.9.0.ebuild b/x11-drivers/xf86-video-ati/xf86-video-ati-7.9.0.ebuild new file mode 100644 index 0000000..edda504 --- /dev/null +++ b/x11-drivers/xf86-video-ati/xf86-video-ati-7.9.0.ebuild @@ -0,0 +1,50 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +XORG_DRI=always +inherit linux-info xorg-2 + +DESCRIPTION="ATI video driver" +HOMEPAGE="http://www.x.org/wiki/ati/" + +KEYWORDS="alpha amd64 ia64 ppc ppc64 sparc x86 ~amd64-fbsd" +IUSE="+glamor udev" + +RDEPEND=">=x11-libs/libdrm-2.4.60[video_cards_radeon] + >=x11-libs/libpciaccess-0.8.0 + glamor? ( x11-base/xorg-server[glamor] ) + udev? ( virtual/udev )" +DEPEND="${RDEPEND} + x11-proto/fontsproto + x11-proto/randrproto + x11-proto/renderproto + x11-proto/videoproto + x11-proto/xextproto + x11-proto/xf86driproto + x11-proto/xproto" + +pkg_pretend() { + if use kernel_linux ; then + if kernel_is -ge 3 9; then + CONFIG_CHECK="~!DRM_RADEON_UMS ~!FB_RADEON" + else + CONFIG_CHECK="~DRM_RADEON_KMS ~!FB_RADEON" + fi + fi + check_extra_config +} + +src_prepare() { + epatch "${FILESDIR}/xf86-video-ati-7.6.1-liverpool.patch" + xorg-2_src_prepare +} + +src_configure() { + XORG_CONFIGURE_OPTIONS=( + $(use_enable glamor) + $(use_enable udev) + ) + xorg-2_src_configure +} diff --git a/x11-libs/libdrm/Manifest b/x11-libs/libdrm/Manifest index a7e17e5..90bbfeb 100644 --- a/x11-libs/libdrm/Manifest +++ b/x11-libs/libdrm/Manifest @@ -1 +1,2 @@ -DIST libdrm-2.4.74.tar.bz2 781730 SHA256 d80dd5a76c401f4c8756dcccd999c63d7e0a3bad258d96a829055cfd86ef840b SHA512 5b9784bf00bb8179ad59f2fbe5600b51ede3f79dd1ea2cb50485ffaabf74e83d766b2deb6833b99692a303e6780286ecce41b88a2d7c15f9e839bc7182a8879d WHIRLPOOL 25a85b5cbfa02b6e4e75f517dd445b5182593a04485ad6ac715e88ae6f7f3952de49096f17c27be7c9bcd2eab064147952e49c1d0957dd95d4e672ba68cd5bc0 +DIST libdrm-2.4.74.tar.bz2 781730 BLAKE2B 30e3dcb2848e8501ecee54d473080acc0d1b6b084005d94a2424033cd8bcc2bcd45778e2ac06273281ddb24c2b6277c6b602887a09e042d8d13eaef07b0fc0c4 SHA512 5b9784bf00bb8179ad59f2fbe5600b51ede3f79dd1ea2cb50485ffaabf74e83d766b2deb6833b99692a303e6780286ecce41b88a2d7c15f9e839bc7182a8879d +DIST libdrm-2.4.79.tar.bz2 783711 BLAKE2B 92b94f08bcd99fbb308dca4bdb6702b5b80df5aaa2567f729d6f10783d057440c0ba1b2ae9f12687d2955629888a78fd2771f3bff7eef8b2ab6e69bd1bca7f33 SHA512 62d6dbdf5e4e73e948fcb128a3ee76c88843d0aabf0af5751526829e9b95cff151a121af88ba9625acc7f5bc4ecfa71f9a3762005d5da76cff1d91dfc8ea8ea7 diff --git a/x11-libs/libdrm/libdrm-2.4.79.ebuild b/x11-libs/libdrm/libdrm-2.4.79.ebuild new file mode 100644 index 0000000..c7d4ef5 --- /dev/null +++ b/x11-libs/libdrm/libdrm-2.4.79.ebuild @@ -0,0 +1,63 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +XORG_MULTILIB=yes +inherit xorg-2 + +DESCRIPTION="X.Org libdrm library" +HOMEPAGE="https://dri.freedesktop.org/" +if [[ ${PV} = 9999* ]]; then + EGIT_REPO_URI="git://anongit.freedesktop.org/git/mesa/drm" +else + SRC_URI="https://dri.freedesktop.org/${PN}/${P}.tar.bz2" +fi + +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux" +VIDEO_CARDS="amdgpu exynos freedreno intel nouveau omap radeon tegra vc4 vivante vmware" +for card in ${VIDEO_CARDS}; do + IUSE_VIDEO_CARDS+=" video_cards_${card}" +done + +IUSE="${IUSE_VIDEO_CARDS} libkms valgrind" +RESTRICT="test" # see bug #236845 + +RDEPEND=">=dev-libs/libpthread-stubs-0.3-r1:=[${MULTILIB_USEDEP}] + video_cards_intel? ( >=x11-libs/libpciaccess-0.13.1-r1:=[${MULTILIB_USEDEP}] ) + abi_x86_32? ( !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)] )" +DEPEND="${RDEPEND} + valgrind? ( dev-util/valgrind )" + +src_prepare() { + if [[ ${PV} = 9999* ]]; then + # tests are restricted, no point in building them + sed -ie 's/tests //' "${S}"/Makefile.am + fi + epatch "${FILESDIR}/libdrm-2.4.74-liverpool.patch" + xorg-2_src_prepare +} + +src_configure() { + XORG_CONFIGURE_OPTIONS=( + # Udev is only used by tests now. + --disable-udev + --disable-cairo-tests + $(use_enable video_cards_amdgpu amdgpu) + $(use_enable video_cards_exynos exynos-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) + $(use_enable video_cards_radeon radeon) + $(use_enable video_cards_tegra tegra-experimental-api) + $(use_enable video_cards_vc4 vc4) + $(use_enable video_cards_vivante etnaviv-experimental-api) + $(use_enable video_cards_vmware vmwgfx) + $(use_enable libkms) + # valgrind installs its .pc file to the pkgconfig for the primary arch + --enable-valgrind=$(usex valgrind auto no) + ) + + xorg-2_src_configure +}