summaryrefslogtreecommitdiffstats
path: root/academic/PhyML/PhyML.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'academic/PhyML/PhyML.SlackBuild')
-rw-r--r--academic/PhyML/PhyML.SlackBuild115
1 files changed, 60 insertions, 55 deletions
diff --git a/academic/PhyML/PhyML.SlackBuild b/academic/PhyML/PhyML.SlackBuild
index cab8490604..351fde6f1f 100644
--- a/academic/PhyML/PhyML.SlackBuild
+++ b/academic/PhyML/PhyML.SlackBuild
@@ -1,8 +1,8 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for PhyML
-# Copyright 2011-2019 Petar Petrov slackalaxy@gmail.com
+# Copyright 2011-2022 Petar Petrov slackalaxy@gmail.com
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -24,11 +24,15 @@
# Thanks to Niels Horn for some handy modifications and corrections.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=PhyML
-SRCNAM=$(echo $PRGNAM | tr A-Z a-z)
-VERSION=${VERSION:-3.3.20190321}
+VERSION=${VERSION:-3.3.20220408}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
+
+SRCNAM=$(echo $PRGNAM | tr A-Z a-z)
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -38,7 +42,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}
@@ -86,12 +97,11 @@ find -L . \
--build=$ARCH-slackware-linux
# Use our CFLAGS
-sed -i "/^CFLAGS/s/=/+=/" src/Makefile
-sed -i "/^CFLAGS/s/=/+=/" Makefile
+sed -i "/^CFLAGS/s/=/+=/" Makefile src/Makefile
-CFLAGS="$SLKCFLAGS" \
-CXXFLAGS="$SLKCFLAGS" \
-make
+# The -mfma flag is needed for building on 14.2. Help is from here:
+# https://github.com/horovod/horovod/issues/1832
+CFLAGS="$SLKCFLAGS -mfma" CXXFLAGS="$SLKCFLAGS -mfma" make
make install DESTDIR=$PKG
# This is PhyML MPI. If you do not want it, comment the lines below. Then you do
@@ -108,59 +118,54 @@ make install DESTDIR=$PKG
--build=$ARCH-slackware-linux
# Use our CFLAGS
-sed -i "/^CFLAGS/s/=/+=/" src/Makefile
-sed -i "/^CFLAGS/s/=/+=/" Makefile
+sed -i "/^CFLAGS/s/=/+=/" Makefile src/Makefile
-CFLAGS="$SLKCFLAGS" \
-CXXFLAGS="$SLKCFLAGS" \
-make
+CFLAGS="$SLKCFLAGS -mfma" CXXFLAGS="$SLKCFLAGS -mfma" make
make install DESTDIR=$PKG
-# This is Phyrex
-./autogen.sh
-./configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --sysconfdir=/etc \
- --localstatedir=/var \
- --mandir=/usr/man \
- --enable-phyrex \
- --docdir=/usr/doc/$PRGNAM-$VERSION \
- --build=$ARCH-slackware-linux
-
-# Use our CFLAGS
-sed -i "/^CFLAGS/s/=/+=/" src/Makefile
-sed -i "/^CFLAGS/s/=/+=/" Makefile
-
-CFLAGS="$SLKCFLAGS" \
-CXXFLAGS="$SLKCFLAGS" \
-make
+# This is Phyrex but it breaks at the moment
+ ./autogen.sh
+ ./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --enable-phyrex \
+ --docdir=/usr/doc/$PRGNAM-$VERSION \
+ --build=$ARCH-slackware-linux
+
+ # Use our CFLAGS
+sed -i "/^CFLAGS/s/=/+=/" Makefile src/Makefile
+
+CFLAGS="$SLKCFLAGS -mfma" CXXFLAGS="$SLKCFLAGS -mfma" make
make install DESTDIR=$PKG
-# This is PhyTime
-./autogen.sh
-./configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --sysconfdir=/etc \
- --localstatedir=/var \
- --mandir=/usr/man \
- --enable-phytime \
- --docdir=/usr/doc/$PRGNAM-$VERSION \
- --build=$ARCH-slackware-linux
-
-# Use our CFLAGS
-sed -i "/^CFLAGS/s/=/+=/" src/Makefile
-sed -i "/^CFLAGS/s/=/+=/" Makefile
-
-CFLAGS="$SLKCFLAGS" \
-CXXFLAGS="$SLKCFLAGS" \
-make
-make install DESTDIR=$PKG
+# # This is PhyTime
+# ./autogen.sh
+# ./configure \
+# --prefix=/usr \
+# --libdir=/usr/lib${LIBDIRSUFFIX} \
+# --sysconfdir=/etc \
+# --localstatedir=/var \
+# --mandir=/usr/man \
+# --enable-phytime \
+# --docdir=/usr/doc/$PRGNAM-$VERSION \
+# --build=$ARCH-slackware-linux
+#
+# # Use our CFLAGS
+# sed -i "/^CFLAGS/s/=/+=/" Makefile src/Makefile
+#
+# CFLAGS="$SLKCFLAGS -mfma" CXXFLAGS="$SLKCFLAGS -mfma" make
+# make install DESTDIR=$PKG
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
+# fix permissions for docs
+chmod 0644 doc/*.{pdf,tex,bib}
+chmod 0644 doc/fig/*.pdf
+
# Include some examples
mkdir -p $PKG/usr/share/$PRGNAM
cp -a examples $PKG/usr/share/$PRGNAM
@@ -176,4 +181,4 @@ mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
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