aboutsummaryrefslogtreecommitdiff
path: root/academic/PhyML/PhyML.SlackBuild
diff options
context:
space:
mode:
authorPetar Petrov <slackalaxy@gmail.com>2016-11-26 20:36:32 +0000
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2016-12-03 07:17:45 +0700
commit23bc94dcfa800859523d8d62d840fb0695a6394b (patch)
tree37778d95757b4c497162693bc5d9ddca42cadcb6 /academic/PhyML/PhyML.SlackBuild
parentb10e3355c21ebd632d13f88817ca7b81d6cdaacf (diff)
academic/PhyML: Updated for version 3.2.20160530.
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
Diffstat (limited to 'academic/PhyML/PhyML.SlackBuild')
-rw-r--r--academic/PhyML/PhyML.SlackBuild61
1 files changed, 47 insertions, 14 deletions
diff --git a/academic/PhyML/PhyML.SlackBuild b/academic/PhyML/PhyML.SlackBuild
index 6c8ccdd3a4148..d4b3d67cae7a2 100644
--- a/academic/PhyML/PhyML.SlackBuild
+++ b/academic/PhyML/PhyML.SlackBuild
@@ -25,16 +25,16 @@
# Thanks to Niels Horn for some handy modifications and corrections.
PRGNAM=PhyML
-VERSION=${VERSION:-20131112}
+VERSION=${VERSION:-3.2.20160530}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
SRCNAM=$(echo $PRGNAM | tr A-Z a-z)
-SRCVER=20120412
+SRCVER=3.2.20160530
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
@@ -45,8 +45,8 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
@@ -65,7 +65,13 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $SRCNAM-$SRCVER
-tar xvf $CWD/$SRCNAM-$SRCVER.tar.gz
+
+if [ -e $CWD/v${SRCVER}.tar.gz ]; then
+ tar xvf $CWD/v${SRCVER}.tar.gz
+else
+ tar xvf $CWD/$SRCNAM-$SRCVER.tar.gz
+fi
+
cd $SRCNAM-$SRCVER
chown -R root:root .
find -L . \
@@ -74,18 +80,38 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-# Apply version patch
-cd src
- patch -i $CWD/$VERSION.patch
-cd ..
+# This is PhyML, the main component of the package. If this is all you want, you
+# can comment out the sections that build PhyML MPI and Phyrex below.
+./autogen.sh
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --enable-phyml \
+ --docdir=/usr/doc/$PRGNAM-$VERSION \
+ --build=$ARCH-slackware-linux
-# This is PhyML
+# 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 PhyML MPI. If you do not want it, comment the lines below. Then you do
+# not need to install openmpi.
+./autogen.sh
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--sysconfdir=/etc \
--localstatedir=/var \
--mandir=/usr/man \
+ --enable-mpi \
--docdir=/usr/doc/$PRGNAM-$VERSION \
--build=$ARCH-slackware-linux
@@ -98,14 +124,15 @@ CXXFLAGS="$SLKCFLAGS" \
make
make install DESTDIR=$PKG
-# And this is PhyTime
+# This is Phyrex
+./autogen.sh
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--sysconfdir=/etc \
--localstatedir=/var \
- --enable-phytime \
--mandir=/usr/man \
+ --enable-phyrex \
--docdir=/usr/doc/$PRGNAM-$VERSION \
--build=$ARCH-slackware-linux
@@ -121,9 +148,15 @@ 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
+# Include some examples
+mkdir -p $PKG/usr/share/$PRGNAM
+cp -a \
+ examples/{lg4x,phyrex_input_files,nexus_example.nxs,nucleic,proteic} \
+ $PKG/usr/share/$PRGNAM
+
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a \
- doc/$SRCNAM-manual-20120306.pdf AUTHORS ChangeLog COPYING INSTALL README \
+ doc/$SRCNAM-manual.pdf AUTHORS ChangeLog COPYING LICENSE README \
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
cat $CWD/References > $PKG/usr/doc/$PRGNAM-$VERSION/References