diff options
Diffstat (limited to 'development/nchexedit/nchexedit.SlackBuild')
-rw-r--r-- | development/nchexedit/nchexedit.SlackBuild | 36 |
1 files changed, 26 insertions, 10 deletions
diff --git a/development/nchexedit/nchexedit.SlackBuild b/development/nchexedit/nchexedit.SlackBuild index 1e0c6b13b7..199b37f875 100644 --- a/development/nchexedit/nchexedit.SlackBuild +++ b/development/nchexedit/nchexedit.SlackBuild @@ -1,8 +1,8 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for nchexedit -# Written by B. Watson (yalhcru@gmail.com) +# Written by B. Watson (urchlay@slackware.uk) # Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. @@ -13,10 +13,15 @@ # We're using most of Debian's patches, the _5 in VERSION is their # patchlevel. +# 20210905 bkw: update for v0.9.7_7.1, fix -current segfault issue. + +cd $(dirname $0) ; CWD=$(pwd) + PRGNAM=nchexedit -VERSION=${VERSION:-0.9.7_5} -BUILD=${BUILD:-2} +VERSION=${VERSION:-0.9.7_7.1} +BUILD=${BUILD:-1} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} SRCNAM=hexedit SRCVER="$( echo $VERSION | cut -d_ -f1 )" @@ -31,7 +36,11 @@ if [ -z "$ARCH" ]; then esac fi -CWD=$(pwd) +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" + exit 0 +fi + TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} @@ -71,7 +80,8 @@ rm -f debian/patches/fix_hexedit_references.patch \ debian/patches/info_dir_section.patch \ debian/patches/rename_binaries.patch \ debian/patches/autoconf_2.69.patch \ - debian/patches/fix_its_typo.patch + debian/patches/fix_its_typo.patch \ + debian/patches/fix_spelling_errors.patch chown -R root:root . find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \ @@ -80,7 +90,7 @@ find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \ # Apply the patches we didn't rm. for i in $( cat debian/patches/series ); do P=debian/patches/$i - [ -e $P ] && patch -p1 < $P + [ -e $P ] && echo "=== $P" && patch -p1 < $P done # Reworked version of Debian patch. @@ -91,15 +101,21 @@ sed -i \ -e 's/hexedit/nchexedit/g' \ -e 's/Hexedit/NCHexedit/g' \ -e 's/HEXEDIT/NCHEXEDIT/g' \ - -e '/utexas\.edu/s#{http[^}]*}#{http://www.rogoyski.com/adam/programs/hexedit/}#' \ + -e '/utexas\.edu/s#{http[^}]*}#{https://www.rogoyski.com/adam/programs/hexedit/}#' \ docs/$SRCNAM.1 # ...nor the info file. sed -i \ -e 's/hexedit/nchexedit/g' \ - -e '/utexas\.edu/s#{http[^}]*}#{http://www.rogoyski.com/adam/programs/hexedit/}#' \ + -e '/utexas\.edu/s#{http[^}]*}#{https://www.rogoyski.com/adam/programs/hexedit/}#' \ docs/$SRCNAM.texinfo +# 20210905 bkw: required for -current (but why?). Without this, it segfaults +# on startup. +sed -i 's,-lncurses,-lncursesw,g' configure + +SLKCFLAGS+=" -fcommon" + CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure \ @@ -128,4 +144,4 @@ cat $CWD/slack-desc > $PKG/install/slack-desc cat $CWD/doinst.sh > $PKG/install/doinst.sh cd $PKG -/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE |