summaryrefslogtreecommitdiffstats
path: root/development/bed
diff options
context:
space:
mode:
Diffstat (limited to 'development/bed')
-rw-r--r--development/bed/README21
-rw-r--r--development/bed/bed.SlackBuild47
-rw-r--r--development/bed/bed.info6
-rw-r--r--development/bed/slack-desc2
4 files changed, 58 insertions, 18 deletions
diff --git a/development/bed/README b/development/bed/README
index 131653ade9..7f3733508f 100644
--- a/development/bed/README
+++ b/development/bed/README
@@ -1,16 +1,21 @@
bed (ncurses-based adjustable data format binary/hex editor)
Bed is a binary editor that supports editing/viewing data in a wide
-variety of formats, including ASCII, unsigned and signed integers, float,
-bit-flags, bit-fields, labels, EBCDIC and time_t. Different sizes and
-byte orderings are possible. Data types can be used in structures. Other
-data formats, filters and procedures can be defined in plugins.
+variety of formats, including ASCII, unsigned and signed integers,
+float, bit-flags, bit-fields, labels, EBCDIC and time_t. Different
+sizes and byte orderings are possible. Data types can be used in
+structures. Other data formats, filters and procedures can be defined
+in plugins.
+
+Optional dependencies: hyperscan and/or re2. These are autodetected at
+build time. bed uses these for faster regular expressions searches.
Notes:
-- bed starts up in Ascii input mode. Press F7 to switch to "Digit-Hex" entry
- mode. If this doesn't work, see the next note.
+- bed starts up in ASCII input mode. Press F7 to switch to "Digit-Hex"
+ entry mode. If this doesn't work, see the next note.
- bed makes extensive use of Meta key combinations and the F-keys.
- It's pretty sensitive to the terminal type and $TERM setting being used.
- See README_SBo.txt if you have trouble with the keyboard commands.
+ It's pretty sensitive to the terminal type and $TERM setting being
+ used. See README_SBo.txt if you have trouble with the keyboard
+ commands.
diff --git a/development/bed/bed.SlackBuild b/development/bed/bed.SlackBuild
index 37bae15312..617726af14 100644
--- a/development/bed/bed.SlackBuild
+++ b/development/bed/bed.SlackBuild
@@ -1,15 +1,24 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for bed
-# 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.
+# 20220404 bkw: BUILD=3, remove more cruft.
+# 20200111 bkw: Upstream site has expired and gone to meet its maker.
+# 20191225 bkw: BUILD=2
+# - fix builds with optional re2 dep, document optional hyperscan dep.
+# - install BUGS CHANGELOG TODO in docdir.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=bed
VERSION=${VERSION:-3.0.0}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-3}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -19,7 +28,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}
@@ -62,6 +75,15 @@ find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
# "exit". So:
sed -i '/Press F1 in menu/s/X/[x]/g' plugins/examples/helpf1.cc
+# 20191225 bkw: build was failing on systems where re2 was installed
+sed -i 's,static *string,static std::string,' src/re2search.cpp
+
+# 20220205 bkw: C++ standards OCD...
+sed -i 's,getret>0,getret,' src/readhelp.cpp
+
+# 20220404 bkw: wtf, upstream? you included compiled binaries in the source.
+rm -f src/mkpartypes regex-*/regtest
+
# Not sure the --without-x does anything, but it doesn't hurt either.
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
@@ -140,18 +162,31 @@ rm -f $PKGBEDLIB/bedmagic.short $PKGBEDLIB/addmagic
# Don't want this (use removepkg instead):
rm -f $PKGBEDLIB/uninstallbed.sh
+# 20220404 bkw: this looks utterly useless.
+rm -f $PKGBEDLIB/plugins/examples/disass-use
+
# There's still some cruft in $PKGBEDLIB (e.g. sources for the plugins),
# but it's stuff that could be considered documentation so I'll leave it.
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+chmod 644 BUGS
+cp -a BUGS CHANGELOG TODO $PKG/usr/doc/$PRGNAM-$VERSION
for i in LICENSE README; do
ln -s ../../lib$LIBDIRSUFFIX/$PRGNAM-$VERSION/$i $PKG/usr/doc/$PRGNAM-$VERSION
done
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+# 20191225 bkw: slack-desc shows optional deps. Can't use ldd for hyperscan
+# as it's dynamically loaded.
+RE2=no; HYPER=no
+ldd $PKG/usr/bin/$PRGNAM | fgrep libre2.so && RE2=yes
+strings $PKG/usr/bin/$PRGNAM | grep -q '(hyperscan) search' && HYPER=yes
+
mkdir -p $PKG/install
-cat $CWD/slack-desc > $PKG/install/slack-desc
+sed -e "s,@HYPER@,$HYPER," \
+ -e "s,@RE2@,$RE2," \
+ $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
-/sbin/makepkg -l y -c n -p $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n -p $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/development/bed/bed.info b/development/bed/bed.info
index 0c5b414a16..e125f06e49 100644
--- a/development/bed/bed.info
+++ b/development/bed/bed.info
@@ -1,10 +1,10 @@
PRGNAM="bed"
VERSION="3.0.0"
-HOMEPAGE="https://www.dse.nl/~bed/"
-DOWNLOAD="https://www.dse.nl/~bed/download/bed-3.0.0.src.tar.xz"
+HOMEPAGE="http://web.archive.org/web/20191229144155/https://www.dse.nl/~bed/download.html"
+DOWNLOAD="https://slackware.uk/~urchlay/src/bed-3.0.0.src.tar.xz"
MD5SUM="cd2f49434d673bd4f124b6cb1d1a1dbd"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
MAINTAINER="B. Watson"
-EMAIL="yalhcru@gmail.com"
+EMAIL="urchlay@slackware.uk"
diff --git a/development/bed/slack-desc b/development/bed/slack-desc
index a286353d05..7e5e33e211 100644
--- a/development/bed/slack-desc
+++ b/development/bed/slack-desc
@@ -15,5 +15,5 @@ bed: sizes and byte orderings are possible. Data types can be used in
bed: structures. Other data formats, filters and procedures can be defined
bed: in plugins.
bed:
-bed:
+bed: Build options: hyperscan=@HYPER@ re2=@RE2@
bed: