aboutsummaryrefslogtreecommitdiff
path: root/development/bas55
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2023-04-24 20:46:39 -0400
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2023-04-29 18:11:54 +0700
commitc9c89b00c5cc4e087bd938d1a5271904acde66f8 (patch)
treec1b88f67d7956efebc90d6cf2d82099a856cbf2a /development/bas55
parent13ebbb8cb7fb78f171adea8fedb11acc7e86c054 (diff)
development/bas55: Updated for version 1.19, fix completion.
Signed-off-by: B. Watson <urchlay@slackware.uk> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'development/bas55')
-rw-r--r--development/bas55/bas55.SlackBuild79
-rw-r--r--development/bas55/bas55.info8
-rw-r--r--development/bas55/doinst.sh6
3 files changed, 68 insertions, 25 deletions
diff --git a/development/bas55/bas55.SlackBuild b/development/bas55/bas55.SlackBuild
index da31d93983615..439340f0032a1 100644
--- a/development/bas55/bas55.SlackBuild
+++ b/development/bas55/bas55.SlackBuild
@@ -22,14 +22,29 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 20230424 bkw: modified by B. Watson, at the maintainer's request. There is
+# an issue with modern libedit that I've temporarily fixed by including an
+# older static libedit in this build. libedit upstream has already fixed the
+# issue and it will be in their next release, but for Slackware 15.0 we won't
+# ever get an updated libedit unless it has an actual security issue.
+# Also:
+# - updated for v1.19.
+# - removed useless INSTALL from package.
+# - add doinst and douninst to rebuild /usr/info/dir.
+# - simplify the build commands a bit.
+# - fix the bas55.info file so it works correctly.
+
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=bas55
-VERSION=${VERSION:-1.18}
+VERSION=${VERSION:-1.19}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
+LIBVER=${LIBVER:-20170329-3.1}
+LIBSRC=libedit-$LIBVER
+
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i586 ;;
@@ -38,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
@@ -70,46 +82,69 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+mkdir $PRGNAM-$VERSION
cd $PRGNAM-$VERSION
+TOPDIR="$(pwd)"
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+tar xvf $CWD/$LIBSRC.tar.gz
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 {} \;
+find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
+ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
-CFLAGS="$SLKCFLAGS -w -Wl,--allow-multiple-definition" \
+# 20230424 bkw: Use an old libedit. Tried 20191231-3.1, it's still too new.
+# Statically linked, and not included in the final package.
+cd $LIBSRC
+CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
+ --mandir=/usr/man \
+ --enable-static \
+ --disable-shared \
+ --build=$ARCH-slackware-linux
+make V=1
+
+cd $TOPDIR/$PRGNAM-$VERSION
+
+# 20230424 bkw: bas55.info is a bit off: when you run "info" and choose
+# bas55 from the menu, it goes to the "Invoking bas55" node. Fix it so
+# it goes to the top (menu) node for bas55 instead.
+sed -i '/^\* bas55: (/s,).*,). ECMA-55 Minimal BASIC System.,' doc/bas55.info
+
+# 20230424 bkw: --with-ncurses is needed for the static libedit.
+CFLAGS="$SLKCFLAGS -I$TOPDIR/$LIBSRC/src/editline" \
+LDFLAGS="-L$TOPDIR/$LIBSRC/src/.libs/" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
--sysconfdir=/etc \
--localstatedir=/var \
--mandir=/usr/man \
--infodir=/usr/info \
--docdir=/usr/doc/$PRGNAM-$VERSION \
--build=$ARCH-slackware-linux \
- --with-libedit
-
-make
-make install DESTDIR=$PKG
+ --with-libedit \
+ --with-ncurses
-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
+make V=1
+make install-strip DESTDIR=$PKG
-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
+gzip -9 $PKG/usr/man/man*/*
rm -f $PKG/usr/info/dir
gzip -9 $PKG/usr/info/*.info*
-mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a AUTHORS COPYING NEWS README INSTALL $PKG/usr/doc/$PRGNAM-$VERSION
-cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION
+mkdir -p $PKGDOC
+cp -a AUTHORS COPYING NEWS README $PKGDOC
+cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild
+# 20230424 bkw: yes, the doinst.sh and douninst.sh are the same.
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
+cat $CWD/doinst.sh > $PKG/install/douninst.sh
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/development/bas55/bas55.info b/development/bas55/bas55.info
index 6c2ae00a39c11..e63e7d71fef65 100644
--- a/development/bas55/bas55.info
+++ b/development/bas55/bas55.info
@@ -1,8 +1,10 @@
PRGNAM="bas55"
-VERSION="1.18"
+VERSION="1.19"
HOMEPAGE="https://jorgicor.niobe.org/bas55"
-DOWNLOAD="https://jorgicor.niobe.org/bas55/bas55-1.18.tar.gz"
-MD5SUM="ab17610a5686c1215f043d9e32673f5a"
+DOWNLOAD="https://jorgicor.niobe.org/bas55/bas55-1.19.tar.gz \
+ https://thrysoee.dk/editline/libedit-20170329-3.1.tar.gz"
+MD5SUM="083f7f13b9b436287e0c909421852338 \
+ c57a0690e62ef523c083598730272cfd"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
diff --git a/development/bas55/doinst.sh b/development/bas55/doinst.sh
new file mode 100644
index 0000000000000..1bef5020286ea
--- /dev/null
+++ b/development/bas55/doinst.sh
@@ -0,0 +1,6 @@
+if [ -x /usr/bin/install-info -a -d usr/info ]; then
+ ( cd usr/info
+ rm -f dir
+ for i in *.info*; do /usr/bin/install-info $i dir 2>/dev/null; done
+ )
+fi