aboutsummaryrefslogtreecommitdiff
path: root/development/tcc/tcc.SlackBuild
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2023-08-16 03:00:46 -0400
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2023-08-19 09:15:33 +0700
commiteb1a9b0c9cf3703c88eb76a76d663f75a8c55995 (patch)
tree799f9d9fc59e3b4a182708e553c24cd69bfe58a6 /development/tcc/tcc.SlackBuild
parent04942805df0afd3d82fbe7d1794e94b1d06f451d (diff)
development/tcc: Update for v0.9.27+20230811_d1c1077, new maint.
Signed-off-by: B. Watson <urchlay@slackware.uk> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'development/tcc/tcc.SlackBuild')
-rw-r--r--development/tcc/tcc.SlackBuild50
1 files changed, 23 insertions, 27 deletions
diff --git a/development/tcc/tcc.SlackBuild b/development/tcc/tcc.SlackBuild
index ba4a94dcd11ad..0faa04ae868dc 100644
--- a/development/tcc/tcc.SlackBuild
+++ b/development/tcc/tcc.SlackBuild
@@ -25,6 +25,14 @@
#
# Markus Reichelt, slackbuilds@mareichelt.de, 0xCCEEF115
# in memoriam of Georg Ohler
+# Now maintained by B. Watson (urchlay@slackware.uk).
+
+# 20230815 bkw:
+# - take over maintenance.
+# - update for 0.9.27+20230811_d1c1077.
+# - make CROSS=yes the default.
+# - add TODO and USES to the doc dir.
+# - mention github repo in README.
# 20230627 bkw: Modified by SlackBuilds.org, BUILD=2:
# - add doinst.sh and douninst.sh to manage /usr/info/dir.
@@ -32,8 +40,8 @@
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=tcc
-VERSION=${VERSION:-20220221_308d8d1}
-BUILD=${BUILD:-2}
+VERSION=${VERSION:-0.9.27+20230811_d1c1077}
+BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -45,9 +53,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
@@ -77,21 +82,16 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-$VERSION.tar.?z*
+tar xvf $CWD/$PRGNAM-$VERSION.tar.xz
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 {} \;
-
-if [ "$CROSS" = "yes" ]; then
- OPT="--enable-cross"
- else OPT=""
-fi
+find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} + -o \
+ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} +
+
+[ "${CROSS:-yes}" = "yes" ] && CROSSOPT="--enable-cross"
-mkdir -p $PKG/usr/bin $PKG/usr/man/man1 $PKG/usr/doc $PKG/usr/include
+DOC=/usr/doc/$PRGNAM-$VERSION
+PKGDOC=$PKG/$DOC
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
@@ -99,23 +99,19 @@ CXXFLAGS="$SLKCFLAGS" \
--prefix=/usr \
--sharedir=/usr \
--libdir=/usr/lib$LIBDIRSUFFIX \
- --docdir=/usr/doc/$PRGNAM-$VERSION \
- $OPT
+ --docdir=$DOC \
+ $CROSSOPT
make
make -j1 test
make install DESTDIR=$PKG
-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 $PKG/usr/bin/*
+gzip -9 $PKG/usr/man/man1/*
gzip -9 $PKG/usr/info/*.info
-cp -a README* Changelog* COPYING RELICENSING examples/ $PKG/usr/doc/$PRGNAM-$VERSION
-cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+cp -a README* Changelog* COPYING RELICENSING TODO USES examples/ $PKGDOC
+cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc