Ignore:
Timestamp:
05/17/18 15:00:08 (7 years ago)
Author:
Edwin Eefting <edwin@datux.nl>
Branches:
master, perl-5.22
Children:
b4abfab
Parents:
94ad01e (diff), f690de8 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'gcc483'

File:
1 edited

Legend:

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

    • Property mode changed from 100755 to 100644
    r94ad01e ra39aa4c  
    1 #!/bin/sh
     1#!/bin/bash
    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  Patrick J. Volkerding, Sebeka, MN, USA
     5# Copyright 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2018  Patrick J. Volkerding, Sebeka, MN, USA
    66# All rights reserved.
    77#
     
    2323#  ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    2424
    25 
    2625# Set initial variables:
    27 CWD=$(pwd)
     26cd $(dirname $0) ; CWD=$(pwd)
    2827TMP=${TMP:-/tmp}
    2928
     29PKGNAM=openssl
    3030VERSION=${VERSION:-$(echo openssl-*.tar.gz | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
    31 BUILD=${BUILD:-1}
     31BUILD=${BUILD:-2}
    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.
     51if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
     52  echo "${NAME1}.txz"
     53  echo "${NAME2}.txz"
     54  exit 0
     55fi
     56
    4857# Parallel build doesn't link properly.
    4958#NUMJOBS=${NUMJOBS:--j6}
    50 NUMJOBS=-j1
    5159
    5260# So that ls has the right field counts for parsing...
     
    6371
    6472# Use .so.1, not .so.1.0.0:
    65 zcat $CWD/openssl.soname.diff.gz | patch -p1 --backup --verbose --suffix=.orig || exit 1
     73sed -i "s/soname=\$\$SHLIB\$\$SHLIB_SOVER\$\$SHLIB_SUFFIX/soname=\$\$SHLIB.1/g" Makefile.shared
     74
    6675if [ "$ARCH" = "i586" ]; then
    6776  # Build with -march=i586 -mtune=i686:
    68   zcat $CWD/openssl.optsx86.diff.gz | patch -p1 --backup --verbose --suffix=.orig || exit 1
     77  sed -i "/linux-elf/s/fomit-frame-pointer/fomit-frame-pointer -march=i586 -mtune=i686/g" Configure
     78  LIBDIRSUFFIX=""
     79elif [ "$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
    6982  LIBDIRSUFFIX=""
    7083elif [ "$ARCH" = "x86_64" ]; then
     
    7790# what they were compiled against, whether or not the ABI has changed.
    7891#
    79 # So, we will use the OPENSSL_VERSION_NUMBER from openssl-1.0.1c unless ABI
     92# So, we will use the OPENSSL_VERSION_NUMBER from openssl-1.0.2e unless ABI
    8093# breakage forces it to change.  Yes, we're finally using this old trick.  :)
    81 sed -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
     94sed -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
    8295
    8396chown -R root:root .
     
    98111# These are the known patent issues with OpenSSL:
    99112# name   #         expires
    100 # MDC-2: 4,908,861  2007-03-13, included.  :-)
     113# MDC-2: 4,908,861  2007-03-13, not included.
    101114# IDEA:  5,214,703  2010-05-25, not included.
    102115# 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.
    103120
    104121./config \
    105122 --prefix=/usr \
    106123 --openssldir=/etc/ssl \
     124 no-mdc2 \
    107125 no-idea \
    108126 no-rc5 \
    109127 no-sse2 \
     128 no-ssl2 \
     129 no-weak-ssl-ciphers \
    110130 shared
    111131
    112 make $NUMJOBS depend || make -j1  depend || exit 1
    113 
    114 make $NUMJOBS || make -j 1 || exit 1
     132make $NUMJOBS depend || make depend || exit 1
     133
     134make $NUMJOBS || make || exit 1
     135
     136make test -j1 || exit 1
    115137
    116138make install INSTALL_PREFIX=$PKG1 || exit 1
     
    144166
    145167mv $PKG1/etc/ssl/man $PKG1/usr
    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 )
     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
    149200# Compress and symlink the man pages:
    150201if [ -d $PKG1/usr/man ]; then
Note: See TracChangeset for help on using the changeset viewer.