summaryrefslogtreecommitdiff
path: root/development/ragel/ragel.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'development/ragel/ragel.SlackBuild')
-rw-r--r--development/ragel/ragel.SlackBuild51
1 files changed, 17 insertions, 34 deletions
diff --git a/development/ragel/ragel.SlackBuild b/development/ragel/ragel.SlackBuild
index d24748a44c..9182442cba 100644
--- a/development/ragel/ragel.SlackBuild
+++ b/development/ragel/ragel.SlackBuild
@@ -1,7 +1,8 @@
#!/bin/sh
# Slackware build script for ragel
-# Copyright Matteo Bernardini <ponce@slackbuilds.org>, Pisa, Italy, 2012
+
+# Copyright 2012-2017 Matteo Bernardini <ponce@slackbuilds.org>, Pisa, Italy
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,13 +23,13 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=ragel
-VERSION=${VERSION:-6.9}
+VERSION=${VERSION:-7.0.0.9}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
@@ -39,8 +40,8 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
@@ -53,7 +54,7 @@ else
LIBDIRSUFFIX=""
fi
-DOCS="AUTHORS COPYING README TODO $PRGNAM.vim contrib/unicode2ragel.rb"
+DOCS="AUTHORS COPYING README TODO"
set -e
@@ -66,36 +67,19 @@ tar xvf $CWD/$PRGNAM-$VERSION.tar.?z*
cd $PRGNAM-$VERSION
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 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
- -exec chmod 644 {} \;
-
-# Fix hardcoded default CXXFLAGS
-sed -i "s|^CXXFLAGS=\"-g|CXXFLAGS=\"$SLKCFLAGS|" configure
+ \( -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 {} \;
sed -i "s|\ compare| this->compare|" \
- aapl/{avlcommon,bstcommon,bubblesort,mergesort}.h
-sed -i "s| compare| this->compare|" aapl/{avl,bst}common.h
+ aapl/{avlcommon,bstcommon,bubblesort,mergesort}.h || exit 1
+sed -i "s| compare| this->compare|" aapl/{avl,bst}common.h || exit 1
-# ragel requires itself to build its parsers :/
-CFLAGS="$SLKCFLAGS" \
-CXXFLAGS="$SLKCFLAGS" \
-./configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --sysconfdir=/etc \
- --localstatedir=/var \
- --mandir=/usr/man \
- --docdir=/usr/doc/$PRGNAM-$VERSION \
- --build=$ARCH-slackware-linux
-make
-install -m 0755 -D $PRGNAM/$PRGNAM $PKG/usr/bin/$PRGNAM
-make clean
-
-sed -i "s|=no|=yes|" DIST
+# Put headers under subdir
+sed -i -e "s/include_HEADERS/pkginclude_HEADERS/g" src/Makefile.am aapl/Makefile.am
-PATH=$PATH:$PKG/usr/bin
+autoreconf -fi
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
@@ -106,10 +90,9 @@ CXXFLAGS="$SLKCFLAGS" \
--localstatedir=/var \
--mandir=/usr/man \
--docdir=/usr/doc/$PRGNAM-$VERSION \
+ --disable-static \
--build=$ARCH-slackware-linux
-sed -i "s|^CXXFLAGS.*|CXXFLAGS = $SLKCFLAGS|" {Makefile,ragel/Makefile}
-
make
make install DESTDIR=$PKG