summaryrefslogtreecommitdiffstats
path: root/network/elinks/elinks.SlackBuild
diff options
context:
space:
mode:
author Dave Woodfall <dave@slackbuilds.org>2022-04-24 21:14:31 +0100
committer Willy Sudiarto Raharjo <willysr@slackbuilds.org>2022-04-30 13:51:48 +0700
commit4b6c4b9509a3a2f01a039fb9010603609e58198f (patch)
tree680683c67d4e4df957946589afeb663b22610c5d /network/elinks/elinks.SlackBuild
parent9fdb3f4dd763580a9d261871a1eb1bf3bc670f11 (diff)
downloadslackbuilds-4b6c4b9509a3a2f01a039fb9010603609e58198f.tar.gz
slackbuilds-4b6c4b9509a3a2f01a039fb9010603609e58198f.tar.xz
network/elinks: Add Patches: disable suspend, -no-connect
2 contributed patches. VERSION renumbering with commit hash. Not likely to change unless felinks fixes are back-ported though. Change download URL. Extra notes in README. Tidy up slackbuild a bit. Move stuff. Signed-off-by: Dave Woodfall <dave@slackbuilds.org> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'network/elinks/elinks.SlackBuild')
-rw-r--r--network/elinks/elinks.SlackBuild65
1 files changed, 36 insertions, 29 deletions
diff --git a/network/elinks/elinks.SlackBuild b/network/elinks/elinks.SlackBuild
index 71a4402a75..86232118d4 100644
--- a/network/elinks/elinks.SlackBuild
+++ b/network/elinks/elinks.SlackBuild
@@ -24,8 +24,8 @@
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=elinks
-VERSION=${VERSION:-git20170723}
-COMMIT=f86be659
+VERSION=${VERSION:-20170723_f86be65}
+COMMIT=${VERSION#*_}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -38,9 +38,6 @@ if [ -z "$ARCH" ]; then
esac
fi
-# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
-# the name of the created package would be, and then exit. This information
-# could be useful to other scripts.
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
exit 0
@@ -50,45 +47,53 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-# Added -fno-strict-aliasing -Wno-pointer-sign for a much more peaceful build
if [ "$ARCH" = "i586" ]; then
- SLKCFLAGS="-O2 -march=i586 -mtune=i686 -fno-strict-aliasing -Wno-pointer-sign"
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
- SLKCFLAGS="-O2 -march=i686 -mtune=i686 -fno-strict-aliasing -Wno-pointer-sign"
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
- SLKCFLAGS="-O2 -fPIC -fno-strict-aliasing -Wno-pointer-sign"
- SLKLDFLAGS="-m64"
+ SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
else
SLKCFLAGS="-O2"
LIBDIRSUFFIX=""
fi
+# A much more peaceful build
+SLKCFLAGS="$SLKCFLAGS -fno-strict-aliasing -Wno-pointer-sign"
+
set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$COMMIT
-tar xvf $CWD/$PRGNAM-$COMMIT.tar.?z
+tar xvf $CWD/$COMMIT.tar.?z
cd $PRGNAM-$COMMIT
-# fix documentation generation on 15.0.
-# xmlto needs --skip-validation or it fails.
-sed -i 's/$(XMLTO) -o/$(XMLTO) --skip-validation -o/' doc/Makefile
chown -R root:root .
find -L . \
- \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
+ \( -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 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+
+# fix documentation generation on 15.0.
+# xmlto needs --skip-validation or it fails.
+sed -i 's/$(XMLTO) -o/$(XMLTO) --skip-validation -o/' doc/Makefile
-for patch in $CWD/patches/*
-do
+for patch in $CWD/patches/*; do
patch --verbose -p1 < $patch
done
+# patches for no suspend (^Z) and -no-connect by default
+# courtesy of B. Watson.
+[ "${NO_SUSPEND:-no}" = "yes" ] &&
+ patch --verbose -p1 -i $CWD/option-patches/0010-*
+[ "${NO_CONNECT:-no}" = "yes" ] &&
+ patch --verbose -p1 -i $CWD/option-patches/0020-*
+
# System
[ "${FASTMEM:-no}" = "yes" ] && fastmem="--enable-fastmem"
[ "${CGI:-no}" = "yes" ] && cgi="--enable-cgi"
@@ -125,8 +130,11 @@ done
[ "${NNTP:-no}" = "yes" ] && nntp="--enable-nntp"
[ "${SMB:-no}" = "yes" ] && smb="--enable-smb"
+# quiet some more warnings
+sed "s,^aclocal,& -Wnone," -i autogen.sh
+
./autogen.sh
-CFLAGS="$SLKCFLAGS -L/usr/lib64" \
+CFLAGS="$SLKCFLAGS -L/usr/lib$LIBDIRSUFFIX" \
./configure \
--prefix=/usr \
--libdir=/usr/lib$LIBDIRSUFFIX \
@@ -135,6 +143,7 @@ CFLAGS="$SLKCFLAGS -L/usr/lib64" \
--mandir=/usr/man \
--infodir=/usr/info \
--docdir=/usr/doc/$PRGNAM-$VERSION \
+ --htmldir=/usr/doc/$PRGNAM-$VERSION/html \
$fastmem \
$cgi \
$combining \
@@ -164,16 +173,12 @@ CFLAGS="$SLKCFLAGS -L/usr/lib64" \
--build=$ARCH-slackware-linux
make
+# html doesn't install so we copy it later
+make -C doc html
make install DESTDIR=$PKG
-cd doc
-make html
-cd ..
-
-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
-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
+strip --strip-unneeded $PKG/usr/bin/$PRGNAM
+gzip -9 $PKG/usr/man/man?/*.?
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
@@ -182,7 +187,9 @@ cp -a \
doc/*txt doc/manual.html-chunked \
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
-rm -f $PKG/usr/doc/$PRGNAM-$VERSION/manual.html-chunked/manual.proc
+
+# don't need these
+find $PKG \( -name ".gitignore" -o -name "manual.proc" \) -delete
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc