--- foo.ebuild 2012-12-21 01:24:32.309108254 -0700 +++ /root/funtoo-overlay/x11-drivers/ati-drivers/ati-drivers-12.11_beta11-r1.ebuild 2012-12-21 01:12:35.550215875 -0700 @@ -1,6 +1,4 @@ -# Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: $ EAPI=4 @@ -10,9 +8,9 @@ HOMEPAGE="http://www.amd.com" MY_V=( $(get_version_components) ) #RUN="${WORKDIR}/amd-driver-installer-9.00-x86.x86_64.run" -SRC_URI="http://www2.ati.com/drivers/beta/amd-driver-installer-catalyst-12.11-beta11-x86.x86_64.zip" +SRC_URI="http://www2.ati.com/drivers/beta/amd-driver-installer-catalyst-12.11-beta11-x86.x86_64.zip http://developer.amd.com.php53-23.ord1-1.websitetestlink.com/wordpress/media/2012/10/xvba-sdk-0.74-404001.tar.gz" FOLDER_PREFIX="common/" -IUSE="debug +modules multilib qt4 static-libs disable-watermark" +IUSE="+vaapi debug +modules multilib qt4 static-libs disable-watermark" LICENSE="AMD GPL-2 QPL-1.0 as-is" KEYWORDS="-* ~amd64 ~x86" @@ -47,6 +45,7 @@ " DEPEND="${RDEPEND} + app-arch/unzip x11-proto/inputproto x11-proto/xf86miscproto x11-proto/xf86vidmodeproto @@ -56,6 +55,10 @@ app-misc/pax-utils " +PDEPEND=" + vaapi? ( x11-libs/xvba-video ) +" + EMULTILIB_PKG="true" S="${WORKDIR}" @@ -279,18 +282,9 @@ } src_unpack() { - if [[ ${A} =~ .*\.tar\.gz ]]; then - unpack ${A} - else - #please note, RUN may be insanely assigned at top near SRC_URI - if [[ ${A} =~ .*\.zip ]]; then - unpack ${A} - [[ -z "$RUN" ]] && RUN="${S}/${A/%.zip/.run}" - else - RUN="${DISTDIR}/${A}" - fi - sh ${RUN} --extract "${S}" 2>&1 > /dev/null || die - fi + unpack ${A} + local RUN="$(ls amd-driver*)" + sh ${RUN} --extract "${S}" || die } src_prepare() { @@ -516,6 +510,9 @@ doexe "${FILESDIR}"/switchlibGL || die "doexe switchlibGL failed" cp "${FILESDIR}"/switchlibGL "${T}"/switchlibglx doexe "${T}"/switchlibglx || die "doexe switchlibglx failed" + + insinto /usr/include + doins ${WORKDIR}/include/*.h } src_install-libs() { @@ -588,9 +585,10 @@ for so in $(find "${D}"/usr/$(get_libdir) -maxdepth 1 -name *.so.[0-9].[0-9]) do local soname=${so##*/} - ## let's keep also this alternative way ;) - #dosym ${soname} /usr/$(get_libdir)/${soname%.[0-9]} - dosym ${soname} /usr/$(get_libdir)/$(scanelf -qF "#f%S" ${so}) + local soname_one=${soname%.[0-9]} + local soname_zero=${soname_one%.[0-9]} + dosym ${soname} /usr/$(get_libdir)/${soname_one} + dosym ${soname_one} /usr/$(get_libdir)/${soname_zero} done # See https://bugs.gentoo.org/show_bug.cgi?id=443466 @@ -599,6 +597,7 @@ #remove static libs if not wanted use static-libs || rm -rf "${D}"/usr/$(get_libdir)/libfglrx_dm.a + } pkg_postinst() { @@ -620,6 +619,13 @@ use modules && linux-mod_pkg_postinst "${ROOT}"/usr/bin/eselect opengl set --use-old ati "${ROOT}"/usr/bin/eselect opencl set --use-old amd + + if has_version ">=x11-drivers/xf86-video-intel-2.20.3"; then + ewarn "It is reported that xf86-video-intel-2.20.3 and later cause the X server" + ewarn "to crash on systems that use hybrid AMD/Intel graphics. If you experience" + ewarn "this crash, downgrade to xf86-video-intel-2.20.2 or earlier." + ewarn "For details, see https://bugs.gentoo.org/show_bug.cgi?id=430000" + fi } pkg_preinst() {