[56220] trunk/dports/games/larn/Portfile

aschenke at macports.org aschenke at macports.org
Tue Aug 25 03:40:00 PDT 2009


Revision: 56220
          http://trac.macports.org/changeset/56220
Author:   aschenke at macports.org
Date:     2009-08-25 03:39:59 -0700 (Tue, 25 Aug 2009)
Log Message:
-----------
added singleuser variant to support --with-no-root-privileges installs in MacPorts 1.8.0

Modified Paths:
--------------
    trunk/dports/games/larn/Portfile

Modified: trunk/dports/games/larn/Portfile
===================================================================
--- trunk/dports/games/larn/Portfile	2009-08-25 10:38:27 UTC (rev 56219)
+++ trunk/dports/games/larn/Portfile	2009-08-25 10:39:59 UTC (rev 56220)
@@ -31,8 +31,12 @@
             patch-scores.c \
             patch-store.c
 
+variant singleuser description {Disables system-wide scoreboards and allows local user installation without root privileges} {}
+
 configure           {
-						addgroup games
+						if {![variant_isset singleuser]} {
+							 addgroup games
+						}
 
                         reinplace "s|MAN|MAN6|" ${worksrcpath}/Makefile
                         reinplace "s|/usr/share/games|${prefix}/share|g" ${worksrcpath}/pathnames.h
@@ -40,9 +44,20 @@
                     }
 
 destroot            {
-						xinstall -m 775 -g games -d ${destroot}${prefix}/var/games/larn
+						if {![variant_isset singleuser]} {
+							xinstall -m 775 -g games -d ${destroot}${prefix}/var/games/larn
+                        } else {
+                        	xinstall -m 775 -d ${destroot}${prefix}/var/games/larn
+                        }
+                        
                         xinstall -m 755 -d ${destroot}${prefix}/share/larn
-                        xinstall -m 2755 -g games -c ${worksrcpath}/larn ${destroot}${prefix}/bin
+                        
+						if {![variant_isset singleuser]} {
+                        	xinstall -m 2755 -g games -c ${worksrcpath}/larn ${destroot}${prefix}/bin
+                        } else {
+                        	xinstall -m 755 -c ${worksrcpath}/larn ${destroot}${prefix}/bin
+                        }                        
+                        
                         xinstall -m 644 -c ${worksrcpath}/larn.6.gz ${destroot}${prefix}/share/man/man6
                         xinstall -m 644 -c ${worksrcpath}/datfiles/larn.help ${destroot}${prefix}/share/larn
                         xinstall -m 644 -c ${worksrcpath}/datfiles/larnmaze ${destroot}${prefix}/share/larn
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090825/4f73ec8c/attachment-0001.html>


More information about the macports-changes mailing list