Browse Source

ap/ncbi-toolkit: Do not attempt to build X11 apps anymore.

slackware-14.2
Damien Goutte-Gattat 13 years ago
parent
commit
74e49910f7
  1. 40
      ap/ncbi-toolkit/build-fixes.diff
  2. 41
      ap/ncbi-toolkit/ncbi-toolkit.SlackBuild

40
ap/ncbi-toolkit/build-fixes.diff

@ -0,0 +1,40 @@
diff -Naur ncbi.orig/ncbi/corelib/ncbienv.c ncbi/ncbi/corelib/ncbienv.c
--- ncbi.orig/ncbi/corelib/ncbienv.c 2007-05-04 15:43:59.000000000 +0200
+++ ncbi/ncbi/corelib/ncbienv.c 2009-03-27 01:37:01.000000000 +0100
@@ -812,6 +812,8 @@
if (fp == NULL) {
path[0] = '\0';
pth = getenv ("NCBI");
+ if (pth == NULL)
+ pth = "/etc/ncbi";
if (pth != NULL) {
Nlm_FileBuildPath(path, pth, str + 1);
fp = Ncbienv_FileOpen (path, "r");
diff -Naur ncbi.orig/ncbimake/makedis.csh ncbi/ncbi/make/makedis.csh
--- ncbi.orig/ncbi/make/makedis.csh 2008-12-30 16:15:10.000000000 +0100
+++ ncbi/ncbi/make/makedis.csh 2009-03-27 01:39:23.000000000 +0100
@@ -342,8 +342,8 @@
#
#uncomment two following lines to don't build X11 apps
-#set HAVE_OGL=0
-#set HAVE_MOTIF=0
+set HAVE_OGL=0
+set HAVE_MOTIF=0
# if $OPENGL_TARGETS (in <platform>.ncbi.mk) is defined,
# then add the appropriate flags, libraries, and binaries for OpenGL apps
diff -Naur ncbi/ncbi.orig/platform/linux-x86.ncbi.mk ncbi/ncbi/platform/linux-x86.ncbi.mk
--- ncbi.orig/ncbi/platform/linux-x86.ncbi.mk 2009-02-04 15:24:03.000000000 +0100
+++ ncbi/ncbi/platform/linux-x86.ncbi.mk 2009-03-27 01:38:18.000000000 +0100
@@ -11,8 +11,8 @@
NCBI_AR=ar
NCBI_CC = gcc -pipe -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_GNU_SOURCE
NCBI_CFLAGS1 = -c
-NCBI_LDFLAGS1 = -O3 -mcpu=pentium4
-NCBI_OPTFLAG = -O3 -mcpu=pentium4
+NCBI_LDFLAGS1 = -O2 -march=i686 -mtune=i686
+NCBI_OPTFLAG = -O2 -march=i686 -mtune=i686
NCBI_BIN_MASTER = /home/coremake/ncbi/bin
NCBI_BIN_COPY = /home/coremake/ncbi/bin
NCBI_INCDIR = /home/coremake/ncbi/include

41
ap/ncbi-toolkit/ncbi-toolkit.SlackBuild

@ -30,7 +30,7 @@ WGET=${WGET:-ftp://ftp.ncbi.nih.gov/toolbox/ncbi_tools/old/20090301/$ARCHIVE}
# Built package infos
NAMETGZ=${NAMETGZ:-ncbi-toolkit}
BUILD=${BUILD:-1GGD}
BUILD=${BUILD:-2GGD}
ARCH=${ARCH:-i486}
TARGET=${TARGET:-i486}
@ -52,23 +52,10 @@ if [ ! -d $TMP ]; then
exit 1
fi
# Compilation flags
case "$ARCH" in
i?86)
CPUOPT="-O2 -march=$ARCH -mtune=i686"
;;
*)
CPUOPT="-O2"
;;
esac
# Get and verify the source archive
if [ ! -r $ARCHIVE ]; then
wget "$WGET"
fi
if [ ! -r $DEBPATCH ]; then
wget "$DEBURL"
fi
sha1sum -c $ARCHIVE.sha1
NAME=$(tar ft $ARCHIVE | head -1 | cut -d / -f 1)
@ -77,28 +64,26 @@ cd $TMP
echo "Building $ARCHIVE..."
mkdir ncbi && cd ncbi
tar xf $CWD/$ARCHIVE
sed -i "s/^NCBI_LDFLAGS1 =.*/NCBI_LDFLAGS1 = $CPUOPT/
s/^NCBI_OPTFLAG = .*/NCBI_OPTFLAG = $CPUOPT/" \
ncbi/platform/linux-x86.ncbi.mk
patch -p 1 < $CWD/build-fixes.diff
./ncbi/make/makedis.csh
# Install binaries and include files
mkdir -p $PKG/usr/include
cp -aL ncbi/bin ncbi/lib $PKG/usr
cp -aL ncbi/bin $PKG/usr/bin
rm $PKG/usr/bin/{demo*,dosimple,test*}
mv $PKG/usr/bin/wblast2.REAL $PKG/usr/bin/wblast2
mv $PKG/usr/bin/wblast2_cs.REAL $PKG/usr/bin/wblast2_cs
cp -aL ncbi/lib $PKG/usr/lib
strip --strip-unneeded $PKG/usr/bin/* $PKG/usr/lib/*
cp -aL ncbi/include $PKG/usr/include/ncbi
(
cd $PKG/usr/bin
for x in blast psiblast wblast2 ; do
mv $x.REAL $x
mv ${x}_cs.REAL ${x}_cs
done
rm demo* dosimple test*
strip --strip-unneeded * ../lib/*
)
rm $PKG/usr/include/ncbi/{cn3d*,pcre*,vib*}
# Install and compress man pages
mkdir -p $PKG/usr/man
cp -aL ncbi/doc/man $PKG/usr/man/man1
rm $PKG/usr/man/man1/{Psequin.1,asnval.1,cleanasn.1,ddv.1,entrez2.1,\
fmerge.1,gbseqget.1,insdseqget.1,nps2gps.1,sortbyquote.1,spidey.1,\
trna2sap.1,trna2tbl.1,udv.1}
find $PKG/usr/man/man1 -type f -exec gzip -9 {} \;
# Install shared NCBI data
@ -118,7 +103,7 @@ rm -rf $DOCDIR/man
mkdir -p $PKG/etc/ncbi
install -m 644 $CWD/ncbirc $PKG/etc/ncbi/ncbirc.new
# Sanitize permission
# Sanitize permissions
find $PKG -type d -exec chmod 755 {} \;
find $PKG -type f -exec chmod 644 {} \;
find $PKG/usr/bin -type f -exec chmod 755 {} \;

Loading…
Cancel
Save