[62844] trunk/dports/lang/perl5.10

ricci at macports.org ricci at macports.org
Mon Jan 18 20:45:29 PST 2010


Revision: 62844
          http://trac.macports.org/changeset/62844
Author:   ricci at macports.org
Date:     2010-01-18 20:45:26 -0800 (Mon, 18 Jan 2010)
Log Message:
-----------
Update to more cleanly install:
  don't mangle the binaries, man pages, etc. by default
  conflict with perl5.8 by default (to avoid conflicts with the above)
  add variant "mangle_names" to mangle the names if desired, removes the conflict with perl5.8
  add dtrace support variant
  
Add multiplicity support, resolves #22301

Modified Paths:
--------------
    trunk/dports/lang/perl5.10/Portfile

Added Paths:
-----------
    trunk/dports/lang/perl5.10/files/patch-Configure.diff

Modified: trunk/dports/lang/perl5.10/Portfile
===================================================================
--- trunk/dports/lang/perl5.10/Portfile	2010-01-19 04:27:52 UTC (rev 62843)
+++ trunk/dports/lang/perl5.10/Portfile	2010-01-19 04:45:26 UTC (rev 62844)
@@ -3,8 +3,9 @@
 PortSystem      1.0
 
 name            perl5.10
+conflicts       perl5.8
 version         5.10.1
-revision        0
+revision        1
 categories      lang
 platforms       darwin freebsd linux
 maintainers     ricci openmaintainer
@@ -25,37 +26,42 @@
                     sha1    98b762b5cd4fb76dd354dfa5ba0d21bc2acacaf2 \
                     rmd160  840b3a5ac3d7f517770ce789676ebd9154d9ee5a
 
+patchfiles	patch-Configure.diff
+
 platform darwin {
     patchfiles-append   patch-hints_darwin.diff \
 						patch-perl.c.diff
-
 }
 
 pre-configure {
     reinplace "s|/opt/local|${prefix}|g" ${worksrcpath}/Configure
 }
 
+configure.ccache    no
+configure.distcc    no
 configure.env       LC_ALL=C
 configure.cmd       sh Configure
 configure.pre_args
 configure.post_args	\
 					-des	\
 					-Dprefix='${prefix}'	\
+					-Dscriptdir='${prefix}/bin' \
 					-Dccflags="-I'${prefix}/include'" \
-                    -Dldflags=-L'${prefix}/lib' \
-                    -Dvendorprefix='${prefix}'	\
+					-Dldflags=-L'${prefix}/lib' \
+					-Dvendorprefix='${prefix}'	\
+					-Dusemultiplicity=y \
 					-D cc=\${CC} \
 					-D ld=\${CC} \
+					-D man1ext='1pm' \
+					-D man3ext='3pm' \
+					-D man1dir='${prefix}/share/man/man1p' \
+					-D man3dir='${prefix}/share/man/man3p' \
+					-D siteman1dir='${prefix}/share/man/man1' \
+					-D siteman3dir='${prefix}/share/man/man3' \
+					-D vendorman1dir='${prefix}/share/man/man1' \
+					-D vendorman3dir='${prefix}/share/man/man3'	\
+					-D pager="/usr/bin/less -sR"
 
-## 					-D man1ext='1pm' \
-## 					-D man3ext='3pm' \
-## 					-D man1dir='${prefix}/share/man/man1p' \
-## 					-D man3dir='${prefix}/share/man/man3p' \
-## 					-D siteman1dir='${prefix}/share/man/man1' \
-## 					-D siteman3dir='${prefix}/share/man/man3' \
-## 					-D vendorman1dir='${prefix}/share/man/man1' \
-## 					-D vendorman3dir='${prefix}/share/man/man3'
-
 configure.ccache	no
 
 universal_variant   no
@@ -63,28 +69,31 @@
 test.run            yes
 
 post-destroot {
-    file delete ${destroot}${prefix}/bin/perl
-    set branch [join [lrange [split ${version} .] 0 1] .]
-    foreach bin [glob ${destroot}${prefix}/bin/*] {
-        if {$bin != "${destroot}${prefix}/bin/perl${version}"} {
-            move ${bin} ${bin}-${branch}
+    if {[variant_isset mangle_names]} {
+
+        file delete ${destroot}${prefix}/bin/perl
+        set branch [join [lrange [split ${version} .] 0 1] .]
+        foreach bin [glob ${destroot}${prefix}/bin/*] {
+            if {$bin != "${destroot}${prefix}/bin/perl${version}"} {
+                move ${bin} ${bin}-${branch}
+            }
         }
+    
+        ln -s ${prefix}/bin/perl${version} ${destroot}${prefix}/bin/$name
+    
+        foreach man1File [glob ${destroot}${prefix}/share/man/man1/*] {
+            regexp (.*)(\.1.*) ${man1File} -> program suffix
+            file rename ${man1File} ${program}-${branch}${suffix}
+        }
+        foreach man3File [glob ${destroot}${prefix}/share/man/man3/*] {
+            regexp (.*)(\.3.*) ${man3File} -> program suffix
+            file rename ${man3File} ${program}-${branch}${suffix}
+        }
+    
+        foreach man3File [glob ${destroot}${prefix}/share/man/man3/*] {
+            file rename ${man3File} ${man3File}pm
+        }
     }
-
-    ln -s ${prefix}/bin/perl${version} ${destroot}${prefix}/bin/$name
-
-    foreach man1File [glob ${destroot}${prefix}/share/man/man1/*] {
-        regexp (.*)(\.1.*) ${man1File} -> program suffix
-        file rename ${man1File} ${program}-${branch}${suffix}
-    }
-    foreach man3File [glob ${destroot}${prefix}/share/man/man3/*] {
-        regexp (.*)(\.3.*) ${man3File} -> program suffix
-        file rename ${man3File} ${program}-${branch}${suffix}
-    }
-
-    foreach man3File [glob ${destroot}${prefix}/share/man/man3/*] {
-        file rename ${man3File} ${man3File}pm
-    }
 }
 
 variant threads description {Build with thread support} {
@@ -95,6 +104,14 @@
     configure.args-append   -Duseshrplib
 }
 
+variant dtrace description {Build with DTrace probes} {
+    configure.args-append   −Dusedtrace
+}
+
+variant mangle_names description {mangle the installed names by appending -5.10 to avoid conflicting with perl5.8} {
+	conflicts	""
+}
+
 livecheck.type  regex
 livecheck.url   http://www.cpan.org/src
 livecheck.regex latest_[join [lrange [split ${version} .] 0 1] .]_is_(\\d+(?:\\.\\d+)*)

Added: trunk/dports/lang/perl5.10/files/patch-Configure.diff
===================================================================
--- trunk/dports/lang/perl5.10/files/patch-Configure.diff	                        (rev 0)
+++ trunk/dports/lang/perl5.10/files/patch-Configure.diff	2010-01-19 04:45:26 UTC (rev 62844)
@@ -0,0 +1,35 @@
+--- Configure.orig	2009-08-18 12:03:53.000000000 -0700
++++ Configure	2009-11-10 21:13:09.000000000 -0800
+@@ -103,7 +103,7 @@
+ fi
+ 
+ : Proper PATH setting
+-paths='/bin /usr/bin /usr/local/bin /usr/ucb /usr/local /usr/lbin'
++paths='/bin /usr/bin /usr/ucb /usr/lbin'
+ paths="$paths /opt/bin /opt/local/bin /opt/local /opt/lbin"
+ paths="$paths /usr/5bin /etc /usr/gnu/bin /usr/new /usr/new/bin /usr/nbin"
+ paths="$paths /opt/gnu/bin /opt/new /opt/new/bin /opt/nbin"
+@@ -1303,12 +1303,12 @@
+ : change the next line if compiling for Xenix/286 on Xenix/386
+ xlibpth='/usr/lib/386 /lib/386'
+ : Possible local library directories to search.
+-loclibpth="/usr/local/lib /opt/local/lib /usr/gnu/lib"
++loclibpth="/opt/local/lib /usr/gnu/lib"
+ loclibpth="$loclibpth /opt/gnu/lib /usr/GNU/lib /opt/GNU/lib"
+ 
+ : general looking path for locating libraries
+ glibpth="/lib /usr/lib $xlibpth"
+-glibpth="$glibpth /usr/ccs/lib /usr/ucblib /usr/local/lib"
++glibpth="$glibpth /usr/ccs/lib /usr/ucblib"
+ test -f /usr/shlib/libc.so && glibpth="/usr/shlib $glibpth"
+ test -f /shlib/libc.so     && glibpth="/shlib $glibpth"
+ test -d /usr/lib64         && glibpth="$glibpth /lib64 /usr/lib64 /usr/local/lib64"
+@@ -1329,7 +1329,7 @@
+ 
+ : Possible local include directories to search.
+ : Set locincpth to "" in a hint file to defeat local include searches.
+-locincpth="/usr/local/include /opt/local/include /usr/gnu/include"
++locincpth="/opt/local/include /usr/gnu/include"
+ locincpth="$locincpth /opt/gnu/include /usr/GNU/include /opt/GNU/include"
+ :
+ : no include file wanted by default
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100118/52188af8/attachment.html>


More information about the macports-changes mailing list