summaryrefslogtreecommitdiff
path: root/libraries/wcslib/wcslib.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/wcslib/wcslib.SlackBuild')
-rw-r--r--libraries/wcslib/wcslib.SlackBuild19
1 files changed, 12 insertions, 7 deletions
diff --git a/libraries/wcslib/wcslib.SlackBuild b/libraries/wcslib/wcslib.SlackBuild
index 3bb417c0af..2a86fa0085 100644
--- a/libraries/wcslib/wcslib.SlackBuild
+++ b/libraries/wcslib/wcslib.SlackBuild
@@ -1,8 +1,8 @@
#!/bin/sh
-# Slackware build script for WCSLIB
+# Slackware build script for WCSLib
-# Copyright 2017 Nitish Ragoomundun, Mauritius
+# Copyright 2018 Nitish Ragoomundun, Mauritius
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -24,7 +24,7 @@
PRGNAM=wcslib
-VERSION=${VERSION:-5.16}
+VERSION=${VERSION:-5.19.1}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -61,10 +61,14 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM.tar.bz2
+tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
cd $PRGNAM-$VERSION
chown -R root:root .
+# Paths for PGPLOT in case it is not set properly
+PGPLOT_DIR="/usr/lib${LIBDIRSUFFIX}/pgplot"
+LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/lib${LIBDIRSUFFIX}/pgplot"
+
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
@@ -75,9 +79,9 @@ CXXFLAGS="$SLKCFLAGS" \
--mandir=/usr/man \
--docdir=/usr/doc/$PRGNAM-$VERSION \
--with-cfitsio \
- --with-pgplot \
--with-cfitsiolib=/usr/lib${LIBDIRSUFFIX} \
--with-cfitsioinc=/usr/include \
+ --with-pgplot \
--with-pgplotlib=${PGPLOT_DIR} \
--with-pgplotinc=${PGPLOT_DIR} \
--with-x \
@@ -86,8 +90,9 @@ CXXFLAGS="$SLKCFLAGS" \
make -j1
make install DESTDIR=$PKG
-# fix crazy permissions
-chmod -R u+w,g-ws $PKG
+# Give root write permission on regular files as
+# many of them get 444 permissions by default
+find $PKG -type f -exec chmod u+w \{\} \;
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