diff options
Diffstat (limited to 'source/ap/ksh93/ksh93.SlackBuild')
-rwxr-xr-x | source/ap/ksh93/ksh93.SlackBuild | 39 |
1 files changed, 37 insertions, 2 deletions
diff --git a/source/ap/ksh93/ksh93.SlackBuild b/source/ap/ksh93/ksh93.SlackBuild index 60f5728d7..af5614be7 100755 --- a/source/ap/ksh93/ksh93.SlackBuild +++ b/source/ap/ksh93/ksh93.SlackBuild @@ -1,7 +1,7 @@ #!/bin/sh # Copyright 2001 BSDi, Inc. Concord, CA, USA # Copyright 2004 Slackware Linux, Inc. Concord, CA, USA -# Copyright 2007, 2008, 2009, 2010, 2013, 2016, 2021, 2022 Patrick J. Volkerding, Sebeka, MN, USA +# Copyright 2007, 2008, 2009, 2010, 2013, 2016, 2021, 2022, 2023 Patrick J. Volkerding, Sebeka, MN, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -45,6 +45,26 @@ if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then exit 0 fi +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "s390" ]; then + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +elif [ "$ARCH" = "armv7hl" ]; then + SLKCFLAGS="-O3 -march=armv7-a -mfpu=vfpv3-d16" + LIBDIRSUFFIX="" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + TMP=${TMP:-/tmp} PKG=$TMP/package-$PKGNAM @@ -66,12 +86,27 @@ find . \ # ast uses its own architecture labels SARCH=$(bin/package host type) || exit +CCFLAGS="$SLKCFLAGS" \ bin/package make || exit mkdir -p $PKG/bin $PKG/usr/bin cp arch/$SARCH/bin/ksh $PKG/bin/ksh.new || exit cp arch/$SARCH/bin/shcomp $PKG/usr/bin/ || exit +# Install ksh93 extra functions: +mkdir -p $PKG/usr/share/ksh93-functions +cp -a arch/$SARCH/fun/* $PKG/usr/share/ksh93-functions +chown root:root $PKG/usr/share/ksh93-functions/* +chmod 755 $PKG/usr/share/ksh93-functions/* + +# Add a profile.d script to enable the above functions upon login. +# This will not be activated by default - to use it, make the script executable +# (and it will stay that way through future upgrades): +mkdir -p $PKG/etc/profile.d +cp -a $CWD/ksh93-functions.sh $PKG/etc/profile.d/ksh93-functions.sh.new +chown root:root $PKG/etc/profile.d/ksh93-functions.sh.new +chmod 644 $PKG/etc/profile.d/ksh93-functions.sh.new + # this may be re-enabled and updated someday when ksh 93u+m # regains the ability to build and use dynamic libraries... #cp arch/$SARCH/lib/libshell.so.1.1 /usr/lib @@ -123,7 +158,7 @@ mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION cp -a COMPATIBILITY* DESIGN* OBSOLETE* README* RELEASE* TYPES* \ $PKG/usr/doc/$PKGNAM-$VERSION ) -cp -a ANNOUNCE* CHANGELOG* CONTRIBUTING* LICENSE* NEWS* README* \ +cp -a ANNOUNCE* CHANGELOG* CONTRIBUTING* COPYRIGHT* LICENSE* NEWS* README* \ $PKG/usr/doc/$PKGNAM-$VERSION mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION/LICENSES cp -a lib/package/LICENSES/* $PKG/usr/doc/$PKGNAM-$VERSION/LICENSES |