aboutsummaryrefslogtreecommitdiff
path: root/libraries/pgplot/pgplot.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/pgplot/pgplot.SlackBuild')
-rw-r--r--libraries/pgplot/pgplot.SlackBuild31
1 files changed, 26 insertions, 5 deletions
diff --git a/libraries/pgplot/pgplot.SlackBuild b/libraries/pgplot/pgplot.SlackBuild
index 2fa320790666..75d8f6b23092 100644
--- a/libraries/pgplot/pgplot.SlackBuild
+++ b/libraries/pgplot/pgplot.SlackBuild
@@ -2,7 +2,7 @@
# Slackware build script for PGPLOT
-# Copyright 2017 Nitish Ragoomundun, Mauritius
+# Copyright 2018 Nitish Ragoomundun, Mauritius
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -21,7 +21,14 @@
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
+# ---------------------------------------------------------------------------
+#
+# Changelog:
+# 02/Aug/2018 : added LD_LIBRARY_PATH and an additional variable for the
+# scripts in /etc/profile.d
+# * Thanks to Eric Lindblad for his suggestions.
+#
+# ---------------------------------------------------------------------------
PRGNAM=pgplot
VERSION=${VERSION:-5.2.2}
@@ -96,17 +103,31 @@ cp -a cpgplot.h $PKG/usr/include/cpgplot.h
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
+
+# /etc/profile.d scripts
mkdir -p $PKG/etc/profile.d/
-cat << EOF > $PKG/etc/profile.d/pgplot.sh.new
+cat << EOF > $PKG/etc/profile.d/pgplot.sh
#!/bin/sh
export PGPLOT_DIR="/usr/lib${LIBDIRSUFFIX}/$PRGNAM"
+export LD_LIBRARY_PATH="\$LD_LIBRARY_PATH:/usr/lib${LIBDIRSUFFIX}/$PRGNAM"
+
+# uncomment the following line if xwin wanted as default
+# export PGPLOT_DEV="/xwin"
EOF
-cat << EOF > $PKG/etc/profile.d/pgplot.csh.new
+
+cat << EOF > $PKG/etc/profile.d/pgplot.csh
#!/bin/csh
setenv PGPLOT_DIR /usr/lib${LIBDIRSUFFIX}/$PRGNAM
+setenv LD_LIBRARY_PATH \$LD_LIBRARY_PATH:/usr/lib${LIBDIRSUFFIX}/$PRGNAM
+
+# uncomment the following line if xwin wanted as default
+# setenv PGPLOT_DEV /xwin
EOF
-chmod 0755 $PKG/etc/profile.d/*
+chmod 0755 $PKG/etc/profile.d/pgplot.{sh,csh}
+
+
+# Copying documentation and changelogs
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a aaaread.me copyright.notice install*.txt ver5*.txt \
$PKG/usr/doc/$PRGNAM-$VERSION