diff options
author | B. Watson <yalhcru@gmail.com> | 2018-08-16 13:13:47 -0400 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2018-08-18 08:39:51 +0700 |
commit | a6be7cdbb2c5be9856e27e4bef0cf485a051ee8d (patch) | |
tree | 1b3169c55329374cc39024875dc7ba6df645cac7 /development/nchexedit/nchexedit.SlackBuild | |
parent | 2926aed4ac2e3d42122eb77655fe6ce29ebabda9 (diff) |
development/nchexedit: Add Debian bugfix patches.
Signed-off-by: B. Watson <yalhcru@gmail.com>
Diffstat (limited to 'development/nchexedit/nchexedit.SlackBuild')
-rw-r--r-- | development/nchexedit/nchexedit.SlackBuild | 40 |
1 files changed, 35 insertions, 5 deletions
diff --git a/development/nchexedit/nchexedit.SlackBuild b/development/nchexedit/nchexedit.SlackBuild index 6abb6564239fb..1e0c6b13b7f1f 100644 --- a/development/nchexedit/nchexedit.SlackBuild +++ b/development/nchexedit/nchexedit.SlackBuild @@ -10,12 +10,18 @@ # This one's full name is "[N] Curses Hexedit" so I'm packaging it # as nchexedit. +# We're using most of Debian's patches, the _5 in VERSION is their +# patchlevel. + PRGNAM=nchexedit -VERSION=${VERSION:-0.9.7} -BUILD=${BUILD:-1} +VERSION=${VERSION:-0.9.7_5} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} SRCNAM=hexedit +SRCVER="$( echo $VERSION | cut -d_ -f1 )" +DEBNAME="ncurses-$SRCNAM" +DEBVER="$( echo $VERSION | cut -d_ -f2 )" if [ -z "$ARCH" ]; then case "$( uname -m )" in @@ -49,13 +55,37 @@ set -e rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP -rm -rf $SRCNAM-$VERSION -tar xvf $CWD/$SRCNAM-$VERSION.tar.gz -cd $SRCNAM-$VERSION +rm -rf $SRCNAM-$SRCVER +tar xvf $CWD/$SRCNAM-$SRCVER.tar.gz +cd $SRCNAM-$SRCVER + +# Include most of Debian's patches. They rename the binary to 'hexeditor' +# so we leave out the patches related to that, and a couple others that +# are unnecessary. The ones we apply are bugfixes, a couple of which are +# crucial (search command didn't work on 64-bit, buffer overruns, segfault +# if the terminal's too small), and the rest are valid but nitpicky. +tar xvf $CWD/${DEBNAME}_${SRCVER}+orig-${DEBVER}.debian.tar.xz +rm -f debian/patches/fix_hexedit_references.patch \ + debian/patches/hexedit_lsm.patch \ + debian/patches/hurd_path_max.patch \ + debian/patches/info_dir_section.patch \ + debian/patches/rename_binaries.patch \ + debian/patches/autoconf_2.69.patch \ + debian/patches/fix_its_typo.patch + chown -R root:root . find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+ +# Apply the patches we didn't rm. +for i in $( cat debian/patches/series ); do + P=debian/patches/$i + [ -e $P ] && patch -p1 < $P +done + +# Reworked version of Debian patch. +patch -p1 < $CWD/fix_its_typo.patch + # --program-prefix doesn't change the contents of the man page sed -i \ -e 's/hexedit/nchexedit/g' \ |