diff options
author | B. Watson <yalhcru@gmail.com> | 2021-10-19 22:30:59 -0400 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2021-10-29 17:07:18 +0700 |
commit | 2628ca3534874569fc0b73f9c8e2deb09b685338 (patch) | |
tree | c892bc45607e4372016249e1c450506795cce32b /libraries/libpst/libpst.SlackBuild | |
parent | 0b1da72b4ebf5fc3b5a66c79b1339d891deb6716 (diff) | |
download | slackbuilds-2628ca3534874569fc0b73f9c8e2deb09b685338.tar.gz |
libraries/libpst: Updated for version 0.6.76.
Signed-off-by: B. Watson <yalhcru@gmail.com>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'libraries/libpst/libpst.SlackBuild')
-rw-r--r-- | libraries/libpst/libpst.SlackBuild | 95 |
1 files changed, 64 insertions, 31 deletions
diff --git a/libraries/libpst/libpst.SlackBuild b/libraries/libpst/libpst.SlackBuild index 179430e3b2..52c29ccd51 100644 --- a/libraries/libpst/libpst.SlackBuild +++ b/libraries/libpst/libpst.SlackBuild @@ -23,6 +23,15 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# Note to SBo admins: Please don't remove this because nothing depends +# on it. It contains useful tools all by itself (it isn't just a +# shared library). Take pity on those who have to deal with Microsoft +# products for a living... + +# 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 @@ -39,7 +48,7 @@ cd $(dirname $0) ; CWD=$(pwd) PRGNAM=libpst -VERSION=${VERSION:-0.6.75} +VERSION=${VERSION:-0.6.76} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -52,9 +61,6 @@ if [ -z "$ARCH" ]; then esac fi -# 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 @@ -90,36 +96,63 @@ 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 |