Removed wine and nvidia-drivers, both patches are upstream now

This commit is contained in:
Stefan Reimer 2012-10-25 18:17:17 -07:00
parent 0b8617740a
commit 8480215938
19 changed files with 0 additions and 5260 deletions

View File

@ -1,15 +0,0 @@
AUX pulseaudio.patch 109370 RMD160 a7412efb915018d657ae329aeed2b907e285425c SHA1 bcf663862186bb62a6ccefb85297c6b218b06087 SHA256 71e28f02a9a3d341e123303ad7ff2ee63aaa33945cd6d40fdb2986b9a393a4a1
AUX wine-1.1.15-winegcc.patch 1556 RMD160 ca7e0df0a45507e7d31ed81c5712111b83ed9bfa SHA1 4b155fe7cb5e831b7f92757d52aa1ab12569b232 SHA256 dbd89db561d7583faf317d795b8c11231575d885e21c6414add39079604dbd0d
AUX wine-1.4_rc2-multilib-portage.patch 1256 RMD160 6445df9cc97ad523f54de256f37810366a0693fd SHA1 8d0d794f74952a53d38c75a8cb586f784a3b9357 SHA256 9d0acd304d11d1bf73f56699754aaa1bfe1facba90648ee330fdbe08d9ff4938
AUX wine-1.5.10-osmesa-check.patch 1620 RMD160 35bd25cccfcd1cbe9b59f55a078a1fbc12aee0db SHA1 713163fc3399b0a99e31faa788da966107e9194a SHA256 3c6c5081cd28231e251c6bacdcee3042decf87ee985624ca76d7b9c1d35a0184
DIST wine-1.4.tar.bz2 20035856 RMD160 ee523c4cf15984197487432790c0e5bbba3ec495 SHA1 ce5d56b9b949c01dde663ab39739ffcfb41a73c4 SHA256 99a437bb8bd350bb1499d59183635e58217e73d631379c43cfd0d6020428ee65
DIST wine-1.5.11.tar.bz2 20651401 RMD160 d4fe8cd101f940041b490dfd88d05607fc89ed9d SHA1 35420a64d33e4886c3ccd37f8ca2a2acf1e6086b SHA256 2854c853546ded26e9c15ba43c29ceace72b7815f25dfd048dd69dc321521488
DIST wine-mono-0.0.4.msi 44408320 RMD160 4a68b97bbe6f5202de594c51a2cc45ea7e1e5089 SHA1 7d827f7d28a88ae0da95a136573783124ffce4b1 SHA256 15d8a612cdeca4eff3137353f29fdeb7a99e055cd633844c91cd00e0186b8882
DIST wine_gecko-1.4-x86.msi 14732288 RMD160 02363538a77a954f2bf1014b28ec1ed8fe2d1b6e SHA1 c30aa99621e98336eb4b7e2074118b8af8ea2ad5 SHA256 b30e0ac29a91a6fc40c73b5b760a56360a1d5323282545e32efaa40c75d8986d
DIST wine_gecko-1.4-x86_64.msi 14980096 RMD160 5613e27d474085c31b53c868ed020445bdee37ae SHA1 bf0aaf56a8cf9abd75be02b56b05e5c4e9a4df93 SHA256 ceab7f1866e85175ed4cd3b5d081ee4f77c8d32ac7adf489a19c1f7329187219
DIST wine_gecko-1.7-x86.msi 16995328 RMD160 6ce45f67498be7c1c010e9fc1eef166529213f4b SHA1 efebc4ed7a86708e2dc8581033a3c5d6effe0b0b SHA256 2ed524e79cc88137b28430389af19cb032989311921462a29f72d6f121954913
DIST wine_gecko-1.7-x86_64.msi 17438720 RMD160 7ef9720567d11abe143e0d57de58ded0dffbf508 SHA1 2253e7ce3a699ddd110c6c9ce4c7ca7e6f7c02f5 SHA256 19d0364a43621738fa3fd1713ef9590ad0cc61ea4c8858ad3f8703a81b13c927
DIST winepulse-2012.06.15.patch 100596 RMD160 33782944497666b150c77ec1c3dd00433a5b2933 SHA1 7720987932e42036a3d9764b5a571af961c750e5 SHA256 f6baf816e6170c406607d81e298fea2d175452ca822ee4cd2748fe4381ecd4dc
EBUILD wine-1.4.ebuild 6236 RMD160 aea6af88d59cfcb02d72c1194a85b26d59fd40a4 SHA1 c03b0d215b10f4d5f6230796a9becf2925693f49 SHA256 8e6ed9bdaa8ff6f89d72f0eccc580a689fbc8aae8692c481893a1a5aa307cea4
EBUILD wine-1.5.11.ebuild 6991 RMD160 4dff7893609989ccf4dc7c07a87686b02df5804f SHA1 c824d1068216c0e1fa82d25b55e70ab4203f653d SHA256 caa455feecc2b39b7c1b6c42d9328aba052abbd21c9392a3767b7657e20627ad
MISC wine.diff 862 RMD160 6325375b9e12c041a41582801981ec65972e87dc SHA1 9d469367f3024a842140967ed0f6f3621d274772 SHA256 38266c6b96f7280f8aa81a10fbf3fc8a0e03722fbb75c7828f2f883c54b6f2c9

File diff suppressed because it is too large Load Diff

View File

@ -1,55 +0,0 @@
http://bugs.gentoo.org/260726
--- wine-1.1.15/tools/winegcc/winegcc.c
+++ wine-1.1.15/tools/winegcc/winegcc.c
@@ -215,10 +215,13 @@
strarray* files;
};
+#undef FORCE_POINTER_SIZE
#ifdef __i386__
static const enum target_cpu build_cpu = CPU_x86;
+#define FORCE_POINTER_SIZE
#elif defined(__x86_64__)
static const enum target_cpu build_cpu = CPU_x86_64;
+#define FORCE_POINTER_SIZE
#elif defined(__sparc__)
static const enum target_cpu build_cpu = CPU_SPARC;
#elif defined(__ALPHA__)
@@ -968,6 +971,9 @@
opts.linker_args = strarray_alloc();
opts.compiler_args = strarray_alloc();
opts.winebuild_args = strarray_alloc();
+#ifdef FORCE_POINTER_SIZE
+ opts.force_pointer_size = sizeof(size_t);
+#endif
/* determine the processor type */
if (strendswith(argv[0], "winecpp")) opts.processor = proc_cpp;
--- wine-1.1.15/tools/winebuild/main.c
+++ wine-1.1.15/tools/winebuild/main.c
@@ -50,10 +50,13 @@
int link_ext_symbols = 0;
int force_pointer_size = 0;
+#undef FORCE_POINTER_SIZE
#ifdef __i386__
enum target_cpu target_cpu = CPU_x86;
+#define FORCE_POINTER_SIZE
#elif defined(__x86_64__)
enum target_cpu target_cpu = CPU_x86_64;
+#define FORCE_POINTER_SIZE
#elif defined(__sparc__)
enum target_cpu target_cpu = CPU_SPARC;
#elif defined(__ALPHA__)
@@ -574,6 +577,10 @@
signal( SIGTERM, exit_on_signal );
signal( SIGINT, exit_on_signal );
+#ifdef FORCE_POINTER_SIZE
+ force_pointer_size = sizeof(size_t);
+#endif
+
output_file = stdout;
argv = parse_options( argc, argv, spec );

View File

@ -1,40 +0,0 @@
https://bugs.gentoo.org/show_bug.cgi?id=395615
Explicitly add the required -m32/m64 to *FLAGS; this overrides any
arch-specific -m* flags that may have been appended by multilib-portage.
Even though -m32/m64 is now added to *FLAGS, -m32/m64 still has to be
explicitly added to CC and CXX due to wine's build system. For example,
winegcc saves the build-time value of CC and uses it at runtime.
--- a/configure.ac
+++ b/configure.ac
@@ -133,12 +133,18 @@
then
CC="$CC -m64"
CXX="$CXX -m64"
+ CFLAGS="$CFLAGS -m64"
+ LDFLAGS="$LDFLAGS -m64"
+ CXXFLAGS="$CXXFLAGS -m64"
host_cpu="x86_64"
notice_platform="64-bit "
AC_SUBST(TARGETFLAGS,"-m64")
else
CC="$CC -m32"
CXX="$CXX -m32"
+ CFLAGS="$CFLAGS -m32"
+ LDFLAGS="$LDFLAGS -m32"
+ CXXFLAGS="$CXXFLAGS -m32"
host_cpu="i386"
notice_platform="32-bit "
AC_SUBST(TARGETFLAGS,"-m32")
@@ -150,6 +156,9 @@
then
CC="$CC -m32"
CXX="$CXX -m32"
+ CFLAGS="$CFLAGS -m32"
+ LDFLAGS="$LDFLAGS -m32"
+ CXXFLAGS="$CXXFLAGS -m32"
AC_MSG_CHECKING([whether $CC works])
AC_LINK_IFELSE([AC_LANG_PROGRAM()],AC_MSG_RESULT([yes]),
[AC_MSG_RESULT([no])

View File

@ -1,33 +0,0 @@
From a233e35ca650db2758de0fd31450b8ce2d86d5e3 Mon Sep 17 00:00:00 2001
From: Alexandre Rostovtsev <tetromino@gentoo.org>
Date: Tue, 7 Aug 2012 01:29:01 -0400
Subject: [PATCH] Do not check for libGL symbols when checking libOSMesa
If mesa had been built with shared glapi, glAccum is not available in
libOSMesa without explicitly linking to libGL. In addition, in
mesa-8.0.x and earlier, libOSMesa needs to be explicitly linked to
libglapi if mesa was built with shared glapi, see
https://bugs.gentoo.org/show_bug.cgi?id=399813
---
configure.ac | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/configure.ac b/configure.ac
index 4bd43d1..c7a718f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1132,7 +1132,10 @@ This probably prevents linking to OpenGL. Try deleting the file and restarting c
if test "$ac_cv_header_GL_osmesa_h" = "yes"
then
- WINE_CHECK_SONAME(OSMesa,glAccum,,,[$X_LIBS $X_PRE_LIBS $XLIB -lm $X_EXTRA_LIBS])
+ WINE_CHECK_SONAME(OSMesa,OSMesaCreateContext,,,[$X_LIBS $X_PRE_LIBS $XLIB -lm $X_EXTRA_LIBS])
+ if test "x$ac_cv_lib_soname_OSMesa" = "x"; then
+ WINE_CHECK_SONAME(OSMesa,OSMesaCreateContext,,,[-lglapi $X_LIBS $X_PRE_LIBS $XLIB -lm $X_EXTRA_LIBS])
+ fi
fi
WINE_NOTICE_WITH(osmesa,[test "x$ac_cv_lib_soname_OSMesa" = "x"],
[libOSMesa ${notice_platform}development files not found (or too old), OpenGL rendering in bitmaps won't be supported.])
--
1.7.8.6

View File

@ -1,232 +0,0 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-emulation/wine/wine-1.4.ebuild,v 1.1 2012/03/07 23:49:32 tetromino Exp $
EAPI="4"
inherit autotools eutils flag-o-matic multilib pax-utils
if [[ ${PV} == "9999" ]] ; then
EGIT_REPO_URI="git://source.winehq.org/git/wine.git"
inherit git-2
SRC_URI=""
#KEYWORDS=""
else
MY_P="${PN}-${PV/_/-}"
SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.bz2"
KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
S=${WORKDIR}/${MY_P}
fi
GV="1.4"
DESCRIPTION="free implementation of Windows(tm) on Unix"
HOMEPAGE="http://www.winehq.org/"
SRC_URI="${SRC_URI}
gecko? (
mirror://sourceforge/wine/wine_gecko-${GV}-x86.msi
win64? ( mirror://sourceforge/wine/wine_gecko-${GV}-x86_64.msi )
)"
LICENSE="LGPL-2.1"
SLOT="0"
IUSE="alsa capi cups custom-cflags elibc_glibc fontconfig +gecko gnutls gphoto2
gsm gstreamer hardened jpeg lcms ldap mp3 ncurses nls odbc openal opencl +opengl
+oss +perl png pulseaudio samba scanner selinux ssl test +threads +truetype udisks v4l +win32 +win64 +X xcomposite xinerama xml"
REQUIRED_USE="elibc_glibc? ( threads )" #286560
RESTRICT="test" #72375
MLIB_DEPS="amd64? (
truetype? ( >=app-emulation/emul-linux-x86-xlibs-2.1 )
X? (
>=app-emulation/emul-linux-x86-xlibs-2.1
>=app-emulation/emul-linux-x86-soundlibs-2.1
)
mp3? ( app-emulation/emul-linux-x86-soundlibs )
odbc? ( app-emulation/emul-linux-x86-db )
openal? ( app-emulation/emul-linux-x86-sdl )
opengl? ( app-emulation/emul-linux-x86-opengl )
scanner? ( app-emulation/emul-linux-x86-medialibs )
v4l? ( app-emulation/emul-linux-x86-medialibs )
app-emulation/emul-linux-x86-baselibs
>=sys-kernel/linux-headers-2.6
)"
RDEPEND="truetype? ( >=media-libs/freetype-2.0.0 media-fonts/corefonts )
perl? ( dev-lang/perl dev-perl/XML-Simple )
capi? ( net-dialup/capi4k-utils )
ncurses? ( >=sys-libs/ncurses-5.2 )
fontconfig? ( media-libs/fontconfig )
gphoto2? ( media-libs/libgphoto2 )
openal? ( media-libs/openal )
udisks? (
sys-apps/dbus
sys-fs/udisks
)
gnutls? ( net-libs/gnutls )
gstreamer? ( media-libs/gstreamer media-libs/gst-plugins-base )
X? (
x11-libs/libXcursor
x11-libs/libXrandr
x11-libs/libXi
x11-libs/libXmu
x11-libs/libXxf86vm
x11-apps/xmessage
)
xinerama? ( x11-libs/libXinerama )
alsa? ( media-libs/alsa-lib )
cups? ( net-print/cups )
opencl? ( virtual/opencl )
opengl? ( virtual/opengl )
gsm? ( media-sound/gsm )
jpeg? ( virtual/jpeg )
ldap? ( net-nds/openldap )
lcms? ( =media-libs/lcms-1* )
mp3? ( >=media-sound/mpg123-1.5.0 )
nls? ( sys-devel/gettext )
odbc? ( dev-db/unixODBC )
samba? ( >=net-fs/samba-3.0.25 )
selinux? ( sec-policy/selinux-wine )
xml? ( dev-libs/libxml2 dev-libs/libxslt )
scanner? ( media-gfx/sane-backends )
ssl? ( dev-libs/openssl )
png? ( media-libs/libpng )
v4l? ( media-libs/libv4l )
!win64? ( ${MLIB_DEPS} )
win32? ( ${MLIB_DEPS} )
xcomposite? ( x11-libs/libXcomposite )
pulseaudio? ( media-sound/pulseaudio )"
DEPEND="${RDEPEND}
X? (
x11-proto/inputproto
x11-proto/xextproto
x11-proto/xf86vidmodeproto
)
xinerama? ( x11-proto/xineramaproto )
!hardened? ( sys-devel/prelink )
dev-util/pkgconfig
virtual/yacc
sys-devel/flex"
src_unpack() {
if use win64 ; then
[[ $(( $(gcc-major-version) * 100 + $(gcc-minor-version) )) -lt 404 ]] \
&& die "you need gcc-4.4+ to build 64bit wine"
fi
if use win32 && use opencl; then
[[ x$(eselect opencl show) = "xintel" ]] &&
die "Cannot build wine[opencl,win32]: intel-ocl-sdk is 64-bit only" # 403947
fi
if [[ ${PV} == "9999" ]] ; then
git-2_src_unpack
else
unpack ${MY_P}.tar.bz2
fi
}
src_prepare() {
epatch "${FILESDIR}"/${PN}-1.1.15-winegcc.patch #260726
epatch "${FILESDIR}"/${PN}-1.4_rc2-multilib-portage.patch #395615
epatch "${FILESDIR}"/pulseaudio.patch
epatch_user #282735
eautoreconf
sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die
sed -i '/^MimeType/d' tools/wine.desktop || die #117785
}
do_configure() {
local builddir="${WORKDIR}/wine$1"
mkdir -p "${builddir}"
pushd "${builddir}" >/dev/null
ECONF_SOURCE=${S} \
econf \
--sysconfdir=/etc/wine \
$(use_with alsa) \
$(use_with capi) \
$(use_with lcms cms) \
$(use_with cups) \
$(use_with ncurses curses) \
$(use_with udisks dbus) \
$(use_with fontconfig) \
$(use_with gnutls) \
$(use_with gphoto2 gphoto) \
$(use_with gsm) \
$(use_with gstreamer) \
--without-hal \
$(use_with jpeg) \
$(use_with ldap) \
$(use_with mp3 mpg123) \
$(use_with nls gettext) \
$(use_with openal) \
$(use_with opencl) \
$(use_with opengl) \
$(use_with ssl openssl) \
$(use_with oss) \
$(use_with png) \
$(use_with pulseaudio) \
$(use_with threads pthread) \
$(use_with scanner sane) \
$(use_enable test tests) \
$(use_with truetype freetype) \
$(use_with v4l) \
$(use_with X x) \
$(use_with xcomposite) \
$(use_with xinerama) \
$(use_with xml) \
$(use_with xml xslt) \
$2
emake -j1 depend
popd >/dev/null
}
src_configure() {
export LDCONFIG=/bin/true
use custom-cflags || strip-flags
if use win64 ; then
do_configure 64 --enable-win64
use win32 && ABI=x86 do_configure 32 --with-wine64=../wine64
else
ABI=x86 do_configure 32 --disable-win64
fi
}
src_compile() {
local b
for b in 64 32 ; do
local builddir="${WORKDIR}/wine${b}"
[[ -d ${builddir} ]] || continue
emake -C "${builddir}" all
done
}
src_install() {
local b
for b in 64 32 ; do
local builddir="${WORKDIR}/wine${b}"
[[ -d ${builddir} ]] || continue
emake -C "${builddir}" install DESTDIR="${D}"
done
dodoc ANNOUNCE AUTHORS README
if use gecko ; then
insinto /usr/share/wine/gecko
doins "${DISTDIR}"/wine_gecko-${GV}-x86.msi
use win64 && doins "${DISTDIR}"/wine_gecko-${GV}-x86_64.msi
fi
if ! use perl ; then
rm "${D}"usr/bin/{wine{dump,maker},function_grep.pl} "${D}"usr/share/man/man1/wine{dump,maker}.1 || die
fi
if use win32 || ! use win64; then
pax-mark psmr "${D}"usr/bin/wine{,-preloader} #255055
fi
use win64 && pax-mark psmr "${D}"usr/bin/wine64{,-preloader}
if use win64 && ! use win32; then
dosym /usr/bin/wine{64,} # 404331
dosym /usr/bin/wine{64,}-preloader
fi
}

View File

@ -1,249 +0,0 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-emulation/wine/wine-1.5.11.ebuild,v 1.1 2012/08/18 00:03:20 tetromino Exp $
EAPI="4"
inherit autotools eutils flag-o-matic multilib pax-utils
if [[ ${PV} == "9999" ]] ; then
EGIT_REPO_URI="git://source.winehq.org/git/wine.git"
inherit git-2
SRC_URI=""
#KEYWORDS=""
else
MY_P="${PN}-${PV/_/-}"
SRC_URI="mirror://sourceforge/${PN}/Source/${MY_P}.tar.bz2"
KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
S=${WORKDIR}/${MY_P}
fi
GV="1.7"
MV="0.0.4"
PULSE_PATCH="winepulse-2012.06.15.patch"
DESCRIPTION="free implementation of Windows(tm) on Unix"
HOMEPAGE="http://www.winehq.org/"
SRC_URI="${SRC_URI}
gecko? (
mirror://sourceforge/${PN}/Wine%20Gecko/${GV}/wine_gecko-${GV}-x86.msi
win64? ( mirror://sourceforge/${PN}/Wine%20Gecko/${GV}/wine_gecko-${GV}-x86_64.msi )
)
mono? ( mirror://sourceforge/${PN}/Wine%20Mono/${MV}/wine-mono-${MV}.msi )
http://source.winehq.org/patches/data/87234 -> ${PULSE_PATCH}"
LICENSE="LGPL-2.1"
SLOT="0"
IUSE="alsa capi cups custom-cflags elibc_glibc fontconfig +gecko gnutls gphoto2 gsm gstreamer hardened jpeg lcms ldap +mono mp3 ncurses nls odbc openal opencl +opengl osmesa +oss +perl png pulseaudio samba scanner selinux ssl test +threads +truetype udisks v4l +win32 +win64 +X xcomposite xinerama xml"
REQUIRED_USE="elibc_glibc? ( threads )
mono? ( || ( win32 !win64 ) )
osmesa? ( opengl )" #286560
RESTRICT="test" #72375
MLIB_DEPS="amd64? (
truetype? ( >=app-emulation/emul-linux-x86-xlibs-2.1 )
X? (
>=app-emulation/emul-linux-x86-xlibs-2.1
>=app-emulation/emul-linux-x86-soundlibs-2.1[pulseaudio(+)?]
)
mp3? ( app-emulation/emul-linux-x86-soundlibs )
odbc? ( app-emulation/emul-linux-x86-db )
openal? ( app-emulation/emul-linux-x86-sdl )
opengl? ( app-emulation/emul-linux-x86-opengl )
scanner? ( app-emulation/emul-linux-x86-medialibs )
v4l? ( app-emulation/emul-linux-x86-medialibs )
app-emulation/emul-linux-x86-baselibs
>=sys-kernel/linux-headers-2.6
)"
RDEPEND="truetype? ( >=media-libs/freetype-2.0.0 media-fonts/corefonts )
perl? ( dev-lang/perl dev-perl/XML-Simple )
capi? ( net-dialup/capi4k-utils )
ncurses? ( >=sys-libs/ncurses-5.2 )
fontconfig? ( media-libs/fontconfig )
gphoto2? ( media-libs/libgphoto2 )
openal? ( media-libs/openal )
udisks? (
sys-apps/dbus
sys-fs/udisks:2
)
gnutls? ( net-libs/gnutls )
gstreamer? ( media-libs/gstreamer media-libs/gst-plugins-base )
X? (
x11-libs/libXcursor
x11-libs/libXrandr
x11-libs/libXi
x11-libs/libXmu
x11-libs/libXxf86vm
)
xinerama? ( x11-libs/libXinerama )
alsa? ( media-libs/alsa-lib )
cups? ( net-print/cups )
opencl? ( virtual/opencl )
opengl? ( virtual/opengl )
gsm? ( media-sound/gsm )
jpeg? ( virtual/jpeg )
ldap? ( net-nds/openldap )
lcms? ( =media-libs/lcms-1* )
mp3? ( >=media-sound/mpg123-1.5.0 )
nls? ( sys-devel/gettext )
odbc? ( dev-db/unixODBC )
osmesa? ( media-libs/mesa[osmesa] )
pulseaudio? ( media-sound/pulseaudio )
samba? ( >=net-fs/samba-3.0.25 )
selinux? ( sec-policy/selinux-wine )
xml? ( dev-libs/libxml2 dev-libs/libxslt )
scanner? ( media-gfx/sane-backends )
ssl? ( dev-libs/openssl )
png? ( media-libs/libpng )
v4l? ( media-libs/libv4l )
!win64? ( ${MLIB_DEPS} )
win32? ( ${MLIB_DEPS} )
xcomposite? ( x11-libs/libXcomposite )"
DEPEND="${RDEPEND}
X? (
x11-proto/inputproto
x11-proto/xextproto
x11-proto/xf86vidmodeproto
)
xinerama? ( x11-proto/xineramaproto )
!hardened? ( sys-devel/prelink )
virtual/pkgconfig
virtual/yacc
sys-devel/flex"
src_unpack() {
if use win64 ; then
[[ $(( $(gcc-major-version) * 100 + $(gcc-minor-version) )) -lt 404 ]] \
&& die "you need gcc-4.4+ to build 64bit wine"
fi
if use win32 && use opencl; then
[[ x$(eselect opencl show) = "xintel" ]] &&
die "Cannot build wine[opencl,win32]: intel-ocl-sdk is 64-bit only" # 403947
fi
if [[ ${PV} == "9999" ]] ; then
git-2_src_unpack
else
unpack ${MY_P}.tar.bz2
fi
}
src_prepare() {
epatch "${FILESDIR}"/${PN}-1.1.15-winegcc.patch #260726
epatch "${FILESDIR}"/${PN}-1.4_rc2-multilib-portage.patch #395615
epatch "${FILESDIR}"/${PN}-1.5.10-osmesa-check.patch #429386
# epatch "${DISTDIR}/${PULSE_PATCH}" #421365
epatch "${FILESDIR}"/pulseaudio.patch
epatch_user #282735
eautoreconf
sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die
sed -i '/^MimeType/d' tools/wine.desktop || die #117785
}
do_configure() {
local builddir="${WORKDIR}/wine$1"
mkdir -p "${builddir}"
pushd "${builddir}" >/dev/null
with_osmesa=$(use_with osmesa)
if use osmesa && use amd64 && [[ $1 = 32 ]]; then #430268
elog "win32 osmesa support is disabled for now, see bug #430268"
with_osmesa=--without-osmesa
fi
ECONF_SOURCE=${S} \
econf \
--sysconfdir=/etc/wine \
$(use_with alsa) \
$(use_with capi) \
$(use_with lcms cms) \
$(use_with cups) \
$(use_with ncurses curses) \
$(use_with udisks dbus) \
$(use_with fontconfig) \
$(use_with gnutls) \
$(use_with gphoto2 gphoto) \
$(use_with gsm) \
$(use_with gstreamer) \
--without-hal \
$(use_with jpeg) \
$(use_with ldap) \
$(use_with mp3 mpg123) \
$(use_with nls gettext) \
$(use_with openal) \
$(use_with opencl) \
$(use_with opengl) \
$(use_with ssl openssl) \
${with_osmesa} \
$(use_with oss) \
$(use_with png) \
$(use_with threads pthread) \
$(use_with pulseaudio) \
$(use_with scanner sane) \
$(use_enable test tests) \
$(use_with truetype freetype) \
$(use_with v4l) \
$(use_with X x) \
$(use_with xcomposite) \
$(use_with xinerama) \
$(use_with xml) \
$(use_with xml xslt) \
$2
emake -j1 depend
popd >/dev/null
}
src_configure() {
export LDCONFIG=/bin/true
use custom-cflags || strip-flags
if use win64 ; then
do_configure 64 --enable-win64
use win32 && ABI=x86 do_configure 32 --with-wine64=../wine64
else
ABI=x86 do_configure 32 --disable-win64
fi
}
src_compile() {
local b
for b in 64 32 ; do
local builddir="${WORKDIR}/wine${b}"
[[ -d ${builddir} ]] || continue
emake -C "${builddir}" all
done
}
src_install() {
local b
for b in 64 32 ; do
local builddir="${WORKDIR}/wine${b}"
[[ -d ${builddir} ]] || continue
emake -C "${builddir}" install DESTDIR="${D}"
done
dodoc ANNOUNCE AUTHORS README
if use gecko ; then
insinto /usr/share/wine/gecko
doins "${DISTDIR}"/wine_gecko-${GV}-x86.msi
use win64 && doins "${DISTDIR}"/wine_gecko-${GV}-x86_64.msi
fi
if use mono ; then
insinto /usr/share/wine/mono
doins "${DISTDIR}"/wine-mono-${MV}.msi
fi
if ! use perl ; then
rm "${D}"usr/bin/{wine{dump,maker},function_grep.pl} "${D}"usr/share/man/man1/wine{dump,maker}.1 || die
fi
if use win32 || ! use win64; then
pax-mark psmr "${D}"usr/bin/wine{,-preloader} #255055
fi
use win64 && pax-mark psmr "${D}"usr/bin/wine64{,-preloader}
if use win64 && ! use win32; then
dosym /usr/bin/wine{64,} # 404331
dosym /usr/bin/wine{64,}-preloader
fi
}

View File

@ -1,21 +0,0 @@
--- /mnt/portage/portage/app-emulation/wine/wine-1.5.10.ebuild 2012-08-07 01:06:43.000000000 -0700
+++ wine-1.5.10.ebuild 2012-08-07 09:31:02.394262211 -0700
@@ -133,7 +133,8 @@
epatch "${FILESDIR}"/${PN}-1.1.15-winegcc.patch #260726
epatch "${FILESDIR}"/${PN}-1.4_rc2-multilib-portage.patch #395615
epatch "${FILESDIR}"/${PN}-1.5.10-osmesa-check.patch #429386
- epatch "${DISTDIR}/${PULSE_PATCH}" #421365
+ # epatch "${DISTDIR}/${PULSE_PATCH}" #421365
+ epatch "${FILESDIR}"/pulseaudio.patch
epatch_user #282735
eautoreconf
sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die
@@ -178,7 +179,7 @@
$(use_with oss) \
$(use_with png) \
$(use_with threads pthread) \
- $(use_with pulseaudio pulse) \
+ $(use_with pulseaudio) \
$(use_with scanner sane) \
$(use_enable test tests) \
$(use_with truetype freetype) \

View File

@ -1,18 +0,0 @@
AUX nvidia-169.07 639 RMD160 8baddb6fd1bf7f0e2688870a78e8ace051d62e3f SHA1 b30487ba2a24a6b1359d1fd831eeb1705060953c SHA256 a8c4860f008d53776fda7a17b59524f271236559af688e9a2c9845cbbcba1577
AUX nvidia-autostart.desktop 227 RMD160 d057866bb52d20295a631a3f90b2e0628a65bd21 SHA1 319f959724171fa85639bbb451cf3882ab88f512 SHA256 850c22fad5ac5a0cf6795b47cfc34f88f151f2802fa1256d2c2422108d59400a
AUX nvidia-drivers-pax-const.patch 833 RMD160 100c36ed4c7db0f30c0680b276a708cd5ed75749 SHA1 b336665366340fec6bd400f36d3e4b9de86473f5 SHA256 74ba8aa3b03e1b4a0515fd84c159eaeb7635fa1364e77544b01ff6f571f0e6d8
AUX nvidia-drivers-pax-usercopy.patch 2350 RMD160 c102590aba1b4191c08fc0ac045640bab3f8f5e2 SHA1 5cd57aef42db6dbb5cf97ed773ec632d3a5f3ec7 SHA256 56980f43db38d582bc6a9bfd881973fce6e3e056b77ce4f4005bdcf79526a863
AUX nvidia-smi.init 671 RMD160 22a1b0b4f48312f8a10e869dd3976c1bb9c7e061 SHA1 ad3c5ccbfc4e7d451b7dff3080f56bebcd24ecb7 SHA256 5776a661b510e072d34e779c23dfc710a13d04c49acc22772d2aeb0e415820d6
AUX nvidia-udev.sh 185 RMD160 26d8e7e1447daa7d4fd09993f855b58ae1754a72 SHA1 d607b57662e0542b335cbc86ed3c946bb522891f SHA256 120c0af2b64fbcbd7032217a78eec8b104874c1ca68726367bce22c57944e07e
AUX nvidia.udev-rule 462 RMD160 a7bc1d61d75a7fd7847903064ae5974e4079db5a SHA1 ac04cf8838bab05d5c092446d34c0154b9f6220e SHA256 37b152a5055a16d1947171567178e2841679ddf03dba9d48e7d30f1e3b469ac6
DIST NVIDIA-FreeBSD-x86-295.59.tar.gz 32092806 SHA256 9a3e1794418add03ad97aad93608d1bc1f2f9c5a82e0321a2a8ba1c9db7d41dd SHA512 e6bb158b8c1bad81068a000b9a4848d038bee2c78519b8a4f61627dd63e84baf233b2328aa4e7b56d9b2de862f1e67318ee67a332e6f9002171ecc5cb157d419 WHIRLPOOL 6b2ba86629d3364b1efb988227860c998e6d0f3161252a742c46600ebe8b7d1f22e4e9d5368067deff8df191be975f05db8df6200d7747d9dd2a7c135713ef89
DIST NVIDIA-FreeBSD-x86-304.37.tar.gz 33291575 RMD160 b72600868b2237a4d6eb3af93e2aba75195cba74 SHA1 6bc5e80d051cd76e6ea246a3495695fdde283966 SHA256 e6c3a1d4a757b5d4f2ab54a43d5d7008fcb1b481f14515f58adcd31f3edc6576
DIST NVIDIA-FreeBSD-x86_64-295.59.tar.gz 33049711 SHA256 4993f2c4874c080352856b1eac529c7be61aff73ea9db7012a04a571f3553bfd SHA512 be7ddf23181386979b085825d0b22c0270a1acd3b17aba1468f16370db5ad7886d96d66eede213427f442c7e857e44e5a734aa5f20753d4ed9f4b2dc649dcad2 WHIRLPOOL c833c5a587645765b781cd869bccdab92fabd9ae133574c3698ec5b29d4b91ae93635de6fba962586af426e6b797b2a8f6c897af7958a0a596155c5cfd9ea6e0
DIST NVIDIA-FreeBSD-x86_64-304.37.tar.gz 34210803 RMD160 b27019f04c4d9e7841af883cd5cf0fedecfa7b58 SHA1 57897fa95d4b49a5078bdb41a460e287b863588b SHA256 0d00046c8463954b6c8e13e245b2619758e947389161a113aa005ef7566e5dd3
DIST NVIDIA-Linux-x86-295.59.run 34730118 SHA256 084bbb76c57d5c2a5b780322a95dcc230ec6e25b4f6c176574a93621399ce5a0 SHA512 91194816de17831e1abb4a2c80dac483dc78222a29921371d43a81626e3a6537468da663ca7a0c0c0a987d116801fce9f169d205beaaa061ab34c8e1818a7b82 WHIRLPOOL fe35d7f3edc5562fdbc2c6045889cb22cf87ff766e55ed68b9ebe0eeffe5c3d044306bbcad4b9086db921ca2489507ce6754803581156e118880fdaa35ec52f9
DIST NVIDIA-Linux-x86-304.37.run 39349097 RMD160 e5507f4ae7e778113c55c06a24c8140fbbe182f5 SHA1 cb61d9062fa40a7800e8ba91ef2ae1d9625059b9 SHA256 ab3174a0c9ab37a8fc3f4a8fc1121d72fbdd5e00ddecf44f7dbd84bb8d51b337
DIST NVIDIA-Linux-x86_64-295.59.run 58529480 RMD160 de86cf0c445f3c6625e340fbc7f2340b49e9e466 SHA1 67a0b326172309e262d31f40d1f545f371ca374a SHA256 4b1d96389abd2b804ad470c5189142a02ee4c82c1ac56cea37ecb45e8051313e
DIST NVIDIA-Linux-x86_64-304.37.run 64075318 RMD160 485ceaf89f630a37b8094d8c84216deca4f9759c SHA1 3841a52212a8d03f02b2c0d8177bb46008f1e735 SHA256 cae75158047d0b97ea48f269fd2903a6731f53b978a1065720343436c97ca9c2
EBUILD nvidia-drivers-295.59.ebuild 18723 RMD160 e8a593ba24bbf2f619b98e18d046498bba887f8f SHA1 9ae2717e9e1b21e525e9514a8f1468adb7e3fbcd SHA256 e4cc8079bdb25440819e152cb02eb45a032ffcaaa2c7108d8d5aac155e41c42f
EBUILD nvidia-drivers-304.37-r1.ebuild 12624 RMD160 ae2fca9d93a83efa3d9e6227e24a9f12321ca6e6 SHA1 3855149a930a7f692509306620f188498381cfb5 SHA256 270c3a4c95fdb6a6d409701b1beeafd918936f530498c7fe177abc9705565ec7
MISC ebuild.diff 819 RMD160 5668203536b3d046ea030fdb4ba2daf148b3a1cb SHA1 963315046afaa709d62cbf5f591f93f2edfc5903 SHA256 3666c4509013c78d959f7095cf2d29dd7ede1488fed93974b00f81c92b553403

View File

@ -1,24 +0,0 @@
--- /mnt/portage/portage/x11-drivers/nvidia-drivers/nvidia-drivers-304.37-r1.ebuild 2012-08-21 22:01:31.000000000 -0700
+++ nvidia-drivers-304.37-r1.ebuild 2012-08-22 21:13:33.716791429 -0700
@@ -22,7 +22,7 @@
LICENSE="NVIDIA"
SLOT="0"
KEYWORDS="-* ~amd64 ~x86 ~amd64-fbsd ~x86-fbsd"
-IUSE="acpi multilib kernel_FreeBSD kernel_linux +tools +X"
+IUSE="acpi multilib kernel_FreeBSD kernel_linux pax_kernel +tools +X"
RESTRICT="strip"
EMULTILIB_PKG="true"
@@ -139,6 +139,12 @@
# If greater than 2.6.5 use M= instead of SUBDIR=
convert_to_m "${NV_SRC}"/Makefile.kbuild
fi
+
+ if use pax_kernel; then
+ epatch "${FILESDIR}"/nvidia-drivers-pax-const.patch
+ epatch "${FILESDIR}"/nvidia-drivers-pax-usercopy.patch
+ fi
+
cat <<- EOF > "${S}"/nvidia.icd
/usr/$(get_libdir)/libnvidia-opencl.so
EOF

View File

@ -1,14 +0,0 @@
# Nvidia drivers support
alias char-major-195 nvidia
alias /dev/nvidiactl char-major-195
# To tweak the driver the following options can be used, note that
# you should be careful, as it could cause instability!! For more
# options see /usr/share/doc/PACKAGE/README
#
# !!! SECURITY WARNING !!!
# DO NOT MODIFY OR REMOVE THE DEVICE FILE RELATED OPTIONS UNLESS YOU KNOW
# WHAT YOU ARE DOING.
# ONLY ADD TRUSTED USERS TO THE VIDEO GROUP, THESE USERS MAY BE ABLE TO CRASH,
# COMPROMISE, OR IRREPARABLY DAMAGE THE MACHINE.
options nvidia NVreg_DeviceFileMode=432 NVreg_DeviceFileUID=0 NVreg_DeviceFileGID=VIDEOGID NVreg_ModifyDeviceFiles=1

View File

@ -1,8 +0,0 @@
[Desktop Entry]
Type=Application
Name=NVIDIA X Server Settings
Comment=Configure NVIDIA X Server Settings
Exec=sh -c "/opt/bin/nvidia-settings --load-config-only"
Terminal=false
Icon=nvidia-settings
Categories=System;Settings;

View File

@ -1,17 +0,0 @@
Binary files kernel.orig/.nv-procfs.c.swp and kernel/.nv-procfs.c.swp differ
diff -urp kernel.orig/nv-procfs.c kernel/nv-procfs.c
--- kernel.orig/nv-procfs.c 2011-07-13 03:29:30.000000000 +0200
+++ kernel/nv-procfs.c 2011-07-19 15:45:27.982993911 +0200
@@ -707,8 +707,10 @@ int nv_register_procfs(void)
* However, in preparation for this, we need to preserve
* the procfs read() and write() operations.
*/
- nv_procfs_registry_fops.read = entry->proc_fops->read;
- nv_procfs_registry_fops.write = entry->proc_fops->write;
+ pax_open_kernel();
+ *(void **)&nv_procfs_registry_fops.read = entry->proc_fops->read;
+ *(void **)&nv_procfs_registry_fops.write = entry->proc_fops->write;
+ pax_close_kernel();
entry = NV_CREATE_PROC_FILE("registry", proc_nvidia,
nv_procfs_read_registry,

View File

@ -1,54 +0,0 @@
diff -urp kernel.orig/nv.c kernel/nv.c
--- kernel.orig/nv.c 2011-09-24 02:32:09.000000000 +0200
+++ kernel/nv.c 2011-10-05 19:13:41.474242252 +0200
@@ -1105,7 +1105,7 @@ static int __init nvidia_init_module(voi
NV_SPIN_LOCK_INIT(&km_lock);
#endif
- NV_KMEM_CACHE_CREATE(nv_stack_t_cache, "nv_stack_t", nv_stack_t);
+ NV_KMEM_CACHE_CREATE(nv_stack_t_cache, "nv_stack_t", nv_stack_t, SLAB_USERCOPY);
if (nv_stack_t_cache == NULL)
{
nv_printf(NV_DBG_ERRORS, "NVRM: stack cache allocation failed!\n");
@@ -1220,7 +1220,7 @@ static int __init nvidia_init_module(voi
}
#endif
- NV_KMEM_CACHE_CREATE(nv_pte_t_cache, "nv_pte_t", nv_pte_t);
+ NV_KMEM_CACHE_CREATE(nv_pte_t_cache, "nv_pte_t", nv_pte_t, 0);
if (nv_pte_t_cache == NULL)
{
rc = -ENOMEM;
@@ -1229,7 +1229,7 @@ static int __init nvidia_init_module(voi
}
NV_KMEM_CACHE_CREATE(nvidia_p2p_page_t_cache, "nvidia_p2p_page_t",
- nvidia_p2p_page_t);
+ nvidia_p2p_page_t, 0);
if (nvidia_p2p_page_t_cache == NULL)
{
rc = -ENOMEM;
diff -urp kernel.orig/nv-linux.h kernel/nv-linux.h
--- kernel.orig/nv-linux.h 2011-09-24 02:32:09.000000000 +0200
+++ kernel/nv-linux.h 2011-10-05 19:14:42.522238996 +0200
@@ -695,16 +695,16 @@ extern nv_spinlock_t km_lock;
#if defined(NV_KMEM_CACHE_CREATE_PRESENT)
#if (NV_KMEM_CACHE_CREATE_ARGUMENT_COUNT == 6)
-#define NV_KMEM_CACHE_CREATE(kmem_cache, name, type) \
+#define NV_KMEM_CACHE_CREATE(kmem_cache, name, type, flags) \
{ \
kmem_cache = kmem_cache_create(name, sizeof(type), \
- 0, 0, NULL, NULL); \
+ 0, flags, NULL, NULL); \
}
#elif (NV_KMEM_CACHE_CREATE_ARGUMENT_COUNT == 5)
-#define NV_KMEM_CACHE_CREATE(kmem_cache, name, type) \
+#define NV_KMEM_CACHE_CREATE(kmem_cache, name, type, flags) \
{ \
kmem_cache = kmem_cache_create(name, sizeof(type), \
- 0, 0, NULL); \
+ 0, flags, NULL); \
}
#else
#error "NV_KMEM_CACHE_CREATE_ARGUMENT_COUNT value unrecognized!"

View File

@ -1,25 +0,0 @@
#!/sbin/runscript
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/x11-drivers/nvidia-drivers/files/nvidia-smi.init,v 1.1 2012/07/22 21:08:43 cardoe Exp $
pidfile="/var/run/nvidia-smi.pid"
depend() {
after modules
}
start() {
ebegin "Starting NVIDIA System Management Interface"
rm -f ${pidfile}
start-stop-daemon --start --quiet --pidfile ${pidfile} \
--make-pidfile --background --exec /opt/bin/nvidia-smi -- \
-q -l 300
eend $?
}
stop() {
ebegin "Stopping NVIDIA System Management Interface"
start-stop-daemon --stop --quiet --pidfile ${pidfile}
eend $?
}

View File

@ -1,17 +0,0 @@
#!/bin/sh
if [ $# -ne 1 ]; then
echo "Invalid args" >&2
exit 1
fi
case $1 in
add|ADD)
/opt/bin/nvidia-smi > /dev/null
;;
remove|REMOVE)
rm -f /dev/nvidia*
;;
esac
exit 0

View File

@ -1,6 +0,0 @@
ACTION=="add", DEVPATH=="/module/nvidia", SUBSYSTEM=="module", RUN+="nvidia-udev.sh $env{ACTION}"
# Previously the ACTION was "add|remove" but one user on bug #376527 had a
# problem until he recompiled udev-171-r5, which is one of the versions I
# tested with and it was fine. I'm breaking the rules out just to be safe
# so someone else doesn't have an issue
ACTION=="remove", DEVPATH=="/module/nvidia", SUBSYSTEM=="module", RUN+="nvidia-udev.sh $env{ACTION}"

View File

@ -1,598 +0,0 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header:
# /var/cvsroot/gentoo-x86/x11-drivers/nvidia-drivers/nvidia-drivers-295.59.ebuild,v 1.1 2012/06/14 23:03:14 cardoe Exp $
EAPI="2"
inherit eutils unpacker multilib portability versionator linux-mod flag-o-matic nvidia-driver
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="x86? ( http://us.download.nvidia.com/XFree86/Linux-x86/${PV}/${X86_NV_PACKAGE}.run )
amd64? ( http://us.download.nvidia.com/XFree86/Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}.run )
amd64-fbsd? ( http://us.download.nvidia.com/XFree86/FreeBSD-x86_64/${PV}/${AMD64_FBSD_NV_PACKAGE}.tar.gz )
x86-fbsd? ( http://us.download.nvidia.com/XFree86/FreeBSD-x86/${PV}/${X86_FBSD_NV_PACKAGE}.tar.gz )"
LICENSE="NVIDIA"
SLOT="0"
KEYWORDS="-* ~amd64 ~x86 ~amd64-fbsd ~x86-fbsd"
IUSE="acpi multilib kernel_FreeBSD kernel_linux pax_kernel +tools"
RESTRICT="strip"
EMULTILIB_PKG="true"
COMMON="<x11-base/xorg-server-1.12.99
kernel_linux? ( >=sys-libs/glibc-2.6.1 )
multilib? ( app-emulation/emul-linux-x86-xlibs )
>=app-admin/eselect-opengl-1.0.9
app-admin/eselect-opencl"
DEPEND="${COMMON}
kernel_linux? ( virtual/linux-sources )"
RDEPEND="${COMMON}
x11-libs/libXvMC
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
)"
PDEPEND=">=x11-libs/libvdpau-0.3-r1"
QA_TEXTRELS_x86="
usr/lib/OpenCL/vendors/nvidia/libOpenCL.so.1.0.0
usr/lib/libXvMCNVIDIA.so.${PV}
usr/lib/libcuda.so.${PV}
usr/lib/libnvcuvid.so.${PV}
usr/lib/libnvidia-cfg.so.${PV}
usr/lib/libnvidia-compiler.so.${PV}
usr/lib/libnvidia-glcore.so.${PV}
usr/lib/libnvidia-ml.so.${PV}
usr/lib/libvdpau_nvidia.so.${PV}
usr/lib/opengl/nvidia/extensions/libglx.so.${PV}
usr/lib/opengl/nvidia/lib/libGL.so.${PV}
usr/lib/opengl/nvidia/lib/libnvidia-tls.so.${PV}
usr/lib/xorg/modules/drivers/nvidia_drv.so"
QA_TEXTRELS_x86_fbsd="boot/modules/nvidia.ko
usr/lib/opengl/nvidia/lib/libGL.so.1
usr/lib/libnvidia-glcore.so.1
usr/lib/libvdpau_nvidia.so.1
usr/lib/libnvidia-cfg.so.1
usr/lib/opengl/nvidia/extensions/libglx.so.1
usr/lib/xorg/modules/drivers/nvidia_drv.so"
QA_TEXTRELS_amd64="usr/lib32/opengl/nvidia/lib/libnvidia-tls.so.${PV}
usr/lib32/libnvidia-glcore.so.${PV}
usr/lib32/libvdpau_nvidia.so.${PV}
usr/lib32/opengl/nvidia/lib/libGL.so.${PV}
usr/lib32/libcuda.so.${PV}
usr/lib32/OpenCL/vendors/nvidia/libOpenCL.so.1.0.0
usr/lib32/libnvidia-compiler.so.${PV}"
QA_EXECSTACK_x86="usr/lib/opengl/nvidia/lib/libGL.so.${PV}
usr/lib/libnvidia-glcore.so.${PV}
usr/lib/opengl/nvidia/extensions/libglx.so.${PV}
usr/lib64/libXvMCNVIDIA.so.${PV}
usr/lib/libXvMCNVIDIA.a:NVXVMC.o
usr/lib/libvdpau_nvidia.so.${PV}
usr/lib/libnvidia-compiler.so.${PV}
usr/lib/libcuda.so.${PV}
usr/lib/OpenCL/vendors/nvidia/libOpenCL.so.1.0.0"
QA_EXECSTACK_amd64="usr/lib32/libnvidia-glcore.so.${PV}
usr/lib32/opengl/nvidia/lib/libGL.so.${PV}
usr/lib32/opengl/nvidia/lib/libnvidia-tls.so.${PV}
usr/lib32/libvdpau_nvidia.so.${PV}
usr/lib32/libcuda.so.${PV}
usr/lib32/OpenCL/vendors/nvidia/libOpenCL.so.1.0.0
usr/lib32/libnvidia-compiler.so.${PV}
usr/lib64/libXvMCNVIDIA.a:NVXVMC.o
usr/lib64/libnvidia-cfg.so.${PV}
usr/lib64/libnvidia-ml.so.${PV}
usr/lib64/libvdpau_nvidia.so.${PV}
usr/lib64/opengl/nvidia/lib/libnvidia-tls.so.${PV}
usr/lib64/opengl/nvidia/lib/libGL.so.${PV}
usr/lib64/libnvidia-glcore.so.${PV}
usr/lib64/opengl/nvidia/extensions/libglx.so.${PV}
usr/lib64/libXvMCNVIDIA.so.${PV}
usr/lib64/libcuda.so.${PV}
usr/lib64/OpenCL/vendors/nvidia/libOpenCL.so.1.0.0
usr/lib64/libnvidia-compiler.so.${PV}
usr/lib64/xorg/modules/drivers/nvidia_drv.so
opt/bin/nvidia-smi
opt/bin/nvidia-xconfig
opt/bin/nvidia-debugdump
opt/bin/nvidia-settings"
QA_WX_LOAD_x86="usr/lib/libnvidia-glcore.so.${PV}
usr/lib/opengl/nvidia/lib/libGL.so.${PV}
usr/lib/opengl/nvidia/extensions/libglx.so.${PV}
usr/lib/libXvMCNVIDIA.a
usr/lib64/libXvMCNVIDIA.so.${PV}"
QA_WX_LOAD_amd64="usr/lib32/opengl/nvidia/lib/libGL.so.${PV}
usr/lib32/libnvidia-glcore.so.${PV}
usr/lib64/opengl/nvidia/lib/libGL.so.${PV}
usr/lib64/libnvidia-glcore.so.${PV}
usr/lib64/opengl/nvidia/extensions/libglx.so.${PV}
usr/lib64/libXvMCNVIDIA.so.${PV}"
QA_SONAME_x86="usr/lib/libnvidia-compiler.so.${PV}"
QA_SONAME_amd64="usr/lib64/libnvidia-compiler.so.${PV}
usr/lib32/libnvidia-compiler.so.${PV}"
QA_DT_HASH_amd64="usr/lib32/libcuda.so.${PV}
usr/lib32/opengl/nvidia/lib/libGL.so.${PV}
usr/lib32/libnvidia-glcore.so.${PV}
usr/lib32/opengl/nvidia/lib/libnvidia-tls.so.${PV}
usr/lib32/libvdpau_nvidia.so.${PV}
usr/lib32/OpenCL/vendors/nvidia/libOpenCL.so.1.0.0
usr/lib32/libnvidia-compiler.so.${PV}
usr/lib64/libXvMCNVIDIA.so.${PV}
usr/lib64/libcuda.so.${PV}
usr/lib64/libnvidia-cfg.so.${PV}
usr/lib64/libnvidia-glcore.so.${PV}
usr/lib64/libnvidia-ml.so.${PV}
usr/lib64/opengl/nvidia/lib/libGL.so.${PV}
usr/lib64/opengl/nvidia/lib/libnvidia-tls.so.${PV}
usr/lib64/opengl/nvidia/extensions/libglx.so.${PV}
usr/lib64/xorg/modules/drivers/nvidia_drv.so
usr/lib64/libvdpau_nvidia.so.${PV}
usr/lib64/OpenCL/vendors/nvidia/libOpenCL.so.1.0.0
usr/lib64/libnvidia-compiler.so.${PV}
usr/lib64/libnvcuvid.so.${PV}
opt/bin/nvidia-smi
opt/bin/nvidia-xconfig
opt/bin/nvidia-debugdump
opt/bin/nvidia-settings"
QA_DT_HASH_x86="usr/lib/libcuda.so.${PV}
usr/lib/libnvidia-cfg.so.${PV}
usr/lib/libnvidia-glcore.so.${PV}
usr/lib/libnvidia-ml.so.${PV}
usr/lib/opengl/nvidia/lib/libGL.so.${PV}
usr/lib/opengl/nvidia/lib/libnvidia-tls.so.${PV}
usr/lib/opengl/nvidia/extensions/libglx.so.${PV}
usr/lib/xorg/modules/drivers/nvidia_drv.so
usr/lib/libXvMCNVIDIA.so.${PV}
usr/lib/libvdpau_nvidia.so.${PV}
usr/lib/OpenCL/vendors/nvidia/libOpenCL.so.1.0.0
usr/lib/libnvidia-compiler.so.${PV}
usr/lib/libnvcuvid.so.${PV}
opt/bin/nvidia-smi
opt/bin/nvidia-xconfig
opt/bin/nvidia-debugdump
opt/bin/nvidia-settings"
S=${WORKDIR}/
mtrr_check() {
ebegin "Checking for MTRR support"
linux_chkconfig_present MTRR
eend $?
if [[ $? -ne 0 ]] ; then
eerror "Please enable MTRR support in your kernel config, found at:"
eerror
eerror " Processor type and features"
eerror " [*] MTRR (Memory Type Range Register) support"
eerror
eerror "and recompile your kernel ..."
die "MTRR support not detected!"
fi
}
lockdep_check() {
if linux_chkconfig_present LOCKDEP; then
eerror "You've enabled LOCKDEP -- lock tracking -- in the kernel."
eerror "Unfortunately, this option exports the symbol "
eerror "'lockdep_init_map' as GPL-only which will prevent "
eerror "${P} from compiling."
eerror "Please make sure the following options have been unset:"
eerror
eerror " Kernel hacking --->"
eerror " [ ] Lock debugging: detect incorrect freeing of live locks"
eerror " [ ] Lock debugging: prove locking correctness"
eerror " [ ] Lock usage statistics"
eerror "in 'menuconfig'"
die "LOCKDEP enabled"
fi
}
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 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; 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/')"
mtrr_check
lockdep_check
fi
# On BSD userland it wants real make command
use userland_BSD && MAKE="$(get_bmake)"
export _POSIX2_VERSION="199209"
# 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
# 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_EXEC="${S}/obj"
NV_LIB="${S}/obj"
NV_SRC="${S}/src"
NV_MAN="${S}/x11/man"
NV_X11="${S}/obj"
NV_X11_DRV="${NV_X11}"
NV_X11_EXT="${NV_X11}"
NV_SOVER=1
elif use kernel_linux; then
NV_DOC="${S}"
NV_EXEC="${S}"
NV_LIB="${S}"
NV_SRC="${S}/kernel"
NV_MAN="${S}"
NV_X11="${S}"
NV_X11_DRV="${NV_X11}"
NV_X11_EXT="${NV_X11}"
NV_SOVER=${PV}
else
die "Could not determine proper NVIDIA package"
fi
}
src_unpack() {
if use kernel_linux && kernel_is lt 2 6 7; then
echo
ewarn "Your kernel version is ${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}"
ewarn "This is not officially supported for ${P}. It is likely you"
ewarn "will not be able to compile or use the kernel module."
ewarn "It is recommended that you upgrade your kernel to a version >= 2.6.7"
echo
ewarn "DO NOT file bug reports for kernel versions less than 2.6.7 as they will be ignored."
fi
if ! use kernel_FreeBSD; then
cd "${S}"
unpack_makeself
else
unpack ${A}
fi
}
src_prepare() {
# Please add a brief description for every added patch
use kernel_FreeBSD && cd doc
if use kernel_linux; then
# Quiet down warnings the user does not need to see
sed -i \
-e 's:-Wsign-compare::g' \
"${NV_SRC}"/Makefile.kbuild
# If greater than 2.6.5 use M= instead of SUBDIR=
convert_to_m "${NV_SRC}"/Makefile.kbuild
fi
if use pax_kernel; then
epatch "${FILESDIR}"/nvidia-drivers-pax-const.patch
epatch "${FILESDIR}"/nvidia-drivers-pax-usercopy.patch
fi
cat <<- EOF > "${S}"/nvidia.icd
/usr/$(get_libdir)/libcuda.so
EOF
# 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
}
src_install() {
if use kernel_linux; then
linux-mod_src_install
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."
fi
# Add the aliases
[ -f "${FILESDIR}/nvidia-169.07" ] || die "nvidia missing in FILESDIR"
sed -e 's:PACKAGE:'${PF}':g' \
-e 's:VIDEOGID:'${VIDEOGROUP}':' "${FILESDIR}"/nvidia-169.07 > \
"${WORKDIR}"/nvidia
insinto /etc/modprobe.d
newins "${WORKDIR}"/nvidia nvidia.conf || die
# Ensures that our device nodes are created when not using X
exeinto /lib/udev
doexe "${FILESDIR}"/nvidia-udev.sh
insinto /lib/udev/rules.d
newins "${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" || die
fi
exeinto /boot/modules
doexe "${S}/src/nvidia.ko" || die
fi
# NVIDIA kernel <-> userspace driver config lib
dolib.so ${NV_LIB}/libnvidia-cfg.so.${NV_SOVER} || \
die "failed to install libnvidia-cfg"
dosym libnvidia-cfg.so.${NV_SOVER} \
/usr/$(get_libdir)/libnvidia-cfg.so.1 || \
die "failed to create libnvidia-cfg.so symlink"
dosym libnvidia-cfg.so.1 \
/usr/$(get_libdir)/libnvidia-cfg.so || \
die "failed to create libnvidia-cfg.so symlink"
if use kernel_linux; then
# NVIDIA monitoring library
dolib.so ${NV_LIB}/libnvidia-ml.so.${NV_SOVER} || \
die "failed to install libnvidia-ml"
dosym libnvidia-ml.so.${NV_SOVER} \
/usr/$(get_libdir)/libnvidia-ml.so.1 || \
die "failed to create libnvidia-ml.so symlink"
dosym libnvidia-ml.so.1 \
/usr/$(get_libdir)/libnvidia-ml.so || \
die "failed to create libnvidia-ml.so symlink"
# NVIDIA video decode <-> CUDA
dolib.so ${NV_LIB}/libnvcuvid.so.${NV_SOVER} || \
die "failed to install libnvcuvid.so"
dosym libnvcuvid.so.${NV_SOVER} \
/usr/$(get_libdir)/libnvcuvid.so.1 || \
die "failed to create libnvcuvid.so symlink"
dosym libnvcuvid.so.1 \
/usr/$(get_libdir)/libnvcuvid.so || \
die "failed to create libnvcuvid.so symlink"
fi
# Xorg DDX driver
insinto /usr/$(get_libdir)/xorg/modules/drivers
doins ${NV_X11_DRV}/nvidia_drv.so || die "failed to install nvidia_drv.so"
# Xorg GLX driver
insinto /usr/$(get_libdir)/opengl/nvidia/extensions
doins ${NV_X11_EXT}/libglx.so.${NV_SOVER} || \
die "failed to install libglx.so"
dosym libglx.so.${NV_SOVER} \
/usr/$(get_libdir)/opengl/nvidia/extensions/libglx.so || \
die "failed to create libglx.so symlink"
# XvMC driver
dolib.a ${NV_X11}/libXvMCNVIDIA.a || \
die "failed to install libXvMCNVIDIA.so"
dolib.so ${NV_X11}/libXvMCNVIDIA.so.${NV_SOVER} || \
die "failed to install libXvMCNVIDIA.so"
dosym libXvMCNVIDIA.so.${NV_SOVER} \
/usr/$(get_libdir)/libXvMCNVIDIA.so.1 || \
die "failed to create libXvMCNVIDIA.so symlink"
dosym libXvMCNVIDIA.so.1 /usr/$(get_libdir)/libXvMCNVIDIA.so || \
die "failed to create libXvMCNVIDIA.so symlink"
dosym libXvMCNVIDIA.so.${NV_SOVER} \
/usr/$(get_libdir)/libXvMCNVIDIA_dynamic.so.1 || \
die "failed to create libXvMCNVIDIA_dynamic.so symlink"
# OpenCL ICD for NVIDIA
if use kernel_linux; then
insinto /etc/OpenCL/vendors
doins nvidia.icd
fi
# Documentation
dohtml ${NV_DOC}/html/*
if use kernel_FreeBSD; then
dodoc "${NV_DOC}/README"
doman "${NV_MAN}/nvidia-xconfig.1"
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"
doman "${NV_MAN}/nvidia-xconfig.1.gz"
doman "${NV_MAN}/nvidia-settings.1.gz"
fi
# Helper Apps
exeinto /opt/bin/
doexe ${NV_EXEC}/nvidia-xconfig || die
use kernel_linux && { doexe ${NV_EXEC}/nvidia-debugdump || die ; }
if use tools; then
doexe ${NV_EXEC}/nvidia-settings || die
fi
doexe ${NV_EXEC}/nvidia-bug-report.sh || die
if use kernel_linux; then
doexe ${NV_EXEC}/nvidia-smi || die
fi
# Desktop entries for nvidia-settings
if use tools && use kernel_linux ; then
sed -e 's:__UTILS_PATH__:/opt/bin:' \
-e 's:__PIXMAP_PATH__:/usr/share/pixmaps:' \
-i "${NV_EXEC}/nvidia-settings.desktop"
newmenu ${NV_EXEC}/nvidia-settings.desktop nvidia-settings-opt.desktop
fi
doicon ${NV_EXEC}/nvidia-settings.png
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"
}
# Install nvidia library:
# the first parameter is the place where to install it
# the second parameter is the base name of the library
# the third parameter is the provided soversion
donvidia() {
dodir $1
exeinto $1
libname=$(basename $2)
doexe $2.$3 || die "failed to install $2"
dosym ${libname}.$3 $1/${libname} || die "failed to symlink $2"
[[ $3 != "1" ]] && dosym ${libname}.$3 $1/${libname}.1
}
src_install-libs() {
local inslibdir=$(get_libdir)
local NV_ROOT="/usr/${inslibdir}/opengl/nvidia"
local CL_ROOT=/usr/${inslibdir}/OpenCL/vendors/nvidia
local libdir= sover=
if use kernel_linux; then
if has_multilib_profile && [[ ${ABI} == "x86" ]] ; then
libdir=32
else
libdir=.
fi
sover=${PV}
else
libdir=obj
# on FreeBSD it has just .1 suffix
sover=1
fi
# The GLX libraries
donvidia ${NV_ROOT}/lib ${libdir}/libGL.so ${sover}
donvidia /usr/${inslibdir} ${libdir}/libnvidia-glcore.so ${sover}
if use kernel_FreeBSD; then
donvidia ${NV_ROOT}/lib ${libdir}/libnvidia-tls.so ${sover}
else
donvidia ${NV_ROOT}/lib ${libdir}/tls/libnvidia-tls.so ${sover}
fi
# VDPAU
donvidia /usr/${inslibdir} ${libdir}/libvdpau_nvidia.so ${sover}
# CUDA & OpenCL
if use kernel_linux; then
donvidia /usr/${inslibdir} ${libdir}/libcuda.so ${sover}
donvidia /usr/${inslibdir} ${libdir}/libnvidia-compiler.so ${sover}
donvidia ${CL_ROOT} ${libdir}/libOpenCL.so 1.0.0
#dosym libOpenCL.so.1 ${CL_ROOT}/libOpenCL.so
fi
}
pkg_preinst() {
use kernel_linux && linux-mod_pkg_preinst
# 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
"${ROOT}"/usr/bin/eselect opengl set --use-old nvidia
"${ROOT}"/usr/bin/eselect opencl set --use-old nvidia
echo
elog "You must be in the video group to use the NVIDIA device"
elog "For more info, read the docs at"
elog "http://www.gentoo.org/doc/en/nvidia-guide.xml#doc_chap3_sect6"
elog
elog "This ebuild installs a kernel module and X driver. Both must"
elog "match explicitly in their version. This means, if you restart"
elog "X, you must modprobe -r nvidia before starting it back up"
elog
elog "To use the NVIDIA GLX, run \"eselect opengl set nvidia\""
elog
elog "To use the NVIDIA CUDA/OpenCL, run \"eselect opencl set nvidia\""
elog
elog "NVIDIA has requested that any bug reports submitted have the"
elog "output of /opt/bin/nvidia-bug-report.sh included."
elog
elog "To work with compiz, you must enable the AddARGBGLXVisuals option."
elog
elog "If you are having resolution problems, try disabling DynamicTwinView."
elog
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"
fi
}
pkg_prerm() {
"${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11
}
pkg_postrm() {
use kernel_linux && linux-mod_pkg_postrm
"${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11
}

View File

@ -1,446 +0,0 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/x11-drivers/nvidia-drivers/nvidia-drivers-304.37-r1.ebuild,v 1.3 2012/08/22 04:50:23 cardoe Exp $
EAPI=4
inherit eutils flag-o-matic linux-info linux-mod multilib nvidia-driver \
portability toolchain-funcs unpacker user versionator
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="x86? ( http://us.download.nvidia.com/XFree86/Linux-x86/${PV}/${X86_NV_PACKAGE}.run )
amd64? ( http://us.download.nvidia.com/XFree86/Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}.run )
amd64-fbsd? ( http://us.download.nvidia.com/XFree86/FreeBSD-x86_64/${PV}/${AMD64_FBSD_NV_PACKAGE}.tar.gz )
x86-fbsd? ( http://us.download.nvidia.com/XFree86/FreeBSD-x86/${PV}/${X86_FBSD_NV_PACKAGE}.tar.gz )"
LICENSE="NVIDIA"
SLOT="0"
KEYWORDS="-* ~amd64 ~x86 ~amd64-fbsd ~x86-fbsd"
IUSE="acpi multilib kernel_FreeBSD kernel_linux pax_kernel +tools +X"
RESTRICT="strip"
EMULTILIB_PKG="true"
COMMON="app-admin/eselect-opencl
kernel_linux? ( >=sys-libs/glibc-2.6.1 )
multilib? ( app-emulation/emul-linux-x86-xlibs )
X? (
<x11-base/xorg-server-1.12.99
>=app-admin/eselect-opengl-1.0.9
)"
DEPEND="${COMMON}
kernel_linux? (
virtual/linux-sources
virtual/pkgconfig
)"
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-libs/libXvMC )"
PDEPEND="X? ( >=x11-libs/libvdpau-0.3-r1 )"
REQUIRED_USE="tools? ( X )"
QA_PREBUILT=""
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
# 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
# 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
# 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
epatch "${FILESDIR}"/nvidia-drivers-pax-const.patch
epatch "${FILESDIR}"/nvidia-drivers-pax-usercopy.patch
fi
cat <<- EOF > "${S}"/nvidia.icd
/usr/$(get_libdir)/libnvidia-opencl.so
EOF
# 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)
# Add it to QA_PREBUILT
QA_PREBUILT+=" ${MY_DEST}/${libname}.${MY_SOVER}"
# 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
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."
fi
# Add the aliases
[ -f "${FILESDIR}/nvidia-169.07" ] || die "nvidia missing in FILESDIR"
sed -e 's:PACKAGE:'${PF}':g' \
-e 's:VIDEOGID:'${VIDEOGROUP}':' "${FILESDIR}"/nvidia-169.07 > \
"${WORKDIR}"/nvidia
insinto /etc/modprobe.d
newins "${WORKDIR}"/nvidia nvidia.conf || die
local udevdir=/lib/udev
has_version sys-fs/udev && udevdir="$($(tc-getPKG_CONFIG) --variable=udevdir udev)"
# Ensures that our device nodes are created when not using X
exeinto "${udevdir}"
doexe "${FILESDIR}"/nvidia-udev.sh
insinto "${udevdir}"/rules.d
newins "${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" || die
fi
exeinto /boot/modules
doexe "${S}/src/nvidia.ko" || die
fi
# NVIDIA kernel <-> userspace driver config lib
donvidia ${NV_OBJ}/libnvidia-cfg.so ${NV_SOVER}
if use kernel_linux; then
# NVIDIA video decode <-> CUDA
donvidia ${NV_OBJ}/libnvcuvid.so ${NV_SOVER}
fi
if use X; then
# Xorg DDX driver
insinto /usr/$(get_libdir)/xorg/modules/drivers
doins ${NV_X11}/nvidia_drv.so || die "failed to install nvidia_drv.so"
# Xorg GLX driver
donvidia ${NV_X11}/libglx.so ${NV_SOVER} \
/usr/$(get_libdir)/opengl/nvidia/extensions
# XvMC driver
dolib.a ${NV_X11}/libXvMCNVIDIA.a || \
die "failed to install libXvMCNVIDIA.so"
donvidia ${NV_X11}/libXvMCNVIDIA.so ${NV_SOVER}
dosym libXvMCNVIDIA.so.${NV_SOVER} \
/usr/$(get_libdir)/libXvMCNVIDIA_dynamic.so.1 || \
die "failed to create libXvMCNVIDIA_dynamic.so symlink"
fi
# OpenCL ICD for NVIDIA
if use kernel_linux; then
insinto /etc/OpenCL/vendors
doins nvidia.icd
donvidia ${NV_OBJ}/libnvidia-opencl.so ${NV_SOVER}
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-proxy-control.1.gz"
fi
# Helper Apps
exeinto /opt/bin/
if use X; then
doexe ${NV_OBJ}/nvidia-xconfig || die
fi
if use kernel_linux ; then
doexe ${NV_OBJ}/nvidia-debugdump || die
doexe ${NV_OBJ}/nvidia-cuda-proxy-control || die
doexe ${NV_OBJ}/nvidia-cuda-proxy-server || die
doexe ${NV_OBJ}/nvidia-smi || die
newinitd "${FILESDIR}/nvidia-smi.init" nvidia-smi
fi
if use tools; then
doexe ${NV_OBJ}/nvidia-settings || die
fi
exeinto /usr/bin/
doexe ${NV_OBJ}/nvidia-bug-report.sh || die
# Desktop entries for nvidia-settings
if use tools ; then
newicon ${NV_OBJ}/nvidia-settings.png nvidia-drivers-settings.png
domenu "${FILESDIR}"/nvidia-drivers-settings.desktop
insinto /etc/xdg/autostart
doins "${FILESDIR}"/nvidia-autostart.desktop
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"
}
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}/libnvidia-glcore.so ${NV_SOVER}
if use kernel_FreeBSD; then
donvidia ${libdir}/libnvidia-tls.so ${NV_SOVER} ${GL_ROOT}
else
donvidia ${libdir}/tls/libnvidia-tls.so ${NV_SOVER} ${GL_ROOT}
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}
fi
}
pkg_preinst() {
use kernel_linux && linux-mod_pkg_preinst
# 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
elog "You must be in the video group to use the NVIDIA device"
elog "For more info, read the docs at"
elog "http://www.gentoo.org/doc/en/nvidia-guide.xml#doc_chap3_sect6"
elog
elog "This ebuild installs a kernel module and X driver. Both must"
elog "match explicitly in their version. This means, if you restart"
elog "X, you must modprobe -r nvidia before starting it back up"
elog
elog "To use the NVIDIA GLX, run \"eselect opengl set nvidia\""
elog
elog "To use the NVIDIA CUDA/OpenCL, run \"eselect opencl set nvidia\""
elog
elog "NVIDIA has requested that any bug reports submitted have the"
elog "output of /opt/bin/nvidia-bug-report.sh included."
elog
if ! use X; then
elog "You have elected to not install the X.org driver. Along with"
elog "this the OpenGL libraries, XvMC, 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
}