mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-16 19:50:19 +01:00
development/ragel: Updated for version 7.0.0.9, cleanups.
Added the new dependency colm Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
This commit is contained in:
parent
e443415637
commit
a57092eab2
3 changed files with 21 additions and 40 deletions
|
@ -1,5 +1,3 @@
|
|||
ragel (State Machine Compiler)
|
||||
|
||||
Ragel compiles executable finite state machines from regular
|
||||
languages. Ragel targets C, C++, Objective-C, D, Java and Ruby.
|
||||
Ragel state machines can not only recognize byte sequences as regular
|
||||
|
|
|
@ -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
|
||||
# Put headers under subdir
|
||||
sed -i -e "s/include_HEADERS/pkginclude_HEADERS/g" src/Makefile.am aapl/Makefile.am
|
||||
|
||||
sed -i "s|=no|=yes|" DIST
|
||||
|
||||
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
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
PRGNAM="ragel"
|
||||
VERSION="6.9"
|
||||
VERSION="7.0.0.9"
|
||||
HOMEPAGE="http://www.colm.net/open-source/ragel/"
|
||||
DOWNLOAD="http://www.colm.net/files/ragel/ragel-6.9.tar.gz"
|
||||
MD5SUM="0c3110d7f17f7af4d9cb774443898dc1"
|
||||
DOWNLOAD="http://www.colm.net/files/ragel/ragel-7.0.0.9.tar.gz"
|
||||
MD5SUM="29a4d8ced2f229966317d123a2d5af8a"
|
||||
DOWNLOAD_x86_64=""
|
||||
MD5SUM_x86_64=""
|
||||
REQUIRES="kelbt"
|
||||
REQUIRES="colm kelbt"
|
||||
MAINTAINER="Matteo Bernardini"
|
||||
EMAIL="ponce@slackbuilds.org"
|
||||
|
|
Loading…
Reference in a new issue