forked from ports/contrib
56 lines
1.7 KiB
Plaintext
56 lines
1.7 KiB
Plaintext
# Description: nVIDIA Linux Display Driver.
|
|
# URL: http://www.nvidia.com/
|
|
# Maintainer: Danny Rawlins, monster dot romster at gmail dot com
|
|
# Packager: Matt Housh, jaeger at morpheus dot net
|
|
# Depends on: xorg gl-select
|
|
|
|
name=nvidia-legacy-71xx
|
|
version=71.86.06
|
|
release=3
|
|
source=(http://us.download.nvidia.com/XFree86/Linux-x86/$version/NVIDIA-Linux-x86-$version-pkg0.run
|
|
nvidia-makefile.patch
|
|
kernel-2.6.27.patch)
|
|
|
|
build() {
|
|
sh NVIDIA-Linux-x86-$version-pkg0.run --extract-only
|
|
cd NVIDIA-Linux-x86-$version-pkg0
|
|
|
|
# patch Makefile.kbuild for normal users and no load during build
|
|
patch -p 0 -i $SRC/nvidia-makefile.patch usr/src/nv/Makefile.kbuild
|
|
|
|
# kernel patch
|
|
patch -p 1 -i $SRC/kernel-2.6.27.patch
|
|
|
|
# create directories the Makefile expects
|
|
mkdir -p $PKG/usr/lib \
|
|
$PKG/usr/lib/xorg/modules/drivers \
|
|
$PKG/usr/lib/xorg/modules/extensions \
|
|
$PKG/usr/bin $PKG/usr/man/man1
|
|
|
|
# install libraries
|
|
cp -a usr/X11R6/lib/* $PKG/usr/lib/xorg/
|
|
cp -a usr/lib/* $PKG/usr/lib/
|
|
sed -i -e 's|__LIBGL_PATH__|/usr/lib|' $PKG/usr/lib/libGL.la
|
|
ln -s libGLcore.so.$version $PKG/usr/lib/libGLcore.so
|
|
ln -sf /usr/lib/libGLcore.so $PKG/usr/lib/xorg/modules/extensions/libGLcore.so
|
|
|
|
# copy includes
|
|
mkdir -p $PKG/usr/include/nvidia
|
|
cp -r usr/include/GL $PKG/usr/include/nvidia/
|
|
|
|
# install xconfig/settings programs and manpages
|
|
install -m 0755 usr/bin/nvidia-settings $PKG/usr/bin/
|
|
install -m 0644 usr/share/man/man1/nvidia-installer.1.gz \
|
|
$PKG/usr/man/man1/
|
|
|
|
# build the module
|
|
cd usr/src/nv
|
|
sed -i -e 's/config.h/utsrelease.h/' nv-linux.h # fix for later kernels
|
|
ln -s Makefile{.kbuild,}
|
|
SYSSRC="/usr/src/linux-$(uname -r)" IGNORE_CC_MISMATCH=1 make module
|
|
|
|
# install it
|
|
install -m 0644 -D nvidia.ko \
|
|
$PKG/lib/modules/`uname -r`/kernel/drivers/video/nvidia.ko
|
|
}
|