summaryrefslogtreecommitdiff
path: root/system
diff options
context:
space:
mode:
authorpomfland <pomfland@tfwno.gf>2018-10-03 13:33:54 +0100
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2018-10-06 07:25:18 +0700
commit8da67da718c1871b1f127c9fb300039ee4cfe1b2 (patch)
tree74d2d738796dc06c3e63c4e770b1c89a9c946b26 /system
parent0bd8f0c5e72656ca92108db1eccd38b98304091f (diff)
downloadslackbuilds-8da67da718c1871b1f127c9fb300039ee4cfe1b2.tar.gz
system/heirloom-ed: Updated with extra build options.
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
Diffstat (limited to 'system')
-rw-r--r--system/heirloom-ed/README12
-rw-r--r--system/heirloom-ed/heirloom-ed.SlackBuild55
2 files changed, 45 insertions, 22 deletions
diff --git a/system/heirloom-ed/README b/system/heirloom-ed/README
index 014504db06..1bd8b5b1df 100644
--- a/system/heirloom-ed/README
+++ b/system/heirloom-ed/README
@@ -2,7 +2,15 @@ heirloom-ed is a version of the standard text editor derived from
the original UNIX source code released by Caldera and Sun and
collected under The Heirloom Toolchest project's umbrella.
-This SlackBuild will install ed under name heirloom-ed in
-order to neither conflict with GNU ed as supplied by
+This SlackBuild will by default install ed under name heirloom-ed
+in order to neither conflict with GNU ed as supplied by
Slackware nor use PATH overrides created by other heirloom
SlackBuilds.
+
+If you pass ALLEDS=yes to the script, additional variants of ed
+will be built correspoding to various Unices. They will be
+installed under names such as heirloom-ed_sus.
+
+If you pass STATIC=yes, the resulting binaries will not be
+dynamically linked (not that there's much to link against beyond
+libc).
diff --git a/system/heirloom-ed/heirloom-ed.SlackBuild b/system/heirloom-ed/heirloom-ed.SlackBuild
index 26f1ba4e4e..ee536cb3d9 100644
--- a/system/heirloom-ed/heirloom-ed.SlackBuild
+++ b/system/heirloom-ed/heirloom-ed.SlackBuild
@@ -1,7 +1,7 @@
#!/bin/sh
# Slackware build script for heirloom-ed
-# $Id: heirloom-ed.SlackBuild,v 1.1 2018/08/01 15:41:11 pomf Exp pomf $
+# $Id: heirloom-ed.SlackBuild,v 1.4 2018/10/02 19:09:22 pomf Exp pomf $
# Copyright 2018 pomfland
# All rights reserved.
@@ -25,16 +25,16 @@
PRGNAM=heirloom-ed
VERSION=${VERSION:-070715}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
_PRGNAM=heirloom
if [ -z "$ARCH" ]; then
-case "$( uname -m )" in
+ case "$( uname -m )" in
i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
- *) ARCH=$( uname -m ) ;;
-esac
+ *) ARCH=$( uname -m ) ;;
+ esac
fi
CWD=$(pwd)
@@ -43,17 +43,17 @@ PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i586" ]; then
-SLKCFLAGS="-O2 -march=i586 -mtune=i686"
-LIBDIRSUFFIX=""
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
-SLKCFLAGS="-O2 -march=i686 -mtune=i686"
-LIBDIRSUFFIX=""
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
-SLKCFLAGS="-O2 -fPIC"
-LIBDIRSUFFIX="64"
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
else
-SLKCFLAGS="-O2"
-LIBDIRSUFFIX=""
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
fi
set -e
@@ -66,30 +66,45 @@ tar xvf $CWD/$_PRGNAM-$VERSION.tar.bz2
cd $_PRGNAM-$VERSION
chown -R root:root .
find -L . \
-\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
--o -perm 511 \) -exec chmod 755 {} \; -o \
-\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
--o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
+ -o -perm 511 \) -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+
+if [ "$STATIC" = "yes" ]; then
+ LDFLAGS="-static"
+else
+ LDFLAGS=""
+fi
make SUBDIRS="libcommon libuxre ed" makefiles
make -C libcommon
make -C libuxre
-make -C ed ed
+if [ "$ALLEDS" = "yes" ]; then
+ make -C ed LDFLAGS=$LDFLAGS all
+else
+ make -C ed LDFLAGS=$LDFLAGS ed
+fi
# custom installation in order to avoid annoyances
mkdir -p $PKG/usr/man/man1
cp ed/ed.1 $PKG/usr/man/man1/heirloom-ed.1
mkdir -p $PKG/usr/bin
cp ed/ed $PKG/usr/bin/heirloom-ed
+if [ "$ALLEDS" = "yes" ]; then
+ cp ed/ed_s42 $PKG/usr/bin/heirloom-ed_s42
+ cp ed/ed_su3 $PKG/usr/bin/heirloom-ed_su3
+ cp ed/ed_sus $PKG/usr/bin/heirloom-ed_sus
+fi
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
-| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
find $PKG/usr/man -type f -exec gzip -9 {} \;
for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a README $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a README LICENSE/ $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install