summaryrefslogtreecommitdiffstats
path: root/libraries/pyPEG2
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/pyPEG2')
-rw-r--r--libraries/pyPEG2/README9
-rw-r--r--libraries/pyPEG2/pyPEG2.SlackBuild32
-rw-r--r--libraries/pyPEG2/pyPEG2.info12
3 files changed, 32 insertions, 21 deletions
diff --git a/libraries/pyPEG2/README b/libraries/pyPEG2/README
index 09f4d7d1ae..9963fa41bb 100644
--- a/libraries/pyPEG2/README
+++ b/libraries/pyPEG2/README
@@ -5,9 +5,8 @@ for Python version 2.7 and 3.x. It is based on Parsing Expression
Grammar (PEG). With pyPEG you can parse many formal languages in a
very easy way.
-NOTE: to build pyPEG2 with python3 run the slackbuild with option
-PYTHON3=yes.
+NOTE: to build pyPEG2 without python3 run the slackbuild with option
+PYTHON3=no.
+ # PYTHON3=no ./pyPEG2.SlackBuild
- # PYTHON3=yes ./pyPEG2.SlackBuild
-
-NOTE2: In this case 'lxml' need to be build with Python3 bindings.
+git: https://gitea.pep.foundation/fdik/pypeg2
diff --git a/libraries/pyPEG2/pyPEG2.SlackBuild b/libraries/pyPEG2/pyPEG2.SlackBuild
index bed8af19c4..d3abe4d92b 100644
--- a/libraries/pyPEG2/pyPEG2.SlackBuild
+++ b/libraries/pyPEG2/pyPEG2.SlackBuild
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
#
# Slackware build script for pyPEG2.
#
@@ -22,10 +22,13 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=pyPEG2
-VERSION=${VERSION:-2.15.2}
+VERSION=${VERSION:-20211118_4dd9d69}
BUILD=${BUILD:-4}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -35,7 +38,16 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+SRCNAM=pypeg2
+
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+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}
@@ -59,9 +71,9 @@ set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM.tar.gz
-cd $PRGNAM-$VERSION
+rm -rf $SRCNAM-$VERSION
+tar xvf $CWD/$SRCNAM-$VERSION.tar.?z
+cd $SRCNAM-$VERSION
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
@@ -72,8 +84,8 @@ find -L . \
python setup.py build
python setup.py install --root=$PKG
-# Build pyPEG2 with python3. Default is no.
-if [ "${PYTHON3:-no}" == "yes" ]; then
+# Build pyPEG2 with python3. Default is yes.
+if [ "${PYTHON3:-yes}" == "yes" ]; then
python3 setup.py build
python3 setup.py install --root=$PKG
fi
@@ -82,11 +94,11 @@ find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | gr
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp CHANGES.txt LICENSE.txt PKG-INFO README.txt TODO.txt $PKG/usr/doc/$PRGNAM-$VERSION
+cp CHANGES.txt LICENSE.txt README.md TODO.txt $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}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/libraries/pyPEG2/pyPEG2.info b/libraries/pyPEG2/pyPEG2.info
index f1a6d2f60e..6e37f72b06 100644
--- a/libraries/pyPEG2/pyPEG2.info
+++ b/libraries/pyPEG2/pyPEG2.info
@@ -1,10 +1,10 @@
PRGNAM="pyPEG2"
-VERSION="2.15.2"
+VERSION="20211118_4dd9d69"
HOMEPAGE="https://fdik.org/pyPEG/"
-DOWNLOAD="https://fdik.org/pyPEG2/pyPEG2.tar.gz"
-MD5SUM="2ff44bc843c61ccd3951ef66a9e4a2b0"
+DOWNLOAD="https://ponce.cc/slackware/sources/repo/pypeg2-20211118_4dd9d69.tar.xz"
+MD5SUM="7a458ccebf2859523462a9f6302d3f23"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
-REQUIRES="lxml"
-MAINTAINER="Edinaldo P. Silva"
-EMAIL="edps.mundognu@gmail.com"
+REQUIRES="python2-lxml python3-lxml"
+MAINTAINER="D Woodfall"
+EMAIL="dave@slackbuilds.org"