[93583] trunk/dports/lang

pixilla at macports.org pixilla at macports.org
Sun May 27 10:20:33 PDT 2012


Revision: 93583
          https://trac.macports.org/changeset/93583
Author:   pixilla at macports.org
Date:     2012-05-27 10:20:30 -0700 (Sun, 27 May 2012)
Log Message:
-----------
lang/perl5.16:
- New port for current perl release version.y

Added Paths:
-----------
    trunk/dports/lang/perl5.16/
    trunk/dports/lang/perl5.16/Portfile
    trunk/dports/lang/perl5.16/files/
    trunk/dports/lang/perl5.16/files/patch-Configure.diff
    trunk/dports/lang/perl5.16/files/patch-handy.h.stdbool.diff
    trunk/dports/lang/perl5.16/files/patch-hints_darwin.sh.diff

Added: trunk/dports/lang/perl5.16/Portfile
===================================================================
--- trunk/dports/lang/perl5.16/Portfile	                        (rev 0)
+++ trunk/dports/lang/perl5.16/Portfile	2012-05-27 17:20:30 UTC (rev 93583)
@@ -0,0 +1,137 @@
+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
+# $Id$
+
+PortSystem      1.0
+
+name            perl5.16
+version         5.16.0
+set branch      [join [lrange [split ${version} .] 0 1] .]
+categories      lang
+license         {Artistic-1 GPL}
+platforms       darwin freebsd linux
+maintainers     mathiesen.info:macintosh pixilla openmaintainer
+description     Perl 5.16.x - Practical Extraction and Report Language
+
+long_description \
+    Perl is a general-purpose programming language originally developed \
+    for text manipulation and now used for a wide range of tasks including \
+    system administration, web development, network programming, GUI \
+    development, and more.
+
+distname        perl-${version}
+use_bzip2       yes
+homepage        http://www.perl.org/
+master_sites    http://www.cpan.org/src/5.0/
+
+checksums           rmd160  1a68709f25c64803afdc05a3fb9fbc1c571ba988 \
+                    sha256  8c1d25e92a5760e84f77baa57fde5606fd6e95ec992408d36fa53c47162721d1
+
+depends_lib-append  port:gdbm
+
+patchfiles	patch-Configure.diff patch-handy.h.stdbool.diff
+
+platform darwin {
+    patchfiles-append   patch-hints_darwin.sh.diff
+##    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.universal_args-delete --disable-dependency-tracking
+configure.post_args	\
+					-des	\
+					-Dprefix='${prefix}'	\
+					-Dscriptdir='${prefix}/bin' \
+					-Dcppflags="\${CPPFLAGS}" \
+					-Dccflags="\${CFLAGS}" \
+					-Dldflags="\${LDFLAGS}" \
+					-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 perlpath="${prefix}/bin/perl${branch}" \
+					-D startperl="#!${prefix}/bin/perl${branch}"
+
+# Allow perl to find p5-* ports installed by previous (minor) versions
+set platsuffix ""
+if {${os.platform} == "darwin"} {
+    set platsuffix "-2level"
+}
+
+if { [variant_isset threads] } {
+	configure.args-append "-D inc_version_list=\"5.16.0/${os.platform}-thread-multi${platsuffix} 5.16.0 \""
+} else {
+	configure.args-append "-D inc_version_list=\"5.16.0/${os.platform}-multi${platsuffix} 5.16.0 \""
+}
+
+
+if {[variant_isset universal]} {
+    post-configure {
+        system "cd ${worksrcpath} && ed - ${worksrcpath}/config.h < ${filespath}/config.h.ed"
+    }
+}
+
+post-build { 
+    reinplace -E {s|-arch [a-z0-9_]+||g} \
+        ${worksrcpath}/lib/Config_heavy.pl 
+}
+
+test.run            yes
+
+variant threads description {Build with thread support} {
+    configure.args-append   -Dusethreads
+}
+
+variant shared description {Build shared perl library} {
+    configure.args-append   -Duseshrplib
+}
+
+variant dtrace description {Build with DTrace probes} {
+    configure.args-append   -Dusedtrace
+}
+
+post-destroot {
+    # avoid conflicting with other perl versions
+    # perl5 creates unversioned symlinks
+    delete ${destroot}${prefix}/bin/perl
+    foreach binFile [glob -directory "${destroot}${prefix}/bin" *] {
+        if {$binFile != "${destroot}${prefix}/bin/perl${version}"} {
+            move ${binFile} ${binFile}-${branch}
+        }
+    }
+    move ${destroot}${prefix}/bin/perl${version} ${destroot}${prefix}/bin/${name}
+    ln -s ${name} ${destroot}${prefix}/bin/perl${version}
+    foreach man1File [glob -directory "${destroot}${prefix}/share/man/man1p" *] {
+        regexp (.*)(\.1.*) ${man1File} -> program suffix
+        move ${man1File} ${program}-${branch}${suffix}
+    }
+    foreach man3File [glob -directory "${destroot}${prefix}/share/man/man3p" *] {
+        regexp (.*)(\.3.*) ${man3File} -> program suffix
+        move ${man3File} ${program}-${branch}${suffix}
+    }
+}
+
+## livecheck.type  regex
+## livecheck.url   http://www.cpan.org/src
+## livecheck.regex latest_[join [lrange [split ${version} .] 0 1] .]_is_(\\d+(?:\\.\\d+)*)
+
+livecheck.type  regex
+livecheck.url   http://www.cpan.org/src
+livecheck.regex {perl-(5\.16\.\d)\.}


Property changes on: trunk/dports/lang/perl5.16/Portfile
___________________________________________________________________
Added: svn:keywords
   + Id
Added: svn:eol-style
   + native

Added: trunk/dports/lang/perl5.16/files/patch-Configure.diff
===================================================================
--- trunk/dports/lang/perl5.16/files/patch-Configure.diff	                        (rev 0)
+++ trunk/dports/lang/perl5.16/files/patch-Configure.diff	2012-05-27 17:20:30 UTC (rev 93583)
@@ -0,0 +1,35 @@
+--- Configure.orig	2011-05-07 20:10:08.000000000 -0700
++++ Configure	2011-06-13 12:50:01.000000000 -0700
+@@ -106,7 +106,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"
+@@ -1323,7 +1323,7 @@
+ archname=''
+ : 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
+@@ -1337,12 +1337,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"

Added: trunk/dports/lang/perl5.16/files/patch-handy.h.stdbool.diff
===================================================================
--- trunk/dports/lang/perl5.16/files/patch-handy.h.stdbool.diff	                        (rev 0)
+++ trunk/dports/lang/perl5.16/files/patch-handy.h.stdbool.diff	2012-05-27 17:20:30 UTC (rev 93583)
@@ -0,0 +1,52 @@
+--- handy.h.orig	2011-01-09 12:20:55.000000000 -0800
++++ handy.h	2011-05-31 18:49:16.000000000 -0700
+@@ -73,47 +73,14 @@
+ #ifdef I_STDBOOL
+ #  include <stdbool.h>
+ #  ifndef HAS_BOOL
+ #    define HAS_BOOL 1
+ #  endif
+ #endif
+ 
+-/* bool is built-in for g++-2.6.3 and later, which might be used
+-   for extensions.  <_G_config.h> defines _G_HAVE_BOOL, but we can't
+-   be sure _G_config.h will be included before this file.  _G_config.h
+-   also defines _G_HAVE_BOOL for both gcc and g++, but only g++
+-   actually has bool.  Hence, _G_HAVE_BOOL is pretty useless for us.
+-   g++ can be identified by __GNUG__.
+-   Andy Dougherty	February 2000
+-*/
+-#ifdef __GNUG__		/* GNU g++ has bool built-in */
+-#  ifndef HAS_BOOL
+-#    define HAS_BOOL 1
+-#  endif
+-#endif
+-
+-/* The NeXT dynamic loader headers will not build with the bool macro
+-   So declare them now to clear confusion.
+-*/
+-#if defined(NeXT) || defined(__NeXT__)
+-# undef FALSE
+-# undef TRUE
+-  typedef enum bool { FALSE = 0, TRUE = 1 } bool;
+-# define ENUM_BOOL 1
+-# ifndef HAS_BOOL
+-#  define HAS_BOOL 1
+-# endif /* !HAS_BOOL */
+-#endif /* NeXT || __NeXT__ */
+-
+-#ifndef HAS_BOOL
+-# if defined(UTS) || defined(VMS)
+-#  define bool int
+-# else
+-#  define bool char
+-# endif
+-# define HAS_BOOL 1
+-#endif
++#define HAS_BOOL 1
++#include <stdbool.h>
+
+ /* a simple (bool) cast may not do the right thing: if bool is defined
+  * as char for example, then the cast from int is implementation-defined
+  * (bool)!!(cbool) in a ternary triggers a bug in xlc on AIX
+  */

Added: trunk/dports/lang/perl5.16/files/patch-hints_darwin.sh.diff
===================================================================
--- trunk/dports/lang/perl5.16/files/patch-hints_darwin.sh.diff	                        (rev 0)
+++ trunk/dports/lang/perl5.16/files/patch-hints_darwin.sh.diff	2012-05-27 17:20:30 UTC (rev 93583)
@@ -0,0 +1,55 @@
+--- hints/darwin.sh.orig	2011-01-09 12:20:55.000000000 -0800
++++ hints/darwin.sh	2011-03-09 01:06:05.000000000 -0800
+@@ -143,7 +143,6 @@ esac
+ 
+ # Shared library extension is .dylib.
+ # Bundle extension is .bundle.
+-ld='cc';
+ so='dylib';
+ dlext='bundle';
+ usedl='define';
+@@ -181,6 +180,27 @@ case "$osvers" in
+    ldflags="${ldflags} -flat_namespace"
+    lddlflags="${ldflags} -bundle -undefined suppress"
+    ;;
++9.*)
++   lddlflags="${ldflags} -bundle -undefined dynamic_lookup"
++   case "$ld" in
++       *MACOSX_DEVELOPMENT_TARGET*) ;;
++       *) ld="env MACOSX_DEPLOYMENT_TARGET=10.5 ${ld}" ;;
++   esac
++   ;;
++10.*)
++   lddlflags="${ldflags} -bundle -undefined dynamic_lookup"
++   case "$ld" in
++       *MACOSX_DEVELOPMENT_TARGET*) ;;
++       *) ld="env MACOSX_DEPLOYMENT_TARGET=10.6 ${ld}" ;;
++   esac
++   ;;
++11.*)
++   lddlflags="${ldflags} -bundle -undefined dynamic_lookup"
++   case "$ld" in
++       *MACOSX_DEVELOPMENT_TARGET*) ;;
++       *) ld="env MACOSX_DEPLOYMENT_TARGET=10.7 ${ld}" ;;
++   esac
++   ;;
+ *) 
+    lddlflags="${ldflags} -bundle -undefined dynamic_lookup"
+    case "$ld" in
+@@ -262,6 +262,10 @@ esac
+ ;;
+ esac
+ 
++# When the bind9 port is installed, its libbind includes dups from
++# /usr/lib/libdl, so remove libbind
++libswanted=`echo $libswanted | sed 's/ bind / /'`
++
+ ##
+ # System libraries
+ ##
+@@ -326,3 +350,5 @@ ranlib='ranlib'
+ # makefile in the same place.  Since Darwin uses GNU make, this dodges
+ # the problem.
+ firstmakefile=GNUmakefile;
++
++usenm='false'
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120527/1582dcec/attachment.html>


More information about the macports-changes mailing list