summaryrefslogtreecommitdiffstats
path: root/development
diff options
context:
space:
mode:
author B. Watson <yalhcru@gmail.com>2019-12-25 14:58:36 -0500
committer Willy Sudiarto Raharjo <willysr@slackbuilds.org>2019-12-31 18:06:24 +0700
commitd452da1a2630e10d633466d8f8f636949b6c71fd (patch)
tree23b9b20112221fb9334ea3016aef9be701060148 /development
parentdcc93ee3c92bcff39afcf54395f8b1d87b04968a (diff)
downloadslackbuilds-d452da1a2630e10d633466d8f8f636949b6c71fd.tar.gz
slackbuilds-d452da1a2630e10d633466d8f8f636949b6c71fd.tar.xz
development/bed: Fix re2 builds.
Signed-off-by: B. Watson <yalhcru@gmail.com>
Diffstat (limited to 'development')
-rw-r--r--development/bed/README3
-rw-r--r--development/bed/bed.SlackBuild21
-rw-r--r--development/bed/slack-desc2
3 files changed, 23 insertions, 3 deletions
diff --git a/development/bed/README b/development/bed/README
index 131653ade9..58a7b6e8ba 100644
--- a/development/bed/README
+++ b/development/bed/README
@@ -6,6 +6,9 @@ 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
diff --git a/development/bed/bed.SlackBuild b/development/bed/bed.SlackBuild
index 37bae15312..ba792ecfcc 100644
--- a/development/bed/bed.SlackBuild
+++ b/development/bed/bed.SlackBuild
@@ -6,9 +6,13 @@
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+# 20191225 bkw: BUILD=2
+# - fix builds with optional re2 dep, document optional hyperscan dep.
+# - install BUGS CHANGELOG TODO in docdir.
+
PRGNAM=bed
VERSION=${VERSION:-3.0.0}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@@ -62,6 +66,9 @@ 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
+
# Not sure the --without-x does anything, but it doesn't hurt either.
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
@@ -144,13 +151,23 @@ rm -f $PKGBEDLIB/uninstallbed.sh
# 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
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: