diff options
Diffstat (limited to 'x11-drivers/nvidia-drivers')
-rw-r--r-- | x11-drivers/nvidia-drivers/ChangeLog | 7 | ||||
-rw-r--r-- | x11-drivers/nvidia-drivers/Manifest | 13 | ||||
-rw-r--r-- | x11-drivers/nvidia-drivers/nvidia-drivers-334.16.ebuild | 461 |
3 files changed, 476 insertions, 5 deletions
diff --git a/x11-drivers/nvidia-drivers/ChangeLog b/x11-drivers/nvidia-drivers/ChangeLog index 5c11c0a027cc..39287df4c84c 100644 --- a/x11-drivers/nvidia-drivers/ChangeLog +++ b/x11-drivers/nvidia-drivers/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for x11-drivers/nvidia-drivers # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/x11-drivers/nvidia-drivers/ChangeLog,v 1.517 2014/02/05 11:31:51 jer Exp $ +# $Header: /var/cvsroot/gentoo-x86/x11-drivers/nvidia-drivers/ChangeLog,v 1.518 2014/02/07 14:43:29 jer Exp $ + +*nvidia-drivers-334.16 (07 Feb 2014) + + 07 Feb 2014; Jeroen Roovers <jer@gentoo.org> +nvidia-drivers-334.16.ebuild: + Version bump. 05 Feb 2014; Jeroen Roovers <jer@gentoo.org> -nvidia-drivers-304.117.ebuild, nvidia-drivers-304.119.ebuild: diff --git a/x11-drivers/nvidia-drivers/Manifest b/x11-drivers/nvidia-drivers/Manifest index 37318d8012ad..82d85a2f30f5 100644 --- a/x11-drivers/nvidia-drivers/Manifest +++ b/x11-drivers/nvidia-drivers/Manifest @@ -16,28 +16,33 @@ AUX nvidia.udev-rule 462 SHA256 37b152a5055a16d1947171567178e2841679ddf03dba9d48 DIST NVIDIA-FreeBSD-x86-173.14.39.tar.gz 20038266 SHA256 63a922ce4c5b676b4cb1ace98094dace4cc5408f2553e183df7b2127777a238b SHA512 96982fe7e0751c52fbef534193de09d187b99c1984c05e791223eb804719d8b3ba72efd983f227661ded4b71569bdbb914f1f629ab73a8bc9b8172832ccf3ec6 WHIRLPOOL 21f5906f42adf0064c7a7f81ac8e323de488e6d36356ee42c31a15c31ebb64335d5e2cff0ff022d41de480f9e0a57b3b96387f17151c7b59eceba2c61a7a102b DIST NVIDIA-FreeBSD-x86-304.119.tar.gz 33971140 SHA256 94eb54fd66f0fa2b7ed0027534a5dbf496ccc682ed6b0ecc16e2db0e4e23ed88 SHA512 ee75354d3f6d6a66963c0928ff81694aeeb105b2e94bb9e792bc674d6d4a161e61c1a566143853443200f4ef20ffa6a62ff9aed9175aeb015386c1ae6ae41e71 WHIRLPOOL 8330d488d99cd11c398590eb536befe97ce1786bcfc0f7a9d8680164a5144ea76cf3f96d0a1d811623d3de04a64fef133f00bee52a965d62be0387763c24f8f5 DIST NVIDIA-FreeBSD-x86-331.38.tar.gz 55851205 SHA256 e4d5932bbc431135285f9e6dba88100688ba19621dc18df185bb1e354584c9d1 SHA512 f7f08d0570fd5d512eeb77bb8bc2aaf104bb0069b430dfe584cff32ec1e9da0af2f380fc52c59c34bf769a0d8b44ef05492beb80569fd530ca98beb763952d7a WHIRLPOOL 89470ec1edb54698faf5083c52532de09e2eb1787d2c5c8ded492350a6ca3f487e70168e9e198005076e6bbe3bfa76e6e97023dfa389f1b65f318f725fd473b1 +DIST NVIDIA-FreeBSD-x86-334.16.tar.gz 56706965 SHA256 e2056730b3a2c3103e947f3a3008ea412dbdb504f2cebe167acb292741205942 SHA512 6719ce27fc96be114e12c96b672184f3dd1e115eca997d026a73d73d3d4a87d137e08ab3c667335c8add2305345a9326aa1401ab7b008fbd1b785153f20419e3 WHIRLPOOL 60accbe2ab9ddb082077b388fd8a29f0be997bb24fdf2d29559021d25feeae764d6f12702327e34285b606d13f2730ed1dc09a3e22e7761aa08cf130ac7c78df DIST NVIDIA-FreeBSD-x86-96.43.23.tar.gz 15463464 SHA256 18d855db8381eda1a6cf548c9e5095fc5bb8694bf1d6e24fc1072fba4e54cd78 SHA512 42d7b1b76cdb3b23680363e565614a22112162a5dd3639cb804fe670c0c3f3f23595bbefa3f78afdc6a8ca848446dee853c7a355f2c96a0d01b354753ba2785c WHIRLPOOL f8e59ce521990cd9edee441e73f973f074db492952807a0931e362102874cddbb47604ff5c5eb20a0cbde27f9b6d4e440dd12cc2e5a20c9cb65bf3c0b3e62511 DIST NVIDIA-FreeBSD-x86_64-304.119.tar.gz 34936081 SHA256 2737b9f08d7fa999977dc8f42415abac94a4af48a4ff9fdfd2691034d43a2bf6 SHA512 42192ef44125bd72fb8ab984feff61623107a568d03234e49c920839675da44c0d6d07575f911a4355f67f0f00112fed4af201e0aec7881ae2c3ed991730242a WHIRLPOOL 8d3b3d62e7955d3344116deccb2259f27b3608fc55a708e35e5b69079f8c6913a1a43dc73d8918f3580df9ebaa7ef7017e8a8c3d4db85822bf2a78dff3281bc4 DIST NVIDIA-FreeBSD-x86_64-331.38.tar.gz 46961827 SHA256 cd01441b324ec78dce6343e54670222dcbdd5752c1fe6eda3af0dee1b07c11ee SHA512 6c8924efca6c4dae78a71a7deeaaca05c4e012410d633c3c35c6be4afa4cd081d3c5d0f4393d4570e041bd215f0c7b1fed66c863a835e6ed5ddda91008bbd331 WHIRLPOOL 0aaf9bb60be620089d996adebb89cd7dd1761bd214f852d803985ee2cf76955bf5a2614230f57bbd138e5b9d832b3f930500da0b3dc235888f6d03da0ae4b8e8 +DIST NVIDIA-FreeBSD-x86_64-334.16.tar.gz 57457834 SHA256 3dfcbc7f4bb78d688a48b19df2f561f186c9e251bc0fbe353bbc002977cd751b SHA512 61821248b9f1f7e6c82fd667c9158dc422759ca35db3b6756fa1c65d619e36d9f8b2d11637d88fb1e2f8c97e6b1b01ccc751b5f5be1f217e2c2524d328a8fd64 WHIRLPOOL 8714c81a6b9315ac2d689fc809afec77bb340e019a164d807da3c9857b64f2700f76513adcdb8fe300a61f5e8adb1bb7a54115a853b12a95010c40fec9e7720f DIST NVIDIA-Linux-x86-173.14.39-pkg0.run 15134997 SHA256 a09935f37121ed3db8ae3da63a0d8e9d4348a19c859811c9fe44d6ce8e3eab23 SHA512 e24e15ccec725d3cbca502c2b77061776a81ef92917a950adec4ff6bdc34f10903aa654433177ea74be0dade4af81c5380d5710d375a5ea445940d06154bde93 WHIRLPOOL fce3d8e4f6cdf698f5a057514b6fe220bb1011025bdce5bd4cf0e424fb4d306d38251b6726bda03f290ea8137d5a95ed418cf8751722879f9042462abd9181b6 DIST NVIDIA-Linux-x86-304.119.run 40092214 SHA256 c8ae388fcf2fa8df41620466b359ce2c51d3f061aaee0df588fc7a9dae80df51 SHA512 939c7099167293db8e93326b9bbc9f5bc896720567fc220137a8e2ee4c0dbeb9a3936e860bc20408c62df868f6aee7697fb45a70626331c908fbbc87c132446f WHIRLPOOL 5660c0e72f8f51d4e6963c3db331ba0b40c6c51bad9fa7625eb387c576899c44fea3e58f82bf4bfa4b17cdad6a1febf81c993625ec074b2478041549c8d3e1c8 DIST NVIDIA-Linux-x86-331.38.run 37020075 SHA256 396e4d8fffacd271937ef57dd90ec2dea3ff32ee9f1de73ce5370a6e29382bf4 SHA512 ae071d404a07754fd3eb4102b0d5d4cf2ec92aecfe65b5f618650f477f78dfa7d776f6786d0b53df2e0f5f00a8fae330bbfbe3de24afbf50ebffc7b45b027e2d WHIRLPOOL 95348fe4c87af0eadc998859f0e591899d18c9b1c52e40c6f53beb03393a2ef2e372f1a239c414bd003dd35520bf2265853ddbca6dbeded34b47150310a64cd4 +DIST NVIDIA-Linux-x86-334.16.run 37562951 SHA256 e8e928d395d9e42978c549342241373a7376ee9ed679f379c33feee873a13fd2 SHA512 f94eeaab0a01b97126dc700b7f53e4366c34f18a9a477da2afcc868025bfc30d853fe9fcc3766d0fe5c13129711e2a914aed1cd506e46986b009b6a35296e9c3 WHIRLPOOL 012b831ad563b3df2fa69031e5c67f3c68d7e2eebef763a0fd591199f3d222820222e130b78b2ae6239b36b64a2f682c6f1e2f6ebfc952adea1fd7700ecafe89 DIST NVIDIA-Linux-x86-96.43.23-pkg0.run 11504817 SHA256 51e6adf4ba73071622045fc37169f80db3ae3e784dff53b29d35146a04042142 SHA512 bed5726e57637481fe4e3c03a65ec14fe949f00860e729ebde408f4fd861d7bfdc296a78bc2f5d42e8b282db09f4bbde1e0545df7228fa20227080dc4b868ba7 WHIRLPOOL 6d4fd1786c11f4e326cc3101d0bb1a2f8b63c25c3dd59f10188f8355759e2861ce44fd53d60258b513d5a1d6124d0f91ba8edf4d3668b6feabfb3e8d585f14fe DIST NVIDIA-Linux-x86_64-173.14.39-pkg2.run 21100833 SHA256 15a953666d5681ba54c97498b578ffd286a1dc96d605f3b02110f3f99813100e SHA512 a65cd496e6ed57f771c3d99f37f616a1242d97844f6faef7a807825ad899c0e536a99fde397020839f0857883b934032f9491024f3047a6b06d3eea1f5d77713 WHIRLPOOL dc5f243b7d1de7e2d1b7f005e018a2940d63335b11a7c83c234b348b7a1839e9131169d2ea928bd8c2f549a4535149b03e16e6c94d59dfa745f7f904ff790a45 DIST NVIDIA-Linux-x86_64-304.119.run 68541691 SHA256 1fd710a78d2bf711ede3bcbd20058de1e94c498db31973dfec1b8c25bf87e6cd SHA512 aaaa44b5414c0362b0280c71ac757114fb7a9ef922701075e2aa2fa07fc6be861ac8b57c1736822d2af850ed5fc1595b15f0d2e23b60414f47d810de095997f1 WHIRLPOOL 3ef9ce1c8ffaeb3228926d57a6d0a20b60b7496a5c0c390cefeb075b8134ddcb6e603a0431cfda25b79f66262942d8b75ef13204f17d952372a43e908b26a4c7 DIST NVIDIA-Linux-x86_64-331.38.run 60164869 SHA256 1015ac65a85ba39bdbe9e6bac54ae7ce3b2441fc7512909074e991242a46cf34 SHA512 adf90617b17e2560aa6b2ead236af02eb76f102db284c66b905254d926a881fec5a1302340fa743d44cae53e906d413a887b1dc121f1bca3aa1f861c9199fd73 WHIRLPOOL 0c0a38118032bbcd91115414d27cde7c80c92864788362ec38659239e1cc3a94878cb12cb803bc7bb89b53408730aa339bb646b212b56d448e78eb9f0ca4d064 +DIST NVIDIA-Linux-x86_64-334.16.run 67546019 SHA256 59a930f7ed6391a1e57b9fc7683420facd1c4548757d4120b1c594479af759f7 SHA512 a864693d7e95f602a1ee3557b5e0666d792d7ea8a22195ff06733cab1162b63daf761d162168e740ff3cae97371121f66f8b570ecc97081809c84d0be0309a34 WHIRLPOOL 001789f06ab96102c0ecc713e5542542148b2da033093cfa14192fe05ad0a53443df8b723731439e815b988429bf00cacd52834cd9ac808f2ba3159252a0cdcb DIST NVIDIA-Linux-x86_64-96.43.23-pkg2.run 15962375 SHA256 ce8d8253e7dab7da63fbdac449ebf190cd0c10cbfffea0f8d0165515f851bc64 SHA512 04bec1187a6024a2b9839f008ec829281f1f2602dae2e639030bc385943186506bcaa2b46a230b2ab87f9217190841abc62f9e2d6395ab5559623389c31c6563 WHIRLPOOL 0651c44a51a1a06fcff5bfddbf9c3e408977e03263c7fe806cb6c01f9fe92f716dfe4e5190ffe1048bde72fcffdc8bca8267e74dd43ba5c9dfb22b6201fcc2bb EBUILD nvidia-drivers-173.14.39.ebuild 16615 SHA256 df85299032940da5c09757185accdfdfc65c9beaa6e07a5ab7224122cbf62521 SHA512 c939a4d4f8e945ef5f90a7842e7110eb18ea5df1b1c9ff08e703b7d744206e0fa49e833f5780cb3f3435652f5e3b5743c74d0d44b7804caab6364236cd5ae6d2 WHIRLPOOL 8df9736aa00dbe6e2f75cb7994e9cfbef635d8c7c451a3d4248929e0b73bd8e73d1b316a5971757b56b1aa40ae3794b093a3adbd7eb840c568410406d9e85c6d EBUILD nvidia-drivers-304.119.ebuild 12594 SHA256 41d33636ae72cfb306ae9c2e561218cc06bc79ed6e1ab76e38eb36e9ded0c9a3 SHA512 ef197812a62068ff473e67c732a3def3c71edc4613dde5a6ba27ef64323ecc19f83924c2b2b72250fd2271811d00d51fec913c0fedb1091523674b15c108a1cc WHIRLPOOL e6b7851feacd09bfb94d01f90916a9fa46653e3200f5b7cc2227b3b98bf612245d9bda7f278f7489025b453802c6d2450f400d24d9087f09259dfa257d68cd12 EBUILD nvidia-drivers-331.38.ebuild 12282 SHA256 1ae32d474538e98e868e314c667d10a70d9f963dde9479e074bbf51be0003ea1 SHA512 4867db76669a90d26a75eb0f15c4c50d270fa47418d223672429eb2ad48e8343f9984ac718de8d07aca11f21e781609c7c2b3a61fcf588d2837ed1e832fb8597 WHIRLPOOL 09572a65a59eb20276f92ec8f610d73bc4a0d563afc6729c0db666f788ac1679c4f05ba9ab864e8e95b118d1150af006df1881cfb0cdac77da53cb2a9f3f0a9c +EBUILD nvidia-drivers-334.16.ebuild 12455 SHA256 e54f7f055a5c1146283d3ae2452bcb7eaa5fad7c1ad00da244dd6c6046f2ca1f SHA512 d659bae5b4107bd5cc26384c4517d563b6e6a590f54f07311213b1846d32b8e2989b67f5f0bf3103b2d43677fd5a31b889a239f38e0c1ec171233194fc003165 WHIRLPOOL f0ea9d543ad10d2528a713e3bb8b73f9fd322f4250700f58f06e4f3e9339278ff7682c8f2400609fc3a48b937091a627191c5a2be1fbc7c182914346bd3799d8 EBUILD nvidia-drivers-96.43.23.ebuild 14882 SHA256 f113d8f0155e54f35ba9ae96e9190c9c0c008f53422bc4e4b07d20ac25efa917 SHA512 6fce1ad80cacf25c9c28638255c304c6218d91f13c7b5f3741cf0a10636aa449fb6241ddce211b8be92005a719f6d1e8cb28315a9900c4774c6420e3fbd5eecd WHIRLPOOL b87d4b6618b0cd355c5f9884eea353c1f0741b71b3b4cbb5e5ad985d1121db44fc2e77bffa361e82d7ab761eefe4b78c40498aa987a7ce5927a80bd868c4d53d -MISC ChangeLog 1296 SHA256 bc8b4589ce159003661ea286206e3227719d354e4e3528983e56c80ce224dd28 SHA512 3feb41fea942ed814fadcf90ec36ee011ff4eb0f7462eb0b98bdc71cdc38e4f86e45de709393ce8fefc899216edb56085fe02615c9f9e28f154f611b15d8a439 WHIRLPOOL 09e0b1745f7286fb5bfd9bed323e707783e020e1e981bb03c4ded16fce44fd5e730873c00dd5aee017184ea7899777f4d8b3d7f177a2001707bf7498dc66ebfa +MISC ChangeLog 1429 SHA256 76e05d6d4041b9352d23560ac67cd07390319b4679e9fa0ed1eadf1249cdaada SHA512 8b18421533b9738d9f9c1d09b3c2d107819d6f439f9df2db4b4bb88b1318f54cd07356f988bfb05724fa4ddd07e354f16d13f2ab82b4cecedc3a436576a8eb4a WHIRLPOOL 667d62b271148c83f48c534343295051c0ef82ac2af0aceff357624b6913068d590326096d61205c60508f144cf886516040bdf901868194499ddb40420ff168 MISC ChangeLog-2013 103100 SHA256 e8474a573b3e0082e71ed55094cb9298a631b76f415210e573b6db8b9a9fe6ce SHA512 706f2be5243cfe7ea2a850f8d3555d7d83d06c1341b8a8deb3ec9776970ed78fbcb2e99612dbb8205e4f553fcc564c187309d1b9013aecddbdc0cb9dc29cdb00 WHIRLPOOL ca71c3c53156cd722c6cdc2117358cdbb6cba8209bda6b3cbc59e4e84fbd9c4e278f108c06e80057a5af1a40993f24eb9cba542dd5e9518506f9ae6766fa56ba MISC metadata.xml 678 SHA256 02f45452a129ba14ad5ef0f6bf0031887aead328a7bfaa6977949bc6e8969e61 SHA512 dfc9494e01db7ee3e7ef64dc67c5e26b1a3b0c90ed2850f75c904a76a11df8b3cb137959fe471c788b7a33f555090a9c764af5cfff7f24253127484d4e518e84 WHIRLPOOL 2940677faa8b8183237d9797025079a68164584d2afd09b6e3846cdbbd5824f3c56da545b2f7d1c7d1e72746f540048e4256bde939a28ac785fa598ee2017abd -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) -iEYEAREIAAYFAlLyISkACgkQVWmRsqeSphNwtQCfWmiHwVHEwldc4HeRK2GnYKaX -RpwAn3kqwD5GqgWoiw8r3RTkE+PuBWYq -=QaIM +iEYEAREIAAYFAlL08RMACgkQVWmRsqeSphPY9ACeJhAkLkVeP8taNRAgp87aXjET +TdUAni5OO1QQZYRQwzBwITAoeJ4gOtNE +=MZHA -----END PGP SIGNATURE----- diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-334.16.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-334.16.ebuild new file mode 100644 index 000000000000..75cca5831e5c --- /dev/null +++ b/x11-drivers/nvidia-drivers/nvidia-drivers-334.16.ebuild @@ -0,0 +1,461 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/x11-drivers/nvidia-drivers/nvidia-drivers-334.16.ebuild,v 1.1 2014/02/07 14:43:29 jer Exp $ + +EAPI=5 + +inherit eutils flag-o-matic linux-info linux-mod multilib nvidia-driver \ + portability toolchain-funcs unpacker user udev + +NV_URI="http://us.download.nvidia.com/XFree86/" +X86_NV_PACKAGE="NVIDIA-Linux-x86-${PV}" +AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}" +X86_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86-${PV}" +AMD64_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86_64-${PV}" + +DESCRIPTION="NVIDIA X11 driver and GLX libraries" +HOMEPAGE="http://www.nvidia.com/" +SRC_URI=" + amd64-fbsd? ( ${NV_URI}FreeBSD-x86_64/${PV}/${AMD64_FBSD_NV_PACKAGE}.tar.gz ) + amd64? ( ${NV_URI}Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}.run ) + x86-fbsd? ( ${NV_URI}FreeBSD-x86/${PV}/${X86_FBSD_NV_PACKAGE}.tar.gz ) + x86? ( ${NV_URI}Linux-x86/${PV}/${X86_NV_PACKAGE}.run ) +" + +LICENSE="GPL-2 NVIDIA-r1" +SLOT="0" +KEYWORDS="-* ~amd64 ~x86 ~amd64-fbsd ~x86-fbsd" +IUSE="acpi multilib kernel_FreeBSD kernel_linux pax_kernel +tools +X" +RESTRICT="bindist mirror strip" +EMULTILIB_PKG="true" + +COMMON=" + app-admin/eselect-opencl + kernel_linux? ( >=sys-libs/glibc-2.6.1 ) + X? ( + >=app-admin/eselect-opengl-1.0.9 + ) +" +DEPEND=" + ${COMMON} + app-arch/xz-utils + kernel_linux? ( virtual/linux-sources ) +" +RDEPEND=" + ${COMMON} + acpi? ( sys-power/acpid ) + tools? ( + dev-libs/atk + dev-libs/glib + x11-libs/gdk-pixbuf + x11-libs/gtk+:2 + x11-libs/libX11 + x11-libs/libXext + x11-libs/pango[X] + ) + X? ( + <x11-base/xorg-server-1.15.99 + >=x11-libs/libvdpau-0.3-r1 + multilib? ( + || ( + ( + x11-libs/libX11[abi_x86_32] + x11-libs/libXext[abi_x86_32] + ) + app-emulation/emul-linux-x86-xlibs + ) + ) + ) +" + +REQUIRED_USE="tools? ( X )" + +QA_PREBUILT="opt/* usr/lib*" + +S=${WORKDIR}/ + +pkg_pretend() { + + if use amd64 && has_multilib_profile && \ + [ "${DEFAULT_ABI}" != "amd64" ]; then + eerror "This ebuild doesn't currently support changing your default ABI" + die "Unexpected \${DEFAULT_ABI} = ${DEFAULT_ABI}" + fi + + if use kernel_linux && kernel_is ge 3 13 ; then + ewarn "Gentoo supports kernels which are supported by NVIDIA" + ewarn "which are limited to the following kernels:" + ewarn "<sys-kernel/gentoo-sources-3.13" + ewarn "<sys-kernel/vanilla-sources-3.13" + ewarn "" + ewarn "You are free to utilize epatch_user to provide whatever" + ewarn "support you feel is appropriate, but will not receive" + ewarn "support as a result of those changes." + ewarn "" + ewarn "Do not file a bug report about this." + fi + + # Since Nvidia ships 3 different series of drivers, we need to give the user + # some kind of guidance as to what version they should install. This tries + # to point the user in the right direction but can't be perfect. check + # nvidia-driver.eclass + nvidia-driver-check-warning + + # Kernel features/options to check for + CONFIG_CHECK="~ZONE_DMA ~MTRR ~SYSVIPC ~!LOCKDEP" + use x86 && CONFIG_CHECK+=" ~HIGHMEM" + + # Now do the above checks + use kernel_linux && check_extra_config +} + +pkg_setup() { + # try to turn off distcc and ccache for people that have a problem with it + export DISTCC_DISABLE=1 + export CCACHE_DISABLE=1 + + if use kernel_linux; then + linux-mod_pkg_setup + MODULE_NAMES="nvidia(video:${S}/kernel)" + BUILD_PARAMS="IGNORE_CC_MISMATCH=yes V=1 SYSSRC=${KV_DIR} \ + SYSOUT=${KV_OUT_DIR} CC=$(tc-getBUILD_CC)" + # linux-mod_src_compile calls set_arch_to_kernel, which + # sets the ARCH to x86 but NVIDIA's wrapping Makefile + # expects x86_64 or i386 and then converts it to x86 + # later on in the build process + BUILD_FIXES="ARCH=$(uname -m | sed -e 's/i.86/i386/')" + fi + + # set variables to where files are in the package structure + if use kernel_FreeBSD; then + use x86-fbsd && S="${WORKDIR}/${X86_FBSD_NV_PACKAGE}" + use amd64-fbsd && S="${WORKDIR}/${AMD64_FBSD_NV_PACKAGE}" + NV_DOC="${S}/doc" + NV_OBJ="${S}/obj" + NV_SRC="${S}/src" + NV_MAN="${S}/x11/man" + NV_X11="${S}/obj" + NV_SOVER=1 + elif use kernel_linux; then + NV_DOC="${S}" + NV_OBJ="${S}" + NV_SRC="${S}/kernel" + NV_MAN="${S}" + NV_X11="${S}" + NV_SOVER=${PV} + else + die "Could not determine proper NVIDIA package" + fi +} + +src_unpack() { + if ! use kernel_FreeBSD; then + cd "${S}" + unpack_makeself + else + unpack ${A} + fi +} + +src_prepare() { + # Please add a brief description for every added patch + + if use kernel_linux; then + if kernel_is lt 2 6 9 ; then + eerror "You must build this against 2.6.9 or higher kernels." + fi + + # If greater than 2.6.5 use M= instead of SUBDIR= +# convert_to_m "${NV_SRC}"/Makefile.kbuild + fi + + if use pax_kernel; then + ewarn "Using PAX patches is not supported. You will be asked to" + ewarn "use a standard kernel should you have issues. Should you" + ewarn "need support with these patches, contact the PaX team." + epatch "${FILESDIR}"/${PN}-331.13-pax-usercopy.patch + fi + + # Allow user patches so they can support RC kernels and whatever else + epatch_user +} + +src_compile() { + # This is already the default on Linux, as there's no toplevel Makefile, but + # on FreeBSD there's one and triggers the kernel module build, as we install + # it by itself, pass this. + + cd "${NV_SRC}" + if use kernel_FreeBSD; then + MAKE="$(get_bmake)" CFLAGS="-Wno-sign-compare" emake CC="$(tc-getCC)" \ + LD="$(tc-getLD)" LDFLAGS="$(raw-ldflags)" || die + elif use kernel_linux; then + linux-mod_src_compile + fi +} + +# Install nvidia library: +# the first parameter is the library to install +# the second parameter is the provided soversion +# the third parameter is the target directory if its not /usr/lib +donvidia() { + # Full path to library minus SOVER + MY_LIB="$1" + + # SOVER to use + MY_SOVER="$2" + + # Where to install + MY_DEST="$3" + + if [[ -z "${MY_DEST}" ]]; then + MY_DEST="/usr/$(get_libdir)" + action="dolib.so" + else + exeinto ${MY_DEST} + action="doexe" + fi + + # Get just the library name + libname=$(basename $1) + + # Install the library with the correct SOVER + ${action} ${MY_LIB}.${MY_SOVER} || \ + die "failed to install ${libname}" + + # If SOVER wasn't 1, then we need to create a .1 symlink + if [[ "${MY_SOVER}" != "1" ]]; then + dosym ${libname}.${MY_SOVER} \ + ${MY_DEST}/${libname}.1 || \ + die "failed to create ${libname} symlink" + fi + + # Always create the symlink from the raw lib to the .1 + dosym ${libname}.1 \ + ${MY_DEST}/${libname} || \ + die "failed to create ${libname} symlink" +} + +src_install() { + if use kernel_linux; then + linux-mod_src_install + + # Add the aliases + # This file is tweaked with the appropriate video group in + # pkg_preinst, see bug #491414 + insinto /etc/modprobe.d + newins "${FILESDIR}"/nvidia-169.07 nvidia.conf + + # Ensures that our device nodes are created when not using X + exeinto "$(udev_get_udevdir)" + doexe "${FILESDIR}"/nvidia-udev.sh + udev_newrules "${FILESDIR}"/nvidia.udev-rule 99-nvidia.rules + elif use kernel_FreeBSD; then + if use x86-fbsd; then + insinto /boot/modules + doins "${S}/src/nvidia.kld" + fi + + exeinto /boot/modules + doexe "${S}/src/nvidia.ko" + fi + + # NVIDIA kernel <-> userspace driver config lib + donvidia ${NV_OBJ}/libnvidia-cfg.so ${NV_SOVER} + + # NVIDIA video encode/decode <-> CUDA + if use kernel_linux; then + donvidia ${NV_OBJ}/libnvcuvid.so ${NV_SOVER} + donvidia ${NV_OBJ}/libnvidia-encode.so ${NV_SOVER} + fi + + if use X; then + # Xorg DDX driver + insinto /usr/$(get_libdir)/xorg/modules/drivers + doins ${NV_X11}/nvidia_drv.so + + # Xorg GLX driver + donvidia ${NV_X11}/libglx.so ${NV_SOVER} \ + /usr/$(get_libdir)/opengl/nvidia/extensions + fi + + # OpenCL ICD for NVIDIA + if use kernel_linux; then + insinto /etc/OpenCL/vendors + doins ${NV_OBJ}/nvidia.icd + fi + + # Documentation + dohtml ${NV_DOC}/html/* + if use kernel_FreeBSD; then + dodoc "${NV_DOC}/README" + use X && doman "${NV_MAN}/nvidia-xconfig.1" + use tools && doman "${NV_MAN}/nvidia-settings.1" + else + # Docs + newdoc "${NV_DOC}/README.txt" README + dodoc "${NV_DOC}/NVIDIA_Changelog" + doman "${NV_MAN}/nvidia-smi.1.gz" + use X && doman "${NV_MAN}/nvidia-xconfig.1.gz" + use tools && doman "${NV_MAN}/nvidia-settings.1.gz" + doman "${NV_MAN}/nvidia-cuda-mps-control.1.gz" + fi + + # Helper Apps + exeinto /opt/bin/ + + if use X; then + doexe ${NV_OBJ}/nvidia-xconfig + fi + + if use kernel_linux ; then + doexe ${NV_OBJ}/nvidia-cuda-mps-control + doexe ${NV_OBJ}/nvidia-cuda-mps-server + doexe ${NV_OBJ}/nvidia-debugdump + doexe ${NV_OBJ}/nvidia-modprobe + doexe ${NV_OBJ}/nvidia-persistenced + doexe ${NV_OBJ}/nvidia-smi + doman nvidia-cuda-mps-control.1.gz + doman nvidia-modprobe.1.gz + doman nvidia-persistenced.1.gz + newinitd "${FILESDIR}/nvidia-smi.init" nvidia-smi + fi + + if use tools; then + doexe ${NV_OBJ}/nvidia-settings + fi + + exeinto /usr/bin/ + doexe ${NV_OBJ}/nvidia-bug-report.sh + + # Desktop entries for nvidia-settings + if use tools ; then + # There is no icon in the FreeBSD tarball. + use kernel_FreeBSD || newicon ${NV_OBJ}/nvidia-settings.png ${PN}-settings.png + domenu "${FILESDIR}"/${PN}-settings.desktop + exeinto /etc/X11/xinit/xinitrc.d + doexe "${FILESDIR}"/95-nvidia-settings + fi + + #doenvd "${FILESDIR}"/50nvidia-prelink-blacklist + + if has_multilib_profile && use multilib ; then + local OABI=${ABI} + for ABI in $(get_install_abis) ; do + src_install-libs + done + ABI=${OABI} + unset OABI + else + src_install-libs + fi + + is_final_abi || die "failed to iterate through all ABIs" + + readme.gentoo_create_doc +} + +src_install-libs() { + local inslibdir=$(get_libdir) + local GL_ROOT="/usr/$(get_libdir)/opengl/nvidia/lib" + local CL_ROOT="/usr/$(get_libdir)/OpenCL/vendors/nvidia" + local libdir=${NV_OBJ} + + if use kernel_linux && has_multilib_profile && \ + [[ ${ABI} == "x86" ]] ; then + libdir=${NV_OBJ}/32 + fi + + if use X; then + # The GLX libraries + donvidia ${libdir}/libGL.so ${NV_SOVER} ${GL_ROOT} + donvidia ${libdir}/libEGL.so ${NV_SOVER} ${GL_ROOT} + donvidia ${libdir}/libGLESv1_CM.so ${NV_SOVER} ${GL_ROOT} + donvidia ${libdir}/libGLESv2.so ${NV_SOVER} ${GL_ROOT} + donvidia ${libdir}/libnvidia-glcore.so ${NV_SOVER} + if use kernel_FreeBSD; then + donvidia ${libdir}/libnvidia-tls.so ${NV_SOVER} + else + donvidia ${libdir}/tls/libnvidia-tls.so ${NV_SOVER} + fi + + # VDPAU + donvidia ${libdir}/libvdpau_nvidia.so ${NV_SOVER} + fi + + # NVIDIA monitoring library + if use kernel_linux ; then + donvidia ${libdir}/libnvidia-ml.so ${NV_SOVER} + fi + + # CUDA & OpenCL + if use kernel_linux; then + donvidia ${libdir}/libcuda.so ${NV_SOVER} + donvidia ${libdir}/libnvidia-compiler.so ${NV_SOVER} + donvidia ${libdir}/libOpenCL.so 1.0.0 ${CL_ROOT} + donvidia ${libdir}/libnvidia-opencl.so ${NV_SOVER} + fi +} + +pkg_preinst() { + if use kernel_linux; then + linux-mod_pkg_preinst + + local videogroup="$(egetent group video | cut -d ':' -f 3)" + if [ -z "${videogroup}" ]; then + eerror "Failed to determine the video group gid" + die "Failed to determine the video group gid" + else + sed -i \ + -e "s:PACKAGE:${PF}:g" \ + -e "s:VIDEOGID:${videogroup}:" \ + "${D}"/etc/modprobe.d/nvidia.conf || die + fi + fi + + # Clean the dynamic libGL stuff's home to ensure + # we dont have stale libs floating around + if [ -d "${ROOT}"/usr/lib/opengl/nvidia ] ; then + rm -rf "${ROOT}"/usr/lib/opengl/nvidia/* + fi + # Make sure we nuke the old nvidia-glx's env.d file + if [ -e "${ROOT}"/etc/env.d/09nvidia ] ; then + rm -f "${ROOT}"/etc/env.d/09nvidia + fi +} + +pkg_postinst() { + use kernel_linux && linux-mod_pkg_postinst + + # Switch to the nvidia implementation + use X && "${ROOT}"/usr/bin/eselect opengl set --use-old nvidia + "${ROOT}"/usr/bin/eselect opencl set --use-old nvidia + + readme.gentoo_print_elog + + if ! use X; then + elog "You have elected to not install the X.org driver. Along with" + elog "this the OpenGL libraries and VDPAU libraries were not" + elog "installed. Additionally, once the driver is loaded your card" + elog "and fan will run at max speed which may not be desirable." + elog "Use the 'nvidia-smi' init script to have your card and fan" + elog "speed scale appropriately." + elog + fi + if ! use tools; then + elog "USE=tools controls whether the nvidia-settings application" + elog "is installed. If you would like to use it, enable that" + elog "flag and re-emerge this ebuild. Optionally you can install" + elog "media-video/nvidia-settings" + elog + fi +} + +pkg_prerm() { + use X && "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11 +} + +pkg_postrm() { + use kernel_linux && linux-mod_pkg_postrm + use X && "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11 +} |