[131305] trunk/dports/lang/perl5.16

larryv at macports.org larryv at macports.org
Thu Jan 8 16:07:21 PST 2015


Revision: 131305
          https://trac.macports.org/changeset/131305
Author:   larryv at macports.org
Date:     2015-01-08 16:07:20 -0800 (Thu, 08 Jan 2015)
Log Message:
-----------
perl5.16: Reorganize patches and fix `Config{ld}`

The patch for setting `Config{ld}` hasn't been updated in years, so it
currently ends up as `env MACOSX_DEPLOYMENT_TARGET=10.3 <value of CC>`
on any OS newer than Mountain Lion. My fix should be more robust.

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

Added Paths:
-----------
    trunk/dports/lang/perl5.16/files/avoid-bind9-linking.patch
    trunk/dports/lang/perl5.16/files/avoid-no-cpp-precomp-PR38913.patch
    trunk/dports/lang/perl5.16/files/clean-up-paths.patch
    trunk/dports/lang/perl5.16/files/fix-cxx-dNOOP-PR43150.patch
    trunk/dports/lang/perl5.16/files/fix-miniperl-linking-PR36438.patch
    trunk/dports/lang/perl5.16/files/no-ld-override.patch
    trunk/dports/lang/perl5.16/files/use-stdbool.patch

Removed Paths:
-------------
    trunk/dports/lang/perl5.16/files/patch-Configure.diff
    trunk/dports/lang/perl5.16/files/patch-Makefile.SH.diff
    trunk/dports/lang/perl5.16/files/patch-handy.h.stdbool.diff
    trunk/dports/lang/perl5.16/files/patch-hints_darwin.sh.diff
    trunk/dports/lang/perl5.16/files/patch-perl.h.diff

Modified: trunk/dports/lang/perl5.16/Portfile
===================================================================
--- trunk/dports/lang/perl5.16/Portfile	2015-01-09 00:06:56 UTC (rev 131304)
+++ trunk/dports/lang/perl5.16/Portfile	2015-01-09 00:07:20 UTC (rev 131305)
@@ -6,6 +6,7 @@
 name                perl5.16
 version             5.16.3
 set branch          [join [lrange [split ${version} .] 0 1] .]
+revision            1
 categories          lang
 platforms           darwin freebsd linux
 license             {Artistic-1 GPL}
@@ -28,22 +29,26 @@
 checksums           rmd160  f25fdd72449156a7cbe989e8bd339fdba1afabc0 \
                     sha256  bb7bc735e6813b177dcfccd480defcde7eddefa173b5967eac11babd1bfa98e8
 
-patchfiles          patch-Configure.diff \
-                    patch-handy.h.stdbool.diff \
-                    patch-perl.h.diff
+patchfiles          clean-up-paths.patch \
+                    use-stdbool.patch \
+                    avoid-no-cpp-precomp-PR38913.patch \
+                    no-ld-override.patch
 
-platform darwin {
-    patchfiles-append   patch-hints_darwin.sh.diff
+# Prevent build from picking up the bind9 port's static libbind, which
+# duplicates symbols from /usr/lib/libdl (r10638).
+patchfiles-append   avoid-bind9-linking.patch
 
-    # Prevent miniperl build from finding libstdcxx (#36438).
-    patchfiles-append   patch-Makefile.SH.diff
-    post-patch {
-        reinplace "s|__PREFIX_LIB__|${prefix}/lib|g" ${worksrcpath}/Makefile.SH
-    }
-}
+# Prevent miniperl linking from accidentally finding our libstdc++
+# (#36438).
+patchfiles-append   fix-miniperl-linking-PR36438.patch
 
-pre-configure {
-    reinplace "s|/opt/local|${prefix}|g" ${worksrcpath}/Configure
+# Avoid a C++ linkage trick that recent Clang doesn't like. See #43150
+# and https://rt.perl.org/Public/Bug/Display.html?id=121714.
+patchfiles-append   fix-cxx-dNOOP-PR43150.patch
+
+post-patch {
+    reinplace -W ${worksrcpath} "s|__PREFIX__|${prefix}|g" \
+           Configure Makefile.SH
 }
 
 configure.ccache    no
@@ -64,7 +69,7 @@
                     -Dusethreads \
                     -Duseshrplib \
                    {-Dcc="$CC"} \
-                   {-Dld="$CC"} \
+                   {-Dld="env MACOSX_DEPLOYMENT_TARGET=$MACOSX_DEPLOYMENT_TARGET $CC"} \
                     -Dman1ext=1pm \
                     -Dman3ext=3pm \
                     -Dman1dir='${prefix}/share/man/man1p' \

Copied: trunk/dports/lang/perl5.16/files/avoid-bind9-linking.patch (from rev 131283, trunk/dports/lang/perl5.16/files/patch-hints_darwin.sh.diff)
===================================================================
--- trunk/dports/lang/perl5.16/files/avoid-bind9-linking.patch	                        (rev 0)
+++ trunk/dports/lang/perl5.16/files/avoid-bind9-linking.patch	2015-01-09 00:07:20 UTC (rev 131305)
@@ -0,0 +1,13 @@
+Index: hints/darwin.sh
+===================================================================
+--- hints/darwin.sh.orig
++++ hints/darwin.sh
+@@ -315,6 +315,8 @@ i_dbm=undef;
+ # NeilW says this should be acceptable on all darwin versions.
+ ranlib='ranlib'
+ 
++libswanted="$(echo $libswanted | sed -e 's/bind //' -e 's/ bind//')"
++
+ ##
+ # Build process
+ ##

Copied: trunk/dports/lang/perl5.16/files/avoid-no-cpp-precomp-PR38913.patch (from rev 131283, trunk/dports/lang/perl5.16/files/patch-hints_darwin.sh.diff)
===================================================================
--- trunk/dports/lang/perl5.16/files/avoid-no-cpp-precomp-PR38913.patch	                        (rev 0)
+++ trunk/dports/lang/perl5.16/files/avoid-no-cpp-precomp-PR38913.patch	2015-01-09 00:07:20 UTC (rev 131305)
@@ -0,0 +1,13 @@
+Index: hints/darwin.sh
+===================================================================
+--- hints/darwin.sh.orig
++++ hints/darwin.sh
+@@ -129,8 +129,6 @@ esac
+ 
+ # Avoid Apple's cpp precompiler, better for extensions
+ if [ "X`echo | ${cc} -no-cpp-precomp -E - 2>&1 >/dev/null`" = "X" ]; then
+-    cppflags="${cppflags} -no-cpp-precomp"
+-
+     # This is necessary because perl's build system doesn't
+     # apply cppflags to cc compile lines as it should.
+     ccflags="${ccflags} ${cppflags}"

Copied: trunk/dports/lang/perl5.16/files/clean-up-paths.patch (from rev 131283, trunk/dports/lang/perl5.16/files/patch-Configure.diff)
===================================================================
--- trunk/dports/lang/perl5.16/files/clean-up-paths.patch	                        (rev 0)
+++ trunk/dports/lang/perl5.16/files/clean-up-paths.patch	2015-01-09 00:07:20 UTC (rev 131305)
@@ -0,0 +1,39 @@
+Index: Configure
+===================================================================
+--- Configure.orig
++++ Configure
+@@ -106,8 +106,8 @@ if test -d c:/. || ( uname -a | grep -i 
+ fi
+ 
+ : Proper PATH setting
+-paths='/bin /usr/bin /usr/local/bin /usr/ucb /usr/local /usr/lbin'
+-paths="$paths /opt/bin /opt/local/bin /opt/local /opt/lbin"
++paths='/bin /usr/bin /usr/ucb /usr/lbin'
++paths="$paths /opt/bin __PREFIX__/bin __PREFIX__ /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"
+ paths="$paths /sys5.3/bin /sys5.3/usr/bin /bsd4.3/bin /bsd4.3/usr/ucb"
+@@ -1323,7 +1323,7 @@ archobjs=''
+ 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="__PREFIX__/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 @@ libnames=''
+ : 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="__PREFIX__/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"

Copied: trunk/dports/lang/perl5.16/files/fix-cxx-dNOOP-PR43150.patch (from rev 131283, trunk/dports/lang/perl5.16/files/patch-perl.h.diff)
===================================================================
--- trunk/dports/lang/perl5.16/files/fix-cxx-dNOOP-PR43150.patch	                        (rev 0)
+++ trunk/dports/lang/perl5.16/files/fix-cxx-dNOOP-PR43150.patch	2015-01-09 00:07:20 UTC (rev 131305)
@@ -0,0 +1,40 @@
+From 7db66e12883f0832ca80164b723768b848187bda Mon Sep 17 00:00:00 2001
+From: "Craig A. Berry" <craigberry at mac.com>
+Date: Wed, 30 May 2012 18:57:51 -0500
+Subject: [PATCH 1/1] A more C++-friendly dNOOP.
+
+The problem with Perl___notused under C++ is that in some cases
+it's merely extern, and in some cases (via the XS macro via the
+XSPROTO macro) it's extern "C".  Object code analysis shows that
+you do actually get one mangled and one unmangled version of the
+symbol, which wouldn't matter since the whole point is to have
+something we never use.
+
+Except that one very picky C++ compiler (HP C++ for OpenVMS) sees
+what we're up to and slaps us down hard.  Since declaration after
+statement has always been allowed in C++, just go ahead and do a
+real noop statement for C++ and avoid the use of an external
+symbol.
+---
+ perl.h | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git perl.h perl.h
+index 3d89f8a..798e7b7 100644
+--- perl.h
++++ perl.h
+@@ -359,7 +359,11 @@
+ /* Rats: if dTHR is just blank then the subsequent ";" throws an error */
+ /* Declaring a *function*, instead of a variable, ensures that we don't rely
+    on being able to suppress "unused" warnings.  */
++#ifdef __cplusplus
++#define dNOOP (void)0
++#else
+ #define dNOOP extern int Perl___notused(void)
++#endif
+ 
+ #ifndef pTHX
+ /* Don't bother defining tTHX and sTHX; using them outside
+-- 
+2.2.1-313-gcc831f2
+

Copied: trunk/dports/lang/perl5.16/files/fix-miniperl-linking-PR36438.patch (from rev 131283, trunk/dports/lang/perl5.16/files/patch-Makefile.SH.diff)
===================================================================
--- trunk/dports/lang/perl5.16/files/fix-miniperl-linking-PR36438.patch	                        (rev 0)
+++ trunk/dports/lang/perl5.16/files/fix-miniperl-linking-PR36438.patch	2015-01-09 00:07:20 UTC (rev 131305)
@@ -0,0 +1,14 @@
+Index: Makefile.SH
+===================================================================
+--- Makefile.SH.orig
++++ Makefile.SH
+@@ -860,7 +860,8 @@ NAMESPACEFLAGS = -force_flat_namespace
+ 		$spitshell >>$Makefile <<'!NO!SUBS!'
+ $(MINIPERL_EXE): $& $(mini_obj)
+ 	- at rm -f miniperl.xok
+-	$(CC) $(CLDFLAGS) $(NAMESPACEFLAGS) -o $(MINIPERL_EXE) \
++	unset LIBRARY_PATH && \
++	$(CC) $(subst -L__PREFIX__/lib,,$(CLDFLAGS)) $(NAMESPACEFLAGS) -o $(MINIPERL_EXE) \
+ 	    $(mini_obj) $(libs)
+ 	$(LDLIBPTH) $(RUN) ./miniperl$(HOST_EXE_EXT) -w -Ilib -MExporter -e '<?>' || $(MAKE) minitest
+ !NO!SUBS!

Copied: trunk/dports/lang/perl5.16/files/no-ld-override.patch (from rev 131283, trunk/dports/lang/perl5.16/files/patch-hints_darwin.sh.diff)
===================================================================
--- trunk/dports/lang/perl5.16/files/no-ld-override.patch	                        (rev 0)
+++ trunk/dports/lang/perl5.16/files/no-ld-override.patch	2015-01-09 00:07:20 UTC (rev 131305)
@@ -0,0 +1,21 @@
+Index: hints/darwin.sh
+===================================================================
+--- hints/darwin.sh.orig
++++ hints/darwin.sh
+@@ -141,7 +141,6 @@ esac
+ 
+ # Shared library extension is .dylib.
+ # Bundle extension is .bundle.
+-ld='cc';
+ so='dylib';
+ dlext='bundle';
+ usedl='define';
+@@ -182,7 +181,7 @@ case "$osvers" in
+ *) 
+    lddlflags="${ldflags} -bundle -undefined dynamic_lookup"
+    case "$ld" in
+-       *MACOSX_DEVELOPMENT_TARGET*) ;;
++       *MACOSX_DEPLOYMENT_TARGET*) ;;
+        *) ld="env MACOSX_DEPLOYMENT_TARGET=10.3 ${ld}" ;;
+    esac
+    ;;

Deleted: trunk/dports/lang/perl5.16/files/patch-Configure.diff
===================================================================
--- trunk/dports/lang/perl5.16/files/patch-Configure.diff	2015-01-09 00:06:56 UTC (rev 131304)
+++ trunk/dports/lang/perl5.16/files/patch-Configure.diff	2015-01-09 00:07:20 UTC (rev 131305)
@@ -1,35 +0,0 @@
---- 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"

Deleted: trunk/dports/lang/perl5.16/files/patch-Makefile.SH.diff
===================================================================
--- trunk/dports/lang/perl5.16/files/patch-Makefile.SH.diff	2015-01-09 00:06:56 UTC (rev 131304)
+++ trunk/dports/lang/perl5.16/files/patch-Makefile.SH.diff	2015-01-09 00:07:20 UTC (rev 131305)
@@ -1,12 +0,0 @@
---- Makefile.SH.orig	2012-08-03 13:35:26.000000000 -0400
-+++ Makefile.SH	2013-05-12 13:36:28.000000000 -0400
-@@ -860,7 +860,8 @@
- 		$spitshell >>$Makefile <<'!NO!SUBS!'
- $(MINIPERL_EXE): $& $(mini_obj)
- 	- at rm -f miniperl.xok
--	$(CC) $(CLDFLAGS) $(NAMESPACEFLAGS) -o $(MINIPERL_EXE) \
-+	unset LIBRARY_PATH && \
-+	$(CC) $(subst -L__PREFIX_LIB__,,$(CLDFLAGS)) $(NAMESPACEFLAGS) -o $(MINIPERL_EXE) \
- 	    $(mini_obj) $(libs)
- 	$(LDLIBPTH) $(RUN) ./miniperl$(HOST_EXE_EXT) -w -Ilib -MExporter -e '<?>' || $(MAKE) minitest
- !NO!SUBS!

Deleted: trunk/dports/lang/perl5.16/files/patch-handy.h.stdbool.diff
===================================================================
--- trunk/dports/lang/perl5.16/files/patch-handy.h.stdbool.diff	2015-01-09 00:06:56 UTC (rev 131304)
+++ trunk/dports/lang/perl5.16/files/patch-handy.h.stdbool.diff	2015-01-09 00:07:20 UTC (rev 131305)
@@ -1,46 +0,0 @@
---- handy.h.orig
-+++ handy.h
-@@ -77,41 +77,8 @@ Null SV pointer. (No longer available when C<PERL_CORE> is defined.)
- #  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

Deleted: trunk/dports/lang/perl5.16/files/patch-hints_darwin.sh.diff
===================================================================
--- trunk/dports/lang/perl5.16/files/patch-hints_darwin.sh.diff	2015-01-09 00:06:56 UTC (rev 131304)
+++ trunk/dports/lang/perl5.16/files/patch-hints_darwin.sh.diff	2015-01-09 00:07:20 UTC (rev 131305)
@@ -1,71 +0,0 @@
---- hints/darwin.sh.orig	2013-05-08 11:13:45.000000000 -0600
-+++ hints/darwin.sh	2013-05-08 11:15:04.000000000 -0600
-@@ -129,7 +129,7 @@
- 
- # Avoid Apple's cpp precompiler, better for extensions
- if [ "X`echo | ${cc} -no-cpp-precomp -E - 2>&1 >/dev/null`" = "X" ]; then
--    cppflags="${cppflags} -no-cpp-precomp"
-+    #cppflags="${cppflags} -no-cpp-precomp"
- 
-     # This is necessary because perl's build system doesn't
-     # apply cppflags to cc compile lines as it should.
-@@ -143,7 +143,6 @@
- 
- # Shared library extension is .dylib.
- # Bundle extension is .bundle.
--ld='cc';
- so='dylib';
- dlext='bundle';
- usedl='define';
-@@ -181,6 +180,34 @@
-    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
-+   ;;
-+12.*)
-+   lddlflags="${ldflags} -bundle -undefined dynamic_lookup"
-+   case "$ld" in
-+       *MACOSX_DEVELOPMENT_TARGET*) ;;
-+       *) ld="env MACOSX_DEPLOYMENT_TARGET=10.8 ${ld}" ;;
-+   esac
-+   ;;
- *) 
-    lddlflags="${ldflags} -bundle -undefined dynamic_lookup"
-    case "$ld" in
-@@ -262,6 +289,10 @@
- ;;
- 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 +357,5 @@
- # makefile in the same place.  Since Darwin uses GNU make, this dodges
- # the problem.
- firstmakefile=GNUmakefile;
-+
-+usenm='false'

Deleted: trunk/dports/lang/perl5.16/files/patch-perl.h.diff
===================================================================
--- trunk/dports/lang/perl5.16/files/patch-perl.h.diff	2015-01-09 00:06:56 UTC (rev 131304)
+++ trunk/dports/lang/perl5.16/files/patch-perl.h.diff	2015-01-09 00:07:20 UTC (rev 131305)
@@ -1,19 +0,0 @@
-Backported patch from Perl 5.18.
-
-https://rt.perl.org/Ticket/Display.html?id=121714
-https://trac.macports.org/ticket/43150
-
---- perl.h.orig
-+++ perl.h
-@@ -359,7 +359,11 @@
- /* Rats: if dTHR is just blank then the subsequent ";" throws an error */
- /* Declaring a *function*, instead of a variable, ensures that we don't rely
-    on being able to suppress "unused" warnings.  */
-+#ifdef __cplusplus
-+#define dNOOP (void)0
-+#else
- #define dNOOP extern int Perl___notused(void)
-+#endif
- 
- #ifndef pTHX
- /* Don't bother defining tTHX and sTHX; using them outside

Copied: trunk/dports/lang/perl5.16/files/use-stdbool.patch (from rev 131283, trunk/dports/lang/perl5.16/files/patch-handy.h.stdbool.diff)
===================================================================
--- trunk/dports/lang/perl5.16/files/use-stdbool.patch	                        (rev 0)
+++ trunk/dports/lang/perl5.16/files/use-stdbool.patch	2015-01-09 00:07:20 UTC (rev 131305)
@@ -0,0 +1,48 @@
+Index: handy.h
+===================================================================
+--- handy.h.orig
++++ handy.h
+@@ -77,41 +77,8 @@ Null SV pointer. (No longer available wh
+ #  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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20150108/c5770108/attachment-0001.html>


More information about the macports-changes mailing list