Fri Sep 4 10:08:46 2020 UTC ()
[lang/perl5] Fix rpath on QNX


(js)
diff -r1.9 -r1.10 pkgsrc/lang/perl5/patches/patch-Configure

cvs diff -r1.9 -r1.10 pkgsrc/lang/perl5/patches/patch-Configure (expand / switch to unified diff)

--- pkgsrc/lang/perl5/patches/patch-Configure 2020/07/22 15:23:57 1.9
+++ pkgsrc/lang/perl5/patches/patch-Configure 2020/09/04 10:08:46 1.10
@@ -1,225 +1,224 @@ @@ -1,225 +1,224 @@
1$NetBSD: patch-Configure,v 1.9 2020/07/22 15:23:57 sjmulder Exp $ 1$NetBSD: patch-Configure,v 1.10 2020/09/04 10:08:46 js Exp $
2 2
3* Use "uname -r" to get OS version for *BSD. 3* Use "uname -r" to get OS version for *BSD.
4* Move $loclibpth to the end of $dlist, instead of the beginning. 4* Move $loclibpth to the end of $dlist, instead of the beginning.
5* Detect systems which have <fenv.h> but where using it fails. 5* Detect systems which have <fenv.h> but where using it fails.
6* Honor more ldflags in shared objects. 6* Honor more ldflags in shared objects.
7* Add Minix 7* Add Minix
8* Several other changes. 8* Several other changes.
 9* Add rpath for QNX
9 10
10--- Configure.orig 2020-02-27 17:40:12.000000000 +0000 11--- Configure.orig 2020-06-14 23:01:24.000000000 +0000
11+++ Configure 12+++ Configure
12@@ -3475,13 +3475,14 @@ EOM 13@@ -3479,13 +3479,14 @@ EOM
13 osvers="$3" 14 osvers="$3"
14 ;; 15 ;;
15 dragonfly) osname=dragonfly 16 dragonfly) osname=dragonfly
16- osvers="$3" 17- osvers="$3"
17+ osvers=`$uname -r | UU/tr '[A-Z]' '[a-z]'` 18+ osvers=`$uname -r | UU/tr '[A-Z]' '[a-z]'`
18 ;; 19 ;;
19 dynixptx*) osname=dynixptx 20 dynixptx*) osname=dynixptx
20 osvers=`echo "$4"|sed 's/^v//'` 21 osvers=`echo "$4"|sed 's/^v//'`
21 ;; 22 ;;
22 freebsd) osname=freebsd 23 freebsd) osname=freebsd
23- osvers="$3" ;; 24- osvers="$3" ;;
24+ osvers=`$uname -r | UU/tr '[A-Z]' '[a-z]'` 25+ osvers=`$uname -r | UU/tr '[A-Z]' '[a-z]'`
25+ ;; 26+ ;;
26 genix) osname=genix ;; 27 genix) osname=genix ;;
27 gnu) osname=gnu 28 gnu) osname=gnu
28 osvers="$3" ;; 29 osvers="$3" ;;
29@@ -3506,8 +3507,11 @@ EOM 30@@ -3510,8 +3511,11 @@ EOM
30 minix) osname=minix 31 minix) osname=minix
31 osvers=`$uname -r` 32 osvers=`$uname -r`
32 ;; 33 ;;
33+ minix*) osname=minix 34+ minix*) osname=minix
34+ osvers=`$uname -r` 35+ osvers=`$uname -r`
35+ ;; 36+ ;;
36 netbsd*) osname=netbsd 37 netbsd*) osname=netbsd
37- osvers="$3" 38- osvers="$3"
38+ osvers=`$uname -r | UU/tr '[A-Z]' '[a-z]'` 39+ osvers=`$uname -r | UU/tr '[A-Z]' '[a-z]'`
39 ;; 40 ;;
40 news-os) osvers="$3" 41 news-os) osvers="$3"
41 case "$3" in 42 case "$3" in
42@@ -3517,7 +3521,7 @@ EOM 43@@ -3521,7 +3525,7 @@ EOM
43 ;; 44 ;;
44 nonstop-ux) osname=nonstopux ;; 45 nonstop-ux) osname=nonstopux ;;
45 openbsd) osname=openbsd 46 openbsd) osname=openbsd
46- osvers="$3" 47- osvers="$3"
47+ osvers=`$uname -r | UU/tr '[A-Z]' '[a-z]'` 48+ osvers=`$uname -r | UU/tr '[A-Z]' '[a-z]'`
48 ;; 49 ;;
49 os2) osname=os2 50 os2) osname=os2
50 osvers="$4" 51 osvers="$4"
51@@ -3532,6 +3536,9 @@ EOM 52@@ -3536,6 +3540,9 @@ EOM
52 qnx) osname=qnx 53 qnx) osname=qnx
53 osvers="$4" 54 osvers="$4"
54 ;; 55 ;;
55+ sco_sv) osname=sco_sv 56+ sco_sv) osname=sco_sv
56+ osvers=`$uname -r`v`$uname -v` 57+ osvers=`$uname -r`v`$uname -v`
57+ ;; 58+ ;;
58 solaris) osname=solaris 59 solaris) osname=solaris
59 case "$3" in 60 case "$3" in
60 5*) osvers=`echo $3 | $sed 's/^5/2/g'` ;; 61 5*) osvers=`echo $3 | $sed 's/^5/2/g'` ;;
61@@ -4970,7 +4977,7 @@ esac 62@@ -4978,7 +4985,7 @@ esac
62 # If using gcc or clang, we can get better values for libpth, incpth 63 # If using gcc or clang, we can get better values for libpth, incpth
63 # and usrinc directly from the compiler. 64 # and usrinc directly from the compiler.
64 # Note that ccname for clang is also gcc. 65 # Note that ccname for clang is also gcc.
65-case "$ccname" in 66-case "$ccname" in
66+case "xx$ccname" in 67+case "xx$ccname" in
67 gcc) 68 gcc)
68 $echo 'extern int foo;' > try.c 69 $echo 'extern int foo;' > try.c
69 set X `$cppstdin -v try.c 2>&1 | $awk '/^#include </,/^End of search /'|$cppfilter $grep '/include'` 70 set X `$cppstdin -v try.c 2>&1 | $awk '/^#include </,/^End of search /'|$cppfilter $grep '/include'`
70@@ -5046,14 +5053,14 @@ case "$plibpth" in 71@@ -5054,14 +5061,14 @@ case "$plibpth" in
71 esac 72 esac
72 case "$libpth" in 73 case "$libpth" in
73 ' ') dlist='';; 74 ' ') dlist='';;
74-'') dlist="$loclibpth $plibpth $glibpth";; 75-'') dlist="$loclibpth $plibpth $glibpth";;
75+'') dlist="$plibpth $glibpth $loclibpth";; 76+'') dlist="$plibpth $glibpth $loclibpth";;
76 *) dlist="$libpth";; 77 *) dlist="$libpth";;
77 esac 78 esac
78  79
79 : Now check and see which directories actually exist, avoiding duplicates 80 : Now check and see which directories actually exist, avoiding duplicates
80 for xxx in $dlist 81 for xxx in $dlist
81 do 82 do
82- if $test -d $xxx; then 83- if $test -d $xxx; then
83+ if $test -d $xxx -o "$xxx" = "$prefix/lib"; then 84+ if $test -d $xxx -o "$xxx" = "$prefix/lib"; then
84 case " $libpth " in 85 case " $libpth " in
85 *" $xxx "*) ;; 86 *" $xxx "*) ;;
86 *) libpth="$libpth $xxx";; 87 *) libpth="$libpth $xxx";;
87@@ -5169,7 +5176,7 @@ lib_ext=$_a 88@@ -5177,7 +5184,7 @@ lib_ext=$_a
88 obj_ext=$_o 89 obj_ext=$_o
89 path_sep=$p_ 90 path_sep=$p_
90  91
91-rm_try="$rm -f try try$_exe a.out .out try.[cho] try.$_o core core.try* try.core*" 92-rm_try="$rm -f try try$_exe a.out .out try.[cho] try.$_o core core.try* try.core*"
92+rm_try="@TOOLS_RM@ -f try try$_exe a.out .out try.[cho] try.$_o core core.try* try.core*" 93+rm_try="@TOOLS_RM@ -f try try$_exe a.out .out try.[cho] try.$_o core core.try* try.core*"
93  94
94 : Which makefile gets called first. This is used by make depend. 95 : Which makefile gets called first. This is used by make depend.
95 case "$firstmakefile" in 96 case "$firstmakefile" in
96@@ -5500,7 +5507,7 @@ default|recommended) 97@@ -5508,7 +5515,7 @@ default|recommended)
97 # thing. (NWC) 98 # thing. (NWC)
98 case "$osname" in 99 case "$osname" in
99 amigaos) ;; # -fstack-protector builds but doesn't work 100 amigaos) ;; # -fstack-protector builds but doesn't work
100- *) case "$gccversion" in 101- *) case "$gccversion" in
101+ nothing) case "$gccversion" in 102+ nothing) case "$gccversion" in
102 ?*) set stack-protector-strong -fstack-protector-strong 103 ?*) set stack-protector-strong -fstack-protector-strong
103 eval $checkccflag 104 eval $checkccflag
104 case "$dflt" in 105 case "$dflt" in
105@@ -6484,6 +6491,15 @@ case "$nm_so_opt" in 106@@ -6492,6 +6499,15 @@ case "$nm_so_opt" in
106 ;; 107 ;;
107 esac 108 esac
108  109
109+: Mac OS X 10.7 is different 110+: Mac OS X 10.7 is different
110+case "$osname" in 111+case "$osname" in
111+ darwin) 112+ darwin)
112+ case "$osvers" in 113+ case "$osvers" in
113+ 11.*) 114+ 11.*)
114+ libnames="$libnames /usr/lib/system/libsystem_*.dylib" 115+ libnames="$libnames /usr/lib/system/libsystem_*.dylib"
115+ esac 116+ esac
116+esac 117+esac
117+ 118+
118 : Figure out where the libc is located 119 : Figure out where the libc is located
119 case "$runnm" in 120 case "$runnm" in
120 true) 121 true)
121@@ -7611,7 +7627,9 @@ rp='Pathname for the site-specific libra 122@@ -7619,7 +7635,9 @@ rp='Pathname for the site-specific libra
122 . ./getfile 123 . ./getfile
123 prefixvar=sitelib 124 prefixvar=sitelib
124 . ./setprefixvar 125 . ./setprefixvar
125-sitelib_stem=`echo "$sitelibexp" | sed "s,/$version$,,"` 126-sitelib_stem=`echo "$sitelibexp" | sed "s,/$version$,,"`
126+if $test -z "$sitelib_stem"; then 127+if $test -z "$sitelib_stem"; then
127+ sitelib_stem=`echo "$sitelibexp" | sed "s,/$version$,,"` 128+ sitelib_stem=`echo "$sitelibexp" | sed "s,/$version$,,"`
128+fi 129+fi
129  130
130 : Determine list of previous versions to include in @INC 131 : Determine list of previous versions to include in @INC
131 $cat > getverlist <<EOPL 132 $cat > getverlist <<EOPL
132@@ -8022,7 +8040,9 @@ case "$vendorprefix" in 133@@ -8030,7 +8048,9 @@ case "$vendorprefix" in
133 vendorlibexp="$ansexp" 134 vendorlibexp="$ansexp"
134 ;; 135 ;;
135 esac 136 esac
136-vendorlib_stem=`echo "$vendorlibexp" | sed "s,/$version$,,"` 137-vendorlib_stem=`echo "$vendorlibexp" | sed "s,/$version$,,"`
137+if $test -z "$vendorlib_stem"; then 138+if $test -z "$vendorlib_stem"; then
138+ vendorlib_stem=`echo "$vendorlibexp" | sed "s,/$version$,,"` 139+ vendorlib_stem=`echo "$vendorlibexp" | sed "s,/$version$,,"`
139+fi 140+fi
140 prefixvar=vendorlib 141 prefixvar=vendorlib
141 . ./installprefix 142 . ./installprefix
142  143
143@@ -8518,6 +8538,7 @@ EOM 144@@ -8530,6 +8550,7 @@ EOM
144 esac 145 esac
145 ;; 146 ;;
146 *linux*|irix*|gnu*) dflt="-shared $optimize" ;; 147 *linux*|irix*|gnu*) dflt="-shared $optimize" ;;
147+ sco_sv) dflt='-shared' ;; 148+ sco_sv) dflt='-shared' ;;
148 solaris) # See [perl #66604]. 149 solaris) # See [perl #66604].
149 # On Solaris 11, gcc -m64 on amd64 150 # On Solaris 11, gcc -m64 on amd64
150 # appears not to understand -G. gcc versions at 151 # appears not to understand -G. gcc versions at
151@@ -8557,7 +8578,7 @@ EOM 152@@ -8569,7 +8590,7 @@ EOM
152 esac 153 esac
153 for thisflag in $ldflags; do 154 for thisflag in $ldflags; do
154 case "$thisflag" in 155 case "$thisflag" in
155- -L*|-R*|-Wl,-R*) 156- -L*|-R*|-Wl,-R*)
156+ -L*|-R*|-Wl,-R*|-Wl,-z*) 157+ -L*|-R*|-Wl,-R*|-Wl,-z*)
157 case " $dflt " in 158 case " $dflt " in
158 *" $thisflag "*) ;; 159 *" $thisflag "*) ;;
159 *) dflt="$dflt $thisflag" ;; 160 *) dflt="$dflt $thisflag" ;;
160@@ -8816,6 +8837,10 @@ if "$useshrplib"; then 161@@ -8825,7 +8846,7 @@ if "$useshrplib"; then
161 bsdos|linux|irix*|dec_osf|gnu*|haiku) 162 freebsd|minix|mirbsd|netbsd|openbsd|interix|dragonfly|bitrig)
 163 xxx="-Wl,-R$shrpdir"
 164 ;;
 165- bsdos|linux|irix*|dec_osf|gnu*|haiku)
 166+ bsdos|linux|irix*|dec_osf|gnu*|haiku|nto)
162 xxx="-Wl,-rpath,$shrpdir" 167 xxx="-Wl,-rpath,$shrpdir"
163 ;; 168 ;;
164+ haiku) 
165+ # Haiku doesn't like the default, either. 
166+ xxx="-Wl,-rpath,$shrpdir" 
167+ ;; 
168 hpux*) 169 hpux*)
169 # hpux doesn't like the default, either. 170@@ -8835,6 +8856,9 @@ if "$useshrplib"; then
170 tmp_shrpenv="env LDOPTS=\"+s +b${shrpdir}\"" 
171@@ -8823,6 +8848,9 @@ if "$useshrplib"; then 
172 cygwin) 171 cygwin)
173 # cygwin needs only ldlibpth 172 # cygwin needs only ldlibpth
174 ;; 173 ;;
175+ sco_sv) 174+ sco_sv)
176+ xxx="-Wl,-R$shrpdir" 175+ xxx="-Wl,-R$shrpdir"
177+ ;; 176+ ;;
178 *) 177 *)
179 tmp_shrpenv="env LD_RUN_PATH=$shrpdir" 178 tmp_shrpenv="env LD_RUN_PATH=$shrpdir"
180 ;; 179 ;;
181@@ -9903,6 +9931,13 @@ esac 180@@ -9911,6 +9935,13 @@ esac
182 : Check if we want perlio 181 : Check if we want perlio
183 useperlio="$define" 182 useperlio="$define"
184  183
185+: Look for a hint-file generated 'call-back-unit'. We need 184+: Look for a hint-file generated 'call-back-unit'. We need
186+: to set some defaults for building perl in pkgsrc. 185+: to set some defaults for building perl in pkgsrc.
187+if $test -f pkgsrc.cbu; then 186+if $test -f pkgsrc.cbu; then
188+ echo "Setting pkgsrc-specific hints regarding compiler/linker flags..." 187+ echo "Setting pkgsrc-specific hints regarding compiler/linker flags..."
189+ . ./pkgsrc.cbu 188+ . ./pkgsrc.cbu
190+fi 189+fi
191+ 190+
192 : Set the vendorbin variables 191 : Set the vendorbin variables
193 case "$vendorprefix" in 192 case "$vendorprefix" in
194 '') d_vendorbin="$undef" 193 '') d_vendorbin="$undef"
195@@ -20058,7 +20093,15 @@ RCAT(Rei,ser) 194@@ -20114,7 +20145,15 @@ RCAT(Rei,ser)
196 ACAT(Cir,cus) 195 ACAT(Cir,cus)
197 EOCP 196 EOCP
198 $cppstdin $cppflags $cppminus <cpp_stuff.c >cpp_stuff.out 2>&1 197 $cppstdin $cppflags $cppminus <cpp_stuff.c >cpp_stuff.out 2>&1
199-if $contains 'Circus' cpp_stuff.out >/dev/null 2>&1; then 198-if $contains 'Circus' cpp_stuff.out >/dev/null 2>&1; then
200+# yuck, what a hack. 199+# yuck, what a hack.
201+# MIPSPro compiler/preprocessor behaves differently if invoked on 200+# MIPSPro compiler/preprocessor behaves differently if invoked on
202+# stdin vs file. Here we test for stdin, but lateron we use files. 201+# stdin vs file. Here we test for stdin, but lateron we use files.
203+# So force it to work the way we know it does: 202+# So force it to work the way we know it does:
204+if [ x"${OPSYS}" = x"IRIX" ]; then 203+if [ x"${OPSYS}" = x"IRIX" ]; then
205+ echo "Hacking MIPSPro on file vs. stdin..." >&4 204+ echo "Hacking MIPSPro on file vs. stdin..." >&4
206+ echo "We know we can catify or stringify, separately or together!" 205+ echo "We know we can catify or stringify, separately or together!"
207+ cpp_stuff=42 206+ cpp_stuff=42
208+elif $contains 'Circus' cpp_stuff.out >/dev/null 2>&1; then 207+elif $contains 'Circus' cpp_stuff.out >/dev/null 2>&1; then
209 echo "Oh! Smells like ANSI's been here." >&4 208 echo "Oh! Smells like ANSI's been here." >&4
210 echo "We can catify or stringify, separately or together!" 209 echo "We can catify or stringify, separately or together!"
211 cpp_stuff=42 210 cpp_stuff=42
212@@ -22864,6 +22907,18 @@ eval $inhdr 211@@ -22920,6 +22959,18 @@ eval $inhdr
213 set fenv.h i_fenv 212 set fenv.h i_fenv
214 eval $inhdr 213 eval $inhdr
215  214
216+: And really validate that it is OK to include it 215+: And really validate that it is OK to include it
217+: On NetBSD 6.x non-amd64 non-i386 and non-sparc this fails 216+: On NetBSD 6.x non-amd64 non-i386 and non-sparc this fails
218+cat > try.c <<EOCP 217+cat > try.c <<EOCP
219+#include <fenv.h> 218+#include <fenv.h>
220+int main() { return 0; } 219+int main() { return 0; }
221+EOCP 220+EOCP
222+set try 221+set try
223+if ! eval $compile_ok; then 222+if ! eval $compile_ok; then
224+ echo "<fenv.h> found to be unusable, disabling" >&4 223+ echo "<fenv.h> found to be unusable, disabling" >&4
225+ i_fenv=$undef 224+ i_fenv=$undef