summaryrefslogtreecommitdiffstats
path: root/development/sdcc/sdcc.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'development/sdcc/sdcc.SlackBuild')
-rw-r--r--development/sdcc/sdcc.SlackBuild34
1 files changed, 14 insertions, 20 deletions
diff --git a/development/sdcc/sdcc.SlackBuild b/development/sdcc/sdcc.SlackBuild
index 7733f67f9b..1e02cb8bcc 100644
--- a/development/sdcc/sdcc.SlackBuild
+++ b/development/sdcc/sdcc.SlackBuild
@@ -2,7 +2,7 @@
# Slackware build script for sdcc
-# Copyright 2014-2021 Kyle Guinn <elyk03@gmail.com>
+# Copyright 2014-2023 Kyle Guinn <elyk03@gmail.com>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -25,7 +25,7 @@
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=sdcc
-VERSION=${VERSION:-4.1.0}
+VERSION=${VERSION:-4.3.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -38,24 +38,18 @@ 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
fi
TMP=${TMP:-/tmp/SBo}
-PKG=$TMP/package-$PRGNAM-$VERSION
+PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
DOCS="COPYING ChangeLog"
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "i586" ]; then
+if [ "$ARCH" = "i586" ]; then
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
@@ -74,9 +68,9 @@ set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf $PRGNAM
+rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-src-$VERSION.tar.bz2
-cd $PRGNAM
+cd $PRGNAM-$VERSION
chown -R root:root .
chmod -R u+w,go-w,a+rX-st .
@@ -88,10 +82,7 @@ chmod -x device/lib/isinf.c device/lib/isnan.c
# up afterwards. Delete some byproducts that they missed.
patch -p1 < $CWD/patches/source-tree.patch
-# Avoid creating empty man directories.
-sed -i '/(man1dir)/d' sim/ucsim/doc/Makefile.in
-
-# Requires lyx, latex2html, possibly others. Untested.
+# Requires lyx and latex2html.
if [ "${ENABLE_DOC:-no}" != 'no' ]; then
enable_doc='--enable-doc'
fi
@@ -107,12 +98,12 @@ ARCH= \
EARCH= \
./configure \
--prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX}/$PRGNAM \
+ --libdir=\${exec_prefix}/lib${LIBDIRSUFFIX}/$PRGNAM \
--sysconfdir=/etc \
--localstatedir=/var \
- --mandir=/usr/man \
- --infodir=/usr/info \
- --docdir=/usr/doc/$PRGNAM-$VERSION \
+ --mandir=\${prefix}/man \
+ --infodir=\${prefix}/info \
+ --docdir=\${prefix}/doc/$PRGNAM-$VERSION \
--enable-libgc \
$enable_doc \
$enable_pic \
@@ -126,8 +117,11 @@ make install DESTDIR=$PKG
find $PKG -exec 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 {} +
+
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a sdas/doc $PKG/usr/doc/$PRGNAM-$VERSION/sdas
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install