diff options
Diffstat (limited to 'academic/xiphos/xiphos.SlackBuild')
-rw-r--r-- | academic/xiphos/xiphos.SlackBuild | 81 |
1 files changed, 43 insertions, 38 deletions
diff --git a/academic/xiphos/xiphos.SlackBuild b/academic/xiphos/xiphos.SlackBuild index cd9533ba6f..3471341e36 100644 --- a/academic/xiphos/xiphos.SlackBuild +++ b/academic/xiphos/xiphos.SlackBuild @@ -1,8 +1,8 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for xiphos -# Copyright 2015-2018 Tim Dickson, email: dickson.tim@googlemail.com +# Copyright 2015-2023 Tim Dickson, email: dickson.tim@googlemail.com # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -22,13 +22,15 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +#note: webkit2gtk is a dep, but is already included as a dep of yelp. + +cd $(dirname $0) ; CWD=$(pwd) + PRGNAM=xiphos -VERSION=${VERSION:-4.1.0} -BUILD=${BUILD:-1} +VERSION=${VERSION:-4.2.1} +BUILD=${BUILD:-5} TAG=${TAG:-_SBo} - -#if WK2 is yes use webkit2. this requires webkit2gtk and gtkhtml (v4) instead of webkitgtk3 -WK2=${WK2:-no} +PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$( uname -m )" in @@ -38,7 +40,14 @@ if [ -z "$ARCH" ]; then esac fi -CWD=$(pwd) +# 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} @@ -65,6 +74,8 @@ cd $TMP rm -rf $PRGNAM-$VERSION tar xvf $CWD/$PRGNAM-$VERSION.tar.gz cd $PRGNAM-$VERSION + +#sane permissions for everything chown -R root:root . find -L . \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ @@ -72,38 +83,32 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; -./waf distclean - -# patch navbar_versekey.gtkbuilder to work with gtk shipped with slackware 14.2 -# patch won't be needed for slackware 15 -sed -i "s/3.20/3.14/g" ui/navbar_versekey.gtkbuilder - -if [ "x$WK2" = "xyes" ]; then - CFLAGS="$SLKCFLAGS" \ - CXXFLAGS="$SLKCFLAGS" \ - ./waf configure \ - --prefix=/usr \ - --enable-webkit2 \ - --gtk=3 - # --disable-dbus - # --gtk=2 doesn't work with webkitgtk as gtk2 is disabled -else - CFLAGS="$SLKCFLAGS" \ - CXXFLAGS="$SLKCFLAGS" \ - ./waf configure \ - --prefix=/usr \ - --enable-webkit-editor \ - --gtk=3 - # --disable-dbus - # --gtk=2 doesn't work with webkitgtk as gtk2 is disabled -fi - -./waf build -./waf install --destdir=$PKG - +#patch to make work with newer glib +echo "#define GLIB_VERSION_MIN_REQUIRED (GLIB_VERSION_2_26)" >>cmake/config.h.cmake.in +mkdir -p build +cd build +cmake -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DLIB_SUFFIX=${LIBDIRSUFFIX} \ + -DCMAKE_INSTALL_MANDIR=man \ + -DHTMLHELP=ON \ + -DCMAKE_BUILD_TYPE=Release \ + -DDBUS=OFF -DSTRIP=ON -DPOSTINST=OFF -DGTKHTML=ON .. + +#cmake should have created make file so restore PATH +make +make install DESTDIR=$PKG +cd .. + +#output should be stripped but we just make sure.. find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true +#compress man pages. +find $PKG/usr/man -type f -exec gzip -9 {} \; +for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done + mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION mv $PKG/usr/share/doc/$PRGNAM/* $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild @@ -114,4 +119,4 @@ cat $CWD/slack-desc > $PKG/install/slack-desc cat $CWD/doinst.sh > $PKG/install/doinst.sh 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 |