From 75a7683de87b4c63ce34492a439827690a11b8ee Mon Sep 17 00:00:00 2001 From: Alexey Dokuchaev Date: Tue, 24 Jul 2007 09:10:57 +0000 Subject: More cleanups: - Simplify SHLIB_VERSION handling, it's not that bad after all - Better and cleaner PORTDOCS handling, less hacks in Makefile - Fix non-root installation (use pre-su-install) - Miscellaneous Makefile nits --- x11/nvidia-driver/Makefile | 17 ++++++------ x11/nvidia-driver/pkg-plist | 63 +++++---------------------------------------- 2 files changed, 14 insertions(+), 66 deletions(-) (limited to 'x11') diff --git a/x11/nvidia-driver/Makefile b/x11/nvidia-driver/Makefile index 4d6ba8e3c439..8c65efcb5de7 100644 --- a/x11/nvidia-driver/Makefile +++ b/x11/nvidia-driver/Makefile @@ -23,6 +23,7 @@ USE_GL= gl INSTALLS_SHLIB= yes SUB_FILES+= pkg-message DOCSDIR= ${PREFIX}/share/doc/NVIDIA_GLX-1.0 +PORTDOCS= * OPTIONS= FREEBSD_AGP "Use FreeBSD AGP GART driver" off \ VM86_INT10CALL "Use VM86 interface for video BIOS calls" off \ @@ -36,10 +37,8 @@ OPTIONS= FREEBSD_AGP "Use FreeBSD AGP GART driver" off \ # .if ${DISTVERSION:M1.0-*} NVVERSION= ${DISTVERSION:S/1.0-//} -SHLIB_VERSION= ${NVVERSION} .else NVVERSION= ${DISTVERSION:S/.//g} -SHLIB_VERSION= ${PORTVERSION} .endif .if ${NVVERSION} == 7184 @@ -63,11 +62,11 @@ XFREE86_SUB= "" # XXX Should use ${PKG_INFO} XXX # -XSERVVERSION!= /usr/sbin/pkg_info -O x11-servers/XFree86-4-Server 2>/dev/null | ${GREP} Server- || /usr/sbin/pkg_info -O x11-servers/xorg-server 2>/dev/null | ${GREP} server- || /usr/sbin/pkg_info -qO x11-servers/xorg-server-snap +XSERVVERSION!= /usr/sbin/pkg_info -O x11-servers/XFree86-4-Server 2>/dev/null | ${GREP} Server- || /usr/sbin/pkg_info -O x11-servers/xorg-server 2>/dev/null | ${GREP} server- || /usr/sbin/pkg_info -qO x11-servers/xorg-server-snap 2>/dev/null XLIBVERSION!= /usr/sbin/pkg_info -O x11/XFree86-4-libraries 2>/dev/null | ${GREP} libraries- || /usr/sbin/pkg_info -O graphics/libGL 2>/dev/null | ${GREP} libGL- || true PLIST_SUB+= XSERVVERSION=${XSERVVERSION} XLIBVERSION=${XLIBVERSION} \ - LINUXBASE=${LINUXBASE} SHLIB_VERSION=${SHLIB_VERSION} \ + LINUXBASE=${LINUXBASE} SHLIB_VERSION=${PORTVERSION} \ MODULESDIR=${MODULESDIR} XORG=${XORG_SUB} XFREE86=${XFREE86_SUB} .if !defined(WITHOUT_LINUX) @@ -133,20 +132,20 @@ post-patch: .SILENT .endif ${REINPLACE_CMD} '/bin/d ; /man/d' ${WRKSRC}/x11/Makefile -pre-install: +pre-su-install: @${MKDIR} ${PREFIX}/${MODULESDIR}/drivers post-install: # pkg-plist is already overbloated, so use this hack instead of PLIST_SUB's .if ${NVVERSION} < 8174 - @${REINPLACE_CMD} '/libnvidia-cfg/d ; /html/d' ${TMPPLIST} + @${REINPLACE_CMD} '/libnvidia-cfg/d' ${TMPPLIST} .else - @${REINPLACE_CMD} '/README\.Linux/d ; /nvidia_drv\.o/d' ${TMPPLIST} + @${REINPLACE_CMD} '/nvidia_drv\.o/d' ${TMPPLIST} .endif .if ${NVVERSION} < 9746 - @${REINPLACE_CMD} '/wfb/d ; /chapter-10/d' ${TMPPLIST} + @${REINPLACE_CMD} '/wfb/d' ${TMPPLIST} .endif - ${LN} -sf libXvMCNVIDIA.so.1 ${PREFIX}/lib/libXvMCNVIDIA_dynamic.so.1 + @${LN} -sf libXvMCNVIDIA.so.1 ${PREFIX}/lib/libXvMCNVIDIA_dynamic.so.1 @${CAT} ${PKGMESSAGE} .include diff --git a/x11/nvidia-driver/pkg-plist b/x11/nvidia-driver/pkg-plist index 50b07eb37b2e..ca4708cafaf3 100644 --- a/x11/nvidia-driver/pkg-plist +++ b/x11/nvidia-driver/pkg-plist @@ -41,67 +41,16 @@ lib/libXvMCNVIDIA.a %%MODULESDIR%%/drivers/nvidia_drv.so %%MODULESDIR%%/extensions/libglx.so.1 @exec ln -sf %D/%%MODULESDIR%%/extensions/libglx.so.1 %D/%%MODULESDIR%%/extensions/libglx.so -%%PORTDOCS%%%%DOCSDIR%%/html/appendix-a.html -%%PORTDOCS%%%%DOCSDIR%%/html/appendix-b.html -%%PORTDOCS%%%%DOCSDIR%%/html/appendix-c.html -%%PORTDOCS%%%%DOCSDIR%%/html/appendix-d.html -%%PORTDOCS%%%%DOCSDIR%%/html/appendix-e.html -%%PORTDOCS%%%%DOCSDIR%%/html/appendix-f.html -%%PORTDOCS%%%%DOCSDIR%%/html/appendix-g.html -%%PORTDOCS%%%%DOCSDIR%%/html/appendix-h.html -%%PORTDOCS%%%%DOCSDIR%%/html/appendix-i.html -%%PORTDOCS%%%%DOCSDIR%%/html/appendix-j.html -%%PORTDOCS%%%%DOCSDIR%%/html/appendix-k.html -%%PORTDOCS%%%%DOCSDIR%%/html/appendix-l.html -%%PORTDOCS%%%%DOCSDIR%%/html/appendix-m.html -%%PORTDOCS%%%%DOCSDIR%%/html/appendix-n.html -%%PORTDOCS%%%%DOCSDIR%%/html/appendix-o.html -%%PORTDOCS%%%%DOCSDIR%%/html/appendix-p.html -%%PORTDOCS%%%%DOCSDIR%%/html/appendix-q.html -%%PORTDOCS%%%%DOCSDIR%%/html/appendix-r.html -%%PORTDOCS%%%%DOCSDIR%%/html/appendix-s.html -%%PORTDOCS%%%%DOCSDIR%%/html/appendix-t.html -%%PORTDOCS%%%%DOCSDIR%%/html/appendix-u.html -%%PORTDOCS%%%%DOCSDIR%%/html/appendix-v.html -%%PORTDOCS%%%%DOCSDIR%%/html/appendix-w.html -%%PORTDOCS%%%%DOCSDIR%%/html/appendix-x.html -%%PORTDOCS%%%%DOCSDIR%%/html/chapter-01.html -%%PORTDOCS%%%%DOCSDIR%%/html/chapter-02.html -%%PORTDOCS%%%%DOCSDIR%%/html/chapter-03-section-02.html -%%PORTDOCS%%%%DOCSDIR%%/html/chapter-03.html -%%PORTDOCS%%%%DOCSDIR%%/html/chapter-04.html -%%PORTDOCS%%%%DOCSDIR%%/html/chapter-05.html -%%PORTDOCS%%%%DOCSDIR%%/html/chapter-06.html -%%PORTDOCS%%%%DOCSDIR%%/html/chapter-07.html -%%PORTDOCS%%%%DOCSDIR%%/html/chapter-08.html -%%PORTDOCS%%%%DOCSDIR%%/html/chapter-09.html -%%PORTDOCS%%%%DOCSDIR%%/html/chapter-10.html -%%PORTDOCS%%%%DOCSDIR%%/html/index.html -%%PORTDOCS%%%%DOCSDIR%%/html/part-01.html -%%PORTDOCS%%%%DOCSDIR%%/html/part-02.html -%%PORTDOCS%%%%DOCSDIR%%/html/part-03.html -%%PORTDOCS%%%%DOCSDIR%%/html/preface-01.html -%%PORTDOCS%%%%DOCSDIR%%/html/preface-02.html -%%PORTDOCS%%@dirrm %%DOCSDIR%%/html -%%PORTDOCS%%%%DOCSDIR%%/README -%%PORTDOCS%%%%DOCSDIR%%/README.Linux -%%PORTDOCS%%%%DOCSDIR%%/XF86Config.sample -%%PORTDOCS%%%%DOCSDIR%%/license.txt -%%PORTDOCS%%%%DOCSDIR%%/gl.h -%%PORTDOCS%%%%DOCSDIR%%/glx.h -%%PORTDOCS%%%%DOCSDIR%%/glext.h -%%PORTDOCS%%%%DOCSDIR%%/glxtokens.h -%%PORTDOCS%%@dirrm %%DOCSDIR%% @cwd /boot/modules nvidia.ko @unexec kldxref %D %%LINUX%%@cwd %%LINUXBASE%% -%%LINUX%%usr/lib/libGL.so.1.0.%%SHLIB_VERSION%% -%%LINUX%%usr/lib/libGLcore.so.1.0.%%SHLIB_VERSION%% -%%LINUX%%usr/lib/libnvidia-tls.so.1.0.%%SHLIB_VERSION%% -%%LINUX%%@exec ln -sf %D/usr/lib/libGL.so.1.0.%%SHLIB_VERSION%% %D/usr/lib/libGL.so.1 -%%LINUX%%@exec ln -sf %D/usr/lib/libGLcore.so.1.0.%%SHLIB_VERSION%% %D/usr/lib/libGLcore.so.1 -%%LINUX%%@exec ln -sf %D/usr/lib/libnvidia-tls.so.1.0.%%SHLIB_VERSION%% %D/usr/lib/libnvidia-tls.so.1 +%%LINUX%%usr/lib/libGL.so.%%SHLIB_VERSION%% +%%LINUX%%usr/lib/libGLcore.so.%%SHLIB_VERSION%% +%%LINUX%%usr/lib/libnvidia-tls.so.%%SHLIB_VERSION%% +%%LINUX%%@exec ln -sf %D/usr/lib/libGL.so.%%SHLIB_VERSION%% %D/usr/lib/libGL.so.1 +%%LINUX%%@exec ln -sf %D/usr/lib/libGLcore.so.%%SHLIB_VERSION%% %D/usr/lib/libGLcore.so.1 +%%LINUX%%@exec ln -sf %D/usr/lib/libnvidia-tls.so.%%SHLIB_VERSION%% %D/usr/lib/libnvidia-tls.so.1 %%LINUX%%@unexec rm -f %D/usr/lib/libGL.so.1 %%LINUX%%@unexec rm -f %D/usr/lib/libGLcore.so.1 %%LINUX%%@unexec rm -f %D/usr/lib/libnvidia-tls.so.1 -- cgit v1.2.3