Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • npl/system/openssl/openssl.SlackBuild.orig

    • Property mode changed from 100644 to 100755
    ra1525ed rc5c522c  
    1 #!/bin/bash
     1#!/bin/sh
    22
    33# Copyright 2000 BSDi, Inc. Concord, CA, USA
    44# Copyright 2001, 2002 Slackware Linux, Inc.  Concord, CA, USA
    5 # Copyright 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2018  Patrick J. Volkerding, Sebeka, MN, USA
     5# Copyright 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014  Patrick J. Volkerding, Sebeka, MN, USA
    66# All rights reserved.
    77#
     
    2323#  ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    2424
     25
    2526# Set initial variables:
    26 cd $(dirname $0) ; CWD=$(pwd)
     27CWD=$(pwd)
    2728TMP=${TMP:-/tmp}
    2829
    29 PKGNAM=openssl
    3030VERSION=${VERSION:-$(echo openssl-*.tar.gz | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
    31 BUILD=${BUILD:-2}
     31BUILD=${BUILD:-1}
    3232
    3333# Automatically determine the architecture we're building on:
     
    4646NAME2=openssl-solibs-$VERSION-$ARCH-$BUILD
    4747
    48 # If the variable PRINT_PACKAGE_NAME is set, then this script will report what
    49 # the name of the created package would be, and then exit. This information
    50 # could be useful to other scripts.
    51 if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
    52   echo "${NAME1}.txz"
    53   echo "${NAME2}.txz"
    54   exit 0
    55 fi
    56 
    5748# Parallel build doesn't link properly.
    5849#NUMJOBS=${NUMJOBS:--j6}
     50NUMJOBS=-j1
    5951
    6052# So that ls has the right field counts for parsing...
     
    7163
    7264# Use .so.1, not .so.1.0.0:
    73 sed -i "s/soname=\$\$SHLIB\$\$SHLIB_SOVER\$\$SHLIB_SUFFIX/soname=\$\$SHLIB.1/g" Makefile.shared
    74 
     65zcat $CWD/openssl.soname.diff.gz | patch -p1 --backup --verbose --suffix=.orig || exit 1
    7566if [ "$ARCH" = "i586" ]; then
    7667  # Build with -march=i586 -mtune=i686:
    77   sed -i "/linux-elf/s/fomit-frame-pointer/fomit-frame-pointer -march=i586 -mtune=i686/g" Configure
    78   LIBDIRSUFFIX=""
    79 elif [ "$ARCH" = "i686" ]; then
    80   # Build with -march=i686 -mtune=i686:
    81   sed -i "/linux-elf/s/fomit-frame-pointer/fomit-frame-pointer -march=i686 -mtune=i686/g" Configure
     68  zcat $CWD/openssl.optsx86.diff.gz | patch -p1 --backup --verbose --suffix=.orig || exit 1
    8269  LIBDIRSUFFIX=""
    8370elif [ "$ARCH" = "x86_64" ]; then
     
    9077# what they were compiled against, whether or not the ABI has changed.
    9178#
    92 # So, we will use the OPENSSL_VERSION_NUMBER from openssl-1.0.2e unless ABI
     79# So, we will use the OPENSSL_VERSION_NUMBER from openssl-1.0.1c unless ABI
    9380# breakage forces it to change.  Yes, we're finally using this old trick.  :)
    94 sed -i "s/#define OPENSSL_VERSION_NUMBER.*/\/* Use 0x1000205fL (1.0.2e) below to avoid pointlessly breaking the ABI *\/\n#define OPENSSL_VERSION_NUMBER 0x1000205fL/g" crypto/opensslv.h || exit 1
     81sed -i "s/#define OPENSSL_VERSION_NUMBER.*/\/* Use 0x1000103fL (1.0.1c) below to avoid pointlessly breaking the ABI *\/\n#define OPENSSL_VERSION_NUMBER 0x1000103fL/g" crypto/opensslv.h || exit 1
    9582
    9683chown -R root:root .
     
    11198# These are the known patent issues with OpenSSL:
    11299# name   #         expires
    113 # MDC-2: 4,908,861  2007-03-13, not included.
     100# MDC-2: 4,908,861  2007-03-13, included.  :-)
    114101# IDEA:  5,214,703  2010-05-25, not included.
    115102# RC5:   5,724,428  2015-03-03, not included.
    116 #
    117 # Although all of the above are expired, it's still probably
    118 # not a good idea to include them as there are better
    119 # algorithms to use.
    120103
    121104./config \
    122105 --prefix=/usr \
    123106 --openssldir=/etc/ssl \
    124  no-mdc2 \
    125107 no-idea \
    126108 no-rc5 \
    127109 no-sse2 \
    128  no-ssl2 \
    129  no-weak-ssl-ciphers \
    130110 shared
    131111
    132 make $NUMJOBS depend || make depend || exit 1
    133 
    134 make $NUMJOBS || make || exit 1
    135 
    136 make test -j1 || exit 1
     112make $NUMJOBS depend || make -j1  depend || exit 1
     113
     114make $NUMJOBS || make -j 1 || exit 1
    137115
    138116make install INSTALL_PREFIX=$PKG1 || exit 1
     
    166144
    167145mv $PKG1/etc/ssl/man $PKG1/usr
    168 # Fix manpage name collisions, and relink anything that linked to the old name:
    169 ( cd $PKG1/usr/man/man1
    170   mv passwd.1 ssl_passwd.1
    171   for file in *.1 ; do
    172     if [ -L $file ]; then
    173       if [ "$(readlink $file)" = "passwd.1" ]; then
    174         rm -f $file
    175         ln -sf ssl_passwd.1 $file
    176       fi
    177     fi
    178   done )
    179 ( cd $PKG1/usr/man/man3
    180   mv rand.3 ssl_rand.3
    181   for file in *.3 ; do
    182     if [ -L $file ]; then
    183       if [ "$(readlink $file)" = "rand.3" ]; then
    184         rm -f $file
    185         ln -sf ssl_rand.3 $file
    186       fi
    187     fi
    188   done )
    189 ( cd $PKG1/usr/man/man3
    190   mv err.3 ssl_err.3
    191   for file in *.3 ; do
    192     if [ -L $file ]; then
    193       if [ "$(readlink $file)" = "err.3" ]; then
    194         rm -f $file
    195         ln -sf ssl_err.3 $file
    196       fi
    197     fi
    198   done )
    199 
     146( cd $PKG1/usr/man/man1 ; mv passwd.1 ssl_passwd.1 )
     147( cd $PKG1/usr/man/man3 ; mv rand.3 ssl_rand.3 )
     148( cd $PKG1/usr/man/man3 ; mv err.3 ssl_err.3 )
    200149# Compress and symlink the man pages:
    201150if [ -d $PKG1/usr/man ]; then
Note: See TracChangeset for help on using the changeset viewer.