1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-23 00:43:28 +00:00

- Update the driver to version 169.07. Since they've changed version scheme

once again, as a temporary measure, NVVERSION is easier to define in slave
  and master ports independently than further obfuscate the Makefile
- Display pkg-message consistenly between port vs. package installation
- Minor nit: spell `NVidia' consistently in Makefile

Closes PR:	ports/119090
Submitted by:	Brad Allen
This commit is contained in:
Alexey Dokuchaev 2008-02-19 14:32:04 +00:00
parent 93e74ab00e
commit acce147415
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=207585
4 changed files with 17 additions and 73 deletions

View File

@ -6,7 +6,7 @@
#
PORTNAME= nvidia-driver
DISTVERSION?= 100.14.19
DISTVERSION?= 169.07
PORTREVISION?= 0 # For consistency with slave ports
CATEGORIES= x11 kld
MASTER_SITES= ${MASTER_SITE_NVIDIA}
@ -35,13 +35,18 @@ OPTIONS= FREEBSD_AGP "Use FreeBSD AGP GART driver" off \
# you need to use legacy driver version and install one of corresponding
# `x11/nvidia-driver-71xx' or `x11/nvidia-driver-96xx' slave ports.
#
NVVERSION= ${DISTVERSION:S/.//g}
# Use a dirty hack to apply patches selectively based on NVVERSION (first
# two or three digits, really).
# NVidia played it tricky with their versioning scheme once again. To make
# stable and legacy versions comprable, employ some sad ugly hackery: assign
# NVVERSION for slave ports independently of master. Hopefully, this is a
# temporary measure and will go away soon.
#
NVVERSION?= ${DISTVERSION:S/.//g}00
EXTRA_PATCHES= ${PATCHDIR}/7667-patch-lib::Makefile \
${PATCHDIR}/${NVVERSION:C/....$//}xx-patch-*
# Legacy versions still need the locking patch
.if ${NVVERSION} < 1000000
EXTRA_PATCHES+= ${PATCHDIR}/${NVVERSION:C/....$//}xx-patch-*
.endif
.include <bsd.port.pre.mk>
@ -135,7 +140,7 @@ pre-su-install:
# XXX This port silently assumes PREFIX == X11BASE XXX
@${MKDIR} ${PREFIX}/${MODULESDIR}/drivers
# xorg-server-1.4 installs its own ${X11BASE}/lib/xorg/modules/libwfb.so,
# so back it up so it can be later restored similarly to what nVidia does:
# so back it up so it can be later restored similarly to what NVidia does:
.if ${NVVERSION} >= 974600 && ${X_WINDOW_SYSTEM} == "xorg"
@${MV} -f ${PREFIX}/${MODULESDIR}/libwfb.so \
${PREFIX}/${MODULESDIR}/XXX-libwfb.so.%%.${XSERVVERSION}
@ -152,6 +157,8 @@ post-install:
@${REINPLACE_CMD} '/wfb/d' ${TMPPLIST}
.endif
@${LN} -sf libXvMCNVIDIA.so.1 ${PREFIX}/lib/libXvMCNVIDIA_dynamic.so.1
@${ECHO_MSG}
@${CAT} ${PKGMESSAGE}
@${ECHO_MSG}
.include <bsd.port.post.mk>

View File

@ -4,6 +4,6 @@ SIZE (NVIDIA-FreeBSD-x86-71.86.01.tar.gz) = 8437426
MD5 (NVIDIA-FreeBSD-x86-96.43.01.tar.gz) = 443f6e392d2cb557c6bb8e1e9890a2f6
SHA256 (NVIDIA-FreeBSD-x86-96.43.01.tar.gz) = 75b43958ba3331dec15cb3ca72d073c428bf58e6fe766852a1b98a0cd0a74908
SIZE (NVIDIA-FreeBSD-x86-96.43.01.tar.gz) = 9675336
MD5 (NVIDIA-FreeBSD-x86-100.14.19.tar.gz) = a124599d3ca8c2e2683472fde8fdbf64
SHA256 (NVIDIA-FreeBSD-x86-100.14.19.tar.gz) = c5a37e34266538b0ecfbbec95c7d5f9767e0d750cbf66a7cb54cc13895d601ad
SIZE (NVIDIA-FreeBSD-x86-100.14.19.tar.gz) = 11146166
MD5 (NVIDIA-FreeBSD-x86-169.07.tar.gz) = 80223c74f7a024b30e9550bf52963a4f
SHA256 (NVIDIA-FreeBSD-x86-169.07.tar.gz) = 9eb417d164bfa6ee53f10227b23e6fae8270bd9890b9777495460c2bbe8e332d
SIZE (NVIDIA-FreeBSD-x86-169.07.tar.gz) = 13751526

View File

@ -1,61 +0,0 @@
--- src/nvidia_os.c.orig 2007-07-24 21:06:12.000000000 +0200
+++ src/nvidia_os.c 2007-07-24 21:17:09.000000000 +0200
@@ -598,7 +598,7 @@
!= RM_OK))
return status;
- mtx_init(&mtx->mutex_mtx, "rm.mutex_mtx", NULL, MTX_SPIN | MTX_RECURSE);
+ mtx_init(&mtx->mutex_mtx, "rm.mutex_mtx", NULL, MTX_DEF | MTX_RECURSE);
cv_init(&mtx->mutex_wait, "rm.mutex_wait");
mtx->refcnt = 1;
@@ -624,13 +624,13 @@
{
struct os_mutex *mtx = semaphore;
- mtx_lock_spin(&mtx->mutex_mtx);
+ mtx_lock(&mtx->mutex_mtx);
if (mtx->refcnt > 0)
rm_disable_interrupts(NULL);
mtx->refcnt--;
if (mtx->refcnt < 0)
cv_wait(&mtx->mutex_wait, &mtx->mutex_mtx);
- mtx_unlock_spin(&mtx->mutex_mtx);
+ mtx_unlock(&mtx->mutex_mtx);
return RM_OK;
}
@@ -639,14 +639,14 @@
{
struct os_mutex *mtx = semaphore;
- mtx_lock_spin(&mtx->mutex_mtx);
+ mtx_lock(&mtx->mutex_mtx);
if (mtx->refcnt < 1) {
- mtx_unlock_spin(&mtx->mutex_mtx);
+ mtx_unlock(&mtx->mutex_mtx);
return FALSE;
} else {
rm_disable_interrupts(NULL);
mtx->refcnt--;
- mtx_unlock_spin(&mtx->mutex_mtx);
+ mtx_unlock(&mtx->mutex_mtx);
}
return TRUE;
@@ -656,13 +656,13 @@
{
struct os_mutex *mtx = semaphore;
- mtx_lock_spin(&mtx->mutex_mtx);
+ mtx_lock(&mtx->mutex_mtx);
if (mtx->refcnt < 0)
cv_signal(&mtx->mutex_wait);
if (!mtx->refcnt)
rm_enable_interrupts(NULL);
mtx->refcnt++;
- mtx_unlock_spin(&mtx->mutex_mtx);
+ mtx_unlock(&mtx->mutex_mtx);
return RM_OK;
}

View File

@ -1,4 +1,3 @@
To use these drivers, make sure that you have loaded the nvidia kernel
module, by doing
@ -35,4 +34,3 @@ in /var/log/Xorg.0.log while actually you have ``options SYSVSHM''
enabled in kernel, the sysctl ``kern.ipc.shmall'' should be increased.
See %%DOCSDIR%%/README for more information.