aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Lecher (jlec) <jlec@j-schmitz.net>2009-11-01 09:08:24 +0100
committerJustin Lecher (jlec) <jlec@j-schmitz.net>2009-11-01 09:08:43 +0100
commit6790ee1dd5deda065eab17f50c1ea89220c00752 (patch)
treec97728aecf71c1bf97d032b70a64090c49d62d9e /sci-chemistry/ccp4-apps
parentsci-libs/cgnstools: Fixed problems with 2D meshes and cgns_to_vtk. (diff)
downloadsci-6790ee1dd5deda065eab17f50c1ea89220c00752.tar.gz
sci-6790ee1dd5deda065eab17f50c1ea89220c00752.tar.bz2
sci-6790ee1dd5deda065eab17f50c1ea89220c00752.zip
sci-chemistry/ccp4-apps: PYTONPATH patch added -- thanks Donnie for pointing this out
(Portage version: 2.2_rc47/git/Linux i686) (Signed Manifest commit)
Diffstat (limited to 'sci-chemistry/ccp4-apps')
-rw-r--r--sci-chemistry/ccp4-apps/ChangeLog6
-rw-r--r--sci-chemistry/ccp4-apps/Manifest14
-rw-r--r--sci-chemistry/ccp4-apps/ccp4-apps-6.1.2-r6.ebuild419
-rw-r--r--sci-chemistry/ccp4-apps/files/6.1.2-pythonpath.patch65
4 files changed, 503 insertions, 1 deletions
diff --git a/sci-chemistry/ccp4-apps/ChangeLog b/sci-chemistry/ccp4-apps/ChangeLog
index 03e07a160..f66c8d9c6 100644
--- a/sci-chemistry/ccp4-apps/ChangeLog
+++ b/sci-chemistry/ccp4-apps/ChangeLog
@@ -2,6 +2,12 @@
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
# $Header: $
+*ccp4-apps-6.1.2-r6 (30 Oct 2009)
+
+ 30 Oct 2009; Justin Lecher (jlec) <jlec@j-schmitz.net>
+ +files/6.1.2-pythonpath.patch, +ccp4-apps-6.1.2-r6.ebuild:
+ PYTONPATH patch added -- thanks Donnie for pointing this out
+
*ccp4-apps-6.1.2-r5 (17 Aug 2009)
17 Aug 2009; Justin Lecher (jlec) <jlec@j-schmitz.net>
diff --git a/sci-chemistry/ccp4-apps/Manifest b/sci-chemistry/ccp4-apps/Manifest
index 6d747df68..61561bd16 100644
--- a/sci-chemistry/ccp4-apps/Manifest
+++ b/sci-chemistry/ccp4-apps/Manifest
@@ -1,3 +1,6 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
AUX 6.1.2-clipper-mmdbold-ggc-4.3.patch 656 RMD160 6b302779b48217a14f5ac9110bc307db3a3b51eb SHA1 f5813d6769fa9dc11605425cdbda85691d3016bc SHA256 982eff0336a6dfaf4e280d51a59cf722fc063ca89d15ca0af46ce83727fb9a8a
AUX 6.1.2-dont-build-double-and-make-bindir.patch 688 RMD160 f5f93cbec122ce81a1ddb1cf57a852d51fa5e5d6 SHA1 4c924554c5c1991ed691fe3474eeffbd108493a9 SHA256 037a3d9042c784c895083fe5348ed3bde74620c1b6b3b2cd4eea53bdbfe77d53
AUX 6.1.2-dont-build-imosflm.patch 365 RMD160 3f8d5354a2469cc38ef16e98d726eeea7be08ef9 SHA1 47d52b554c594b00ea8e6f84768548879b02a36e SHA256 d57b800c78a1624c665771add717b8b94169d5a5432c5201efa7d9a2cfa62277
@@ -9,9 +12,18 @@ AUX 6.1.2-dont-configure.patch 4592 RMD160 301eeb912704ff01ab7e324e951c2d5770739
AUX 6.1.2-dont-make-dirs-in-configure.patch 2866 RMD160 ba49e45ab609a42a2d93b96f55af913bf9625610 SHA1 36c9329c3768c08687ef062c9ab649d32833b422 SHA256 1b5997f17526a4fd60ffa9eccf4b765aadf3a78c9394657000e0454f364240ca
AUX 6.1.2-fix-setup-bash-incompatibility.patch 422 RMD160 e7e886ab030cf3324302c8fd0c866b48eeb34f8c SHA1 4e549abcd3ced1e6ecf9d3f2bddfed70425d61aa SHA256 109a0e806f9c0e1b8bf5e5f0c58be6f1dae06396b62ee4dae9f579ff7dcb5a01
AUX 6.1.2-gcc4.4.patch 1006 RMD160 5d66b599da41649b836080f18dcea292917c88eb SHA1 0d7ed670e46f8433555fe63b0b7443fa27f42b0f SHA256 09d0cc3333e75d85ef057ba4f239e2c79ed76623cfa7ecc6e62a813d9bac2423
+AUX 6.1.2-pythonpath.patch 2716 RMD160 f46963e6c4c48cfab76062aaff8d58189f9d590b SHA1 24f6c9a051f97d9e5db5c4fb9ef457114fa7a951 SHA256 41ca8ed3fc1701caa18b30f44af7475d49fc0042ee058bae3d8c8617a6d9bcc2
AUX 6.1.2-rename-rapper.patch 2856 RMD160 37504bed3cb4e1858d88331305deef6564616b02 SHA1 31f513c987e1408b868f8c9de4aaa9f2c35cb378 SHA256 d9fed1ec65089c4130358aeed771b32c1253e48a73e90f0ce7b92bd0abbb0c2b
AUX 6.1.2-rename-truncate.patch 1515 RMD160 eff332faa67a1732e0f99cc6cdcb846932eadc87 SHA1 b504542cf710e1b54a684b0fa0e8d73d967c96ac SHA256 50a59a1856867daa3de1f8f53e92bcfe74dea3a6d3c4ba238a9ea83dbcdfbf07
DIST ccp4-6.1.2-core-src.tar.gz 247203188 RMD160 19019c6cd37e83cf6d2d19f91979edc978d18395 SHA1 2423178d3877dd44d3671a7eb4d6666de6852cb7 SHA256 bcae870675270be410278d9a6f2ee19f9caf32b73fd969e9381a4d510f174c75
EBUILD ccp4-apps-6.1.2-r5.ebuild 11457 RMD160 ff5153e4f797f9e9ae5546736829e72c88dd98f0 SHA1 eb6c45a291b20732ba47613a0044198857b6346b SHA256 38eb6b744b70cc53dca5a90df3a3074e4e6e45d156036bf1fd9905a7d95d90f3
-MISC ChangeLog 6903 RMD160 1feb734225921dd8857206b8d44267138161c03a SHA1 b9219627f40e73ecb1efae8e3c2352713ff73b8b SHA256 6b6e490f357bb606ee3747462e83e261bbbc984fd43037c11cf1c9a785918470
+EBUILD ccp4-apps-6.1.2-r6.ebuild 11538 RMD160 96ca59d74ffe61d5827f0fccf8068064a7b511f9 SHA1 958f2571ac46bbfa313afbe8cb8dae534a03e4a9 SHA256 e812e446eb710e71086933d4a7f9edd052f073f04cfa3e0a109799f7aeb472c8
+MISC ChangeLog 7120 RMD160 806da12b338b5ca0fc7f25f0e0e056e561a7eeeb SHA1 2eadbd8b17c48edd6751af2fc9bfc36693647c39 SHA256 84f137fd11422a26ec2f4ea79e9c8dfc077fb3958c20e904f582557f6ac3d548
MISC metadata.xml 166 RMD160 4452298fd03e7c9395d1182bfe69d60a14144af6 SHA1 cb0b513473c0348f4f6f6cd9a132e4884155fddb SHA256 84c92b49702daf95eace8d2765215cbd8650da4ef776f9f700b5ce3785dec852
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2.0.11 (GNU/Linux)
+
+iEYEARECAAYFAkrtQfgACgkQgAnW8HDreRb9cgCgoOWwgkrVmfM8MKzhjzut2kYI
+/voAoLq1fI+cHWkZFGVvUz1Gjjq2bnp5
+=6gMp
+-----END PGP SIGNATURE-----
diff --git a/sci-chemistry/ccp4-apps/ccp4-apps-6.1.2-r6.ebuild b/sci-chemistry/ccp4-apps/ccp4-apps-6.1.2-r6.ebuild
new file mode 100644
index 000000000..54e1df893
--- /dev/null
+++ b/sci-chemistry/ccp4-apps/ccp4-apps-6.1.2-r6.ebuild
@@ -0,0 +1,419 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+inherit fortran eutils flag-o-matic gnuconfig toolchain-funcs autotools
+
+FORTRAN="g77 gfortran ifc"
+
+MY_P="${PN/-apps}-${PV}"
+
+SRC="ftp://ftp.ccp4.ac.uk/ccp4"
+
+#UPDATE="04_03_09"
+#PATCHDATE="090511"
+
+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}/${MY_P}-core-src.tar.gz"
+# patch tarball from upstream
+ [[ -n ${UPDATE} ]] && SRC_URI="${SRC_URI} ${SRC}/${PV}/updates/${P}-src-patch-${UPDATE}.tar.gz"
+# patches created by us
+ [[ -n ${PATCHDATE} ]] && SRC_URI="${SRC_URI} http://dev.gentooexperimental.org/~jlec/science-dist/${PV}-${PATCHDATE}-updates.patch.bz2"
+
+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 ~x86"
+IUSE="X examples"
+
+# 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.
+X11DEPS="x11-libs/libX11
+ x11-libs/libXt
+ x11-libs/libXaw
+ x11-libs/libxdl_view
+ x11-libs/libjwc_c
+ x11-libs/libjwc_f"
+
+TKDEPS=">=dev-lang/tk-8.3
+ >=dev-tcltk/blt-2.4
+ dev-tcltk/iwidgets
+ >=dev-tcltk/tdom-0.8
+ dev-tcltk/tkimg
+ dev-tcltk/tktreectrl
+ dev-tcltk/itcl
+ dev-tcltk/itk"
+
+SCILIBS="sci-libs/ccp4-libs
+ virtual/lapack
+ virtual/blas
+ =sci-libs/fftw-2*
+ sci-libs/clipper"
+
+SCIAPPS="sci-chemistry/pdb-extract
+ sci-chemistry/rasmol"
+
+RDEPEND="X? ( ${X11DEPS} )
+ ${TKDEPS}
+ ${SCILIBS}
+ ${SCIAPPS}
+ app-shells/tcsh
+ dev-python/pyxml
+ dev-libs/libxml2
+ dev-libs/boehm-gc
+ !app-office/sc
+ !<sci-chemistry/ccp4-6.1.2"
+DEPEND="${RDEPEND}
+ =sys-devel/automake-1.6*
+ X? (
+ x11-misc/imake
+ x11-proto/inputproto
+ x11-proto/xextproto
+ )"
+
+S="${WORKDIR}/${MY_P}"
+
+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
+
+ [[ -n ${PATCHDATE} ]] && epatch "${WORKDIR}"/${PV}-${PATCHDATE}-updates.patch
+
+ einfo "Applying Gentoo patches ..."
+
+ # 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
+ # Also remember to create the bindir.
+ ccp_patch "${FILESDIR}"/${PV}-dont-build-double-and-make-bindir.patch
+
+ # libraries come from sci-libs/ccp4-libs
+ ccp_patch "${FILESDIR}"/${PV}-dont-build-libs.patch
+
+ # coreutils installs a binary called truncate
+ ccp_patch "${FILESDIR}"/${PV}-rename-truncate.patch
+ mv ./doc/truncate.doc ./doc/ftruncate.doc || die
+ mv ./html/truncate.html ./html/ftruncate.html || die
+
+ # conflicts with media-libs/raptor
+ ccp_patch "${FILESDIR}"/${PV}-rename-rapper.patch
+ mv ./doc/rapper.doc ./doc/rappermc.doc || die
+ mv ./html/rapper.html ./html/rappermc.html || die
+
+ # molref is provided as binary and dynamically linked against icc
+ ccp_patch "${FILESDIR}"/${PV}-dont-build-molref.patch
+
+ # no xia
+ ccp_patch "${FILESDIR}"/${PV}-dont-build-xia.patch
+
+ # We build scala ourself
+ ccp_patch "${FILESDIR}"/${PV}-dont-build-scala.patch
+
+ # We build scala ourself
+ ccp_patch "${FILESDIR}"/${PV}-dont-build-imosflm.patch
+
+ # gcc-4.3.3
+ ccp_patch "${FILESDIR}"/${PV}-gcc4.4.patch
+
+ # don't configure what is not build
+ ccp_patch "${FILESDIR}"/${PV}-dont-configure.patch
+
+ # Set python paths correctly
+ ccp_patch "${FILESDIR}"/${PV}-pythonpath.patch
+
+ einfo "Done." # done applying Gentoo patches
+ echo
+
+ # Don't build refmac binaries available from the standalone version
+ sed -i -e "/^REFMACTARGETS/s:refmac5 libcheck makecif molrep::g" configure
+
+ # Rapper bundles libxml2 and boehm-gc. Don't build, use or install those.
+ pushd src/rapper 2>/dev/null
+ sed -i \
+ -e '/^AC_CONFIG_SUBDIRS(\[gc7.0 libxml2\])/d' \
+ configure.ac
+ sed -i \
+ -e '/^SUBDIRS/s:libxml2 gc7.0::g' \
+ Makefile.am
+ sed -i \
+ -e '/^rappermc_LDADD/s:../gc7.0/libgc.la ../libxml2/libxml2.la:-lgc -lxml2:g' \
+ LOOP/Makefile.am
+ sed -i \
+ -e '/^INCLUDES/s:-I../gc7.0/include -I../libxml2/include:-I/usr/include/gc -I/usr/include/libxml2:g' \
+ LOOP/Makefile.am
+ eautoreconf
+ popd 2>/dev/null
+
+ gnuconfig_update
+}
+
+src_compile() {
+ # Build system is broken if we set LDFLAGS
+ unset LDFLAGS
+
+ # These are broken with ./src/procheck/ps.f
+ filter-flags "-floop-*"
+
+ # 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~^\(export CCP4_MASTER.*\)/.*~\1${WORKDIR}~g" \
+ -e "s~^\(setenv CCP4I_TCLTK.*\)/usr/local/bin~\1/usr/bin~g" \
+ -e "s~^\(export 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}
+ export BINSORT_SCR="${T}"
+ export CCP4_MASTER="${WORKDIR}"
+ export CCP4I_TCLTK="/usr/bin"
+
+ # 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 \
+ --disable-diffractionImg \
+ --disable-clipper \
+ --disable-mosflm \
+ --disable-mrbump \
+ --tmpdir="${TMPDIR}" \
+ ${GENTOO_OSNAME} || die "econf failed"
+
+ # fsplit is required for the programs
+ pushd lib/src 2>/dev/null
+ emake fsplit -j1 || die
+ popd 2>/dev/null
+
+ # We do this manually, since disabling the clipper libraries also
+ # disables the clipper programs
+ pushd src/clipper_progs 2>/dev/null
+ econf \
+ --prefix="${S}" \
+ --with-ccp4="${S}" \
+ --with-clipper=/usr \
+ --with-fftw=/usr \
+ --with-mmdb=/usr \
+ CXX=$(tc-getCXX) \
+ || die
+ emake || die
+ popd 2>/dev/null
+
+ emake -j1 || die "emake failed"
+}
+
+src_install() {
+ # Set up variables for build
+ source "${S}"/include/ccp4.setup
+
+# make install || die "install failed"
+
+ # if we don't make this, a ton of programs fail to install
+ mkdir "${S}"/bin || die
+
+ # We do this manually, since disabling the clipper libraries also
+ # disables the clipper programs
+ pushd "${S}"/src/clipper_progs 2>/dev/null
+ emake install || die
+ popd 2>/dev/null
+
+ einstall || die "install failed"
+
+ # Fix env
+# -e "s~^\(.*setenv PYTHONPATH .*\)\${CCP4}.*~\1\${CCP4}/share/ccp4/python~g" \
+# -e "s~^\(.*export PYTHONPATH.*\)\${CCP4}.*~\1\${CCP4}/share/ccp4/python~g" \
+ 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 DBCCP4I_TOP\).*~\1 \$CCP4/share/ccp4/dbccp4i~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\$CCP4/share/ccp4/data/monomers/~g" \
+ -e "s~^\(.*setenv MOLREPLIB .*\)\$CCP4.*~\1\$CCP4/share/ccp4/data/monomers/~g" \
+ -e "s~^\(export CCP4_MASTER.*\)${WORKDIR}~\1/usr~g" \
+ -e "s~^\(export CCP4.*\$CCP4_MASTER\).*~\1~g" \
+ -e "s~^\(export CCP4I_TOP\).*~\1=\$CCP4/$(get_libdir)/ccp4/ccp4i~g" \
+ -e "s~^\(export DBCCP4I_TOP\).*~\1=\$CCP4/share/ccp4/dbccp4i~g" \
+ -e "s~^\(.*export CINCL.*\$CCP4\).*~\1/share/ccp4/include~g" \
+ -e "s~^\(.*export CLIBD.*\$CCP4\).*~\1/share/ccp4/data~g" \
+ -e "s~^\(.*export CLIBD_MON.*\)\$CCP4.*~\1\$CCP4/share/ccp4/data/monomers/~g" \
+ -e "s~^\(.*export MOLREPLIB.*\)\$CCP4.*~\1\$CCP4/share/ccp4/data/monomers/~g" \
+ -e "/IMOSFLM_VERSION/d" \
+ "${S}"/include/ccp4.setup* || die
+
+# -e "s~\$CCP4/share/XIAROOT/setup.sh~\$CCP4/share/ccp4/XIAROOT/setup.sh~g" \
+
+ # Don't check for updates on every sourcing of /etc/profile
+ sed -i \
+ -e "s:\(eval python.*\):#\1:g"
+ "${S}"/include/ccp4.setup* || die
+
+ # Collision with sci-chemistry/mrbump
+ rm -f "${S}"/bin/{mrbump,pydbviewer} || die
+
+ # Bins
+ dobin "${S}"/bin/* || die
+
+ # 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
+
+ # Setup scripts
+ insinto /etc/profile.d
+# newins "${S}"/include/ccp4.setup-bash ccp4.setup.bash || die
+ newins "${S}"/include/ccp4.setup-csh ccp4.setup.csh || die
+# newins "${S}"/include/ccp4.setup-zsh ccp4.setup.zsh || die
+ newins "${S}"/include/ccp4.setup-sh ccp4.setup.sh || die
+ rm -f "${S}"/include/ccp4.setup*
+
+ # Environment files, setup scripts, etc.
+ insinto /usr/share/ccp4/include
+ doins "${S}"/include/* || die
+
+ # smartie -- log parsing
+ insinto /usr/share/ccp4
+ doins -r "${S}"/share/smartie || die
+
+ # 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.*
+ rm "${D}"/usr/share/doc/${PF}/COPYING.*
+
+ dohtml -r "${S}"/html/*
+ dodoc "${S}"/examples/README
+
+ # Fix wrongly installed HTML pages from clipper
+ dohtml "${D}"/usr/html/*
+ rm -rf "${D}"/usr/html
+
+ if use examples; then
+ for i in data rnase toxd; do
+ docinto examples/${i}
+ dodoc "${S}"/examples/${i}/*
+ done
+
+ docinto examples/tutorial
+ dohtml -r "${S}"/examples/tutorial/html examples/tutorial/tut.css
+ for i in data results; do
+ docinto examples/tutorial/${i}
+ dodoc "${S}"/examples/tutorial/${i}/*
+ done
+
+ for i in non-runnable runnable; do
+ docinto examples/unix/${i}
+ dodoc "${S}"/examples/unix/${i}/*
+ done
+ fi
+ # 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 -f "${D}"/usr/share/man/man1/rasmol.1* "${D}"/usr/lib/font84.dat || die
+
+ cat >> "${T}"/baubles <<- EOF
+ #!/bin/bash
+ exec python \${CCP4}/share/ccp4/smartie/baubles.py
+ EOF
+
+ dobin "${T}"/baubles || die
+}
+
+pkg_postinst() {
+ einfo "The Web browser defaults to firefox. Change CCP4_BROWSER"
+ einfo "in /etc/profile.d/ccp4.setup* to modify this."
+}
+
+# Epatch wrapper for bulk patching
+ccp_patch() {
+ EPATCH_SINGLE_MSG=" ${1##*/} ..." epatch ${1}
+}
diff --git a/sci-chemistry/ccp4-apps/files/6.1.2-pythonpath.patch b/sci-chemistry/ccp4-apps/files/6.1.2-pythonpath.patch
new file mode 100644
index 000000000..7a012be6e
--- /dev/null
+++ b/sci-chemistry/ccp4-apps/files/6.1.2-pythonpath.patch
@@ -0,0 +1,65 @@
+diff --git a/ccp4-6.1.2/include/ccp4.setup-bash b/ccp4-6.1.2/include/ccp4.setup-bash
+index 9848101..cea8ae6 100755
+--- a/ccp4-6.1.2/include/ccp4.setup-bash
++++ b/ccp4-6.1.2/include/ccp4.setup-bash
+@@ -188,9 +188,9 @@ fi
+ #Python path for the subprocess fixed module
+
+ if [ $ccp4_first_in_path -eq 1 ]; then
+- setenv PYTHONPATH ${CCP4}/share/python:${PYTHONPATH}
++ setenv PYTHONPATH ${CCP4}/share/ccp4/smartie:${CCP4I_TOP}/python:${PYTHONPATH}
+ else
+- setenv PYTHONPATH ${PYTHONPATH}:${CCP4}/share/python
++ setenv PYTHONPATH ${PYTHONPATH}:${CCP4}/share/ccp4/smartie:${CCP4I_TOP}/python
+ fi
+
+ ### PLOT_COMMAND PRINT_COMMAND for the XCCPJIFFY programs to compile ###
+diff --git a/ccp4-6.1.2/include/ccp4.setup-csh b/ccp4-6.1.2/include/ccp4.setup-csh
+index 42f0820..93c2cf3 100755
+--- a/ccp4-6.1.2/include/ccp4.setup-csh
++++ b/ccp4-6.1.2/include/ccp4.setup-csh
+@@ -180,9 +180,9 @@ endif
+ #Python path for the subprocess fixed module
+ if (${?PYTHONPATH}) then
+ if ($ccp4_first_in_path) then
+- setenv PYTHONPATH ${CCP4}/share/python:${PYTHONPATH}
++ setenv PYTHONPATH ${CCP4}/share/ccp4/smartie:${CCP4I_TOP}/python:${PYTHONPATH}
+ else
+- setenv PYTHONPATH ${PYTHONPATH}:${CCP4}/share/python
++ setenv PYTHONPATH ${PYTHONPATH}:${CCP4}/share/ccp4/smartie:${CCP4I_TOP}/python
+ endif
+ else
+ setenv PYTHONPATH ${CCP4}/share/python
+diff --git a/ccp4-6.1.2/include/ccp4.setup-sh b/ccp4-6.1.2/include/ccp4.setup-sh
+index 4396ebf..a0455bd 100755
+--- a/ccp4-6.1.2/include/ccp4.setup-sh
++++ b/ccp4-6.1.2/include/ccp4.setup-sh
+@@ -228,9 +228,9 @@ test -r $CCP4/include/ccp4.msg && cat $CCP4/include/ccp4.msg
+ #Python path for the subprocess fixed module
+
+ if test $ccp4_first_in_path -eq 1; then
+- export PYTHONPATH=${CCP4}/share/python:${PYTHONPATH}
++ export PYTHONPATH=${CCP4}/share/ccp4/smartie:${CCP4I_TOP}/python:${PYTHONPATH}
+ else
+- export PYTHONPATH=${PYTHONPATH}:${CCP4}/share/python
++ export PYTHONPATH=${PYTHONPATH}:${CCP4}/share/ccp4/smartie:${CCP4I_TOP}/python
+ fi
+
+ ################### THE REST SHOULDN'T NEED EDITING #####################
+diff --git a/ccp4-6.1.2/include/ccp4.setup-zsh b/ccp4-6.1.2/include/ccp4.setup-zsh
+index 0e5c2ce..53523f3 100755
+--- a/ccp4-6.1.2/include/ccp4.setup-zsh
++++ b/ccp4-6.1.2/include/ccp4.setup-zsh
+@@ -157,10 +157,10 @@ export CLASSPATH
+ #Python path for the subprocess fixed module
+
+ if ($ccp4_first_in_path) then
+- PYTHONPATH=${CCP4}/share/python:${PYTHONPATH}
++ PYTHONPATH=${CCP4}/share/ccp4/smartie:${CCP4I_TOP}/python:${PYTHONPATH}
+ export PYTHONPATH
+ else
+- PYTHONPATH=${PYTHONPATH}:${CCP4}/share/python
++ PYTHONPATH=${PYTHONPATH}:${CCP4}/share/ccp4/smartie:${CCP4I_TOP}/python
+ export PYTHONPATH
+ fi
+