Correct FreeBSD hints file for FreeBSD 10.0
authorJilles Tjoelker <jilles@stack.nl>
Sun, 30 Oct 2011 09:53:43 +0000 (10:53 +0100)
committerNicholas Clark <nick@ccl4.org>
Sun, 30 Oct 2011 09:53:43 +0000 (10:53 +0100)
Perl does not build on FreeBSD 10.0 because some checks in
hints/freebsd.sh think FreeBSD 10 is FreeBSD 1 and therefore enable
behaviour only appropriate for a.out systems.

The below patch was included in the lang/perl5.12 port and fixes its
build. The resulting binaries are also suitable to compile other ports.
I have also verified that this patch applies to lang/perl5.10 and
lang/perl5.14, making them build.

hints/freebsd.sh

index c661fe8..a67c0bb 100644 (file)
@@ -110,7 +110,8 @@ esac
 case "$osvers" in
 0.*|1.0*) ;;
 
-1*|2*) cccdlflags='-DPIC -fpic'
+1.*|2.*)
+       cccdlflags='-DPIC -fpic'
        lddlflags="-Bshareable $lddlflags"
        ;;
 
@@ -140,7 +141,7 @@ case "$osvers" in
 esac
 
 case "$osvers" in
-0*|1*|2*|3*) ;;
+0.*|1.*|2.*|3.*) ;;
 
 *)
        ccflags="${ccflags} -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H"
@@ -195,7 +196,7 @@ case "$usethreads" in
 $define|true|[yY]*)
         lc_r=`/sbin/ldconfig -r|grep ':-lc_r'|awk '{print $NF}'|sed -n '$p'`
         case "$osvers" in  
-       0*|1*|2.0*|2.1*)   cat <<EOM >&4
+       0.*|1.*|2.0*|2.1*)   cat <<EOM >&4
 I did not know that FreeBSD $osvers supports POSIX threads.
 
 Feel free to tell perlbug@perl.org otherwise.