summaryrefslogtreecommitdiff
path: root/development
diff options
context:
space:
mode:
Diffstat (limited to 'development')
-rw-r--r--development/mawk/README24
-rw-r--r--development/mawk/mawk.SlackBuild32
-rw-r--r--development/mawk/mawk.info6
-rw-r--r--development/mawk/slack-desc2
4 files changed, 50 insertions, 14 deletions
diff --git a/development/mawk/README b/development/mawk/README
index 795e5fc177..2c3bcc4003 100644
--- a/development/mawk/README
+++ b/development/mawk/README
@@ -16,3 +16,27 @@ and mawk provides a small number of extensions.
This build does not conflict with Slackware's own awk (from the gawk
package).
+
+By default, mawk is built using its own built-in regular expression
+engine. There are some slight differences between this and the glibc
+regular expression engine:
+
+- Embedded NUL characters are supported by the built-in engine. For
+ instance, you can use the hex escape \x00 to match a NUL character.
+ glibc regexes don't support this.
+
+- POSIX brace syntax is NOT supported by the built-in engine. For
+ instance, /a{3}/ to match "aaa" but not "a" or "aa". glibc regexes do
+ support this.
+
+If you require the glibc engine, export BUILTIN_REGEX=no in the script's
+environment.
+
+The default version in the .info file is 1.3.4, which is a stable release
+from 2009. If you'd like to (or need to) build one of the newer 'snapshot'
+releases, get the source from ftp://ftp.invisible-island.net/mawk/
+and export VERSION in the environment. Notice the filenames look like
+e.g. "mawk-1.3.4-20171017.tgz". Slackware version numbers can't contain
+the hyphen, so use an underscore instead. Example:
+
+# export "VERSION=1.3.4_20171017"
diff --git a/development/mawk/mawk.SlackBuild b/development/mawk/mawk.SlackBuild
index 36196827ac..7a6d7468ed 100644
--- a/development/mawk/mawk.SlackBuild
+++ b/development/mawk/mawk.SlackBuild
@@ -6,9 +6,12 @@
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+# 20180902 bkw:
+# - Add BUILTIN_REGEX option.
+
PRGNAM=mawk
VERSION=${VERSION:-1.3.4}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@@ -40,23 +43,32 @@ fi
set -e
+# This does nothing for 1.3.4, but allows e.g. VERSION=1.3.4_20171017 in
+# the environment.
+SRCVER="$( echo $VERSION | sed 's,_,-,' )"
+
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-$VERSION.tgz
-cd $PRGNAM-$VERSION
+rm -rf $PRGNAM-$SRCVER
+tar xvf $CWD/$PRGNAM-$SRCVER.tgz
+cd $PRGNAM-$SRCVER
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 {} \+
+if [ "${BUILTIN_REGEX:-yes}" = "yes" ]; then
+ REGEX_OPT="--with-builtin-regex"
+ REGEX_DESC="mawk's built-in"
+else
+ REGEX_OPT="--without-builtin-regex"
+ REGEX_DESC="glibc's"
+fi
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
+ $REGEX_OPT \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--sysconfdir=/etc \
@@ -76,7 +88,7 @@ cp -a ACKNOWLEDGMENT CHANGES COPYING MANIFEST README \
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
-cat $CWD/slack-desc > $PKG/install/slack-desc
+sed "s,@REGEX_DESC@,$REGEX_DESC," $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/development/mawk/mawk.info b/development/mawk/mawk.info
index 7139df4270..d2c91cd6d2 100644
--- a/development/mawk/mawk.info
+++ b/development/mawk/mawk.info
@@ -1,8 +1,8 @@
PRGNAM="mawk"
-VERSION="1.3.4"
+VERSION="1.3.4_20171017"
HOMEPAGE="http://invisible-island.net/mawk/mawk.html"
-DOWNLOAD="ftp://ftp.invisible-island.net/mawk/mawk-1.3.4.tgz"
-MD5SUM="b1d27324ae80302452d0fa0c98447b65"
+DOWNLOAD="ftp://ftp.invisible-island.net/mawk/mawk-1.3.4-20171017.tgz"
+MD5SUM="6de7560406cd9836335a7297bb910e08"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
diff --git a/development/mawk/slack-desc b/development/mawk/slack-desc
index 0f4f678359..b4b960b319 100644
--- a/development/mawk/slack-desc
+++ b/development/mawk/slack-desc
@@ -13,7 +13,7 @@ mawk: Language. It's a very fast AWK implementation based on a bytecode
mawk: interpreter. Originally written by Mike Brennan, mawk is currently
mawk: maintained by Thomas E. Dickey.
mawk:
-mawk:
+mawk: Package built with @REGEX_DESC@ regular expression engine.
mawk:
mawk:
mawk: