summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2018-06-19 23:54:29 +0100
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2018-06-23 08:44:01 +0700
commit9319bd2c8bceb36518a4442b90c1e3b1ac4a3f42 (patch)
tree9b4597415c41f92f6d37f0a8d9d5311847e0569a
parentfdd50477c43f720d7350ef242680d54423412721 (diff)
downloadslackbuilds-9319bd2c8bceb36518a4442b90c1e3b1ac4a3f42.tar.gz
development/reflex: Added (variant of flex fast lexical scanner).
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
-rw-r--r--development/reflex/README12
-rw-r--r--development/reflex/reflex.SlackBuild107
-rw-r--r--development/reflex/reflex.info10
-rw-r--r--development/reflex/slack-desc19
4 files changed, 148 insertions, 0 deletions
diff --git a/development/reflex/README b/development/reflex/README
new file mode 100644
index 0000000000..ae336e4b29
--- /dev/null
+++ b/development/reflex/README
@@ -0,0 +1,12 @@
+reflex (variant of flex fast lexical scanner)
+
+This is Thomas E. Dickey's fork of flex, based on flex-2.5.4. It has
+a few bugfixes and slightly different features from the flex included
+in Slackware.
+
+This build doesn't conflict with Slackware's flex. To build sources with
+reflex, they'll have to be modified slightly:
+
+- replace "flex" command with "reflex" in Makefiles or build scripts.
+- replace any occurence of "-lfl" with "-lrefl".
+- if the source includes <FlexLexer.h>, replace with <reFlexLexer.h>.
diff --git a/development/reflex/reflex.SlackBuild b/development/reflex/reflex.SlackBuild
new file mode 100644
index 0000000000..d7ecb6b137
--- /dev/null
+++ b/development/reflex/reflex.SlackBuild
@@ -0,0 +1,107 @@
+#!/bin/sh
+
+# Slackware build script for reflex
+
+# Written by B. Watson (yalhcru@gmail.com)
+
+# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+
+PRGNAM=reflex
+VERSION=${VERSION:-2.5.4.20171231}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+set -e
+
+# The "2.5.4" part of VERSION isn't part of the filename nor the extracted
+# directory. I kept it as part of the version number for consistency
+# with reflex's own documentation, but it means I gotta construct the
+# tarball filename:
+TARVER="$( echo $VERSION | rev | cut -d. -f1 | rev )"
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$TARVER
+tar xvf $CWD/$PRGNAM-$TARVER.tgz
+cd $PRGNAM-$TARVER
+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 {} \;
+
+# Check VERSION in tarball, to make sure the version hasn't
+# updated. Nobody but me should ever see this error message (in the
+# grand tradition of error messages that say "This never happens").
+MAJMIN="$( echo $VERSION | rev | cut -d. -f2- | rev )"
+REALVER="$( cut -f2 VERSION )"
+
+if [ "$REALVER" != "$MAJMIN" ]; then
+ cat 1>&2 <<EOF
+
+*** VERSION=$VERSION, the $MAJMIN part is wrong, doesn't match
+*** VERSION $REALVER in the VERSION file.
+*** Fix the build! If you are not the maintainer, please copy/paste
+*** this message and mail it to the maintainer.
+
+EOF
+ exit 1
+fi
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --build=$ARCH-slackware-linux
+
+make
+make install DESTDIR=$PKG
+
+strip $PKG/usr/bin/$PRGNAM
+gzip -9 $PKG/usr/man/man1/$PRGNAM.1
+
+# Considered adding MISC/* to the doc dir, but it's almost all cruft
+# from 20+ years ago, from before reflex forked from flex, and it looks
+# like it's only of interest to archaeologists.
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a COPYING NEWS README VERSION $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $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/reflex/reflex.info b/development/reflex/reflex.info
new file mode 100644
index 0000000000..4f08f862f4
--- /dev/null
+++ b/development/reflex/reflex.info
@@ -0,0 +1,10 @@
+PRGNAM="reflex"
+VERSION="2.5.4.20171231"
+HOMEPAGE="http://invisible-island.net/reflex/reflex.html"
+DOWNLOAD="ftp://ftp.invisible-island.net/reflex/reflex-20171231.tgz"
+MD5SUM="e2bf096f267a8885709e48f7990f8283"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES=""
+MAINTAINER="B. Watson"
+EMAIL="yalhcru@gmail.com"
diff --git a/development/reflex/slack-desc b/development/reflex/slack-desc
new file mode 100644
index 0000000000..0f0df9d70a
--- /dev/null
+++ b/development/reflex/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+reflex: reflex (variant of flex fast lexical scanner)
+reflex:
+reflex: This is Thomas E. Dickey's fork of flex, based on flex-2.5.4. It
+reflex: has a few bugfixes and slightly different features from the flex
+reflex: included in Slackware.
+reflex:
+reflex:
+reflex:
+reflex:
+reflex:
+reflex: