1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/openpkg/openssl.patch Tue Jan 06 23:40:39 2009 +0100 1.3 @@ -0,0 +1,355 @@ 1.4 +Index: Configure 1.5 +--- Configure.orig 2007-09-16 14:24:17 +0200 1.6 ++++ Configure 2007-10-17 12:14:14 +0200 1.7 +@@ -6,7 +6,6 @@ 1.8 + ## 1.9 + 1.10 + require 5.000; 1.11 +-use strict; 1.12 + 1.13 + # see INSTALL for instructions. 1.14 + 1.15 +@@ -34,6 +33,7 @@ 1.16 + # (Default: KRB5_DIR/include) 1.17 + # --with-krb5-flavor Declare what flavor of Kerberos 5 is used. Currently 1.18 + # supported values are "MIT" and "Heimdal". A value is required. 1.19 ++# --with-cc compiler to use for $CC (useful if cc is a disguised gcc) 1.20 + # 1.21 + # --test-sanity Make a number of sanity checks on the data in this file. 1.22 + # This is a debugging tool for OpenSSL developers. 1.23 +@@ -113,6 +113,7 @@ 1.24 + #$bits2="THIRTY_TWO_BIT "; 1.25 + my $bits1="THIRTY_TWO_BIT "; 1.26 + my $bits2="SIXTY_FOUR_BIT "; 1.27 ++my $ccarg; 1.28 + 1.29 + my $x86_elf_asm="x86cpuid-elf.o:bn86-elf.o co86-elf.o:dx86-elf.o yx86-elf.o:ax86-elf.o:bx86-elf.o:mx86-elf.o:sx86-elf.o s512sse2-elf.o:cx86-elf.o:rx86-elf.o:rm86-elf.o:r586-elf.o"; 1.30 + my $x86_coff_asm="x86cpuid-cof.o:bn86-cof.o co86-cof.o:dx86-cof.o yx86-cof.o:ax86-cof.o:bx86-cof.o:mx86-cof.o:sx86-cof.o s512sse2-cof.o:cx86-cof.o:rx86-cof.o:rm86-cof.o:r586-cof.o"; 1.31 +@@ -402,8 +403,8 @@ 1.32 + 1.33 + #### IBM's AIX. 1.34 + "aix3-cc", "cc:-O -DB_ENDIAN -qmaxmem=16384::(unknown):AIX::BN_LLONG RC4_CHAR:::", 1.35 +-"aix-gcc", "gcc:-O -DB_ENDIAN::-D_THREAD_SAFE:AIX::BN_LLONG RC4_CHAR::aix_ppc32.o::::::::::dlfcn:aix-shared:::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)::-X 32", 1.36 +-"aix64-gcc","gcc:-maix64 -O -DB_ENDIAN::-D_THREAD_SAFE:AIX::SIXTY_FOUR_BIT_LONG RC4_CHAR::aix_ppc64.o::::::::::dlfcn:aix-shared::-maix64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)::-X64", 1.37 ++"aix-gcc", "gcc:-O -DB_ENDIAN::-D_THREAD_SAFE:AIX::BN_LLONG RC4_CHAR::aix_ppc32.o::::::::::dlfcn:aix-shared:::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)::", 1.38 ++"aix64-gcc","gcc:-maix64 -O -DB_ENDIAN::-D_THREAD_SAFE:AIX::SIXTY_FOUR_BIT_LONG RC4_CHAR::aix_ppc64.o::::::::::dlfcn:aix-shared::-maix64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)::", 1.39 + # Below targets assume AIX 5. Idea is to effectively disregard $OBJECT_MODE 1.40 + # at build time. $OBJECT_MODE is respected at ./config stage! 1.41 + "aix-cc", "cc:-q32 -O -DB_ENDIAN -qmaxmem=16384 -qro -qroconst::-qthreaded:AIX::BN_LLONG RC4_CHAR::aix_ppc32.o::::::::::dlfcn:aix-shared::-q32:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)::-X 32", 1.42 +@@ -697,6 +698,10 @@ 1.43 + { 1.44 + exit(&test_sanity()); 1.45 + } 1.46 ++ elsif (/^--with-cc=(.*)$/) 1.47 ++ { 1.48 ++ $ccarg=$1 1.49 ++ } 1.50 + elsif (/^reconfigure/ || /^reconf/) 1.51 + { 1.52 + if (open(IN,"<$Makefile")) 1.53 +@@ -949,7 +954,7 @@ 1.54 + print "IsMK1MF=$IsMK1MF\n"; 1.55 + 1.56 + my @fields = split(/\s*:\s*/,$table{$target} . ":" x 30 , -1); 1.57 +-my $cc = $fields[$idx_cc]; 1.58 ++my $cc = $ccarg ? $ccarg : $fields[$idx_cc]; 1.59 + my $cflags = $fields[$idx_cflags]; 1.60 + my $unistd = $fields[$idx_unistd]; 1.61 + my $thread_cflag = $fields[$idx_thread_cflag]; 1.62 +Index: config 1.63 +--- config.orig 2007-08-01 13:21:35 +0200 1.64 ++++ config 2007-10-17 12:13:48 +0200 1.65 +@@ -401,9 +401,9 @@ 1.66 + 1.67 + # figure out if gcc is available and if so we use it otherwise 1.68 + # we fallback to whatever cc does on the system 1.69 +-GCCVER=`(gcc -dumpversion) 2>/dev/null` 1.70 ++GCCVER=`(gcc -dumpversion 2>/dev/null && exit; cc --version 2>/dev/null | grep GCC >/dev/null && cc -dumpversion )` 1.71 + if [ "$GCCVER" != "" ]; then 1.72 +- CC=gcc 1.73 ++ CC=cc; gcc -dumpversion >/dev/null 2>&1 && CC=gcc 1.74 + # then strip off whatever prefix egcs prepends the number with... 1.75 + # Hopefully, this will work for any future prefixes as well. 1.76 + GCCVER=`echo $GCCVER | LC_ALL=C sed 's/^[a-zA-Z]*\-//'` 1.77 +@@ -412,8 +412,10 @@ 1.78 + # major and minor version numbers. 1.79 + # peak single digit before and after first dot, e.g. 2.95.1 gives 29 1.80 + GCCVER=`echo $GCCVER | sed 's/\([0-9]\)\.\([0-9]\).*/\1\2/'` 1.81 ++ SUFFIX=gcc 1.82 + else 1.83 + CC=cc 1.84 ++ SUFFIX=cc 1.85 + fi 1.86 + GCCVER=${GCCVER:-0} 1.87 + if [ "$SYSTEM" = "HP-UX" ];then 1.88 +@@ -422,7 +424,7 @@ 1.89 + if [ $GCCVER -ge 30 ]; then 1.90 + # PA64 support only came in with gcc 3.0.x. 1.91 + # We check if the preprocessor symbol __LP64__ is defined... 1.92 +- if echo "__LP64__" | gcc -v -E -x c - 2>/dev/null | grep "^__LP64__" 2>&1 > /dev/null; then 1.93 ++ if echo "__LP64__" | $CC -v -E -x c - 2>/dev/null | grep "^__LP64__" 2>&1 > /dev/null; then 1.94 + : # __LP64__ has slipped through, it therefore is not defined 1.95 + else 1.96 + GCC_BITS="64" 1.97 +@@ -433,13 +435,14 @@ 1.98 + if [ $GCCVER -ge 30 ]; then 1.99 + # 64-bit ABI isn't officially supported in gcc 3.0, but it appears 1.100 + # to be working, at the very least 'make test' passes... 1.101 +- if gcc -v -E -x c /dev/null 2>&1 | grep __arch64__ > /dev/null; then 1.102 ++ if $CC -v -E -x c /dev/null 2>&1 | grep __arch64__ > /dev/null; then 1.103 + GCC_ARCH="-m64" 1.104 + else 1.105 + GCC_ARCH="-m32" 1.106 + fi 1.107 + fi 1.108 + # check for WorkShop C, expected output is "cc: blah-blah C x.x" 1.109 ++ if [ $GCCVER -eq 0 ]; then 1.110 + CCVER=`(cc -V 2>&1) 2>/dev/null | \ 1.111 + egrep -e '^cc: .* C [0-9]\.[0-9]' | \ 1.112 + sed 's/.* C \([0-9]\)\.\([0-9]\).*/\1\2/'` 1.113 +@@ -452,6 +455,7 @@ 1.114 + sleep 5 1.115 + fi 1.116 + fi 1.117 ++ fi 1.118 + fi 1.119 + 1.120 + if [ "${SYSTEM}-${MACHINE}" = "Linux-alpha" ]; then 1.121 +@@ -469,6 +473,7 @@ 1.122 + 1.123 + if [ "${SYSTEM}" = "AIX" ]; then # favor vendor cc over gcc 1.124 + (cc) 2>&1 | grep -iv "not found" > /dev/null && CC=cc 1.125 ++ (gcc) 2>&1 | grep -iv "not found" > /dev/null && CC=gcc 1.126 + fi 1.127 + 1.128 + CCVER=${CCVER:-0} 1.129 +@@ -488,7 +493,7 @@ 1.130 + if [ $CPU -ge 4000 ]; then 1.131 + options="$options -mips2" 1.132 + fi 1.133 +- OUT="irix-$CC" 1.134 ++ OUT="irix-$SUFFIX" 1.135 + ;; 1.136 + mips3-sgi-irix) 1.137 + #CPU=`(hinv -t cpu) 2>/dev/null | head -1 | sed 's/^CPU:[^R]*R\([0-9]*\).*/\1/'` 1.138 +@@ -498,11 +503,11 @@ 1.139 + #else 1.140 + # options="$options -mips3" 1.141 + #fi 1.142 +- OUT="irix-mips3-$CC" 1.143 ++ OUT="irix-mips3-$SUFFIX" 1.144 + ;; 1.145 + mips4-sgi-irix64) 1.146 + echo "WARNING! If you wish to build 64-bit library, then you have to" 1.147 +- echo " invoke './Configure irix64-mips4-$CC' *manually*." 1.148 ++ echo " invoke './Configure irix64-mips4-$SUFFIX' *manually*." 1.149 + if [ "$TEST" = "false" -a -t 1 ]; then 1.150 + echo " You have about 5 seconds to press Ctrl-C to abort." 1.151 + (trap "stty `stty -g`" 2 0; stty -icanon min 0 time 50; read waste) <&1 1.152 +@@ -514,7 +519,7 @@ 1.153 + #else 1.154 + # options="$options -mips3" 1.155 + #fi 1.156 +- OUT="irix-mips3-$CC" 1.157 ++ OUT="irix-mips3-$SUFFIX" 1.158 + ;; 1.159 + ppc-apple-rhapsody) OUT="rhapsody-ppc-cc" ;; 1.160 + ppc-apple-darwin*) OUT="darwin-ppc-cc" ;; 1.161 +@@ -522,10 +527,10 @@ 1.162 + alpha-*-linux2) 1.163 + ISA=`awk '/cpu model/{print$4;exit(0);}' /proc/cpuinfo` 1.164 + case ${ISA:-generic} in 1.165 +- *[678]) OUT="linux-alpha+bwx-$CC" ;; 1.166 +- *) OUT="linux-alpha-$CC" ;; 1.167 ++ *[678]) OUT="linux-alpha+bwx-$SUFFIX" ;; 1.168 ++ *) OUT="linux-alpha-$SUFFIX" ;; 1.169 + esac 1.170 +- if [ "$CC" = "gcc" ]; then 1.171 ++ if [ $GCCVER -gt 0 ]; then 1.172 + case ${ISA:-generic} in 1.173 + EV5|EV45) options="$options -mcpu=ev5";; 1.174 + EV56|PCA56) options="$options -mcpu=ev56";; 1.175 +@@ -592,7 +597,7 @@ 1.176 + s390x-*-linux2) OUT="linux-generic64"; options="$options -DB_ENDIAN" ;; 1.177 + x86_64-*-linux?) OUT="linux-x86_64" ;; 1.178 + *86-*-linux2) OUT="linux-elf" 1.179 +- if [ "$GCCVER" -gt 28 ]; then 1.180 ++ if [ $GCCVER -gt 28 ]; then 1.181 + if grep '^model.*Pentium' /proc/cpuinfo >/dev/null ; then 1.182 + options="$options -march=pentium" 1.183 + fi 1.184 +@@ -606,17 +611,17 @@ 1.185 + *-*-linux1) OUT="linux-aout" ;; 1.186 + *-*-linux2) OUT="linux-generic32" ;; 1.187 + sun4[uv]*-*-solaris2) 1.188 +- OUT="solaris-sparcv9-$CC" 1.189 ++ OUT="solaris-sparcv9-$SUFFIX" 1.190 + ISA64=`(isalist) 2>/dev/null | grep sparcv9` 1.191 + if [ "$ISA64" != "" ]; then 1.192 +- if [ "$CC" = "cc" -a $CCVER -ge 50 ]; then 1.193 ++ if [ $GCCVER -eq 0 -a $CCVER -ge 50 ]; then 1.194 + echo "WARNING! If you wish to build 64-bit library, then you have to" 1.195 + echo " invoke './Configure solaris64-sparcv9-cc' *manually*." 1.196 + if [ "$TEST" = "false" -a -t 1 ]; then 1.197 + echo " You have about 5 seconds to press Ctrl-C to abort." 1.198 + (trap "stty `stty -g`" 2 0; stty -icanon min 0 time 50; read waste) <&1 1.199 + fi 1.200 +- elif [ "$CC" = "gcc" -a "$GCC_ARCH" = "-m64" ]; then 1.201 ++ elif [ $GCCVER -gt 0 -a "$GCC_ARCH" = "-m64" ]; then 1.202 + # $GCC_ARCH denotes default ABI chosen by compiler driver 1.203 + # (first one found on the $PATH). I assume that user 1.204 + # expects certain consistency with the rest of his builds 1.205 +@@ -639,21 +644,21 @@ 1.206 + fi 1.207 + fi 1.208 + ;; 1.209 +- sun4m-*-solaris2) OUT="solaris-sparcv8-$CC" ;; 1.210 +- sun4d-*-solaris2) OUT="solaris-sparcv8-$CC" ;; 1.211 +- sun4*-*-solaris2) OUT="solaris-sparcv7-$CC" ;; 1.212 ++ sun4m-*-solaris2) OUT="solaris-sparcv8-$SUFFIX" ;; 1.213 ++ sun4d-*-solaris2) OUT="solaris-sparcv8-$SUFFIX" ;; 1.214 ++ sun4*-*-solaris2) OUT="solaris-sparcv7-$SUFFIX" ;; 1.215 + *86*-*-solaris2) 1.216 + ISA64=`(isalist) 2>/dev/null | grep amd64` 1.217 +- if [ "$ISA64" != "" ]; then 1.218 +- OUT="solaris64-x86_64-$CC" 1.219 ++ if [ "$ISA64" != "" -a $GCCVER -gt 0 -a "$GCC_ARCH" = "-m64" ]; then 1.220 ++ OUT="solaris64-x86_64-$SUFFIX" 1.221 + else 1.222 +- OUT="solaris-x86-$CC" 1.223 ++ OUT="solaris-x86-$SUFFIX" 1.224 + if [ `uname -r | sed -e 's/5\.//'` -lt 10 ]; then 1.225 + options="$options no-sse2" 1.226 + fi 1.227 + fi 1.228 + ;; 1.229 +- *-*-sunos4) OUT="sunos-$CC" ;; 1.230 ++ *-*-sunos4) OUT="sunos-$SUFFIX" ;; 1.231 + 1.232 + *86*-*-bsdi4) OUT="BSD-x86-elf"; options="$options no-sse2 -ldl" ;; 1.233 + alpha*-*-*bsd*) OUT="BSD-generic64"; options="$options -DL_ENDIAN" ;; 1.234 +@@ -677,7 +682,7 @@ 1.235 + *-*-osf) OUT="osf1-alpha-cc" ;; 1.236 + *-*-tru64) OUT="tru64-alpha-cc" ;; 1.237 + *-*-[Uu]nix[Ww]are7) 1.238 +- if [ "$CC" = "gcc" ]; then 1.239 ++ if [ $GCCVER -gt 0 ]; then 1.240 + OUT="unixware-7-gcc" ; options="$options no-sse2" 1.241 + else 1.242 + OUT="unixware-7" ; options="$options no-sse2 -D__i386__" 1.243 +@@ -688,12 +693,12 @@ 1.244 + *-*-vos) 1.245 + options="$options no-threads no-shared no-asm no-dso" 1.246 + EXE=".pm" 1.247 +- OUT="vos-$CC" ;; 1.248 ++ OUT="vos-$SUFFIX" ;; 1.249 + BS2000-siemens-sysv4) OUT="BS2000-OSD" ;; 1.250 + RM*-siemens-sysv4) OUT="ReliantUNIX" ;; 1.251 + *-siemens-sysv4) OUT="SINIX" ;; 1.252 + *-hpux1*) 1.253 +- if [ $CC = "gcc" -a $GCC_BITS = "64" ]; then 1.254 ++ if [ $GCCVER -gt 0 -a $GCC_BITS = "64" ]; then 1.255 + OUT="hpux64-parisc2-gcc" 1.256 + fi 1.257 + KERNEL_BITS=`(getconf KERNEL_BITS) 2>/dev/null` 1.258 +@@ -711,8 +716,8 @@ 1.259 + fi 1.260 + OUT="hpux64-ia64-cc" 1.261 + elif [ $CPU_VERSION -ge 532 ]; then # PA-RISC 2.x CPU 1.262 +- OUT=${OUT:-"hpux-parisc2-${CC}"} 1.263 +- if [ $KERNEL_BITS -eq 64 -a "$CC" = "cc" ]; then 1.264 ++ OUT=${OUT:-"hpux-parisc2-${SUFFIX}"} 1.265 ++ if [ $KERNEL_BITS -eq 64 -a $GCCVER -eq 0 ]; then 1.266 + echo "WARNING! If you wish to build 64-bit library then you have to" 1.267 + echo " invoke './Configure hpux64-parisc2-cc' *manually*." 1.268 + if [ "$TEST" = "false" -a -t 1 ]; then 1.269 +@@ -721,19 +726,19 @@ 1.270 + fi 1.271 + fi 1.272 + elif [ $CPU_VERSION -ge 528 ]; then # PA-RISC 1.1+ CPU 1.273 +- OUT="hpux-parisc-${CC}" 1.274 ++ OUT="hpux-parisc-${SUFFIX}" 1.275 + elif [ $CPU_VERSION -ge 523 ]; then # PA-RISC 1.0 CPU 1.276 +- OUT="hpux-parisc-${CC}" 1.277 ++ OUT="hpux-parisc-${SUFFIX}" 1.278 + else # Motorola(?) CPU 1.279 +- OUT="hpux-$CC" 1.280 ++ OUT="hpux-$SUFFIX" 1.281 + fi 1.282 + options="$options -D_REENTRANT" ;; 1.283 +- *-hpux) OUT="hpux-parisc-$CC" ;; 1.284 ++ *-hpux) OUT="hpux-parisc-$SUFFIX" ;; 1.285 + *-aix) 1.286 + KERNEL_BITS=`(getconf KERNEL_BITMODE) 2>/dev/null` 1.287 + KERNEL_BITS=${KERNEL_BITS:-32} 1.288 + OBJECT_MODE=${OBJECT_MODE:-32} 1.289 +- if [ "$CC" = "gcc" ]; then 1.290 ++ if [ $GCCVER -gt 0 ]; then 1.291 + OUT="aix-gcc" 1.292 + elif [ $OBJECT_MODE -eq 64 ]; then 1.293 + echo 'Your $OBJECT_MODE was found to be set to 64' 1.294 +@@ -828,7 +833,7 @@ 1.295 + #fi 1.296 + 1.297 + if [ -z "$OUT" ]; then 1.298 +- OUT="$CC" 1.299 ++ OUT="$SUFFIX" 1.300 + fi 1.301 + 1.302 + if [ ".$PERL" = . ] ; then 1.303 +@@ -860,9 +865,9 @@ 1.304 + # compiler for the platform ... in which case we add it on 1.305 + # the end ... otherwise we leave it off 1.306 + 1.307 +-$PERL ./Configure LIST | grep "$OUT-$CC" > /dev/null 1.308 ++$PERL ./Configure LIST | grep "$OUT-$SUFFIX" > /dev/null 1.309 + if [ $? = "0" ]; then 1.310 +- OUT="$OUT-$CC" 1.311 ++ OUT="$OUT-$SUFFIX" 1.312 + fi 1.313 + 1.314 + OUT="$PREFIX$OUT" 1.315 +@@ -872,9 +877,9 @@ 1.316 + echo Configuring for $OUT 1.317 + 1.318 + if [ "$TEST" = "true" ]; then 1.319 +- echo $PERL ./Configure $OUT $options 1.320 ++ echo $PERL ./Configure $OUT --with-cc=$CC $options 1.321 + else 1.322 +- $PERL ./Configure $OUT $options 1.323 ++ $PERL ./Configure $OUT --with-cc=$CC $options 1.324 + fi 1.325 + else 1.326 + echo "This system ($OUT) is not supported. See file INSTALL for details." 1.327 +Index: crypto/objects/obj_dat.pl 1.328 +--- crypto/objects/obj_dat.pl.orig 2005-08-29 01:20:47 +0200 1.329 ++++ crypto/objects/obj_dat.pl 2007-10-17 12:13:48 +0200 1.330 +@@ -1,9 +1,5 @@ 1.331 + #!/usr/local/bin/perl 1.332 + 1.333 +-# fixes bug in floating point emulation on sparc64 when 1.334 +-# this script produces off-by-one output on sparc64 1.335 +-use integer; 1.336 +- 1.337 + sub obj_cmp 1.338 + { 1.339 + local(@a,@b,$_,$r); 1.340 +Index: util/mklink.pl 1.341 +--- util/mklink.pl.orig 2006-02-09 13:28:30 +0100 1.342 ++++ util/mklink.pl 2007-10-17 12:13:48 +0200 1.343 +@@ -15,13 +15,12 @@ 1.344 + # Apart from this, this script should be able to handle even the most 1.345 + # pathological cases. 1.346 + 1.347 +-use Cwd; 1.348 +- 1.349 + my $from = shift; 1.350 + my @files = @ARGV; 1.351 + 1.352 + my @from_path = split(/[\\\/]/, $from); 1.353 +-my $pwd = getcwd(); 1.354 ++my $pwd = `pwd`; 1.355 ++$pwd =~ s/\n$//s; 1.356 + chomp($pwd); 1.357 + my @pwd_path = split(/[\\\/]/, $pwd); 1.358 +