diff options
Diffstat (limited to 'libraries/hdf5/hdf5.SlackBuild')
-rw-r--r-- | libraries/hdf5/hdf5.SlackBuild | 56 |
1 files changed, 21 insertions, 35 deletions
diff --git a/libraries/hdf5/hdf5.SlackBuild b/libraries/hdf5/hdf5.SlackBuild index 1b1073c9dd..651ef23cbf 100644 --- a/libraries/hdf5/hdf5.SlackBuild +++ b/libraries/hdf5/hdf5.SlackBuild @@ -22,79 +22,65 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# Thanks to Fedora Core 7 hdf5 package's maintainer for a hack taken from his gcc4 -# patch to allow neat compilation using gcc4.x fortran. - -# Exit on most errors -set -e - PRGNAM=hdf5 -VERSION=1.6.6 +VERSION=1.8.1 ARCH=${ARCH:-i486} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} + CWD=$(pwd) TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} -DOCFILES="COPYING MANIFEST README.txt release_docs/RELEASE.txt release_docs/HISTORY.txt" - if [ "$ARCH" = "i486" ]; then SLKCFLAGS="-O2 -march=i486 -mtune=i686" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" fi +set -e # Exit on most errors + rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP rm -rf $PRGNAM-$VERSION -tar xvzf $CWD/$PRGNAM-$VERSION.tar.gz || exit 1 +tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2 cd $PRGNAM-$VERSION chown -R root:root . chmod -R u+w,go+r-w,a-s . -# F9X=gfortran is needed to compile fortran interface using gcc-gfortran 4.x; -# autodetection and g95 seem not to work -# CXXFLAGS is not used, use CPPFLAGS instead CFLAGS="$SLKCFLAGS" \ CPPFLAGS="$SLKCFLAGS" \ -F9X=gfortran \ ./configure \ --prefix=/usr \ + --mandir=/usr/man \ + --docdir=/usr/doc/$PRGNAM-$VERSION \ --with-pthread \ - --enable-threadsafe \ --enable-cxx \ --enable-fortran \ --with-ssl \ --with-zlib \ - --without-szlib - -make || exit 1 -make prefix=$PKG/usr install || exit 1 # No DESTDIR support + --without-szlib \ + --enable-static=no \ + --build=$ARCH-slackware-linux -# --docdir configure flag seems to be completely ignored; move docs to usual directory -mv $PKG/usr/doc/$PRGNAM $PKG/usr/doc/$PRGNAM-$VERSION +make +make install DESTDIR=$PKG -# html documentation files are not installed in 'make install' phase -mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/html/ -cp -a doc/html $PKG/usr/doc/$PRGNAM-$VERSION -cp -a $DOCFILES $PKG/usr/doc/$PRGNAM-$VERSION/ +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a COPYING MANIFEST README.txt release_docs/RELEASE.txt \ + release_docs/HISTORY-1_8.txt $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild find $PKG/usr/doc -type f -exec chmod 0644 {} \; -# installation seems to copy a lot of useless files and empty directories -( find $PKG/usr/doc/$PRGNAM-$VERSION/ -name Makefile\* -exec rm -f {} \; - find $PKG/usr/doc/$PRGNAM-$VERSION/ -name Dependencies -exec rm -f {} \; - rm -f $PKG/usr/lib/*.settings - rm -rf $PKG/usr/doc/$PRGNAM-$VERSION/html/{cpplus,PSandPDF} -) +# Remove unnecessary stuff +rm -f $PKG/usr/lib/*.settings -( cd $PKG - find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null - find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null -) +find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc |