summaryrefslogtreecommitdiffstats
path: root/libraries/libpst
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/libpst')
-rw-r--r--libraries/libpst/libpst.SlackBuild111
-rw-r--r--libraries/libpst/libpst.info10
2 files changed, 84 insertions, 37 deletions
diff --git a/libraries/libpst/libpst.SlackBuild b/libraries/libpst/libpst.SlackBuild
index 70236337c1..f02b91fcd1 100644
--- a/libraries/libpst/libpst.SlackBuild
+++ b/libraries/libpst/libpst.SlackBuild
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for libpst
@@ -23,6 +23,13 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 20220510 bkw: old website went 404, project moved to github. thanks to
+# Ozan Türkyılmaz for reporting this!
+# 20211019 bkw:
+# - upgrade to 0.6.76
+# - build both python 2 and 3 modules
+# - get rid of .la files
+# 20201025 bkw: upgrade to 0.6.75
# 20200224 bkw: upgrade to 0.6.74
# 20180917 bkw: upgrade to 0.6.72
# 20170122 bkw: upgrade to 0.6.69
@@ -35,10 +42,13 @@
# - upgrade to 0.6.63
# - make install-strip instead of slow find stuff
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=libpst
-VERSION=${VERSION:-0.6.74}
+VERSION=${VERSION:-0.6.76}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -48,7 +58,11 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+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}
@@ -69,46 +83,79 @@ fi
set -e
+# 20220510 bkw: the github release URL has a ton of cloud-ey CGI
+# parameters. wget (with or without content-disposition) saves it
+# with the right filename, but be paranoid about it anyway:
+TARBALL=$CWD/$PRGNAM-$VERSION.tar.gz
+[ -e $TARBALL ] || TARBALL="$( /bin/ls -1 $TARBALL* | head -1 )"
+
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+tar xvf $TARBALL
cd $PRGNAM-$VERSION
chown -R root:root .
find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
\! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
-# 20180917 bkw: libpst supposedly supports python3 now, but python3
-# builds fail. Not tried to diagnose it, just reverting to python2,
-# like previous versions of libpst used.
-# ./configure --help claims that I can set PYTHON_VERSION in the environment
-# and it'll use that, but it doesn't work. So I have to use this abomination:
-sed -i 's,\<python3\..\>,,g' m4/ax_python.m4
-
-autoreconf -if
-
-CFLAGS="$SLKCFLAGS" \
-CXXFLAGS="$SLKCFLAGS" \
-./configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --mandir=/usr/man \
- --enable-dii \
- --disable-static \
- --enable-libpst-shared \
- --enable-python \
- --build=$ARCH-slackware-linux
-
-make
-# ./configure options --docdir and --htmldir have no effect,
-# it is necessary to override "htmldir" and "htmldeveldir"
-make install-strip DESTDIR=$PKG \
- htmldir=/usr/doc/$PRGNAM-$VERSION \
- htmldeveldir=/usr/doc/$PRGNAM-$VERSION/devel
+buildit() {
+ autoreconf -if
+
+ CFLAGS="$SLKCFLAGS" \
+ CXXFLAGS="$SLKCFLAGS" \
+ ./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --mandir=/usr/man \
+ --enable-dii \
+ --disable-static \
+ --enable-libpst-shared \
+ --enable-python \
+ --build=$ARCH-slackware-linux
+
+ make
+ # ./configure options --docdir and --htmldir have no effect,
+ # it is necessary to override "htmldir" and "htmldeveldir"
+ make install-strip DESTDIR=$PKG \
+ htmldir=/usr/doc/$PRGNAM-$VERSION \
+ htmldeveldir=/usr/doc/$PRGNAM-$VERSION/devel
+}
+
+# 20211019 bkw: python3 builds work now. Include support for both
+# python versions, 2 and 3. Unfortunately this means building the
+# entire project twice (keeping only the python2 stuff from the
+# first build). autotools doesn't make it easy or even necessarily
+# possible to build only part of a project :(
+
+# Python 2 build. If python2 ever really does go away, this code will
+# silently omit python2 support from the package.
+if type -p python2 &>/dev/null; then
+ PY2VER="$( python2 --version 2>&1 | cut -d' ' -f2 | cut -d. -f1,2 )"
+
+ # ./configure --help claims that I can set PYTHON_VERSION in the environment
+ # and it'll use that, but it doesn't work. So I have to use this abomination:
+ sed -i.bak 's,\<python3\..\>,python'$PY2VER',g' m4/ax_python.m4
+
+ buildit
+
+ mv $PKG/usr/lib$LIBDIRSUFFIX/python$PY2VER $PKG/.keep.python2
+ rm -rf $PKG/*
+
+ # put everything back the way it was.
+ make distclean
+ mv m4/ax_python.m4.bak m4/ax_python.m4
+fi
+
+# Python 3 build
+buildit
+[ -e $PKG/.keep.python2 ] && \
+ mv $PKG/.keep.python2 $PKG/usr/lib$LIBDIRSUFFIX/python$PY2VER
gzip -9 $PKG/usr/man/man?/*.?
+rm -f $PKG/usr/lib*/*.la $PKG/usr/lib*/python*/*/*.la
+
# Package documentation has aready been copied
# into $PKG/usr/doc/$PRGNAM-$VERSION by "make install"
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
@@ -117,4 +164,4 @@ 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/libpst/libpst.info b/libraries/libpst/libpst.info
index 538af13ada..6c488273d5 100644
--- a/libraries/libpst/libpst.info
+++ b/libraries/libpst/libpst.info
@@ -1,10 +1,10 @@
PRGNAM="libpst"
-VERSION="0.6.74"
-HOMEPAGE="http://www.five-ten-sg.com/libpst/"
-DOWNLOAD="http://www.five-ten-sg.com/libpst/packages/libpst-0.6.74.tar.gz"
-MD5SUM="c0fb28dc7d6b9d2af1701027dc7154fe"
+VERSION="0.6.76"
+HOMEPAGE="https://github.com/pst-format/libpst/"
+DOWNLOAD="https://github.com/pst-format/libpst/releases/download/libpst-0.6.76/libpst-0.6.76.tar.gz"
+MD5SUM="e821b94e8d7790ee314059f751182ebf"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
MAINTAINER="B. Watson"
-EMAIL="yalhcru@gmail.com"
+EMAIL="urchlay@slackware.uk"