aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonnie Berkholz <dberkholz@gentoo.org>2008-08-01 16:09:48 -0700
committerDonnie Berkholz <dberkholz@gentoo.org>2008-08-01 16:09:48 -0700
commitc0dbe285a00523e7d93d3a3a11630cbec45a8397 (patch)
tree35cf9bf0481c7648fb1b5c75d1ffc38fb56fbf80 /sci-libs
parentAdd initial version of split-out ccp4-libs package. (diff)
downloaddberkholz-c0dbe285a00523e7d93d3a3a11630cbec45a8397.tar.gz
dberkholz-c0dbe285a00523e7d93d3a3a11630cbec45a8397.tar.bz2
dberkholz-c0dbe285a00523e7d93d3a3a11630cbec45a8397.zip
Move ccp4-libs to sci-libs.
Diffstat (limited to 'sci-libs')
-rw-r--r--sci-libs/ccp4-libs/Manifest8
-rw-r--r--sci-libs/ccp4-libs/ccp4-libs-6.0.99e.ebuild255
-rw-r--r--sci-libs/ccp4-libs/files/6.0.2-ppc-double-define-gerror.patch11
-rw-r--r--sci-libs/ccp4-libs/files/6.0.99e-clipper-mmdbold-ggc-4.3.patch22
-rw-r--r--sci-libs/ccp4-libs/files/6.0.99e-dont-make-dirs-in-configure.patch87
-rw-r--r--sci-libs/ccp4-libs/files/6.0.99e-fix-setup-bash-incompatibility.patch11
-rw-r--r--sci-libs/ccp4-libs/files/pass-clipper-enablevals.patch11
-rw-r--r--sci-libs/ccp4-libs/metadata.xml5
8 files changed, 410 insertions, 0 deletions
diff --git a/sci-libs/ccp4-libs/Manifest b/sci-libs/ccp4-libs/Manifest
new file mode 100644
index 0000000..4e71bed
--- /dev/null
+++ b/sci-libs/ccp4-libs/Manifest
@@ -0,0 +1,8 @@
+AUX 6.0.2-ppc-double-define-gerror.patch 424 RMD160 4f012233446fffa61e8d775a19a0dacea4ae2234 SHA1 209fa1bdf1e59b4055177e343b69e487d9183fb3 SHA256 09c2c1e0176bee94673b21609b2b00118b2bb4f5942f3feb35c64c61c99ebc61
+AUX 6.0.99e-clipper-mmdbold-ggc-4.3.patch 656 RMD160 6b302779b48217a14f5ac9110bc307db3a3b51eb SHA1 f5813d6769fa9dc11605425cdbda85691d3016bc SHA256 982eff0336a6dfaf4e280d51a59cf722fc063ca89d15ca0af46ce83727fb9a8a
+AUX 6.0.99e-dont-make-dirs-in-configure.patch 2866 RMD160 ba49e45ab609a42a2d93b96f55af913bf9625610 SHA1 36c9329c3768c08687ef062c9ab649d32833b422 SHA256 1b5997f17526a4fd60ffa9eccf4b765aadf3a78c9394657000e0454f364240ca
+AUX 6.0.99e-fix-setup-bash-incompatibility.patch 422 RMD160 e7e886ab030cf3324302c8fd0c866b48eeb34f8c SHA1 4e549abcd3ced1e6ecf9d3f2bddfed70425d61aa SHA256 109a0e806f9c0e1b8bf5e5f0c58be6f1dae06396b62ee4dae9f579ff7dcb5a01
+AUX pass-clipper-enablevals.patch 501 RMD160 23466922268a91570b0f64cf79809b988e32689b SHA1 c254d31fe88ed1716a53bd549cf7aee537ca5204 SHA256 d476c9f231fb6cdfb5e57004b393644a88016318cdeed9c33c32de25e0d91b79
+DIST ccp4-6.0.99e-core-src.tar.gz 202226972 RMD160 5f88c763c028acad02bb81e75c490184331bb01d SHA1 c3a610f0eabb452e355ba07be3387175583e4e64 SHA256 51484c9e9a60d1983f8c05edddb4bb5215e6f7cc7dd83d5546b0d16c38624a08
+EBUILD ccp4-libs-6.0.99e.ebuild 6827 RMD160 e29f257437241ada02f3623e57a51e0ff30900c0 SHA1 8cf97bb2cea3da06fd71cf9738500977ae5f8bf9 SHA256 449d05000a825573a42aa6f88d3b5eb75087fb731e22b5f319e5c7f60bb4fa56
+MISC metadata.xml 166 RMD160 4452298fd03e7c9395d1182bfe69d60a14144af6 SHA1 cb0b513473c0348f4f6f6cd9a132e4884155fddb SHA256 84c92b49702daf95eace8d2765215cbd8650da4ef776f9f700b5ce3785dec852
diff --git a/sci-libs/ccp4-libs/ccp4-libs-6.0.99e.ebuild b/sci-libs/ccp4-libs/ccp4-libs-6.0.99e.ebuild
new file mode 100644
index 0000000..5a1bca4
--- /dev/null
+++ b/sci-libs/ccp4-libs/ccp4-libs-6.0.99e.ebuild
@@ -0,0 +1,255 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/ccp4/ccp4-6.0.2-r1.ebuild,v 1.6 2008/06/03 02:11:18 mr_bones_ Exp $
+
+inherit fortran eutils gnuconfig toolchain-funcs
+
+FORTRAN="g77 gfortran ifc"
+
+SRC="ftp://ftp.ccp4.ac.uk/ccp4"
+
+PATCH_TOT="0"
+# Here's a little scriptlet to generate this list from the provided
+# index.patches file
+#
+# i=1; while read -a line; do [[ ${line//#} != ${line} ]] && continue;
+# echo "PATCH${i}=( ${line[1]}"; echo "${line[0]} )"; (( i++ )); done <
+# index.patches
+#PATCH1=( src/topp_
+#topp.f-r1.16.2.5-r1.16.2.6.diff )
+#PATCH2=( .
+#configure-r1.372.2.18-r1.372.2.19.diff )
+
+DESCRIPTION="Protein X-ray crystallography toolkit"
+HOMEPAGE="http://www.ccp4.ac.uk/"
+RESTRICT="mirror"
+#SRC_URI="${SRC}/${PV}/source/${P/-libs}-core-src.tar.gz"
+SRC_URI="${SRC}/6.1/${P/-libs}-core-src.tar.gz"
+for i in $(seq $PATCH_TOT); do
+ NAME="PATCH${i}[1]"
+ SRC_URI="${SRC_URI}
+ ${SRC}/${PV}/patches/${!NAME}"
+done
+LICENSE="ccp4"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE=""
+RDEPEND="virtual/lapack
+ virtual/blas
+ =sci-libs/fftw-2*
+ app-shells/tcsh"
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}/${P/-libs}"
+
+src_unpack() {
+ unpack ${A}
+ cd ${S}
+
+ einfo "Applying upstream patches ..."
+ for patch in $(seq $PATCH_TOT); do
+ base="PATCH${patch}"
+ dir=$(eval echo \${${base}[0]})
+ p=$(eval echo \${${base}[1]})
+ pushd ${dir} >& /dev/null
+ ccp_patch ${DISTDIR}/${p}
+ popd >& /dev/null
+ done
+ einfo "Done."
+ echo
+
+ einfo "Applying Gentoo patches ..."
+ # These two only needed when attempting to install outside build dir via
+ # --bindir and --libdir instead of straight copying after build
+
+ # it attempts to install some libraries during the build
+ #ccp_patch ${FILESDIR}/${P}-install-libs-at-install-time.patch
+ # hklview/ipdisp.exe/xdlmapman/ipmosflm can't find libxdl_view
+ # without this patch when --libdir is set
+ # Rotgen still needs more patching to find it
+ #ccp_patch ${FILESDIR}/add-xdl-libdir.patch
+
+ # it tries to create libdir, bindir etc on live system in configure
+ ccp_patch ${FILESDIR}/${PV}-dont-make-dirs-in-configure.patch
+
+ # Don't use this when we aren't building clipper
+ # For some reason clipper check for $enableval even when --enable is passed
+ ccp_patch ${FILESDIR}/pass-clipper-enablevals.patch
+
+ # gerror_ gets defined twice on ppc if you're using gfortran/g95
+ ccp_patch ${FILESDIR}/6.0.2-ppc-double-define-gerror.patch
+
+ # csh syntax doesn't work in a bash script
+ ccp_patch ${FILESDIR}/${PV}-fix-setup-bash-incompatibility.patch
+
+ # gcc-4.3 fixes
+ ccp_patch ${FILESDIR}/${PV}-clipper-mmdbold-ggc-4.3.patch
+
+ einfo "Done." # done applying Gentoo patches
+ echo
+
+ gnuconfig_update
+}
+
+src_compile() {
+ # Build system is broken if we set LDFLAGS
+ unset LDFLAGS
+
+ # GENTOO_OSNAME can be one of:
+ # irix irix64 sunos sunos64 aix hpux osf1 linux freebsd
+ # linux_compaq_compilers linux_intel_compilers generic Darwin
+ # ia64_linux_intel Darwin_ibm_compilers linux_ibm_compilers
+ if [[ "${FORTRANC}" = "ifc" ]]; then
+ if use ia64; then
+ GENTOO_OSNAME="ia64_linux_intel"
+ else
+ # Should be valid for x86, maybe amd64
+ GENTOO_OSNAME="linux_intel_compilers"
+ fi
+ else
+ # Should be valid for x86 and amd64, at least
+ GENTOO_OSNAME="linux"
+ fi
+
+ # Sets up env
+ ln -s \
+ ccp4.setup-bash \
+ ${S}/include/ccp4.setup
+
+ # We agree to the license by emerging this, set in LICENSE
+ sed -i \
+ -e "s~^\(^agreed=\).*~\1yes~g" \
+ ${S}/configure
+
+ # Fix up variables -- need to reset CCP4_MASTER at install-time
+ sed -i \
+ -e "s~^\(setenv CCP4_MASTER.*\)/.*~\1${WORKDIR}~g" \
+ -e "s~^\(setenv CCP4I_TCLTK.*\)/usr/local/bin~\1/usr/bin~g" \
+ ${S}/include/ccp4.setup*
+
+ # Set up variables for build
+ source ${S}/include/ccp4.setup
+
+ export CC=$(tc-getCC)
+ export CXX=$(tc-getCXX)
+ export COPTIM=${CFLAGS}
+ export CXXOPTIM=${CXXFLAGS}
+ # Default to -O2 if FFLAGS is unset
+ export FC=${FORTRANC}
+ export FOPTIM=${FFLAGS:- -O2}
+
+ # Can't use econf, configure rejects unknown options like --prefix
+ ./configure \
+ --onlylibs \
+ --with-shared-libs \
+ --with-fftw=/usr \
+ --with-warnings \
+ --disable-cctbx \
+ --tmpdir="${TMPDIR}" \
+ ${GENTOO_OSNAME} || die "econf failed"
+ emake -j1 onlylib || die "emake failed"
+}
+
+src_install() {
+ # Set up variables for build
+ source ${S}/include/ccp4.setup
+
+# Only needed when using --bindir and --libdir
+ # Needed to avoid errors. Originally tried to make lib and bin
+ # in configure script, now patched out by dont-make-dirs-in-configure.patch
+# dodir /usr/include /usr/$(get_libdir) /usr/bin
+
+# make install || die "install failed"
+ einstall || die "install failed"
+
+ # Get rid of S instances
+ # Also the main clipper library is built as libclipper-core, not libclipper
+ sed -i \
+ -e "s:${S}:$usr:g" \
+ -e "s:lclipper :lclipper-core :g" \
+ ${S}/bin/clipper-config
+
+ # Libs
+ for file in ${S}/lib/*; do
+ if [[ -d ${file} ]]; then
+ continue
+ elif [[ -x ${file} ]]; then
+ dolib.so ${file} || die
+ else
+ insinto /usr/$(get_libdir)
+ doins ${file} || die
+ fi
+ done
+
+ # Fix libdir in all *.la files
+ sed -i \
+ -e "s:^\(libdir=\).*:\1\'/usr/$(get_libdir)\':g" \
+ ${D}/usr/$(get_libdir)/*.la
+
+ # Library symlinks
+ local LIBNAMES="libclipper-ccp4.so.0.0.0
+ libclipper-cif.so.0.0.0
+ libclipper-contrib.so.0.0.0
+ libclipper-core.so.0.0.0
+ libclipper-minimol.so.0.0.0
+ libclipper-mmdbold.so.0.0.0
+ libclipper-mmdb.so.0.0.0
+ libclipper-mtz.so.1.0.0
+ libclipper-phs.so.0.0.0
+ libssm.so.0.0.0"
+
+ for LIBNAME in ${LIBNAMES}; do
+ library_dosym ${LIBNAME}
+ done
+
+ # Data
+ insinto /usr/share/ccp4
+ doins -r ${S}/lib/data || die
+
+ # Include files
+ insinto /usr/include
+ for i in ccp4 mmdb; do
+ doins -r ${S}/include/${i} || die
+ done
+
+ # Fix wrongly installed HTML pages from clipper
+ dohtml "${D}"/usr/html/*
+ rm -rf "${D}"/usr/html
+}
+
+# Epatch wrapper for bulk patching
+ccp_patch() {
+ EPATCH_SINGLE_MSG=" ${1##*/} ..." epatch ${1}
+}
+
+# Links libname.so, libname.so.major and libname.so.major.minor
+# to libname.so.major.minor.micro
+library_dosym() {
+ local LIBNAME LIBDIR SUFFIX CORE_LIBNAME LIB_MAJOR LIB_MINOR LIB_VERSIONS
+
+ LIBNAME=${1}
+ LIBDIR=${2:-/usr/$(get_libdir)}
+
+ # Tag / on the end of libdir if needed
+ if [[ ${LIBDIR:$((${#LIBDIR}-1)):1} != "/" ]]; then
+ LIBDIR="${LIBDIR}/"
+ fi
+
+ if [[ "${LIBNAME}" != *.so.* ]]; then
+ msg="library_dosym() requires a shared, versioned library as an argument"
+ eerror "$msg"
+ die "$msg"
+ fi
+
+ SUFFIX=${LIBNAME##*so.}
+ CORE_LIBNAME=${LIBNAME%.so.*}
+ CORE_LIBNAME="${CORE_LIBNAME}.so"
+ LIB_MAJOR=${SUFFIX%%.*}
+ LIB_MINOR=${SUFFIX#*.}
+ LIB_MINOR=${SUFFIX%%.*}
+ LIB_VERSIONS="${LIB_MAJOR} ${LIB_MAJOR}.${LIB_MINOR}"
+ for LIB_SUFFIX in .${LIB_MAJOR} ""; do
+ einfo "Calling dosym ${LIBNAME} ${LIBDIR} ${CORE_LIBNAME} ${LIB_SUFFIX}"
+ dosym ${LIBNAME} ${LIBDIR}${CORE_LIBNAME}${LIB_SUFFIX}
+ done
+}
diff --git a/sci-libs/ccp4-libs/files/6.0.2-ppc-double-define-gerror.patch b/sci-libs/ccp4-libs/files/6.0.2-ppc-double-define-gerror.patch
new file mode 100644
index 0000000..a77d949
--- /dev/null
+++ b/sci-libs/ccp4-libs/files/6.0.2-ppc-double-define-gerror.patch
@@ -0,0 +1,11 @@
+--- ccp4-6.0.1.orig/lib/src/library_f.c 2006-06-12 07:06:22.000000000 -0700
++++ ccp4-6.0.1/lib/src/library_f.c 2006-06-12 07:21:56.000000000 -0700
+@@ -716,7 +716,7 @@
+
+ #endif /* end of apple xlf support */
+
+-#if ( defined (__linux__) && defined (_CALL_SYSV) )
++#if ( defined (__linux__) && defined (_CALL_SYSV) && ! defined(G95) && ! defined (GFORTRAN) )
+ /* linuxppc xlf support */
+ void gerror_ (str, Lstr)
+ char *str;
diff --git a/sci-libs/ccp4-libs/files/6.0.99e-clipper-mmdbold-ggc-4.3.patch b/sci-libs/ccp4-libs/files/6.0.99e-clipper-mmdbold-ggc-4.3.patch
new file mode 100644
index 0000000..6618660
--- /dev/null
+++ b/sci-libs/ccp4-libs/files/6.0.99e-clipper-mmdbold-ggc-4.3.patch
@@ -0,0 +1,22 @@
+--- ccp4-6.0.99e.orig/lib/clipper/clipper/mmdbold/clipper_mmdb.cpp 2008-07-31 13:23:13.000000000 -0700
++++ ccp4-6.0.99e/lib/clipper/clipper/mmdbold/clipper_mmdb.cpp 2008-07-31 13:47:35.000000000 -0700
+@@ -43,7 +43,7 @@
+
+ #include <set>
+ #include <algorithm>
+-
++#include <string.h>
+
+ namespace clipper {
+
+--- ccp4-6.0.99e.orig/lib/clipper/clipper/mmdbold/clipper_mmdb_wrapper.cpp.orig 2008-07-31 13:49:53.000000000 -0700
++++ ccp4-6.0.99e/lib/clipper/clipper/mmdbold/clipper_mmdb_wrapper.cpp 2008-07-31 13:50:25.000000000 -0700
+@@ -40,7 +40,7 @@
+ //L MA 02111-1307 USA
+
+ #include "clipper_mmdb_wrapper.h"
+-
++#include <string.h>
+
+ namespace clipper {
+
diff --git a/sci-libs/ccp4-libs/files/6.0.99e-dont-make-dirs-in-configure.patch b/sci-libs/ccp4-libs/files/6.0.99e-dont-make-dirs-in-configure.patch
new file mode 100644
index 0000000..583697c
--- /dev/null
+++ b/sci-libs/ccp4-libs/files/6.0.99e-dont-make-dirs-in-configure.patch
@@ -0,0 +1,87 @@
+--- ccp4-6.0.99e.orig/configure 2008-07-31 10:37:22.000000000 -0700
++++ ccp4-6.0.99e/configure 2008-07-31 10:39:18.000000000 -0700
+@@ -643,45 +643,45 @@
+ # echo "! Beware -- the $system installation isn't properly tested." ; }
+ syswarn='echo; echo "! Beware -- the $system installation is not properly tested."'
+
+-if test -z "$onlylibs" ; then
+- for i in CCP4_SCR BINSORT_SCR; do
+- if ( eval test -d \$$i || eval mkdir -p \$$i ) ; then :
+- else
+- eval echo "! No directory \$$i and can\'t create it."
+- echo " Check the value of $i."
+- badvar=1
+- fi
+- done
+-
+- for i in libdir bindir includedir; do
+- if ( eval test -d \$$i || eval mkdir -p \$$i ) ; then :
+- else
+- eval echo "! No directory \$$i and can\'t create it."
+- echo " Check the argument of --$i."
+- badvar=1
+- fi
+- done
+-
+- for i in $dotsrc $dotunsupp $dotunsuppsrc $dotdeprec $dotdeprecsrc ./lib ./lib/src ./lib/data ./ccp4i/etc/unix $mosflmdir/lib $mosflmdir/bin $mosflmdir/cbf/lib ; do
+- if test -d $i || mkdir $i; then :
+- else
+- eval echo "! No directory $i and can\'t create it."
+- badvar=1
+- fi
+- done
+-else
+- # Kludge to fool the "Makefile" target in the top-level CCP4
+- # Makefile into not trying to remake src/Makefile.in
+- for i in $srcdir/src $srcdir/lib/src ; do
+- if test -d $i || mkdir $i; then
+- if ! test -f $i/Makefile.in ; then
+- echo
+- echo "onlylibs: making dummy file $i/Makefile.in"
+- touch $i/Makefile.in
+- fi
+- fi
+- done
+-fi
++#if test -z "$onlylibs" ; then
++# for i in CCP4_SCR BINSORT_SCR; do
++# if ( eval test -d \$$i || eval mkdir -p \$$i ) ; then :
++# else
++# eval echo "! No directory \$$i and can\'t create it."
++# echo " Check the value of $i."
++# badvar=1
++# fi
++# done
++#
++# for i in libdir bindir includedir; do
++# if ( eval test -d \$$i || eval mkdir -p \$$i ) ; then :
++# else
++# eval echo "! No directory \$$i and can\'t create it."
++# echo " Check the argument of --$i."
++# badvar=1
++# fi
++# done
++#
++# for i in $dotsrc $dotunsupp $dotunsuppsrc $dotdeprec $dotdeprecsrc ./lib ./lib/src ./lib/data ./ccp4i/etc/unix $mosflmdir/lib $mosflmdir/bin $mosflmdir/cbf/lib ; do
++# if test -d $i || mkdir $i; then :
++# else
++# eval echo "! No directory $i and can\'t create it."
++# badvar=1
++# fi
++# done
++#else
++# # Kludge to fool the "Makefile" target in the top-level CCP4
++# # Makefile into not trying to remake src/Makefile.in
++# for i in $srcdir/src $srcdir/lib/src ; do
++# if test -d $i || mkdir $i; then
++# if ! test -f $i/Makefile.in ; then
++# echo
++# echo "onlylibs: making dummy file $i/Makefile.in"
++# touch $i/Makefile.in
++# fi
++# fi
++# done
++#fi
+
+ ### sanity checks
+
diff --git a/sci-libs/ccp4-libs/files/6.0.99e-fix-setup-bash-incompatibility.patch b/sci-libs/ccp4-libs/files/6.0.99e-fix-setup-bash-incompatibility.patch
new file mode 100644
index 0000000..d98f54c
--- /dev/null
+++ b/sci-libs/ccp4-libs/files/6.0.99e-fix-setup-bash-incompatibility.patch
@@ -0,0 +1,11 @@
+--- ccp4-6.0.99e.orig/include/ccp4.setup-bash 2008-07-31 10:37:22.000000000 -0700
++++ ccp4-6.0.99e/include/ccp4.setup-bash 2008-07-31 12:47:14.000000000 -0700
+@@ -181,7 +181,7 @@
+
+ #Python path for the subprocess fixed module
+
+-if ($ccp4_first_in_path) then
++if [ $ccp4_first_in_path -eq 1 ]; then
+ setenv PYTHONPATH ${CCP4}/share/python:${PYTHONPATH}
+ else
+ setenv PYTHONPATH ${PYTHONPATH}:${CCP4}/share/python
diff --git a/sci-libs/ccp4-libs/files/pass-clipper-enablevals.patch b/sci-libs/ccp4-libs/files/pass-clipper-enablevals.patch
new file mode 100644
index 0000000..3e1a8b0
--- /dev/null
+++ b/sci-libs/ccp4-libs/files/pass-clipper-enablevals.patch
@@ -0,0 +1,11 @@
+--- ccp4-5.99.5.orig/configure 2006-01-06 11:45:43.000000000 -0800
++++ ccp4-5.99.5/configure 2006-01-06 11:46:53.000000000 -0800
+@@ -3210,7 +3210,7 @@
+ #ccp4 setup
+ xopts="${xopts} --with-ccp4=${srcdir}"
+ #interface setup
+- xopts="${xopts} --enable-mmdb --enable-cif --enable-ccp4 --enable-minimol"
++ xopts="${xopts} --enable-mmdb --enable-cif --enable-ccp4 --enable-minimol --enable-mmdbold --enable-mtz --with-mccp4=/usr"
+ echo
+ echo "********* CLIPPER CONFIGURATION ***********"
+ echo
diff --git a/sci-libs/ccp4-libs/metadata.xml b/sci-libs/ccp4-libs/metadata.xml
new file mode 100644
index 0000000..9ac9ffd
--- /dev/null
+++ b/sci-libs/ccp4-libs/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>sci-chemistry</herd>
+</pkgmetadata>