diff options
Diffstat (limited to 'development/mawk')
-rw-r--r-- | development/mawk/README | 35 | ||||
-rw-r--r-- | development/mawk/mawk.SlackBuild | 59 | ||||
-rw-r--r-- | development/mawk/mawk.info | 8 |
3 files changed, 55 insertions, 47 deletions
diff --git a/development/mawk/README b/development/mawk/README index 2c3bcc4003..7cbdd2107c 100644 --- a/development/mawk/README +++ b/development/mawk/README @@ -1,8 +1,9 @@ mawk (fast awk implementation) -mawk (Mike's AWK) is an interpreter for the AWK Programming Language. It's -a very fast AWK implementation based on a bytecode interpreter. Originally -written by Mike Brennan, mawk is currently maintained by Thomas E. Dickey. +mawk (Mike's AWK) is an interpreter for the AWK Programming +Language. It's a very fast AWK implementation based on a bytecode +interpreter. Originally written by Mike Brennan, mawk is currently +maintained by Thomas E. Dickey. The AWK language is useful for manipulation of data files, text retrieval and processing, and for prototyping and experimenting with @@ -18,25 +19,9 @@ 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" +engine. In recent mawk versions, the only user-visible difference +between the built-in and glibc regex engines is that the glibc engine +doesn't support embedded NUL characters (can't use \x00 to match a +NUL, for instance). If there are other difference in usage, they are +undocumented. If you require the glibc engine, export BUILTIN_REGEX=no +in the script's environment. diff --git a/development/mawk/mawk.SlackBuild b/development/mawk/mawk.SlackBuild index 597c102522..f109a165ea 100644 --- a/development/mawk/mawk.SlackBuild +++ b/development/mawk/mawk.SlackBuild @@ -1,18 +1,32 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for mawk -# 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. -# 20180902 bkw: -# - Add BUILTIN_REGEX option. +# 20240315 bkw: update for v1.3.4_20240123. +# 20230822 bkw: Update for v1.3.4_20230808. +# Sorry this went so long without updates. +# - get MANIFEST out of the package doc dir (don't need). +# - install examples/ to the doc dir (but without +x perms). +# - run 'make check' by default, undocumented MAKECHECK=no to disable. +# - if 'make check' is run, save the results to the doc dir. +# - POSIX intervals (brace expressions) are now supported in the +# built-in regex engine, so update README accordingly. +# 20200302 bkw: Update for v1.3.4_20200120. +# 20200111 bkw: Update for v1.3.4_20200106. +# 20191129 bkw: Update for v1.3.4_20190203. +# 20180902 bkw: Add BUILTIN_REGEX option. + +cd $(dirname $0) ; CWD=$(pwd) PRGNAM=mawk -VERSION=${VERSION:-1.3.4_20171017} -BUILD=${BUILD:-2} +VERSION=${VERSION:-1.3.4_20240123} +BUILD=${BUILD:-1} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$( uname -m )" in @@ -22,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} @@ -43,9 +61,11 @@ 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,_,-,' )" +# This does nothing for 1.3.4, but allows e.g. VERSION=1.3.4_20171017 to +# work correctly. +# 20230822 bkw: trying to teach myself to remember bash's string substutions, +# so get rid of the sed here. +SRCVER="${VERSION/_/-}" rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT @@ -54,8 +74,8 @@ rm -rf $PRGNAM-$SRCVER tar xvf $CWD/$PRGNAM-$SRCVER.tgz cd $PRGNAM-$SRCVER 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 {} \+ +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" @@ -77,18 +97,21 @@ CXXFLAGS="$SLKCFLAGS" \ --build=$ARCH-slackware-linux make +[ "${MAKECHECK:-yes}" = "yes" ] && make check 2>&1 | tee make_check.out make install DESTDIR=$PKG strip $PKG/usr/bin/$PRGNAM -gzip -9 $PKG/usr/man/man1/$PRGNAM.1 +gzip -9 $PKG/usr/man/man*/* -mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a ACKNOWLEDGMENT CHANGES COPYING MANIFEST README \ - $PKG/usr/doc/$PRGNAM-$VERSION -cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild +PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION +mkdir -p $PKGDOC +chmod 644 examples/* +cp -a ACKNOWLEDGMENT CHANGES COPYING README examples $PKGDOC +[ -e make_check.out ] && cp -a make_check.out $PKGDOC +cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild mkdir -p $PKG/install 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} +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE diff --git a/development/mawk/mawk.info b/development/mawk/mawk.info index d2c91cd6d2..84bf3ab580 100644 --- a/development/mawk/mawk.info +++ b/development/mawk/mawk.info @@ -1,10 +1,10 @@ PRGNAM="mawk" -VERSION="1.3.4_20171017" +VERSION="1.3.4_20240123" HOMEPAGE="http://invisible-island.net/mawk/mawk.html" -DOWNLOAD="ftp://ftp.invisible-island.net/mawk/mawk-1.3.4-20171017.tgz" -MD5SUM="6de7560406cd9836335a7297bb910e08" +DOWNLOAD="https://invisible-mirror.net/archives/mawk/mawk-1.3.4-20240123.tgz" +MD5SUM="90376fbf8faf6e63be373ccad93504ba" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="" MAINTAINER="B. Watson" -EMAIL="yalhcru@gmail.com" +EMAIL="urchlay@slackware.uk" |