Browse Source

l/vtk: Added profile scripts to update LD_LIBRARY_PATH.

slackware-14.2
Damien Goutte-Gattat 10 years ago
parent
commit
78d68136d8
  1. 17
      l/vtk/vtk.SlackBuild

17
l/vtk/vtk.SlackBuild

@ -32,7 +32,7 @@ WGET=${WGET:-http://www.vtk.org/files/release/5.8/$ARCHIVE}
# Build infos
NAMEPKG=${NAMEPKG:-vtk}
BUILD=${BUILD:-1GGD}
BUILD=${BUILD:-2GGD}
ARCH=${ARCH:-$(uname -m | sed 's/^i.86$/i486/;s/^arm.*/arm/')}
JOBS=${JOBS:-1}
EXT=${EXT:-txz}
@ -56,12 +56,14 @@ if [ ! -d $TMP ]; then
fi
# Compilation flags
LIBDIR=""
case "$ARCH" in
i?86)
CPUOPT="-O2 -march=$ARCH -mtune=i686"
;;
x86_64)
CPUOPT="-O2 -fPIC"
LIBDIRSUFFIX=64
;;
*)
CPUOPT="-O2"
@ -113,6 +115,19 @@ fi
find $PKG | xargs file | grep "ELF \(32\|64\)-bit LSB" | cut -d : -f 1 | \
xargs strip --strip-unneeded 2> /dev/null
# Install profile scripts
mkdir -p $PKG/etc/profile.d
cat > $PKG/etc/profile.d/vtk.sh <<EOF
#!/bin/sh
LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:/usr/lib$LIBDIRSUFFIX/vtk-5.8
export LD_LIBRARY_PATH
EOF
cat > $PKG/etc/profile.d/vtk.csh <<EOF
#!/bin/csh
setenv LD_LIBRARY_PATH \${LD_LIBRARY_PATH}:/usr/lib$LIBDIRSUFFIX/vtk-5.8
EOF
chmod 755 $PKG/etc/profile.d/vtk.{csh,sh}
# Install the documentation
mkdir -p $PKG/usr/doc/$NAMEPKG-$VERSION
install -m 644 ../Copyright.txt ../README.html $PKG/usr/doc/$NAMEPKG-$VERSION

Loading…
Cancel
Save