From bd953aa8c3d07ab46316ac6b5af07721202faf16 Mon Sep 17 00:00:00 2001 From: Patrick J Volkerding Date: Sat, 6 Nov 2021 20:24:12 +0000 Subject: Sat Nov 6 20:24:12 UTC 2021 a/kernel-generic-5.15.1-x86_64-1.txz: Upgraded. a/kernel-huge-5.15.1-x86_64-1.txz: Upgraded. a/kernel-modules-5.15.1-x86_64-1.txz: Upgraded. ap/ksh93-20211105_77827c5-x86_64-1.txz: Upgraded. Switched to ksh93u+m. Thanks to aikempshall and GazL. d/kernel-headers-5.15.1-x86-1.txz: Upgraded. k/kernel-source-5.15.1-noarch-1.txz: Upgraded. l/libxml2-2.9.12-x86_64-4.txz: Rebuilt. Patched to fix python3 unicode errors. Thanks to Daedra. l/python-pycparser-2.21-x86_64-1.txz: Upgraded. l/vte-0.66.1-x86_64-1.txz: Upgraded. tcl/tcl-8.6.12-x86_64-1.txz: Upgraded. tcl/tk-8.6.12-x86_64-1.txz: Upgraded. xap/pan-0.148-x86_64-1.txz: Upgraded. isolinux/initrd.img: Rebuilt. kernels/*: Upgraded. usb-and-pxe-installers/usbboot.img: Rebuilt. --- source/ap/ksh93/ksh93.SlackBuild | 134 ++++++++++++++++++++------------------- 1 file changed, 70 insertions(+), 64 deletions(-) (limited to 'source/ap/ksh93/ksh93.SlackBuild') diff --git a/source/ap/ksh93/ksh93.SlackBuild b/source/ap/ksh93/ksh93.SlackBuild index e63a256bf..2df90b081 100755 --- a/source/ap/ksh93/ksh93.SlackBuild +++ b/source/ap/ksh93/ksh93.SlackBuild @@ -1,7 +1,7 @@ -#!/bin/bash +#!/bin/sh # Copyright 2001 BSDi, Inc. Concord, CA, USA # Copyright 2004 Slackware Linux, Inc. Concord, CA, USA -# Copyright 2007, 2008, 2009, 2010, 2013, 2016, 2018, 2019 Patrick J. Volkerding, Sebeka, MN, USA +# Copyright 2007, 2008, 2009, 2010, 2013, 2016, 2021 Patrick J. Volkerding, Sebeka, MN, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -24,9 +24,11 @@ cd $(dirname $0) ; CWD=$(pwd) PKGNAM=ksh93 -SRCNAM=att-ast -VERSION=${VERSION:-$(echo $SRCNAM-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} -BUILD=${BUILD:-3} +VERSION=${VERSION:-$(echo ksh-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} +# Not packaged? +# Seems to conflict with locations already used by glibc. +#KSHLOCALE=2010-02-02 +BUILD=${BUILD:-1} # Automatically determine the architecture we're building on: if [ -z "$ARCH" ]; then @@ -46,38 +48,25 @@ if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then exit 0 fi -NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "} - -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="" +# ast considers this an i386 arch, so we'll humor it +# but package with our real arch label... +if [ "$ARCH" = "x86_64" ]; then + SARCH=i386-64 else - SLKCFLAGS="-O2" - LIBDIRSUFFIX="" + SARCH=i386 fi -TMP=${TMP:-/tmp} -PKG=$TMP/package-$PKGNAM +CWD=$(pwd) +TMP=/tmp/build-ksh93 +PKG=/tmp/package-ksh93 -rm -rf $PKG +rm -rf $TMP $PKG mkdir -p $TMP $PKG - cd $TMP -rm -rf $SRCNAM-$VERSION -tar xvf $CWD/$SRCNAM-$VERSION.tar.?z || exit 1 -cd $SRCNAM-$VERSION || exit 1 + +rm -rf $PKGNAM-$VERSION +tar xvf $CWD/ksh-$VERSION.tar.?z || exit 1 +cd ksh-$VERSION || exit 1 chown -R root:root . find . \ @@ -86,41 +75,52 @@ find . \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ -exec chmod 644 {} \+ -# Configure, build, and install: -export CC=clang -export CFLAGS="$SLKCFLAGS" -mkdir build -cd build -meson setup \ - --prefix=/usr \ - --libdir=lib${LIBDIRSUFFIX} \ - --libexecdir=/usr/libexec \ - --bindir=/usr/bin \ - --sbindir=/usr/sbin \ - --includedir=/usr/include \ - --datadir=/usr/share \ - --mandir=/usr/man \ - --sysconfdir=/etc \ - --localstatedir=/var \ - --buildtype=release \ - .. || exit 1 - "${NINJA:=ninja}" $NUMJOBS || exit 1 - DESTDIR=$PKG $NINJA install || exit 1 -cd .. - -# Stuff we don't ship: -rm -f $PKG/usr/bin/pty -rm -f $PKG/usr/bin/shcomp - -# Move the shell into /bin: +/bin/ksh ./bin/package +/bin/ksh ./bin/package make mamake ||: +/bin/ksh ./bin/package make mamake ||: +/bin/ksh ./bin/package make -S || exit 1 + mkdir -p $PKG/bin -mv --verbose $PKG/usr/bin/ksh $PKG/bin/ksh.new || exit 1 -rmdir $PKG/usr/bin || exit 1 +cp arch/linux.$SARCH/bin/ksh $PKG/bin/ksh.new strip --strip-unneeded $PKG/bin/ksh.new + +#cp arch/linux.$SARCH/lib/libshell.so.1.1 /usr/lib +#cp arch/linux.$SARCH/lib/libshell.a /usr/lib +#cp arch/linux.$SARCH/lib/libast.so.5.4 /usr/lib +#cp arch/linux.$SARCH/lib/libast.a /usr/lib +#cp arch/linux.$SARCH/src/cmd/ksh93/cc-g,-fpic/libshell.so.1.1 /usr/lib +#cp arch/linux.$SARCH/src/cmd/ksh93/cc-g,-fpic/libshell.a /usr/lib +#cp arch/linux.$SARCH/src/lib/libast/libast.so.5.4 /usr/lib +#cp arch/linux.$SARCH/src/cmd/ksh93/cc-g,-fpic/libast.a /usr/lib +#strip /usr/lib/libast.so.5.4 /usr/lib/libshell.so.1.1 + +mkdir -p $PKG/usr/man/man1 +sed -e "s#\.nr Z 0#\.nr Z 1#g" src/cmd/ksh93/sh.1 > \ + $PKG/usr/man/man1/ksh.1 +#mkdir -p $PKG/usr/man/man1 +#cp src/cmd/ksh93/shell.3 $PKG/usr/man/man3 +#cp src/cmd/ksh93/nval.3 $PKG/usr/man/man3 +gzip -9 $PKG/usr/man/man?/* + +## Install locale files: +#mkdir -p $PKG/usr/share +#cp -a share/lib/locale $PKG/usr/share +#chown -R root:root $PKG/usr/share +#( cd $PKG/usr/share +# find . -type d -exec chmod 755 {} \; +# find . -type f -exec chmod 644 {} \; +#) + +#cp src/cmd/ksh93/include/shell.h /usr/include + +# If anyone is actually using the ksh libraries, drop me some mail +# and explain which libs you use and what they're for. As it is, I +# don't see a compeling reason to include them, as ksh itself doesn't +# use them. +#( cd /usr/lib ; ln -sf libshell.so.1.1 libshell.so ) +#( cd /usr/lib rm -rf libast.so ; ln -sf libast.so.5.4 libast.so ) + ( cd $PKG/bin ; ln -sf ksh rksh ) -if [ -r $PKG/usr/man/man1/ksh.1 ]; then - gzip -9 $PKG/usr/man/man1/ksh.1 -fi ( cd $PKG/usr/man/man1 ; ln -sf ksh.1.gz rksh.1.gz ) mkdir -p $PKG/usr/doc/ksh93-$VERSION @@ -136,6 +136,13 @@ cp -a lib/package/LICENSES/* $PKG/usr/doc/ksh93-$VERSION/LICENSE find . -name "*.def" -exec cp -a "{}" $PKG/usr/doc/ksh93-$VERSION/LICENSE \; find . -name "*.lic" -exec cp -a "{}" $PKG/usr/doc/ksh93-$VERSION/LICENSE \; +chown -R root:root $PKG/usr/doc/ksh93-$VERSION +find $PKG/usr/doc/ksh93-$VERSION -type f -exec chmod 644 "{}" \; +find $PKG/usr/doc/ksh93-$VERSION -type d -exec chmod 755 "{}" \; + +#chmod 755 $PKG/usr/lib/libshell.so.1.1 +#chmod 755 $PKG/usr/lib/libast.so.5.4 + mkdir -p $PKG/install cat <> $PKG/install/doinst.sh # Backup the old copy if we find one, move the new one in place @@ -163,4 +170,3 @@ cat $CWD/slack-desc > $PKG/install/slack-desc cd $PKG /sbin/makepkg -l y -c n /tmp/ksh93-$VERSION-$ARCH-$BUILD.txz - -- cgit v1.2.3-79-gdb01