[73585] trunk/dports

jmr at macports.org jmr at macports.org
Fri Nov 19 05:36:10 PST 2010


Revision: 73585
          http://trac.macports.org/changeset/73585
Author:   jmr at macports.org
Date:     2010-11-19 05:36:06 -0800 (Fri, 19 Nov 2010)
Log Message:
-----------
remove with_default_names variants and link unprefixed binaries in a separate directory (#20748)

Modified Paths:
--------------
    trunk/dports/devel/m4/Portfile
    trunk/dports/net/gnetcat/Portfile
    trunk/dports/sysutils/coreutils/Portfile
    trunk/dports/sysutils/diffutils/Portfile
    trunk/dports/sysutils/findutils/Portfile
    trunk/dports/sysutils/gwhich/Portfile
    trunk/dports/textproc/gsed/Portfile

Modified: trunk/dports/devel/m4/Portfile
===================================================================
--- trunk/dports/devel/m4/Portfile	2010-11-19 13:28:23 UTC (rev 73584)
+++ trunk/dports/devel/m4/Portfile	2010-11-19 13:36:06 UTC (rev 73585)
@@ -4,6 +4,7 @@
 
 name            m4
 version         1.4.15
+revision        1
 categories      devel
 maintainers     blair openmaintainer
 platforms       darwin
@@ -37,18 +38,13 @@
 	xinstall -d ${destroot}${docdir}
 	xinstall -m 0644 -W ${worksrcpath} AUTHORS COPYING ChangeLog NEWS README THANKS \
 		TODO ${destroot}${docdir}
+
+    xinstall -m 755 -d ${destroot}${prefix}/libexec/gnubin
+    foreach binary [glob -tails -directory ${destroot}${prefix}/bin g*] {
+        ln -s ${prefix}/bin/${binary} ${destroot}${prefix}/libexec/gnubin/[string range $binary 1 end]
+    }
 }
 
 test.run        yes
 test.target     check
 test.env        TMPDIR=/tmp
-
-variant with_default_names description {Install files without 'g' prefix} {
-    post-destroot {
-        foreach {d} {bin share/man/man1} {
-            foreach {f} [glob -tails -directory ${destroot}${prefix}/${d} g*] {
-                ln -sf ${prefix}/${d}/${f} ${destroot}${prefix}/${d}/[string range ${f} 1 end]
-            }
-        }
-    }
-}

Modified: trunk/dports/net/gnetcat/Portfile
===================================================================
--- trunk/dports/net/gnetcat/Portfile	2010-11-19 13:28:23 UTC (rev 73584)
+++ trunk/dports/net/gnetcat/Portfile	2010-11-19 13:36:06 UTC (rev 73585)
@@ -6,6 +6,7 @@
 name            gnetcat
 set my_name     netcat
 version         0.7.1
+revision        1
 homepage        http://netcat.sourceforge.net/
 description     A rewrite of the well-known networking tool, but more portable, with new features and fully GNU compliant.
 long_description \
@@ -45,32 +46,29 @@
 test.run    yes
 test.target check
 
-variant with_default_names description {Install files without 'g' prefix} {
-    configure.args-delete --program-prefix=g
-}
-
 post-configure {
     # prefix the shortname
-    if { ! [variant_isset with_default_names] } {
-        reinplace "s|netcat_nc = \$(DESTDIR)\$(bindir)/nc|netcat_nc = \$(DESTDIR)\$(bindir)/gnc|" ${worksrcpath}/src/Makefile
-        reinplace "s|ln -s netcat \$(netcat_nc);|ln -s gnetcat \$(netcat_nc);|" ${worksrcpath}/src/Makefile
-    }
+    reinplace "s|netcat_nc = \$(DESTDIR)\$(bindir)/nc|netcat_nc = \$(DESTDIR)\$(bindir)/gnc|" ${worksrcpath}/src/Makefile
+    reinplace "s|ln -s netcat \$(netcat_nc);|ln -s gnetcat \$(netcat_nc);|" ${worksrcpath}/src/Makefile
 }
 
 post-destroot {
-    if { ! [variant_isset with_default_names] } {
-        # prefix the info files
-        foreach {f} [glob -tails -directory ${destroot}${prefix}/share/info *.info] {
-            move ${destroot}${prefix}/share/info/${f} ${destroot}${prefix}/share/info/g${f}
+    # prefix the info files
+    foreach {f} [glob -tails -directory ${destroot}${prefix}/share/info *.info] {
+        move ${destroot}${prefix}/share/info/${f} ${destroot}${prefix}/share/info/g${f}
+    }
+    # prefix the locale files
+    foreach {d} [glob -tails -directory ${destroot}${prefix}/share/locale */] {
+        foreach {f} [glob -tails -directory ${destroot}${prefix}/share/locale/${d}/LC_MESSAGES *.mo] {
+            move ${destroot}${prefix}/share/locale/${d}/LC_MESSAGES/${f} ${destroot}${prefix}/share/locale/${d}/LC_MESSAGES/g${f}
         }
-        # prefix the locale files
-        foreach {d} [glob -tails -directory ${destroot}${prefix}/share/locale */] {
-            foreach {f} [glob -tails -directory ${destroot}${prefix}/share/locale/${d}/LC_MESSAGES *.mo] {
-                move ${destroot}${prefix}/share/locale/${d}/LC_MESSAGES/${f} ${destroot}${prefix}/share/locale/${d}/LC_MESSAGES/g${f}
-            }
-        }
     }
-    
+
+    xinstall -m 755 -d ${destroot}${prefix}/libexec/gnubin
+    foreach binary [glob -tails -directory ${destroot}${prefix}/bin g*] {
+        ln -s ${prefix}/bin/${binary} ${destroot}${prefix}/libexec/gnubin/[string range $binary 1 end]
+    }
+
     # create and copy the port docs
     xinstall -d ${destroot}${docdir}
     xinstall -m 0644 -W ${worksrcpath} ABOUT-NLS AUTHORS COPYING ChangeLog INSTALL NEWS README TODO \

Modified: trunk/dports/sysutils/coreutils/Portfile
===================================================================
--- trunk/dports/sysutils/coreutils/Portfile	2010-11-19 13:28:23 UTC (rev 73584)
+++ trunk/dports/sysutils/coreutils/Portfile	2010-11-19 13:36:06 UTC (rev 73585)
@@ -5,6 +5,7 @@
 
 name            coreutils
 version         8.5
+revision        1
 categories      sysutils
 platforms       darwin
 maintainers     nox openmaintainer
@@ -52,6 +53,11 @@
     xinstall -d ${destroot}${docdir}
     xinstall -m 0644 -W ${worksrcpath} AUTHORS COPYING ChangeLog NEWS README \
         THANKS THANKS-to-translators TODO ${destroot}${docdir}
+
+    xinstall -m 755 -d ${destroot}${prefix}/libexec/gnubin
+    foreach binary [glob -tails -directory ${destroot}${prefix}/bin g*] {
+        ln -s ${prefix}/bin/${binary} ${destroot}${prefix}/libexec/gnubin/[string range $binary 1 end]
+    }
 }
 
 # Set the RUN_EXPENSIVE_TESTS environmental variable to 'yes' to run more
@@ -59,14 +65,3 @@
 # to 'yes' to run even more expensive tests.
 test.run        yes
 test.target     check
-
-variant with_default_names description \
-        {Install files without 'g' prefix, use with extreme caution} {
-    post-destroot {
-        foreach {d} {bin share/man/man1} {
-            foreach {f} [glob -tails -directory ${destroot}${prefix}/${d} g*] {
-                ln -sf ${f} ${destroot}${prefix}/${d}/[string range ${f} 1 end]
-            }
-        }
-    }
-}

Modified: trunk/dports/sysutils/diffutils/Portfile
===================================================================
--- trunk/dports/sysutils/diffutils/Portfile	2010-11-19 13:28:23 UTC (rev 73584)
+++ trunk/dports/sysutils/diffutils/Portfile	2010-11-19 13:36:06 UTC (rev 73585)
@@ -4,6 +4,7 @@
 
 name                diffutils
 version             3.0
+revision            1
 categories          sysutils textproc devel
 license             GPL-3+
 maintainers         nomaintainer
@@ -36,22 +37,16 @@
     xinstall -m 0755 -d ${destroot}${docdir}
     xinstall -m 0644 -W ${worksrcpath} ABOUT-NLS AUTHORS ChangeLog COPYING NEWS README THANKS \
         ${destroot}${docdir}
+
+    xinstall -m 755 -d ${destroot}${prefix}/libexec/gnubin
+    foreach binary [glob -tails -directory ${destroot}${prefix}/bin g*] {
+        ln -s ${prefix}/bin/${binary} ${destroot}${prefix}/libexec/gnubin/[string range $binary 1 end]
+    }
 }
 
 test.run        yes
 test.target     check
 
-variant with_default_names description {Install files without 'g' prefix} {
-    post-destroot {
-        foreach d {bin share/info share/man/man1} {
-            foreach a [glob -directory ${destroot}${prefix}/$d g*] {
-                regexp /g(.+)\$ $a dummy b
-                file link -hard ${destroot}${prefix}/$d/$b $a
-            }
-        }
-    }
-}
-
 livecheck.type  regex
 livecheck.url   http://ftp.gnu.org/gnu/${name}/?C=M&O=D
 livecheck.regex ${name}-(\\d+(?:\\.\\d+)*)

Modified: trunk/dports/sysutils/findutils/Portfile
===================================================================
--- trunk/dports/sysutils/findutils/Portfile	2010-11-19 13:28:23 UTC (rev 73584)
+++ trunk/dports/sysutils/findutils/Portfile	2010-11-19 13:36:06 UTC (rev 73585)
@@ -5,6 +5,7 @@
 
 name            findutils
 version         4.4.2
+revision        1
 categories      sysutils
 platforms       darwin
 maintainers     nox openmaintainer
@@ -40,14 +41,9 @@
     xinstall -d ${destroot}${docdir}
     xinstall -m 0644 -W ${worksrcpath} AUTHORS COPYING ChangeLog NEWS README \
         THANKS TODO ${destroot}${docdir}
-}
 
-variant with_default_names description {Install files without 'g' prefix} {
-    post-destroot {
-        foreach {d} {bin libexec share/info share/man/man1 share/man/man5} {
-            foreach {f} [glob -tails -directory ${destroot}${prefix}/${d} g*] {
-                ln -sf ${f} ${destroot}${prefix}/${d}/[string range ${f} 1 end]
-            }
-        }
+    xinstall -m 755 -d ${destroot}${prefix}/libexec/gnubin
+    foreach binary [glob -tails -directory ${destroot}${prefix}/bin g*] {
+        ln -s ${prefix}/bin/${binary} ${destroot}${prefix}/libexec/gnubin/[string range $binary 1 end]
     }
 }

Modified: trunk/dports/sysutils/gwhich/Portfile
===================================================================
--- trunk/dports/sysutils/gwhich/Portfile	2010-11-19 13:28:23 UTC (rev 73584)
+++ trunk/dports/sysutils/gwhich/Portfile	2010-11-19 13:36:06 UTC (rev 73585)
@@ -3,6 +3,7 @@
 PortSystem 1.0
 name            gwhich
 version         2.20
+revision        1
 categories      sysutils
 maintainers     nomaintainer
 description     GNU Which - Everything you never wanted in a which
@@ -29,17 +30,11 @@
 
 post-destroot {
     file rename ${destroot}${prefix}/share/info/which.info ${destroot}${prefix}/share/info/gwhich.info
-    if {[variant_isset with_default_names]} {
-        foreach d {bin share/info share/man/man1} {
-            foreach a [glob -directory ${destroot}${prefix}/$d g*] {
-                regexp /g(.+)\$ $a dummy b
-                file link -hard ${destroot}${prefix}/$d/$b $a
-            }
-        }
+    xinstall -m 755 -d ${destroot}${prefix}/libexec/gnubin
+    foreach binary [glob -tails -directory ${destroot}${prefix}/bin g*] {
+        ln -s ${prefix}/bin/${binary} ${destroot}${prefix}/libexec/gnubin/[string range $binary 1 end]
     }
 }
 
 test.run        yes
 test.target     check
-
-variant with_default_names {}

Modified: trunk/dports/textproc/gsed/Portfile
===================================================================
--- trunk/dports/textproc/gsed/Portfile	2010-11-19 13:28:23 UTC (rev 73584)
+++ trunk/dports/textproc/gsed/Portfile	2010-11-19 13:36:06 UTC (rev 73585)
@@ -6,6 +6,7 @@
 name            gsed
 set my_name     sed
 version         4.2.1
+revision        1
 categories      textproc
 platforms       darwin
 maintainers     nox openmaintainer
@@ -46,6 +47,11 @@
     xinstall -d ${destroot}${docdir}
     xinstall -m 0644 -W ${worksrcpath} AUTHORS BUGS COPYING ChangeLog NEWS README THANKS \
         ${destroot}${docdir}
+
+    xinstall -m 755 -d ${destroot}${prefix}/libexec/gnubin
+    foreach binary [glob -tails -directory ${destroot}${prefix}/bin g*] {
+        ln -s ${prefix}/bin/${binary} ${destroot}${prefix}/libexec/gnubin/[string range $binary 1 end]
+    }
 }
 
 test.run        yes
@@ -56,13 +62,3 @@
     # See https://trac.macports.org/ticket/18297.
     supported_archs i386 ppc
 }
-
-variant with_default_names description {Install files without 'g' prefix} {
-    post-destroot {
-        foreach {d} {bin share/info share/man/man1} {
-            foreach {f} [glob -tails -directory ${destroot}${prefix}/${d} g*] {
-                ln -sf ${prefix}/${d}/${f} ${destroot}${prefix}/${d}/[string range ${f} 1 end]
-            }
-        }
-    }
-}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20101119/eb91221a/attachment-0001.html>


More information about the macports-changes mailing list