From c9c89b00c5cc4e087bd938d1a5271904acde66f8 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Mon, 24 Apr 2023 20:46:39 -0400 Subject: development/bas55: Updated for version 1.19, fix completion. Signed-off-by: B. Watson Signed-off-by: Willy Sudiarto Raharjo --- development/bas55/bas55.SlackBuild | 79 +++++++++++++++++++++++++++----------- development/bas55/bas55.info | 8 ++-- development/bas55/doinst.sh | 6 +++ 3 files changed, 68 insertions(+), 25 deletions(-) create mode 100644 development/bas55/doinst.sh diff --git a/development/bas55/bas55.SlackBuild b/development/bas55/bas55.SlackBuild index da31d93983..439340f003 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,17 +82,39 @@ 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} \ @@ -90,26 +124,27 @@ CXXFLAGS="$SLKCFLAGS" \ --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 6c2ae00a39..e63e7d71fe 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 0000000000..1bef502028 --- /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 -- cgit v1.2.3-65-gdbad