summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonnie Berkholz <dberkholz@gentoo.org>2006-06-16 20:46:02 +0000
committerDonnie Berkholz <dberkholz@gentoo.org>2006-06-16 20:46:02 +0000
commitc6da6496bd646a96e65a7f629b143f2e8db714d8 (patch)
tree73a03ae106770daa8c4185ba86b1f82e2e8186f7 /sci-chemistry
parentStable on ppc64 (diff)
downloadhistorical-c6da6496bd646a96e65a7f629b143f2e8db714d8.tar.gz
historical-c6da6496bd646a96e65a7f629b143f2e8db714d8.tar.bz2
historical-c6da6496bd646a96e65a7f629b143f2e8db714d8.zip
Add CCP4, a popular protein X-ray crystallography toolkit. Relies on portage auto-fixing RPATHs for now, because its build system consists of a bunch of stuff thrown together into the same tarball.
Package-Manager: portage-2.1.1_pre1
Diffstat (limited to 'sci-chemistry')
-rw-r--r--sci-chemistry/ccp4/ChangeLog20
-rw-r--r--sci-chemistry/ccp4/Manifest64
-rw-r--r--sci-chemistry/ccp4/ccp4-6.0.1.ebuild432
-rw-r--r--sci-chemistry/ccp4/files/6.0.1-dont-make-dirs-in-configure.patch87
-rw-r--r--sci-chemistry/ccp4/files/6.0.1-ppc-double-define-gerror.patch11
-rw-r--r--sci-chemistry/ccp4/files/ccp4i-default-to-firefox.patch13
-rw-r--r--sci-chemistry/ccp4/files/check-blas-lapack-pthread.patch103
-rw-r--r--sci-chemistry/ccp4/files/clipper-find-mccp4-includes.patch11
-rw-r--r--sci-chemistry/ccp4/files/create-mosflm-bindir.patch10
-rw-r--r--sci-chemistry/ccp4/files/digest-ccp4-6.0.13
-rw-r--r--sci-chemistry/ccp4/files/dont-build-rasmol.patch19
-rw-r--r--sci-chemistry/ccp4/files/make-ipmosflm-dir.patch10
-rw-r--r--sci-chemistry/ccp4/files/make-mosflm-cbf-libdir.patch11
-rw-r--r--sci-chemistry/ccp4/files/make-mosflm-index-libdir.patch10
-rw-r--r--sci-chemistry/ccp4/files/make-mosflm-libdir.patch10
-rw-r--r--sci-chemistry/ccp4/files/pass-clipper-enablevals.patch11
-rw-r--r--sci-chemistry/ccp4/metadata.xml9
17 files changed, 834 insertions, 0 deletions
diff --git a/sci-chemistry/ccp4/ChangeLog b/sci-chemistry/ccp4/ChangeLog
new file mode 100644
index 000000000000..d379184f709c
--- /dev/null
+++ b/sci-chemistry/ccp4/ChangeLog
@@ -0,0 +1,20 @@
+# ChangeLog for sci-chemistry/ccp4
+# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/ccp4/ChangeLog,v 1.1 2006/06/16 20:46:02 spyderous Exp $
+
+*ccp4-6.0.1 (16 Jun 2006)
+
+ 16 Jun 2006; Donnie Berkholz <spyderous@gentoo.org>;
+ +files/6.0.1-dont-make-dirs-in-configure.patch,
+ +files/6.0.1-ppc-double-define-gerror.patch,
+ +files/ccp4i-default-to-firefox.patch,
+ +files/check-blas-lapack-pthread.patch,
+ +files/clipper-find-mccp4-includes.patch,
+ +files/create-mosflm-bindir.patch, +files/dont-build-rasmol.patch,
+ +files/make-ipmosflm-dir.patch, +files/make-mosflm-cbf-libdir.patch,
+ +files/make-mosflm-index-libdir.patch, +files/make-mosflm-libdir.patch,
+ +files/pass-clipper-enablevals.patch, +metadata.xml, +ccp4-6.0.1.ebuild:
+ Add CCP4, a popular protein X-ray crystallography toolkit. Relies on portage
+ auto-fixing RPATHs for now, because its build system consists of a bunch of
+ stuff thrown together into the same tarball.
+
diff --git a/sci-chemistry/ccp4/Manifest b/sci-chemistry/ccp4/Manifest
new file mode 100644
index 000000000000..d3ccda89b92d
--- /dev/null
+++ b/sci-chemistry/ccp4/Manifest
@@ -0,0 +1,64 @@
+AUX 6.0.1-dont-make-dirs-in-configure.patch 2790 RMD160 904e37ab1ea20dda50f50ce8780268eb5fa52480 SHA1 f8989cb867c92def86ccd88b4d67f38578d5d80b SHA256 2dbf78513ef94d88e446042e969644ad8a8462a22e80105e7481af93003a18bf
+MD5 3dc230e3cc15f5cd2a19968e8f07a9f2 files/6.0.1-dont-make-dirs-in-configure.patch 2790
+RMD160 904e37ab1ea20dda50f50ce8780268eb5fa52480 files/6.0.1-dont-make-dirs-in-configure.patch 2790
+SHA256 2dbf78513ef94d88e446042e969644ad8a8462a22e80105e7481af93003a18bf files/6.0.1-dont-make-dirs-in-configure.patch 2790
+AUX 6.0.1-ppc-double-define-gerror.patch 424 RMD160 4f012233446fffa61e8d775a19a0dacea4ae2234 SHA1 209fa1bdf1e59b4055177e343b69e487d9183fb3 SHA256 09c2c1e0176bee94673b21609b2b00118b2bb4f5942f3feb35c64c61c99ebc61
+MD5 5a2ad632f539bc7981b55b6f52b6a227 files/6.0.1-ppc-double-define-gerror.patch 424
+RMD160 4f012233446fffa61e8d775a19a0dacea4ae2234 files/6.0.1-ppc-double-define-gerror.patch 424
+SHA256 09c2c1e0176bee94673b21609b2b00118b2bb4f5942f3feb35c64c61c99ebc61 files/6.0.1-ppc-double-define-gerror.patch 424
+AUX ccp4i-default-to-firefox.patch 717 RMD160 626050c2ca8386e369900225f74f97fb22c3a91e SHA1 dc255e30033d1dbc422dbacd2c1814c13a003bc3 SHA256 40bc277d9353f13b490291fe0ba10c1180adc80a660afa5cf8f7c9449af909ae
+MD5 b7c4c90e38ef49651876128a209b4546 files/ccp4i-default-to-firefox.patch 717
+RMD160 626050c2ca8386e369900225f74f97fb22c3a91e files/ccp4i-default-to-firefox.patch 717
+SHA256 40bc277d9353f13b490291fe0ba10c1180adc80a660afa5cf8f7c9449af909ae files/ccp4i-default-to-firefox.patch 717
+AUX check-blas-lapack-pthread.patch 5335 RMD160 d9818cd59333c6f40984f71a0f32249725d5ffcc SHA1 5aa0ee530975bd89dde38145297c4868ee54adbb SHA256 82a73295274b6d4cabbe00883a3e9cf6a38fe80eed8c487cd67960d073cb1231
+MD5 a9fd6533dc70e2c88e4623509e20c30b files/check-blas-lapack-pthread.patch 5335
+RMD160 d9818cd59333c6f40984f71a0f32249725d5ffcc files/check-blas-lapack-pthread.patch 5335
+SHA256 82a73295274b6d4cabbe00883a3e9cf6a38fe80eed8c487cd67960d073cb1231 files/check-blas-lapack-pthread.patch 5335
+AUX clipper-find-mccp4-includes.patch 491 RMD160 203cb5f807ede5462070d993f3e4b914992aa3e1 SHA1 f58ef6f143d751d50b55e620be877327af651fb9 SHA256 154c012c0ca75fc0da50b412b948acec53f4cecd2efd8910af73166db270e026
+MD5 cee8a62b63386a13f4276cab7bf09260 files/clipper-find-mccp4-includes.patch 491
+RMD160 203cb5f807ede5462070d993f3e4b914992aa3e1 files/clipper-find-mccp4-includes.patch 491
+SHA256 154c012c0ca75fc0da50b412b948acec53f4cecd2efd8910af73166db270e026 files/clipper-find-mccp4-includes.patch 491
+AUX create-mosflm-bindir.patch 438 RMD160 b0a210bf86de3af52c538efdf05d9ba44d7824d9 SHA1 30f45f7ac2eda5241256d31ee5073594985e5a05 SHA256 41b06cb4860b263fbc5c7c5be2aec1f859ff1cd6dd3750e5aae0410c264b1d84
+MD5 fcf801c9c9f1cc7f35294ff95776ff5e files/create-mosflm-bindir.patch 438
+RMD160 b0a210bf86de3af52c538efdf05d9ba44d7824d9 files/create-mosflm-bindir.patch 438
+SHA256 41b06cb4860b263fbc5c7c5be2aec1f859ff1cd6dd3750e5aae0410c264b1d84 files/create-mosflm-bindir.patch 438
+AUX dont-build-rasmol.patch 725 RMD160 2c294c46dcea586026e6d7c3936527e490bd7569 SHA1 97ac86575512776ecabb32488df6f59cf2431884 SHA256 f46b1d8d6f239f4b7c9b1d343661c98f1bc0015bc988881261b06a79a1e0c3e5
+MD5 8638a4880d926711233e53382f35205a files/dont-build-rasmol.patch 725
+RMD160 2c294c46dcea586026e6d7c3936527e490bd7569 files/dont-build-rasmol.patch 725
+SHA256 f46b1d8d6f239f4b7c9b1d343661c98f1bc0015bc988881261b06a79a1e0c3e5 files/dont-build-rasmol.patch 725
+AUX make-ipmosflm-dir.patch 375 RMD160 b359ff3028777157f6ce4cb60c5aa35b8177779e SHA1 1c23f2d56a8cfea479f5b32c842fe50d134c68c0 SHA256 2ca03ea4b4c1581be56bbac0afd3cbfe789b61a8453e50b1b477b074c6b2fd43
+MD5 5c89d8a6c5570d442a71a8c598a80f72 files/make-ipmosflm-dir.patch 375
+RMD160 b359ff3028777157f6ce4cb60c5aa35b8177779e files/make-ipmosflm-dir.patch 375
+SHA256 2ca03ea4b4c1581be56bbac0afd3cbfe789b61a8453e50b1b477b074c6b2fd43 files/make-ipmosflm-dir.patch 375
+AUX make-mosflm-cbf-libdir.patch 415 RMD160 19e275563cbd7c3d6b91630f8c554494a75d8ea0 SHA1 d264cbee4db1a1f48297ce43fef4f45e14e1aebe SHA256 475eec831306d33871f65b827b07a09dbe0ecd7b4f9e6af34a91fa4d433d56a4
+MD5 962cb5c0c55797f865254e4dc374183b files/make-mosflm-cbf-libdir.patch 415
+RMD160 19e275563cbd7c3d6b91630f8c554494a75d8ea0 files/make-mosflm-cbf-libdir.patch 415
+SHA256 475eec831306d33871f65b827b07a09dbe0ecd7b4f9e6af34a91fa4d433d56a4 files/make-mosflm-cbf-libdir.patch 415
+AUX make-mosflm-index-libdir.patch 358 RMD160 772bad5d83385adce5858f43ac9302c94cd6a6b8 SHA1 b889d238b0f3e2385ad8259ea4ea85b29d05e0d1 SHA256 5549d5208548168c0f246606802c143bd34b87ca3eb25640c6b777d9d9e4b902
+MD5 e38e0ef05c30c16148e8319e0bb0977d files/make-mosflm-index-libdir.patch 358
+RMD160 772bad5d83385adce5858f43ac9302c94cd6a6b8 files/make-mosflm-index-libdir.patch 358
+SHA256 5549d5208548168c0f246606802c143bd34b87ca3eb25640c6b777d9d9e4b902 files/make-mosflm-index-libdir.patch 358
+AUX make-mosflm-libdir.patch 371 RMD160 2ff9ddcc064b2621d241850d9774961b140d28b8 SHA1 0a4aba167b530544f6e602dab622e51fae1c7b68 SHA256 55c2978125acb3f1ba55039d171b09b6dbd13ee1dd1e4c1e48edc48e89d5c717
+MD5 703cb01ad626d4dbf4176a18ea5269a1 files/make-mosflm-libdir.patch 371
+RMD160 2ff9ddcc064b2621d241850d9774961b140d28b8 files/make-mosflm-libdir.patch 371
+SHA256 55c2978125acb3f1ba55039d171b09b6dbd13ee1dd1e4c1e48edc48e89d5c717 files/make-mosflm-libdir.patch 371
+AUX pass-clipper-enablevals.patch 501 RMD160 23466922268a91570b0f64cf79809b988e32689b SHA1 c254d31fe88ed1716a53bd549cf7aee537ca5204 SHA256 d476c9f231fb6cdfb5e57004b393644a88016318cdeed9c33c32de25e0d91b79
+MD5 bcdb856dae7ea7b22d130474f6c17b7d files/pass-clipper-enablevals.patch 501
+RMD160 23466922268a91570b0f64cf79809b988e32689b files/pass-clipper-enablevals.patch 501
+SHA256 d476c9f231fb6cdfb5e57004b393644a88016318cdeed9c33c32de25e0d91b79 files/pass-clipper-enablevals.patch 501
+DIST ccp4-6.0.1-core-src.tar.gz 59311291 RMD160 0f514fe30f22a4f6eb2e05c8bab567d2132e8fae SHA1 e8f5fb325a13375793f7610160337090af8fb9b5 SHA256 26a5704d707c3bc2fbe4c1d0804abccc1c50255005d26a8ec3a03fcba63335f2
+EBUILD ccp4-6.0.1.ebuild 13729 RMD160 5fe2a8f1d42a810e8fda14c61e970f9146ab0b96 SHA1 25638dfbe892e82daccc6f40af9479ae88d2386f SHA256 d3d7ea08c1260eff42b49ead37d935bf3c9e38eac6e8eeb4fa86b3962ed25c7c
+MD5 48bda08719da61345f9297bdecd1b975 ccp4-6.0.1.ebuild 13729
+RMD160 5fe2a8f1d42a810e8fda14c61e970f9146ab0b96 ccp4-6.0.1.ebuild 13729
+SHA256 d3d7ea08c1260eff42b49ead37d935bf3c9e38eac6e8eeb4fa86b3962ed25c7c ccp4-6.0.1.ebuild 13729
+MISC ChangeLog 1012 RMD160 f6184eb32342ca2ca1f8eb8c41e93be1ae78e27d SHA1 7154ddbef8aaca8dadacbf25ec4522dff76ee10e SHA256 5ddac215ec26b617ce72cc344c799b5070b122ff8479bf368c126eef581e7a81
+MD5 151f372b72ea8eaf0f2f3f3321819d14 ChangeLog 1012
+RMD160 f6184eb32342ca2ca1f8eb8c41e93be1ae78e27d ChangeLog 1012
+SHA256 5ddac215ec26b617ce72cc344c799b5070b122ff8479bf368c126eef581e7a81 ChangeLog 1012
+MISC metadata.xml 248 RMD160 6488d9f1ef3e05e6ac5a29ddcc818e5ead0a5230 SHA1 75a648fddef9922cdfe21fb0298a1c746190fd82 SHA256 de0ad7dc383b462c407cae015684d27c090455eac87c6f0f9ff581ef6e0b5b27
+MD5 af1bfbb0777267a03e889b08173f2757 metadata.xml 248
+RMD160 6488d9f1ef3e05e6ac5a29ddcc818e5ead0a5230 metadata.xml 248
+SHA256 de0ad7dc383b462c407cae015684d27c090455eac87c6f0f9ff581ef6e0b5b27 metadata.xml 248
+MD5 af2485e5d663b3c625e3ee4f94748730 files/digest-ccp4-6.0.1 265
+RMD160 72caf22fe0480a8c577d84ff2ffb3bb3a6dcadd5 files/digest-ccp4-6.0.1 265
+SHA256 52ebe8c93194a9140171ac2e0d80b4750913b3e97ac1ee0f37c34ad9137deda8 files/digest-ccp4-6.0.1 265
diff --git a/sci-chemistry/ccp4/ccp4-6.0.1.ebuild b/sci-chemistry/ccp4/ccp4-6.0.1.ebuild
new file mode 100644
index 000000000000..d3a1e56b5431
--- /dev/null
+++ b/sci-chemistry/ccp4/ccp4-6.0.1.ebuild
@@ -0,0 +1,432 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/ccp4/ccp4-6.0.1.ebuild,v 1.1 2006/06/16 20:46:02 spyderous Exp $
+
+inherit fortran eutils gnuconfig toolchain-funcs
+
+FORTRAN="g77 gfortran ifc"
+
+SRC="ftp://ftp.ccp4.ac.uk/ccp4"
+
+PATCH_TOT="0"
+#PATCH1=( src
+# anisoanl.f-r1.22-r1.24.diff )
+#PATCH2=( src/sc_
+# sc.f-r1.9-r1.9.2.1.diff )
+#PATCH3=( src/sc_
+# setup.fh-r1.5-r1.5.2.1.diff )
+
+DESCRIPTION="Protein X-ray crystallography toolkit"
+HOMEPAGE="http://www.ccp4.ac.uk/"
+RESTRICT="mirror stricter"
+SRC_URI="${SRC}/${PV}/packed/${P}-core-src.tar.gz"
+# ${SRC}/${PV}/patches/${PATCH1[1]}
+# ${SRC}/${PV}/patches/${PATCH2[1]}
+# ${SRC}/${PV}/patches/${PATCH3[1]}"
+LICENSE="ccp4"
+SLOT="0"
+KEYWORDS="~ppc ~x86"
+IUSE="X"
+# app-office/sc overlaps sc binary and man page
+# We can't rename ours since the automated ccp4i interface expects it there,
+# as do many scripts. app-office/sc can't rename its because that's the name
+# of the package.
+RDEPEND="X? (
+ || (
+ (
+ x11-libs/libX11
+ x11-libs/libXt
+ x11-libs/libXaw
+ )
+ virtual/x11
+ )
+ )
+ >=dev-lang/tcl-8.3
+ >=dev-lang/tk-8.3
+ >=dev-tcltk/blt-2.4
+ virtual/lapack
+ virtual/blas
+ =sci-libs/fftw-2*
+ sci-chemistry/pdb-extract
+ sci-chemistry/rasmol
+ sci-libs/mccp4
+ || ( app-shells/tcsh app-shells/csh )
+ !app-office/sc"
+# >=sys-apps/portage-2.1.1_pre1 for RESTRICT=stricter
+# Otherwise portage dies instead of fixing RPATHs
+DEPEND="${RDEPEND}
+ X? (
+ || (
+ (
+ x11-misc/imake
+ x11-proto/inputproto
+ x11-proto/xextproto
+ )
+ virtual/x11
+ )
+ )
+ >=sys-apps/portage-2.1.1_pre1"
+
+S="${WORKDIR}/${PN}-${PV}"
+
+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
+
+ # We already have sci-chemistry/rasmol
+ ccp_patch ${FILESDIR}/dont-build-rasmol.patch
+
+ # We already have sci-chemistry/pdb-extract
+# Use configure option instead
+# ccp_patch ${FILESDIR}/dont-build-pdb-extract.patch
+
+ ccp_patch ${FILESDIR}/create-mosflm-bindir.patch
+ ccp_patch ${FILESDIR}/make-mosflm-libdir.patch
+ ccp_patch ${FILESDIR}/make-mosflm-index-libdir.patch
+ ccp_patch ${FILESDIR}/make-mosflm-cbf-libdir.patch
+ ccp_patch ${FILESDIR}/make-ipmosflm-dir.patch
+
+# Don't use these when we aren't building phaser
+# ccp_patch ${FILESDIR}/make-phaser-bindir.patch
+# ccp_patch ${FILESDIR}/no-phaser-ld-assume-kernel.patch
+# # scons config.py tries to chmod python on live system
+# ccp_patch ${FILESDIR}/dont-chmod-python-binary.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
+ ccp_patch ${FILESDIR}/clipper-find-mccp4-includes.patch
+
+ # Default to firefox browser, not 'netscape'
+ ccp_patch ${FILESDIR}/ccp4i-default-to-firefox.patch
+
+ # Also use -lpthread when linking blas and lapack
+ # We may need more fixing to use libcblas for the C files
+ ccp_patch ${FILESDIR}/check-blas-lapack-pthread.patch
+
+ # gerror_ gets defined twice on ppc if you're using gfortran/g95
+ ccp_patch ${FILESDIR}/${PV}-ppc-double-define-gerror.patch
+
+ einfo "Done." # done applying Gentoo patches
+ echo
+
+ gnuconfig_update
+}
+
+src_compile() {
+ # 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}
+
+ # Add xdl libraries to library search path
+ # Note: some of configure attaches CCP4_LIB to -L, and other parts
+ # append libfoo.a immediately after it, so it can only be a single path.
+ export CCP4_LIB="${CCP4}/x-windows/xdl_view/src/.libs"
+
+ # Can't use econf, configure rejects unknown options like --prefix
+ ./configure \
+ $(use_enable X x) \
+ --with-shared-libs \
+ --with-fftw=/usr \
+ --with-warnings \
+ --disable-pdb_extract \
+ --disable-cctbx \
+ --disable-phaser \
+ --tmpdir="${TMPDIR}" \
+ ${GENTOO_OSNAME} || die "econf failed"
+ emake -j1 || die "emake failed"
+}
+
+src_install() {
+# 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"
+
+ # Fix env
+ sed -i \
+ -e "s~^\(setenv CCP4_MASTER.*\)${WORKDIR}~\1/usr~g" \
+ -e "s~^\(setenv CCP4.*\$CCP4_MASTER\).*~\1~g" \
+ -e "s~^\(setenv CCP4I_TOP\).*~\1 \$CCP4/$(get_libdir)/ccp4/ccp4i~g" \
+ -e "s~^\(.*setenv CINCL.*\$CCP4\).*~\1/share/ccp4/include~g" \
+ -e "s~^\(.*setenv CLIBD .*\$CCP4\).*~\1/share/ccp4/data~g" \
+ -e "s~^\(.*setenv CLIBD_MON .*\)\$CCP4.*~\1\$CLIBD/monomers/~g" \
+ -e "s~^\(.*setenv MOLREPLIB .*\)\$CCP4.*~\1\$CLIBD/monomers/~g" \
+ -e "s~^\(.*setenv CCP4_BROWSER.*\).*~\1 firefox~g" \
+ ${S}/include/ccp4.setup*
+
+ # Get rid of S instances
+ # Also the main clipper library is built as libclipper-core, not libclipper
+ sed -i \
+ -e "s:${S}:${ROOT}usr:g" \
+ -e "s:lclipper :lclipper-core :g" \
+ ${S}/bin/clipper-config
+# sed -i \
+# -e "s:${S}:${ROOT}usr:g" \
+# ${S}/$(get_libdir)/cctbx/cctbx_build/setpaths*
+
+ # Bins
+ EXEDESTTREE="/usr/bin" doexe ${S}/bin/*
+
+ # Libs
+ for file in ${S}/lib/*; do
+ if [[ -d ${file} ]]; then
+ continue
+ elif [[ -x ${file} ]]; then
+ dolib.so ${file}
+ else
+ INSDESTTREE="/usr/$(get_libdir)" doins ${file}
+ 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
+ libjwc_c.so.0.1.1
+ libjwc_f.so.0.1.1
+ libssm.so.0.0.0
+ libxdl_viewextra.so.0.0.0
+ libxdl_view.so.2.0.0"
+
+ for LIBNAME in ${LIBNAMES}; do
+ library_dosym ${LIBNAME}
+ done
+
+# dosym libclipper-ccp4.so.0.0.0 /usr/$(get_libdir)/libclipper-ccp4.so
+# dosym libclipper-ccp4.so.0.0.0 /usr/$(get_libdir)/libclipper-ccp4.so.0
+# dosym libclipper-ccp4.so.0.0.0 /usr/$(get_libdir)/libclipper-ccp4.so.0.0
+#
+# dosym libclipper-cif.so.0.0.0 /usr/$(get_libdir)/libclipper-cif.so
+# dosym libclipper-cif.so.0.0.0 /usr/$(get_libdir)/libclipper-cif.so.0
+# dosym libclipper-cif.so.0.0.0 /usr/$(get_libdir)/libclipper-cif.so.0.0
+#
+# dosym libclipper-contrib.so.0.0.0 /usr/$(get_libdir)/libclipper-contrib.so
+# dosym libclipper-contrib.so.0.0.0 /usr/$(get_libdir)/libclipper-contrib.so.0
+# dosym libclipper-contrib.so.0.0.0 /usr/$(get_libdir)/libclipper-contrib.so.0.0
+#
+# dosym libclipper-core.so.0.0.0 /usr/$(get_libdir)/libclipper-core.so
+# dosym libclipper-core.so.0.0.0 /usr/$(get_libdir)/libclipper-core.so.0
+# dosym libclipper-core.so.0.0.0 /usr/$(get_libdir)/libclipper-core.so.0.0
+#
+# dosym libclipper-minimol.so.0.0.0 /usr/$(get_libdir)/libclipper-minimol.so
+# dosym libclipper-minimol.so.0.0.0 /usr/$(get_libdir)/libclipper-minimol.so.0
+# dosym libclipper-minimol.so.0.0.0 /usr/$(get_libdir)/libclipper-minimol.so.0.0
+#
+# dosym libclipper-mmdbold.so.0.0.0 /usr/$(get_libdir)/libclipper-mmdbold.so
+# dosym libclipper-mmdbold.so.0.0.0 /usr/$(get_libdir)/libclipper-mmdbold.so.0
+# dosym libclipper-mmdbold.so.0.0.0 /usr/$(get_libdir)/libclipper-mmdbold.so.0.0
+#
+# dosym libclipper-mmdb.so.0.0.0 /usr/$(get_libdir)/libclipper-mmdb.so
+# dosym libclipper-mmdb.so.0.0.0 /usr/$(get_libdir)/libclipper-mmdb.so.0
+# dosym libclipper-mmdb.so.0.0.0 /usr/$(get_libdir)/libclipper-mmdb.so.0.0
+#
+# dosym libclipper-mtz.so.1.0.0 /usr/$(get_libdir)/libclipper-mtz.so
+# dosym libclipper-mtz.so.1.0.0 /usr/$(get_libdir)/libclipper-mtz.so.1
+# dosym libclipper-mtz.so.1.0.0 /usr/$(get_libdir)/libclipper-mtz.so.1.0
+#
+# dosym libclipper-phs.so.0.0.0 /usr/$(get_libdir)/libclipper-phs.so
+# dosym libclipper-phs.so.0.0.0 /usr/$(get_libdir)/libclipper-phs.so.0
+# dosym libclipper-phs.so.0.0.0 /usr/$(get_libdir)/libclipper-phs.so.0.0
+#
+# dosym libjwc_c.so.0.1.1 /usr/$(get_libdir)/libjwc_c.so
+# dosym libjwc_c.so.0.1.1 /usr/$(get_libdir)/libjwc_c.so.0
+# dosym libjwc_c.so.0.1.1 /usr/$(get_libdir)/libjwc_c.so.0.1
+#
+# dosym libjwc_f.so.0.1.1 /usr/$(get_libdir)/libjwc_f.so
+# dosym libjwc_f.so.0.1.1 /usr/$(get_libdir)/libjwc_f.so.0
+# dosym libjwc_f.so.0.1.1 /usr/$(get_libdir)/libjwc_f.so.0.1
+#
+# dosym libssm.so.0.0.0 /usr/$(get_libdir)/libssm.so
+# dosym libssm.so.0.0.0 /usr/$(get_libdir)/libssm.so.0
+# dosym libssm.so.0.0.0 /usr/$(get_libdir)/libssm.so.0.0
+#
+# dosym libxdl_viewextra.so.0.0.0 /usr/$(get_libdir)/libxdl_viewextra.so
+# dosym libxdl_viewextra.so.0.0.0 /usr/$(get_libdir)/libxdl_viewextra.so.0
+# dosym libxdl_viewextra.so.0.0.0 /usr/$(get_libdir)/libxdl_viewextra.so.0.0
+#
+# dosym libxdl_view.so.2.0.0 /usr/$(get_libdir)/libxdl_view.so
+# dosym libxdl_view.so.2.0.0 /usr/$(get_libdir)/libxdl_view.so.2
+# dosym libxdl_view.so.2.0.0 /usr/$(get_libdir)/libxdl_view.so.2.0
+
+ # Environment files, setup scripts, etc.
+ INSDESTTREE="/usr/share/ccp4/include" doins ${S}/include/*
+
+ # CCP4Interface - GUI
+ INSDESTTREE="/usr/$(get_libdir)/ccp4" doins -r ${S}/ccp4i
+ EXEDESTTREE="/usr/$(get_libdir)/ccp4/ccp4i/bin" doexe ${S}/ccp4i/bin/*
+
+ # Data
+ INSDESTTREE="/usr/share/ccp4" doins -r ${S}/lib/data
+
+ # Include files
+ for i in ccp4 clipper mmdb ssm; do
+ INSDESTTREE="/usr/include" doins -r ${S}/include/${i}
+ done
+
+ # Install docs and examples
+
+ doman ${S}/man/cat1/*
+
+ mv ${S}/manual/README ${S}/manual/README-manual
+ dodoc ${S}/manual/*
+
+ dodoc ${S}/README ${S}/CHANGES
+
+ dodoc ${S}/doc/*
+ rm ${D}/usr/share/doc/${PF}/GNUmakefile.gz
+ rm ${D}/usr/share/doc/${PF}/COPYING.gz
+
+ dohtml -r ${S}/html/*
+ dodoc ${S}/examples/README
+
+ # Fix wrongly installed HTML pages from clipper
+ dohtml "${D}"/usr/html/*
+ rm -rf "${D}"/usr/html
+
+ for i in data rnase toxd; do
+ DOCDESTTREE="examples/${i}" dodoc ${S}/examples/${i}/*
+ done
+
+ DOCDESTTREE="examples/tutorial" dohtml -r ${S}/examples/tutorial/html
+ DOCDESTTREE="examples/tutorial" dohtml examples/tutorial/tut.css
+ for i in data results; do
+ DOCDESTTREE="examples/tutorial/${i}" dodoc ${S}/examples/tutorial/${i}/*
+ done
+
+ for i in non-runnable runnable; do
+ DOCDESTTREE="examples/unix/${i}" dodoc ${S}/examples/unix/${i}
+ done
+
+ # Needed for ccp4i docs to work
+ dosym ../../share/doc/${PF}/examples /usr/$(get_libdir)/ccp4/examples
+ dosym ../../share/doc/${PF}/html /usr/$(get_libdir)/ccp4/html
+
+ # Fix overlaps with other packages
+ rm ${D}/usr/share/man/man1/rasmol.1.gz
+}
+
+pkg_postinst() {
+ einfo "The Web browser defaults to firefox. Change CCP4_BROWSER"
+ einfo "in /usr/share/ccp4/include/ccp4.setup* to modify this."
+
+ ewarn "Set your .bashrc or other shell login file to source"
+ ewarn "one of the ccp4.setup* files in ${ROOT}usr/share/ccp4/include."
+ ewarn "CCP4 will not work without this."
+}
+
+# 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} .${LIB_MAJOR}.${LIB_MINOR} ""; do
+ einfo "Calling dosym ${LIBNAME} ${LIBDIR} ${CORE_LIBNAME} ${LIB_SUFFIX}"
+ dosym ${LIBNAME} ${LIBDIR}${CORE_LIBNAME}${LIB_SUFFIX}
+ done
+}
diff --git a/sci-chemistry/ccp4/files/6.0.1-dont-make-dirs-in-configure.patch b/sci-chemistry/ccp4/files/6.0.1-dont-make-dirs-in-configure.patch
new file mode 100644
index 000000000000..1420419ffab0
--- /dev/null
+++ b/sci-chemistry/ccp4/files/6.0.1-dont-make-dirs-in-configure.patch
@@ -0,0 +1,87 @@
+--- ccp4-6.0.1.orig/configure 2006-06-10 17:30:02.000000000 -0700
++++ ccp4-6.0.1/configure 2006-06-10 17:45:43.000000000 -0700
+@@ -623,45 +623,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; 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 ./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; 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 ./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-chemistry/ccp4/files/6.0.1-ppc-double-define-gerror.patch b/sci-chemistry/ccp4/files/6.0.1-ppc-double-define-gerror.patch
new file mode 100644
index 000000000000..a77d9494a05c
--- /dev/null
+++ b/sci-chemistry/ccp4/files/6.0.1-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-chemistry/ccp4/files/ccp4i-default-to-firefox.patch b/sci-chemistry/ccp4/files/ccp4i-default-to-firefox.patch
new file mode 100644
index 000000000000..106db895b775
--- /dev/null
+++ b/sci-chemistry/ccp4/files/ccp4i-default-to-firefox.patch
@@ -0,0 +1,13 @@
+--- ccp4-5.99.5.orig/ccp4i/etc/configure.def.dist 2006-01-06 17:54:17.000000000 -0800
++++ ccp4-5.99.5/ccp4i/etc/configure.def.dist 2006-01-06 17:54:47.000000000 -0800
+@@ -54,8 +54,8 @@
+ MESSAGE _text ""
+ BLT_LIBRARY _text ""
+ MENU_LENGTH _positiveint 25
+-HYPERTEXT_VIEWER _text netscape
+-START_NETSCAPE _text netscape
++HYPERTEXT_VIEWER _text firefox
++START_NETSCAPE _text firefox
+ O_MAPMAN _text mapman
+ MAPMAN_MAXSIZE _positiveint 4194304
+ QUANTA_MBKALL _text mbkall
diff --git a/sci-chemistry/ccp4/files/check-blas-lapack-pthread.patch b/sci-chemistry/ccp4/files/check-blas-lapack-pthread.patch
new file mode 100644
index 000000000000..02a2aa6d8877
--- /dev/null
+++ b/sci-chemistry/ccp4/files/check-blas-lapack-pthread.patch
@@ -0,0 +1,103 @@
+--- ccp4-5.99.5.orig/configure 2006-01-17 00:35:36.000000000 -0800
++++ ccp4-5.99.5/configure 2006-01-17 10:44:39.000000000 -0800
+@@ -2410,12 +2410,12 @@
+ end
+ EOF
+ #firslty test without -lblas
+- test_compile="$FC $FOPTIM $XFFLAGS -o testlink testlink.f -llapack"
++ test_compile="$FC $FOPTIM $XFFLAGS -o testlink testlink.f -llapack -lpthread"
+ echo $test_compile
+ if { (eval $test_compile >& /dev/null ) 2>&1; } && test -s testlink ; then
+ # Compilation was okay
+- echo "... only -llapack needed"
+- XLAPACK_LIB="-llapack"
++ echo "... only -llapack -lpthread needed"
++ XLAPACK_LIB="-llapack -lpthread"
+ # Set the next two variables so that configure
+ # doesn't try to build netlib libraries
+ LAPACKLIB="lapack"
+@@ -2424,12 +2424,12 @@
+ tryblas=
+ else
+ echo "more than just -llapack needed...."
+- test_compile="$FC $FOPTIM $XFFLAGS -o testlink testlink.f -llapack -lblas"
++ test_compile="$FC $FOPTIM $XFFLAGS -o testlink testlink.f -llapack -lblas -lpthread"
+ echo $test_compile
+ if { (eval $test_compile ) 2>&1; } && test -s testlink ; then
+ # Compilation was okay
+- echo "...-llapack and -lblas were needed"
+- XLAPACK_LIB="-llapack -lblas"
++ echo "...-llapack, -lpthread and -lblas were needed"
++ XLAPACK_LIB="-llapack -lpthread -lblas"
+ # Set the next two variables so that configure
+ # doesn't try to build netlib libraries
+ LAPACKLIB="lapack blas"
+@@ -2720,8 +2720,8 @@
+ STOP
+ END
+ EOF
+- test_compile="$FC $FOPTIM $XFFLAGS -o testlink testlink.f -L$testdir -l$testlib"
+- test_ccompile="$FC $FOPTIM $XFFLAGS -o testlink testlink.f -L$testdir -l$testlib $XLDFLAGS"
++ test_compile="$FC $FOPTIM $XFFLAGS -o testlink testlink.f -L$testdir -l$testlib -lpthread"
++ test_ccompile="$FC $FOPTIM $XFFLAGS -o testlink testlink.f -L$testdir -l$testlib $XLDFLAGS -lpthread"
+ echo $test_compile
+ if { (eval $test_compile ) 2>&1; } && test -s testlink ; then
+ have_lapack=yes
+@@ -2738,7 +2738,7 @@
+ LAPACKDIR="$testdir"
+ echo "Link ok - using lib$LAPACKLIB from $LAPACKDIR"
+ #
+- XLAPACK_LIB="-L$LAPACKDIR -l$LAPACKLIB"
++ XLAPACK_LIB="-L$LAPACKDIR -l$LAPACKLIB -lpthread"
+ #
+ # Test to see if we need BLAS too
+ # Do this by trying to compile a test program
+@@ -2750,8 +2750,8 @@
+ if test -f testlsame ; then
+ rm -f testsame testlsame.o
+ fi
+- test_compile="$FC $FOPTIM $XFFLAGS -o testlsame lsametst.f -L$LAPACKDIR -l$LAPACKLIB"
+- test_ccompile="$FC $FOPTIM $XFFLAGS -o testlsame lsametst.f -L$LAPACKDIR -l$LAPACKLIB $XLDFLAGS"
++ test_compile="$FC $FOPTIM $XFFLAGS -o testlsame lsametst.f -L$LAPACKDIR -l$LAPACKLIB -lpthread"
++ test_ccompile="$FC $FOPTIM $XFFLAGS -o testlsame lsametst.f -L$LAPACKDIR -l$LAPACKLIB $XLDFLAGS -lpthread"
+ echo $test_compile
+ if { ( eval $test_compile) 2>&1;} && test -s testlsame ; then
+ have_blas=yes
+@@ -2830,8 +2830,8 @@
+ STOP
+ END
+ EOF
+- test_compile="$FC $FOPTIM $XFFLAGS -o testlink testlink.f -L$testdir -l$testlib"
+- test_ccompile="$FC $FOPTIM $XFFLAGS -o testlink testlink.f -L$testdir -l$testlib $XLDFLAGS"
++ test_compile="$FC $FOPTIM $XFFLAGS -o testlink testlink.f -L$testdir -l$testlib -lpthread"
++ test_ccompile="$FC $FOPTIM $XFFLAGS -o testlink testlink.f -L$testdir -l$testlib $XLDFLAGS -lpthread"
+ echo $test_compile
+ if { ( eval $test_compile) 2>&1;} && test -s testlink ; then
+ have_blas=yes
+@@ -3033,7 +3033,7 @@
+ if test -f testlsame ; then
+ rm -f testsame testlsame.o
+ fi
+- test_compile="$FC $FOPTIM $XFFLAGS -o testlsame lsametst.f -L$BLASDIR -l$BLASLIB"
++ test_compile="$FC $FOPTIM $XFFLAGS -o testlsame lsametst.f -L$BLASDIR -l$BLASLIB -lpthread"
+ echo $test_compile
+ if { ( eval $test_compile) 2>&1;} && test -s testlsame ; then
+ echo "Found LSAME in lib$BLASLIB"
+@@ -3046,7 +3046,7 @@
+ if test -f testxerbla ; then
+ rm -f testxerbla testxerbla.o
+ fi
+- test_compile="$FC $FOPTIM $XFFLAGS -o testxerbla xerblatst.f -L$BLASDIR -l$BLASLIB"
++ test_compile="$FC $FOPTIM $XFFLAGS -o testxerbla xerblatst.f -L$BLASDIR -l$BLASLIB -lpthread"
+ echo $test_compile
+ if { ( eval $test_compile) 2>&1;} && test -s testxerbla ; then
+ # Found lsame
+@@ -3080,7 +3080,7 @@
+ cd ../..
+ #
+ lapackdir=lib/lapack
+- XLAPACK_LIB="-L$srcdir/lib/lapack -llapack -L$BLASDIR -l$BLASLIB"
++ XLAPACK_LIB="-L$srcdir/lib/lapack -llapack -L$BLASDIR -l$BLASLIB -lpthread"
+ # netlib lapack is in fortran, so we may need the fortran libraries when
+ # we are linking using the C or C++ compilers
+ case $system in
diff --git a/sci-chemistry/ccp4/files/clipper-find-mccp4-includes.patch b/sci-chemistry/ccp4/files/clipper-find-mccp4-includes.patch
new file mode 100644
index 000000000000..3bf5a0652247
--- /dev/null
+++ b/sci-chemistry/ccp4/files/clipper-find-mccp4-includes.patch
@@ -0,0 +1,11 @@
+--- ccp4-5.99.5/lib/clipper/configure.orig 2006-01-07 16:54:13.000000000 -0800
++++ ccp4-5.99.5/lib/clipper/configure 2006-01-07 16:54:31.000000000 -0800
+@@ -21751,7 +21751,7 @@
+
+ if test "x$mccp4_prefix" != x; then
+ # ie. mccp4=thing was given (thing is what we're checking for)
+- ac_MCCP4_CXXFLAGS="-I$mccp4_prefix/include"
++ ac_MCCP4_CXXFLAGS="-I$mccp4_prefix/include -I$mccp4_prefix/include/mccp4"
+ ac_MCCP4_LDOPTS="-L$mccp4_prefix/lib -lmccp4"
+ else
+ # treat as standard lib/include
diff --git a/sci-chemistry/ccp4/files/create-mosflm-bindir.patch b/sci-chemistry/ccp4/files/create-mosflm-bindir.patch
new file mode 100644
index 000000000000..34d6197572fc
--- /dev/null
+++ b/sci-chemistry/ccp4/files/create-mosflm-bindir.patch
@@ -0,0 +1,10 @@
+--- ccp4-5.99.5.orig/x-windows/Makefile.in 2006-01-06 12:31:02.000000000 -0800
++++ ccp4-5.99.5/x-windows/Makefile.in 2006-01-06 12:31:30.000000000 -0800
+@@ -158,6 +158,7 @@
+ install_obj = ipdisp.exe hklview xdldataman xdlmapman \
+ rotgen ipmosflm
+ install: all
++ mkdir -p $(bindir)
+ $(INSTALL_PROGRAM) $(srcdir)/ipdisp.exe $(bindir)
+ $(INSTALL_PROGRAM) $(srcdir)/ipdisp/ipdisp $(bindir)
+ $(INSTALL_PROGRAM) $(srcdir)/hklview $(bindir)
diff --git a/sci-chemistry/ccp4/files/digest-ccp4-6.0.1 b/sci-chemistry/ccp4/files/digest-ccp4-6.0.1
new file mode 100644
index 000000000000..acc5dc94a96a
--- /dev/null
+++ b/sci-chemistry/ccp4/files/digest-ccp4-6.0.1
@@ -0,0 +1,3 @@
+MD5 bd3ff43388b58841de79bcc23ebf81e3 ccp4-6.0.1-core-src.tar.gz 59311291
+RMD160 0f514fe30f22a4f6eb2e05c8bab567d2132e8fae ccp4-6.0.1-core-src.tar.gz 59311291
+SHA256 26a5704d707c3bc2fbe4c1d0804abccc1c50255005d26a8ec3a03fcba63335f2 ccp4-6.0.1-core-src.tar.gz 59311291
diff --git a/sci-chemistry/ccp4/files/dont-build-rasmol.patch b/sci-chemistry/ccp4/files/dont-build-rasmol.patch
new file mode 100644
index 000000000000..8da54fd26de8
--- /dev/null
+++ b/sci-chemistry/ccp4/files/dont-build-rasmol.patch
@@ -0,0 +1,19 @@
+--- ccp4-5.99.5.orig/x-windows/Makefile.in 2005-12-05 03:06:57.000000000 -0800
++++ ccp4-5.99.5/x-windows/Makefile.in 2005-12-05 03:07:23.000000000 -0800
+@@ -35,7 +35,7 @@
+ #
+ # all
+ #
+-all : xdlview libjwc_c libjwc_f rotgen_ hklview ipdisp.exe xdlgjk xjiffy rasmol2 ipmosflm
++all : xdlview libjwc_c libjwc_f rotgen_ hklview ipdisp.exe xdlgjk xjiffy ipmosflm
+ #
+ # xdl_view
+ #
+@@ -161,7 +161,6 @@
+ $(INSTALL_PROGRAM) $(srcdir)/xdldataman $(bindir)
+ $(INSTALL_PROGRAM) $(srcdir)/xdlmapman $(bindir)
+ cd $(srcdir)/XCCPJIFFY ; $(MAKE) install
+- $(INSTALL_PROGRAM) $(rasmol_dir)/rasmol $(bindir)
+ cd $(rotgen_dir); $(MAKE) install
+ $(INSTALL_PROGRAM) $(mosflm_dir)/bin/ipmosflm $(bindir)
+ cd $(xdlview_dir); $(MAKE) install
diff --git a/sci-chemistry/ccp4/files/make-ipmosflm-dir.patch b/sci-chemistry/ccp4/files/make-ipmosflm-dir.patch
new file mode 100644
index 000000000000..7813141b2ec2
--- /dev/null
+++ b/sci-chemistry/ccp4/files/make-ipmosflm-dir.patch
@@ -0,0 +1,10 @@
+--- ccp4-5.99.5.orig/x-windows/Mosflm/mosflm/Makefile.in 2006-01-06 00:04:12.000000000 -0800
++++ ccp4-5.99.5/x-windows/Mosflm/mosflm/Makefile.in 2006-01-06 00:04:41.000000000 -0800
+@@ -37,6 +37,7 @@
+ ${F77} ${FFLAGS} -o $@ $<
+
+ ipmosflm: ${OBJS}
++ mkdir -p ${DPSBIN}
+ ${FLINK} ${FFLAGS} ${OBJS} ${LOCALLIBS} ${LIBS} \
+ -o ${DPSBIN}/ipmosflm ${LDFLAGS}
+
diff --git a/sci-chemistry/ccp4/files/make-mosflm-cbf-libdir.patch b/sci-chemistry/ccp4/files/make-mosflm-cbf-libdir.patch
new file mode 100644
index 000000000000..ae4b7633b105
--- /dev/null
+++ b/sci-chemistry/ccp4/files/make-mosflm-cbf-libdir.patch
@@ -0,0 +1,11 @@
+--- ccp4-5.99.5.orig/x-windows/Mosflm/cbf/Makefile.in 2006-01-05 23:42:19.000000000 -0800
++++ ccp4-5.99.5/x-windows/Mosflm/cbf/Makefile.in 2006-01-05 23:43:35.000000000 -0800
+@@ -132,7 +132,7 @@
+ #
+ # CBF library
+ #
+-$(LIB)/libcbf.a: $(SOURCE) $(HEADERS) $(COMMONDEP)
++$(LIB)/libcbf.a: $(SOURCE) $(HEADERS) $(COMMONDEP) $(LIB)
+ $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) -c $(SOURCE)
+ $(AR) cr $@ *.o
+ $(RANLIB) $@
diff --git a/sci-chemistry/ccp4/files/make-mosflm-index-libdir.patch b/sci-chemistry/ccp4/files/make-mosflm-index-libdir.patch
new file mode 100644
index 000000000000..97607b689672
--- /dev/null
+++ b/sci-chemistry/ccp4/files/make-mosflm-index-libdir.patch
@@ -0,0 +1,10 @@
+--- ccp4-5.99.5.orig/x-windows/Mosflm/index/Makefile.in 2006-01-05 23:15:09.000000000 -0800
++++ ccp4-5.99.5/x-windows/Mosflm/index/Makefile.in 2006-01-05 23:15:30.000000000 -0800
+@@ -76,6 +76,7 @@
+
+ # local version of libdps_index.a
+ ${LIB}/dps_index.a: ${IOBJS} ${HOBJS}
++ mkdir -p ${LIB}
+ ar ru ${LIB}/dps_index.a ${IOBJS} ${HOBJS}
+
+ ${LIB}/libpeak.a:
diff --git a/sci-chemistry/ccp4/files/make-mosflm-libdir.patch b/sci-chemistry/ccp4/files/make-mosflm-libdir.patch
new file mode 100644
index 000000000000..eac1b9f1721e
--- /dev/null
+++ b/sci-chemistry/ccp4/files/make-mosflm-libdir.patch
@@ -0,0 +1,10 @@
+--- ccp4-5.99.5.orig/x-windows/Mosflm/src/dps/index/Makefile.in 2006-01-05 22:48:47.000000000 -0800
++++ ccp4-5.99.5/x-windows/Mosflm/src/dps/index/Makefile.in 2006-01-05 22:49:02.000000000 -0800
+@@ -42,6 +42,7 @@
+ $(LOCALLIBS) $(LIBS)
+
+ index: $(IOBJS)
++ mkdir -p $(LIBDIR)
+ ${AR} $(AR_FLAGS) $(LIBDIR)/libdps_index.a $(IOBJS)
+ chmod 644 $(LIBDIR)/libdps_index.a
+
diff --git a/sci-chemistry/ccp4/files/pass-clipper-enablevals.patch b/sci-chemistry/ccp4/files/pass-clipper-enablevals.patch
new file mode 100644
index 000000000000..3e1a8b0e6be8
--- /dev/null
+++ b/sci-chemistry/ccp4/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-chemistry/ccp4/metadata.xml b/sci-chemistry/ccp4/metadata.xml
new file mode 100644
index 000000000000..211b8bd0f0a4
--- /dev/null
+++ b/sci-chemistry/ccp4/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>sci</herd>
+<maintainer>
+<email>spyderous@gentoo.org</email>
+<name>Donnie Berkholz</name>
+</maintainer>
+</pkgmetadata>