summaryrefslogtreecommitdiff
path: root/lang/perl5/patches/patch-ca
blob: ba733c0d92e20d87e49cf04036a2c91481f78420 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
$NetBSD: patch-ca,v 1.9 2011/01/30 21:31:43 wiz Exp $

Hunk 7 (MirBSD) was submitted and accepted upstream, see
http://rt.perl.org/rt3/Ticket/Display.html?id=82532

--- Configure.orig	2010-09-06 23:30:32.000000000 +0000
+++ Configure
@@ -3251,13 +3251,14 @@ EOM
 			osvers="$3"
 			;;
 		dragonfly) osname=dragonfly
-			osvers="$3"
+			osvers=`$uname -r | UU/tr '[A-Z]' '[a-z]'`
 			;;
 		dynixptx*) osname=dynixptx
 			osvers=`echo "$4"|sed 's/^v//'`
 			;;
 		freebsd) osname=freebsd
-			osvers="$3" ;;
+			osvers=`$uname -r | UU/tr '[A-Z]' '[a-z]'`
+			;;
 		genix)	osname=genix ;;
 		gnu)	osname=gnu
 			osvers="$3" ;;
@@ -3279,7 +3280,7 @@ EOM
 		MiNT)	osname=mint
 			;;
 		netbsd*) osname=netbsd
-			osvers="$3"
+			osvers=`$uname -r | UU/tr '[A-Z]' '[a-z]'`
 			;;
 		news-os) osvers="$3"
 			case "$3" in
@@ -3290,7 +3291,7 @@ EOM
 		next*) osname=next ;;
 		nonstop-ux) osname=nonstopux ;;
 		openbsd) osname=openbsd
-                	osvers="$3"
+                	osvers=`$uname -r | UU/tr '[A-Z]' '[a-z]'`
                 	;;
 		os2)	osname=os2
 			osvers="$4"
@@ -4790,7 +4791,7 @@ case "$plibpth" in
 esac
 case "$libpth" in
 ' ') dlist='';;
-'') dlist="$loclibpth $plibpth $glibpth";;
+'') dlist="$plibpth $glibpth $loclibpth";;
 *) dlist="$libpth";;
 esac
 
@@ -6521,7 +6522,9 @@ rp='Pathname for the site-specific libra
 . ./getfile
 prefixvar=sitelib
 . ./setprefixvar
-sitelib_stem=`echo "$sitelibexp" | sed "s,/$version$,,"`
+if $test -z "$sitelib_stem"; then
+	sitelib_stem=`echo "$sitelibexp" | sed "s,/$version$,,"`
+fi
 
 : Determine list of previous versions to include in @INC
 $cat > getverlist <<EOPL
@@ -7033,7 +7036,9 @@ case "$vendorprefix" in
 	vendorlibexp="$ansexp"
 	;;
 esac
-vendorlib_stem=`echo "$vendorlibexp" | sed "s,/$version$,,"`
+if $test -z "$vendorlib_stem"; then
+	vendorlib_stem=`echo "$vendorlibexp" | sed "s,/$version$,,"`
+fi
 prefixvar=vendorlib
 . ./installprefix
 
@@ -8326,7 +8331,7 @@ if "$useshrplib"; then
 	solaris)
 		xxx="-R $shrpdir"
 		;;
-	freebsd|netbsd|openbsd|interix|dragonfly)
+	freebsd|mirbsd|netbsd|openbsd|interix|dragonfly)
 		xxx="-Wl,-R$shrpdir"
 		;;
 	bsdos|linux|irix*|dec_osf|gnu*)
@@ -8339,7 +8344,7 @@ if "$useshrplib"; then
 		# beos doesn't like the default, either.
 		;;
 	haiku)
-		# Haiku doesn't like the default, either.
+		xxx="-Wl,-rpath,$shrpdir"
 		;;
 	hpux*)
 		# hpux doesn't like the default, either.
@@ -9410,6 +9415,13 @@ EOCP
 	;;
 esac
 
+: Look for a hint-file generated 'call-back-unit'.  We need
+: to set some defaults for building perl in pkgsrc.
+if $test -f pkgsrc.cbu; then
+	echo "Setting pkgsrc-specific hints regarding compiler/linker flags..."
+	. ./pkgsrc.cbu
+fi
+
 : Set the vendorbin variables
 case "$vendorprefix" in
 '')	d_vendorbin="$undef"
@@ -18925,7 +18937,15 @@ RCAT(Rei,ser)
 ACAT(Cir,cus)
 EOCP
 $cppstdin $cppflags $cppminus <cpp_stuff.c >cpp_stuff.out 2>&1
-if $contains 'Circus' cpp_stuff.out >/dev/null 2>&1; then
+# yuck, what a hack.
+# MIPSPro compiler/preprocessor behaves differently if invoked on
+# stdin vs file.  Here we test for stdin, but lateron we use files.
+# So force it to work the way we know it does:
+if [ x"${OPSYS}" = x"IRIX" ]; then
+	echo "Hacking MIPSPro on file vs. stdin..." >&4
+	echo "We know we can catify or stringify, separately or together!"
+	cpp_stuff=42
+elif $contains 'Circus' cpp_stuff.out >/dev/null 2>&1; then
 	echo "Oh!  Smells like ANSI's been here." >&4
 	echo "We can catify or stringify, separately or together!"
 	cpp_stuff=42