diff options
Diffstat (limited to 'academic/PhyML/PhyML.SlackBuild')
-rw-r--r-- | academic/PhyML/PhyML.SlackBuild | 61 |
1 files changed, 47 insertions, 14 deletions
diff --git a/academic/PhyML/PhyML.SlackBuild b/academic/PhyML/PhyML.SlackBuild index 6c8ccdd3a4..d4b3d67cae 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 |