Date: Mon, 10 Jan 2011 11:22:28 GMT From: Alex Dupre <ale@FreeBSD.org> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/153840: Allow to build package of x11/nvidia-driver Message-ID: <201101101122.p0ABMS6C024728@freefall.freebsd.org> Resent-Message-ID: <201101101130.p0ABUB41024899@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 153840 >Category: ports >Synopsis: Allow to build package of x11/nvidia-driver >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Mon Jan 10 11:30:11 UTC 2011 >Closed-Date: >Last-Modified: >Originator: Alex Dupre >Release: FreeBSD 8.1-STABLE i386 >Organization: >Environment: System: FreeBSD freefall.freebsd.org 8.1-STABLE FreeBSD 8.1-STABLE #2 r215627: Sun Nov 21 13:36:51 UTC 2010 simon@freefall.freebsd.org:/usr/obj/usr/src/sys/FREEFALL i386 >Description: I don't see a valid reason to avoid creating a package of nvidia-driver. The attached patch "fixes" this issue. Tested on tinderbox and on my system. >How-To-Repeat: >Fix: --- nvidia-driver.diff begins here --- Index: Makefile =================================================================== RCS file: /home/pcvs/ports/x11/nvidia-driver/Makefile,v retrieving revision 1.102 diff -u -r1.102 Makefile --- Makefile 8 Dec 2010 03:28:28 -0000 1.102 +++ Makefile 10 Jan 2011 11:17:38 -0000 @@ -10,14 +10,14 @@ PORTREVISION?= 0 # As a reminder it can be overridden CATEGORIES= x11 kld MASTER_SITES= ${MASTER_SITE_NVIDIA} -ARCH_SUFX= ${ARCH:S/i386//:S/amd/_/} # MASTER_SITE_SUBDIR has to be set later because it depends on NVVERSION DISTNAME= NVIDIA-FreeBSD-x86${ARCH_SUFX}-${DISTVERSION} MAINTAINER= danfe@FreeBSD.org COMMENT= NVidia graphics card binary drivers for hardware OpenGL rendering -NO_PACKAGE= should be recompiled for a particular FreeBSD kernel +ARCH_SUFX= ${ARCH:S/i386//:S/amd/_/} +USE_XORG= xorg-server USE_GL= gl USE_LDCONFIG= yes SUB_FILES= pkg-message @@ -57,14 +57,8 @@ .include <bsd.port.pre.mk> -# XXX Should use ${PKG_INFO} but it does not expand for some reason XXX -# -XSERVVERSION!= /usr/sbin/pkg_info -qO x11-servers/xorg-server 2>/dev/null || true -LIBGLVERSION!= /usr/sbin/pkg_info -qO graphics/libGL 2>/dev/null || true - -.if empty(XSERVVERSION) -IGNORE= needs an X server implementation installed -.endif +XSERVVERSION!= ${PKG_INFO} -qO x11-servers/xorg-server 2>/dev/null || true +LIBGLVERSION!= ${PKG_INFO} -qO graphics/libGL 2>/dev/null || true PLIST_SUB+= XSERVVERSION=${XSERVVERSION} LIBGLVERSION=${LIBGLVERSION} \ LINUXBASE=${LINUXBASE} SHLIB_VERSION=${PORTVERSION} \ @@ -138,6 +132,7 @@ pre-su-install: # XXX This port silently assumes PREFIX == LOCALBASE XXX @${MKDIR} ${PREFIX}/${MODULESDIR}/drivers + @${MKDIR} ${PREFIX}/${MODULESDIR}/extensions post-install: .SILENT # pkg-plist is already overbloated, so use these hacks instead of PLIST_SUB's Index: pkg-plist =================================================================== RCS file: /home/pcvs/ports/x11/nvidia-driver/pkg-plist,v retrieving revision 1.28 diff -u -r1.28 pkg-plist --- pkg-plist 24 Sep 2010 19:11:00 -0000 1.28 +++ pkg-plist 10 Jan 2011 11:17:38 -0000 @@ -1,14 +1,10 @@ -@comment I can't add the below files to the package because pkg_delete -@comment will complain when removing this package: -@comment %%MODULESDIR%%/extensions/XXX-libglx.la.%%%%.%%XSERVVERSION%% -@comment %%MODULESDIR%%/extensions/XXX-libglx.so.%%%%.%%XSERVVERSION%% -@comment lib/XXX-libGL.so.1.%%%%.%%LIBGLVERSION%% -@comment They are however restored when this package is removed: @exec mv -f %D/%%MODULESDIR%%/extensions/libglx.la %D/%%MODULESDIR%%/extensions/XXX-libglx.la.%%%%.%%XSERVVERSION%% @unexec mv -f %D/%%MODULESDIR%%/extensions/XXX-libglx.la.%%%%.%%XSERVVERSION%% %D/%%MODULESDIR%%/extensions/libglx.la @exec mv -f %D/%%MODULESDIR%%/extensions/libglx.so %D/%%MODULESDIR%%/extensions/XXX-libglx.so.%%%%.%%XSERVVERSION%% +%%MODULESDIR%%/extensions/libglx.so @unexec mv -f %D/%%MODULESDIR%%/extensions/XXX-libglx.so.%%%%.%%XSERVVERSION%% %D/%%MODULESDIR%%/extensions/libglx.so @exec mv -f %D/lib/libGL.so.1 %D/lib/XXX-libGL.so.1.%%%%.%%LIBGLVERSION%% +lib/libGL.so.1 @unexec mv -f %D/lib/XXX-libGL.so.1.%%%%.%%LIBGLVERSION%% %D/lib/libGL.so.1 lib/libnvidia-tls.so.1 lib/libnvidia-tls.so --- nvidia-driver.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201101101122.p0ABMS6C024728>