1 Don't look for headers and libraries in "traditional" locations.
3 Patch adapted from Nixpkgs, originally by Eelco Dolstra
4 <eelco.dolstra@logicblox.com>.
6 diff -ru -x '*~' -x '*.rej' perl-5.20.0-orig/Configure perl-5.20.0/Configure
7 --- perl-5.20.0-orig/Configure 2014-05-26 15:34:18.000000000 +0200
8 +++ perl-5.20.0/Configure 2014-06-25 10:43:35.368285986 +0200
13 -paths='/bin /usr/bin /usr/local/bin /usr/ucb /usr/local /usr/lbin'
14 -paths="$paths /opt/bin /opt/local/bin /opt/local /opt/lbin"
15 -paths="$paths /usr/5bin /etc /usr/gnu/bin /usr/new /usr/new/bin /usr/nbin"
16 -paths="$paths /opt/gnu/bin /opt/new /opt/new/bin /opt/nbin"
17 -paths="$paths /sys5.3/bin /sys5.3/usr/bin /bsd4.3/bin /bsd4.3/usr/ucb"
18 -paths="$paths /bsd4.3/usr/bin /usr/bsd /bsd43/bin /opt/ansic/bin /usr/ccs/bin"
19 -paths="$paths /etc /usr/lib /usr/ucblib /lib /usr/ccs/lib"
20 -paths="$paths /sbin /usr/sbin /usr/libexec"
21 -paths="$paths /system/gnu_library/bin"
28 : Possible local include directories to search.
29 : Set locincpth to "" in a hint file to defeat local include searches.
30 -locincpth="/usr/local/include /opt/local/include /usr/gnu/include"
31 -locincpth="$locincpth /opt/gnu/include /usr/GNU/include /opt/GNU/include"
34 : no include file wanted by default
36 @@ -1349,17 +1340,12 @@
39 : change the next line if compiling for Xenix/286 on Xenix/386
40 -xlibpth='/usr/lib/386 /lib/386'
42 : Possible local library directories to search.
43 -loclibpth="/usr/local/lib /opt/local/lib /usr/gnu/lib"
44 -loclibpth="$loclibpth /opt/gnu/lib /usr/GNU/lib /opt/GNU/lib"
47 : general looking path for locating libraries
48 -glibpth="/lib /usr/lib $xlibpth"
49 -glibpth="$glibpth /usr/ccs/lib /usr/ucblib /usr/local/lib"
50 -test -f /usr/shlib/libc.so && glibpth="/usr/shlib $glibpth"
51 -test -f /shlib/libc.so && glibpth="/shlib $glibpth"
52 -test -d /usr/lib64 && glibpth="$glibpth /lib64 /usr/lib64 /usr/local/lib64"
55 : Private path used by Configure to find libraries. Its value
56 : is prepended to libpth. This variable takes care of special
58 libswanted="$libswanted m crypt sec util c cposix posix ucb bsd BSD"
59 : We probably want to search /usr/shlib before most other libraries.
60 : This is only used by the lib/ExtUtils/MakeMaker.pm routine extliblist.
61 -glibpth=`echo " $glibpth " | sed -e 's! /usr/shlib ! !'`
62 -glibpth="/usr/shlib $glibpth"
63 : Do not use vfork unless overridden by a hint file.
69 pth=`echo $PATH | sed -e "s/$p_/ /g"`
70 -pth="$pth $sysroot/lib $sysroot/usr/lib"
71 for file in $loclist; do
75 : Set private lib path
78 - plibpth="$incpath/usr/lib $sysroot/usr/local/lib $sysroot/usr/ccs/lib"
79 + plibpth="$incpath/usr/lib"
83 @@ -8600,13 +8583,8 @@
87 - syspath='/usr/share/man/man1 /usr/man/man1'
88 - syspath="$syspath /usr/man/mann /usr/man/manl /usr/man/local/man1"
89 - syspath="$syspath /usr/man/u_man/man1"
90 - syspath="$syspath /usr/catman/u_man/man1 /usr/man/l_man/man1"
91 - syspath="$syspath /usr/local/man/u_man/man1 /usr/local/man/l_man/man1"
92 - syspath="$syspath /usr/man/man.L /local/man/man1 /usr/local/man/man1"
93 - sysman=`./loc . /usr/man/man1 $syspath`
98 if $test -d "$sysman"; then
99 @@ -19900,9 +19878,10 @@
105 : Store the full pathname to the sed program for use in the C program
109 : see what type gids are declared as in the kernel
111 Only in perl-5.20.0/: Configure.orig
112 diff -ru -x '*~' -x '*.rej' perl-5.20.0-orig/ext/Errno/Errno_pm.PL perl-5.20.0/ext/Errno/Errno_pm.PL
113 --- perl-5.20.0-orig/ext/Errno/Errno_pm.PL 2014-05-26 15:34:20.000000000 +0200
114 +++ perl-5.20.0/ext/Errno/Errno_pm.PL 2014-06-25 10:31:24.317970047 +0200
116 if ($dep =~ /(\S+errno\.h)/) {
119 - } elsif ($^O eq 'linux' &&
120 - $Config{gccversion} ne '' &&
121 - $Config{gccversion} !~ /intel/i
122 - # might be using, say, Intel's icc
125 # When cross-compiling we may store a path for gcc's "sysroot" option:
126 my $sysroot = $Config{sysroot} || '';
127 # Some Linuxes have weird errno.hs which generate
128 Only in perl-5.20.0/ext/Errno: Errno_pm.PL.orig
129 diff -ru -x '*~' -x '*.rej' perl-5.20.0-orig/hints/freebsd.sh perl-5.20.0/hints/freebsd.sh
130 --- perl-5.20.0-orig/hints/freebsd.sh 2014-01-31 22:55:51.000000000 +0100
131 +++ perl-5.20.0/hints/freebsd.sh 2014-06-25 10:25:53.263964680 +0200
132 @@ -119,21 +119,21 @@
133 objformat=`/usr/bin/objformat`
134 if [ x$objformat = xaout ]; then
135 if [ -e /usr/lib/aout ]; then
136 - libpth="/usr/lib/aout /usr/local/lib /usr/lib"
137 - glibpth="/usr/lib/aout /usr/local/lib /usr/lib"
141 lddlflags='-Bshareable'
143 - libpth="/usr/lib /usr/local/lib"
144 - glibpth="/usr/lib /usr/local/lib"
150 cccdlflags='-DPIC -fPIC'
153 - libpth="/usr/lib /usr/local/lib"
154 - glibpth="/usr/lib /usr/local/lib"
159 cccdlflags='-DPIC -fPIC'
160 diff -ru -x '*~' -x '*.rej' perl-5.20.0-orig/hints/linux.sh perl-5.20.0/hints/linux.sh
161 --- perl-5.20.0-orig/hints/linux.sh 2014-05-26 15:34:20.000000000 +0200
162 +++ perl-5.20.0/hints/linux.sh 2014-06-25 10:33:47.354883843 +0200
167 -# Ubuntu 11.04 (and later, presumably) doesn't keep most libraries
168 -# (such as -lm) in /lib or /usr/lib. So we have to ask gcc to tell us
169 -# where to look. We don't want gcc's own libraries, however, so we
171 -# This could be conditional on Unbuntu, but other distributions may
172 -# follow suit, and this scheme seems to work even on rather old gcc's.
173 -# This unconditionally uses gcc because even if the user is using another
174 -# compiler, we still need to find the math library and friends, and I don't
175 -# know how other compilers will cope with that situation.
176 -# Morever, if the user has their own gcc earlier in $PATH than the system gcc,
177 -# we don't want its libraries. So we try to prefer the system gcc
178 -# Still, as an escape hatch, allow Configure command line overrides to
179 -# plibpth to bypass this check.
180 -if [ -x /usr/bin/gcc ] ; then
187 '') plibpth=`LANG=C LC_ALL=C $gcc $ccflags $ldflags -print-search-dirs | grep libraries |
188 cut -f2- -d= | tr ':' $trnl | grep -v 'gcc' | sed -e 's:/$::'`
193 -# SuSE8.2 has /usr/lib/libndbm* which are ld scripts rather than
194 -# true libraries. The scripts cause binding against static
195 -# version of -lgdbm which is a bad idea. So if we have 'nm'
196 -# make sure it can read the file
203 - if $test -r $p/libndbm.so; then
204 - if $nm $p/libndbm.so >/dev/null 2>&1 ; then
205 - echo 'Your shared -lndbm seems to be a real library.'
211 - if $test "X$_libndbm_real" = X; then
212 - echo 'Your shared -lndbm is not a real library.'
213 - set `echo X "$libswanted "| sed -e 's/ ndbm / /'`
221 if [ -f /etc/synoinfo.conf -a -d /usr/syno ]; then
222 # Tested on Synology DS213 and DS413
223 diff --git a/hints/linux.sh b/hints/linux.sh
224 index 3f38ea0..97aed11 100644
227 @@ -195,32 +195,6 @@ case "$usequadmath" in
233 -# If you have glibc, then report the version for ./myconfig bug reporting.
234 -# (Configure doesn't need to know the specific version since it just uses
235 -# gcc to load the library for all tests.)
236 -# We don't use __GLIBC__ and __GLIBC_MINOR__ because they
237 -# are insufficiently precise to distinguish things like
238 -# libc-2.0.6 and libc-2.0.7.
241 - for trylib in libc.so.6 libc.so
243 - if $test -e $p/$trylib; then
244 - libc=`ls -l $p/$trylib | awk '{print $NF}'`
245 - if $test "X$libc" != X; then
250 - if $test "X$libc" != X; then
257 if ${sh:-/bin/sh} -c exit; then
259 echo 'You appear to have a working bash. Good.'