From a9bd9680201196ff421fbcb25507123f5de2fe4c Mon Sep 17 00:00:00 2001 From: Dave Margell Date: Thu, 13 May 2010 00:58:27 +0200 Subject: libraries/boolstuff: Added to 13.0 repository --- libraries/boolstuff/README | 9 ++++ libraries/boolstuff/boolstuff.SlackBuild | 84 ++++++++++++++++++++++++++++++++ libraries/boolstuff/boolstuff.info | 10 ++++ libraries/boolstuff/slack-desc | 19 ++++++++ 4 files changed, 122 insertions(+) create mode 100644 libraries/boolstuff/README create mode 100644 libraries/boolstuff/boolstuff.SlackBuild create mode 100644 libraries/boolstuff/boolstuff.info create mode 100644 libraries/boolstuff/slack-desc (limited to 'libraries/boolstuff') diff --git a/libraries/boolstuff/README b/libraries/boolstuff/README new file mode 100644 index 0000000000..ab4313d54f --- /dev/null +++ b/libraries/boolstuff/README @@ -0,0 +1,9 @@ +BoolStuff is a small C++ library that supports a few operations on +boolean expression binary trees. The main features are: + - a boolean expression parser (supports operators AND, OR + and NOT, as well as parentheses); + - an algorithm to convert a boolean expression binary tree + into its Disjunctive Normal Form; + - a function that determines if an expression tree is in DNF. + +A command named `booldnf' that calls this library is also provided. diff --git a/libraries/boolstuff/boolstuff.SlackBuild b/libraries/boolstuff/boolstuff.SlackBuild new file mode 100644 index 0000000000..504f18b173 --- /dev/null +++ b/libraries/boolstuff/boolstuff.SlackBuild @@ -0,0 +1,84 @@ +#!/bin/sh + +# Slackware build script for boolstuff + +# Written by Dave Margell (dmargell@gmail.com) + +PRGNAM=boolstuff +VERSION=${VERSION:-0.1.12} +ARCH=${ARCH:-i486} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" + SLKLDFLAGS=""; LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + SLKLDFLAGS=""; LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + SLKLDFLAGS="-L/usr/lib64"; LIBDIRSUFFIX="64" +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +cd $PRGNAM-$VERSION +chown -R root:root . +find . \ + \( -perm 777 -o -perm 775 -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 {} \; + +LDFLAGS="$SLKLDFLAGS" \ +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 +make install DESTDIR=$PKG + +( cd $PKG + find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null || true + find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null +) + +( cd $PKG/usr/man + find . -type f -exec gzip -9 {} \; + for i in $( find . -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done +) + +# --docdir is not honored: +rm -rf $PKG/usr/share/ +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/examples +cp -a AUTHORS COPYING INSTALL NEWS README THANKS TODO \ + $PKG/usr/doc/$PRGNAM-$VERSION +cp -a examples/{example.cpp,non-string-nodes.cpp,test-booldnf.pl} \ + $PKG/usr/doc/$PRGNAM-$VERSION/examples +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/libraries/boolstuff/boolstuff.info b/libraries/boolstuff/boolstuff.info new file mode 100644 index 0000000000..3e77c1250c --- /dev/null +++ b/libraries/boolstuff/boolstuff.info @@ -0,0 +1,10 @@ +PRGNAM="boolstuff" +VERSION="0.1.12" +HOMEPAGE="http://perso.b2b2c.ca/sarrazip/dev/boolstuff.html" +DOWNLOAD="http://perso.b2b2c.ca/sarrazip/dev/boolstuff-0.1.12.tar.gz" +MD5SUM="3eb0aa4bf24e215700c9cba30a648969" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +MAINTAINER="Dave Margell" +EMAIL="dmargell@gmail.com" +APPROVED="rworkman" diff --git a/libraries/boolstuff/slack-desc b/libraries/boolstuff/slack-desc new file mode 100644 index 0000000000..67a7da86c9 --- /dev/null +++ b/libraries/boolstuff/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 ':'. + + |-----handy-ruler------------------------------------------------------| +boolstuff: boolstuff (library to perform operations on boolean expressions) +boolstuff: +boolstuff: boolstuff is a C++ library that supports a few operations on boolean +boolstuff: expression binary trees. The main features are: +boolstuff: * a simple boolean expression parser +boolstuff: (supports operators AND, OR and NOT, as well as parentheses); +boolstuff: * an algorithm to convert a boolean expression binary tree into its +boolstuff: Disjunctive Normal Form (this algorithm supports the NOT operator); +boolstuff: * a function that determines if an expression tree is in DNF. +boolstuff: Project homepage: http://perso.b2b2c.ca/sarrazip/dev/boolstuff.html +boolstuff: -- cgit v1.2.3