summaryrefslogtreecommitdiff
path: root/sci-libs/cctbx
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /sci-libs/cctbx
reinit the tree, so we can have metadata
Diffstat (limited to 'sci-libs/cctbx')
-rw-r--r--sci-libs/cctbx/Manifest13
-rw-r--r--sci-libs/cctbx/cctbx-2010.03.29.2334-r7.ebuild189
-rw-r--r--sci-libs/cctbx/files/2010.03.29.2334-boost.patch516
-rw-r--r--sci-libs/cctbx/files/2010.03.29.2334-clipper.patch77
-rw-r--r--sci-libs/cctbx/files/2010.03.29.2334-flags.patch94
-rw-r--r--sci-libs/cctbx/files/2010.03.29.2334-format-security.patch117
-rw-r--r--sci-libs/cctbx/files/2010.03.29.2334-gcc-4.6.patch29
-rw-r--r--sci-libs/cctbx/files/2010.03.29.2334-gcc-4.7.patch154
-rw-r--r--sci-libs/cctbx/files/2010.03.29.2334-soname.patch123
-rw-r--r--sci-libs/cctbx/files/2010.03.29.2334-tst_server.py.patch15
-rw-r--r--sci-libs/cctbx/metadata.xml20
11 files changed, 1347 insertions, 0 deletions
diff --git a/sci-libs/cctbx/Manifest b/sci-libs/cctbx/Manifest
new file mode 100644
index 000000000000..a7323ca2432a
--- /dev/null
+++ b/sci-libs/cctbx/Manifest
@@ -0,0 +1,13 @@
+AUX 2010.03.29.2334-boost.patch 18175 SHA256 f6a8a246dfd42e7981687802a0e00d933759d3c749c0344bfbfbfde12814f4d7 SHA512 e722312a878be229a24269471902bd1febe98c5510bfc50e1ba3a841c1a0228cdb7964e69703083850052e49e91899b229bc3543d90485ba50e79e7eceb11e2e WHIRLPOOL f87a78d93a94fb93fd243269fe1e5c0cfcc6beff02d936d2b609cece6ea9fbe08b5201c354f982df6ef5f09b84032a25b8a3cac357abf6279c6b5a5b2468e0e7
+AUX 2010.03.29.2334-clipper.patch 2209 SHA256 e7c8bf813bedd3b67de5ce727d5f75e9635568769373f237e7b624ed143351b1 SHA512 cb3fc1f89d9a4008b4add3ef2ecf5b2aa8e875e41e169916859a8e508858bc9548023bb552d4cb3794c46788eaa325c75bb858c7c08799b87f2e31bef57cf69a WHIRLPOOL 84b427cfc9ddba9891197f8185123a8f5831e6a9beaafe58ced2f52ea3d492217cbb5264f3118ec9f27b12746141b788e9464a66b00c56f54b786bd3aada9351
+AUX 2010.03.29.2334-flags.patch 3336 SHA256 769edb3e5dcb608b54ab4d33c5933b523f73ff62c6cb627c4eb4b1a2086e40b1 SHA512 63ccefc4303136c9fea854fecdbed39efe9d7f565000bc356addc2b268e042c34815da3416e9960200b9f6ac33b7c4bb7ce705a7b7939cd65ef4f925d56ced41 WHIRLPOOL 22e86a519b74e54d6655e85defb1c9bd66bf8535c3b44cd03e924fffc6ddd6b5cf6d9dd0c69a82d1970893f19671ddd46ae8883c52763d29e3e20bfbe7da9cdc
+AUX 2010.03.29.2334-format-security.patch 4696 SHA256 fccc39e80b59d3b728b1611777a218ad1b349d60209cceefb7aea5339be8da6b SHA512 715c3b810c7c89864c8192dc9678cd8e758ba1bbb39782a2077f7ca598ddd2bc01114d4e5b58821c3246f1951d8b53b8ecdc085b3a03e2ebb5082a9dbf46a156 WHIRLPOOL 1d8d57955b326da2d2b46329cf5e6df11107e7761034763a58f4a35d28ec003783ae9e60eef9c5e7d38a95bdcfb4453d39ac3b69ef69cad8caa61a05d5feed84
+AUX 2010.03.29.2334-gcc-4.6.patch 1059 SHA256 dad06be10e1ba3fefee9f9aa79a897635cb8362f5719c5c8c5e5c25d1bea6236 SHA512 25ad8471b1108549de6806752f886057e86e875dbcf78ad4f11095a54295d2234bf704b55559bf48ff50f0db64fb3d6a0367bcdc85e517a244abecdbbcabb2c1 WHIRLPOOL 5e1d0cc70b9501ffce3af51ffd921b8d3ab30c7bf690ac2f31a823fbcfd8dd38aa6bbe9e1304bfae9750a917df622391fb0b68da898bd662f838d172f1737721
+AUX 2010.03.29.2334-gcc-4.7.patch 6747 SHA256 ab01875a97ece09e4d729bb435b67960eff6193c27454cc889f0dda0cd3c92a5 SHA512 17d557567ed135c3c095f3849f2643121f6c183573f8e5b63e056180c5ca6985cd1fcf482378787fbf37078eb185bd2502dfc42fb163e50fc1567588d7e3ef0e WHIRLPOOL fc41e5fb4400103999e7a178547e46ec18253241fe69b0074d29223be36fc38ec7be725c2db10481db4d48634972cc51e4c3352c2ab44c687995dd027f9ad383
+AUX 2010.03.29.2334-soname.patch 5177 SHA256 dd4ea6dbf34c1b2d9572adec5a33fe6a73b1a99e8c4364123e69382bb161ce74 SHA512 3f62bc52c32c3573fbcd90fc49234498d7c28fc0dc7a68497041af35da46cbd9cb386b9b13ed2269a5728e87526987ac49179e38b2bcb6a355ee4c180e9f7861 WHIRLPOOL cdd533d510defea65388ccd25c63055fc2798edd4222d1aa1b0201671d2c074107a151edc5ba62b5677908d5c045f98f26cd5ae5574e9fc83919632c4258c77c
+AUX 2010.03.29.2334-tst_server.py.patch 774 SHA256 df058d16d2dc5beaac9f1a1fbf2e640994c7e881d449eb01ac338dadbfb15ac3 SHA512 490918c3139355ecb0430d908ccafc6d66cb25ec7df285cedbb983d80f3473425c72d0766262c557c0c783626479edd2528eaf83b1decdeba416dde193472d5a WHIRLPOOL cc15b95661d8cba66bc3e06b3589188582c5e637faa860c70a4bbc53450a02afb36ec14c51796fe34441bd74842c06c938e22258a5ea5bf3264237a7afc169bc
+DIST cctbx-2010.03.29.2334.tar.gz 15570372 SHA256 e1fae804caaf8593c7a3f32e4544046f4c00293063d9099721578cc8fbd17213 SHA512 7aafd647db49925fc1df16a9ccb4f8caf040b4d73e9601731eb3da3051467c3005fb2cc95b498501c899cd1bd378e6a6135cffe734cb4f93eccacbc13575b2c8 WHIRLPOOL 5954ce6ae8bd3a29deaa5d7f8b354d9468a87a01fc7d6aa9a0545e1d323b1ee209348e88270e2f50d7985b1916a7b5bf687dfdf871013d3ec35925fde253d9a0
+EBUILD cctbx-2010.03.29.2334-r7.ebuild 5709 SHA256 55a8725c3e7661571eb29545033a7175d961cf1f2881372859d8ed7b4ef153df SHA512 6afbc11e892c871a75303c0d7bf735114a1c60c7deebac2777596fbe9e5178eefca1ad1ab50c08337e826de8ac0f488093b69762fd00e3ae84b4e569fa62289a WHIRLPOOL 40d7db2f0c5e3db02feb42559678abcc8404d3bee67757f90ec3337323a1bb487bdc57380bee4d1557321284e0e37c9c8fa1b49ab5d10c1716c4d5606d8622ef
+MISC ChangeLog 3348 SHA256 aeea03e9044e32b56ea9505551b398f5f61ffb019e34248b1d1a3d6b495ba030 SHA512 07d7dc8ac4ab7187ca2065fb3ac349c812c237c08d8ad69ec477cf98aa3ed357f1f1c4d164ca063bef4ffc4557d72ee2b058d6a36059f4e1e71a3e869a68a92e WHIRLPOOL d18b4f8989dfc098f53346d1e2df45da868be49cf1383615e46e585c7cdc58ea06a2e3e43ba52941afd207a659cd0a97bb9144647a4948d162cd420e78507cca
+MISC ChangeLog-2015 6886 SHA256 54f052fb0fa846f89f5b6e296f2fe238c8ec08363e644766e2f9b55a48d46db0 SHA512 eb358bfd2708aa1bb7f4c0e1ab9d136ae4d027ad3f26687a8f351dd9caf3ac9dcb7a4a1309013527b2dc221e857cee0b5e6db1436788b8a70863924a29e5f968 WHIRLPOOL 958d3f9e08df1540c79b021dfd9f7b647b7bfeec596a6d17b5b98a2ab9f34d4972586e05a97f561fbad50d5cc7c85a6638a0633ae7c53045bae02f7b49f88588
+MISC metadata.xml 851 SHA256 15e480a586fe252b4d4f9a8b04d61350e156bce30206462ee9702a6af331520a SHA512 390b476908b2b885c4dfe3f5dda349847c8eb1089d784612b8da342f95b93d1baf370e5877d2977e1d2c804066b4d43d92893ed861256264f607a87a4597116a WHIRLPOOL 72a2193f9df4c8bac19018122f5746ac055f81ca7498d5f75c2a136095df99fadb5705d4378065b87b698cf090a1e52e1048136d43df3e93cd27c2f5a1087a1b
diff --git a/sci-libs/cctbx/cctbx-2010.03.29.2334-r7.ebuild b/sci-libs/cctbx/cctbx-2010.03.29.2334-r7.ebuild
new file mode 100644
index 000000000000..5ac1e461f684
--- /dev/null
+++ b/sci-libs/cctbx/cctbx-2010.03.29.2334-r7.ebuild
@@ -0,0 +1,189 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit eutils fortran-2 multilib prefix python-single-r1 toolchain-funcs
+
+MY_PV="${PV//./_}"
+
+DESCRIPTION="Computational Crystallography Toolbox"
+HOMEPAGE="http://cctbx.sourceforge.net/"
+SRC_URI="http://cci.lbl.gov/cctbx_build/results/${MY_PV}/${PN}_bundle.tar.gz -> ${P}.tar.gz"
+
+LICENSE="cctbx-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux"
+IUSE="+minimal openmp threads"
+
+REQUIRED_USE="
+ ${PYTHON_REQUIRED_USE}
+ ?? ( openmp threads )"
+
+RDEPEND="
+ ${PYTHON_DEPS}
+ >=dev-libs/boost-1.48[python,${PYTHON_USEDEP}]
+ sci-libs/clipper
+ sci-libs/fftw:3.0=
+ !minimal? (
+ sci-chemistry/cns
+ sci-chemistry/shelx )"
+DEPEND="${RDEPEND}
+ !prefix? ( >=dev-util/scons-1.2[${PYTHON_USEDEP}] )"
+
+S="${WORKDIR}"
+MY_S="${WORKDIR}"/cctbx_sources
+MY_B="${WORKDIR}"/cctbx_build
+
+pkg_setup() {
+ use openmp && FORTRAN_NEED_OPENMP="1"
+ if use openmp && ! tc-has-openmp; then
+ ewarn "You are using gcc and OpenMP is only available with gcc >= 4.2 and icc"
+ ewarn "If you want to build ${PN} with OpenMP, abort now,"
+ ewarn "and switch CC to an OpenMP capable compiler"
+ FORTRAN_NEED_OPENMP=1
+ fi
+ fortran-2_pkg_setup
+ python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ local opts
+ local optsld
+
+ epatch \
+ "${FILESDIR}"/${PV}-tst_server.py.patch \
+ "${FILESDIR}"/${PV}-boost.patch \
+ "${FILESDIR}"/${PV}-clipper.patch \
+ "${FILESDIR}"/${PV}-flags.patch \
+ "${FILESDIR}"/${PV}-soname.patch \
+ "${FILESDIR}"/${PV}-gcc-4.6.patch \
+ "${FILESDIR}"/${PV}-gcc-4.7.patch \
+ "${FILESDIR}"/${PV}-format-security.patch
+
+ eprefixify "${MY_S}"/scitbx/libtbx_refresh.py
+
+ rm -rvf "${MY_S}/boost" "${MY_S}/PyCifRW" >> "${T}"/clean.log || die
+ if ! use prefix; then
+ rm -rvf "${MY_S}/scons" >> "${T}"/clean.log || die
+ echo "import os, sys; os.execvp('scons', sys.argv)" > "${MY_S}"/libtbx/command_line/scons.py || die
+ fi
+
+ find "${MY_S}/clipper" -name "*.h" -print -delete >> "${T}"/clean.log || die
+
+ sed \
+ -e "/LIBS/s:boost_python:boost_python-$(echo ${EPYTHON} | sed 's/python//'):g" \
+ -i "${MY_S}"/boost_adaptbx/SConscript "${MY_S}"/scitbx/boost_python/SConscript || die
+}
+
+src_configure() {
+ local compiler
+ local myconf
+
+ myconf="${MY_S}/libtbx/configure.py"
+
+ compiler=$(expr match "$(tc-getCC)" '.*\([a-z]cc\)')
+ myconf="${myconf} --compiler=${compiler}"
+
+ # Additional USE flag usage
+ myconf="${myconf} --enable-openmp-if-possible=$(usex openmp true false)"
+
+ use threads && USEthreads="--enable-boost-threads"
+
+ myconf="${myconf} ${USE_threads} --scan-boost --use_environment_flags"
+
+ mkdir "${MY_B}" && myconf="${myconf} --current_working_directory=${MY_B}"
+ cd "${MY_B}"
+
+ myconf="${myconf} --build=release fftw3tbx rstbx smtbx mmtbx clipper_adaptbx fable"
+ einfo "configuring with ${python} ${myconf}"
+
+ ${EPYTHON} ${myconf} || die "configure failed"
+}
+
+src_compile() {
+ local makeopts_exp
+
+ cd "${MY_B}"
+
+ makeopts_exp=${MAKEOPTS/j/j }
+ makeopts_exp=${makeopts_exp%-l[0-9]*}
+
+ source setpaths_all.sh
+
+ einfo "compiling with libtbx.scons ${makeopts_exp}"
+ libtbx.scons ${makeopts_exp} .|| die "make failed"
+}
+
+src_test(){
+ source "${MY_B}"/setpaths_all.sh
+ libtbx.python $(libtbx.show_dist_paths boost_adaptbx)/tests/tst_rational.py && \
+ libtbx.python ${SCITBX_DIST}/run_tests.py ${MAKEOPTS_EXP} && \
+ libtbx.python ${CCTBX_DIST}/run_tests.py ${MAKEOPTS_EXP} \
+ || die "test failed"
+}
+
+src_install(){
+ local lib baselib
+# find cctbx_build/ -type f \( -name "*.py" -o -name "*sh" \) -exec \
+# sed -e "s:${MY_S}:${EPREFIX}/usr/$(get_libdir)/cctbx/cctbx_sources:g" \
+# -e "s:${MY_B}:${EPREFIX}/usr/$(get_libdir)/cctbx/cctbx_build:g" \
+# -i '{}' \; || die "Fail to correct path"
+
+ sed \
+ -e "s:${MY_B}:${EPREFIX}/usr:g" \
+ -e "s:${MY_S}:${EPREFIX}/$(python_get_sitedir):g" \
+ -i "${MY_B}/libtbx_env" || die
+
+ insinto /usr/share/cctbx
+ doins "${MY_B}/libtbx_env" || die
+
+ ebegin "removing unnessary files"
+ rm -r "${S}"/cctbx_sources/{clipper,ccp4io,ucs-fonts,TAG} || die "failed to remove uneeded scons"
+ find -O3 "${S}" -type f \
+ \( -name "*conftest*" -o -name "*.o" -o -name "*.c" -o -name "*.f" -o -name "*.cpp" -o \
+ -name "*.pyc" -o -name "SCons*" -o -name "Makefile" -o -name "config.log" \) -delete \
+ -print >> "${T}"/clean.log || die
+ find "${S}" -type d -empty -delete -print >> "${T}"/clean.log || die
+ find "${MY_B}" -maxdepth 1 -type f -delete -print >> "${T}"/clean.log || die
+ eend
+
+ dobin "${MY_B}"/bin/*
+ rm -vrf "${MY_B}/bin" >> "${T}"/clean.log || die
+ dolib.so "${MY_B}"/lib/lib*
+ mv "${ED}"/usr/$(get_libdir)/libscitbx_min{,i}pack.so || die
+ rm -vf "${MY_B}"/lib/lib* >> "${T}"/clean.log || die
+
+ for lib in "${ED}"/usr/$(get_libdir)/*.so; do
+ baselib=$(basename ${lib})
+ mv ${lib}{,.0.0} || die
+ dosym ${baselib}.0.0 /usr/$(get_libdir)/${baselib}
+ done
+
+ insinto /usr/include
+ doins -r "${MY_B}"/include/* || die
+ rm -rvf "${MY_B}/include" >> "${T}"/clean.log || die
+
+ insinto /usr/libexec/${PN}
+ doins -r "${MY_B}"/* || die
+ find "${ED}"/usr/libexec/${PN} -type f -exec chmod 755 '{}' \;
+
+ cd "${MY_S}"
+ python_domodule * "${MY_B}"/lib/*
+ rm -rvf "${MY_B}/lib" >> "${T}"/clean.log || die
+
+ sed \
+ -e "/PYTHONPATH/s:${MY_S}:$(python_get_sitedir):g" \
+ -e "/PYTHONPATH/s:${MY_B}:$(python_get_sitedir):g" \
+ -e "/LD_LIBRARY_PATH/s:${MY_B}/lib:${EPREFIX}/usr/$(get_libdir):g" \
+ -e "/PATH/s:${MY_B}/bin:${EPREFIX}/usr/bin:g" \
+ -e "/PATH/s:${MY_B}/exe:${EPREFIX}/usr/bin:g" \
+ -e "/exec/s:${MY_S}:$(python_get_sitedir):g" \
+ -e "/LIBTBX_BUILD/s:${MY_B}:${EPREFIX}/usr/share/cctbx:g" \
+ -e "s:${MY_B}/exe_dev/:${EPREFIX}/usr/libexec/${PN}/exe_dev/:g" \
+ -i "${ED}"/usr/bin/* || die
+
+ python_optimize
+}
diff --git a/sci-libs/cctbx/files/2010.03.29.2334-boost.patch b/sci-libs/cctbx/files/2010.03.29.2334-boost.patch
new file mode 100644
index 000000000000..5b4439ee6780
--- /dev/null
+++ b/sci-libs/cctbx/files/2010.03.29.2334-boost.patch
@@ -0,0 +1,516 @@
+From 7e77ff8694b87e95efe56ed961fbc8dd30d8c238 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <gentoo@mgorny.alt.pl>
+Date: Sun, 4 Jul 2010 12:21:10 +0200
+Subject: [PATCH] Unbundle boost.
+
+---
+ work/cctbx_sources/boost_adaptbx/SConscript | 260 -------------------------
+ work/cctbx_sources/cbflib_adaptbx/SConscript | 1 -
+ work/cctbx_sources/cctbx/SConscript | 1 -
+ work/cctbx_sources/clipper_adaptbx/SConscript | 1 -
+ work/cctbx_sources/fable/SConscript | 1 -
+ work/cctbx_sources/fable/libtbx_config | 2 +-
+ work/cctbx_sources/fftw3tbx/SConscript | 1 -
+ work/cctbx_sources/gltbx/SConscript | 1 -
+ work/cctbx_sources/iotbx/SConscript | 2 -
+ work/cctbx_sources/mmtbx/SConscript | 1 -
+ work/cctbx_sources/omptbx/libtbx_config | 2 +-
+ work/cctbx_sources/rstbx/SConscript | 1 -
+ work/cctbx_sources/scitbx/SConscript | 1 -
+ work/cctbx_sources/scitbx/libtbx_config | 2 +-
+ work/cctbx_sources/scitbx/libtbx_refresh.py | 3 +-
+ work/cctbx_sources/smtbx/SConscript | 1 -
+ work/cctbx_sources/spotfinder/SConscript | 1 -
+ work/cctbx_sources/tntbx/SConscript | 1 -
+ 18 files changed, 4 insertions(+), 279 deletions(-)
+
+diff --git a/work/cctbx_sources/boost_adaptbx/SConscript b/work/cctbx_sources/boost_adaptbx/SConscript
+index 0701816..9f8cbf9 100644
+--- a/work/cctbx_sources/boost_adaptbx/SConscript
++++ b/work/cctbx_sources/boost_adaptbx/SConscript
+@@ -8,39 +8,9 @@ import string
+ import sys, os
+ op = os.path
+ Import("env_base", "env_etc")
+-env_etc.boost_dist = libtbx.env.dist_path("boost")
+-env_etc.boost_include = env_etc.boost_dist
+ env_etc.boost_adaptbx_dist = libtbx.env.dist_path("boost_adaptbx")
+ env_etc.boost_adaptbx_include = os.path.dirname(env_etc.boost_adaptbx_dist)
+
+-def build_boost_thread():
+- if (not libtbx.env.build_options.enable_boost_threads):
+- return
+- if (sys.platform == "win32"): s = "win32"
+- else: s = "pthread"
+- join = os.path.join
+- src = join("libs", "thread", "src", s)
+- prefix = "#" + join(os.path.basename(env_etc.boost_dist), src)
+- source = []
+- for node in sorted(os.listdir(join(env_etc.boost_dist, src))):
+- if (not node.lower().endswith(".cpp")): continue
+- source.append(join(prefix, node))
+- env = env_base.Clone(
+- SHLINKFLAGS=env_etc.shlinkflags)
+- env.Append(SHCXXFLAGS=["-DBOOST_THREAD_BUILD_DLL"])
+- env_etc.include_registry.append(
+- env=env,
+- paths=[env_etc.boost_include])
+- darwin_shlinkcom(env_etc, env,
+- lo="boost/libs/thread/src/libboost_thread.lo",
+- dylib="lib/libboost_thread.dylib")
+- env.Repository(os.path.dirname(env_etc.boost_dist))
+- env.SharedLibrary(
+- target='#lib/boost_thread',
+- source=source)
+-
+-build_boost_thread()
+-
+ if (not env_etc.no_boost_python):
+ env_etc.cxxflags_bpl_defines_base = [
+ "-DBOOST_PYTHON_MAX_BASES=2"]
+@@ -64,12 +34,10 @@ if (not env_etc.no_boost_python):
+ ' /manifest ${TARGET}.manifest'])
+ Export("env_no_includes_boost_python_ext")
+ env_pure_boost_python_ext = env_no_includes_boost_python_ext.Clone()
+- env_etc.include_registry.set_boost_dir_name(env_etc.boost_dist)
+ env_etc.include_registry.append(
+ env=env_pure_boost_python_ext,
+ paths=[
+ "#include",
+- env_etc.boost_include,
+ env_etc.python_include])
+ env_boost_python_ext = env_pure_boost_python_ext.Clone()
+ env_etc.include_registry.prepend(
+@@ -113,234 +81,6 @@ if (not env_etc.no_boost_python):
+ target="tests/tst_optional_copy",
+ source="tests/tst_optional_copy.cpp")
+
+- import os, os.path
+- env = env_base.Clone(LIBS=env_etc.libs_python)
+- env.Append(LIBPATH=env_etc.libpath_python)
+- env.Append(SHCXXFLAGS=env_etc.cxxflags_bpl_defines_base)
+- env.Append(SHCXXFLAGS=["-DBOOST_PYTHON_SOURCE"])
+- if (libtbx.env.build_options.boost_python_bool_int_strict):
+- env.Append(SHCXXFLAGS=["-DBOOST_PYTHON_BOOL_INT_STRICT"])
+- env.Replace(SHLINKFLAGS=env_etc.shlinkflags)
+- env.Append(CXXFLAGS=env_etc.cxxflags_bpl_defines_base)
+- env.Append(CXXFLAGS="-DBOOST_PYTHON_SOURCE")
+- env.Replace(LINKFLAGS=env_etc.shlinkflags)
+- env_etc.include_registry.append(
+- env=env,
+- paths=[env_etc.boost_include, env_etc.python_include])
+-
+- darwin_shlinkcom(env_etc, env,
+- lo="boost/libs/python/src/libboost_python.lo",
+- dylib="lib/libboost_python.dylib")
+-
+- # fixed list of file names introduced 2009-09-29, due to major changes in
+- # boost/libs/python/build/Jamfile.v2 svn rev. 56305 (new Python 3 support)
+- bpl_dll_sources = """\
+-numeric.cpp
+-list.cpp
+-long.cpp
+-dict.cpp
+-tuple.cpp
+-str.cpp
+-slice.cpp
+-converter/from_python.cpp
+-converter/registry.cpp
+-converter/type_id.cpp
+-object/enum.cpp
+-object/class.cpp
+-object/function.cpp
+-object/inheritance.cpp
+-object/life_support.cpp
+-object/pickle_support.cpp
+-errors.cpp
+-module.cpp
+-converter/builtin_converters.cpp
+-converter/arg_to_python_base.cpp
+-object/iterator.cpp
+-object/stl_iterator.cpp
+-object_protocol.cpp
+-object_operators.cpp
+-wrapper.cpp
+-import.cpp
+-exec.cpp
+-object/function_doc_signature.cpp
+-""".splitlines()
+- prefix = "#"+os.path.join(
+- os.path.basename(env_etc.boost_dist), "libs", "python", "src")
+- bpl_dll_sources = [os.path.join(prefix, path) for path in bpl_dll_sources]
+- #
+- env.Repository(os.path.dirname(env_etc.boost_dist))
+- if (env_etc.static_bpl):
+- env.StaticLibrary(target="#lib/boost_python", source=bpl_dll_sources)
+- else:
+- env.SharedLibrary(target="#lib/boost_python", source=bpl_dll_sources)
+- if (int(ARGUMENTS.get("boost_python_tests", 0))):
+- warn_if_unexpected_md5_hexdigest(
+- path=libtbx.env.under_dist("boost", "libs/python/test/Jamfile.v2"),
+- expected_md5_hexdigests=[
+- "c7a3dd81bf730635146f5c908ac982eb", # svn revision 39065M
+- "d40aac0029bcd28f6e205ae3b30a1284", # svn revision 40216
+- "b79f016d3ec10cf1625a9e006e605428", # svn revision 40714
+- "f948983d970fd47e83a3a785bb54520a", # svn revision 41550
+- "c3d84006331d534840c42ab956fdfa05", # svn revision 50367M
+- "cedfd061d767a27413ef4a75ee0e446f", # svn revision 56310
+- "e5507482a1937825e4c9f3ffe555fc59", # svn revision 59331
+- ])
+- bpl_tests = Split("""
+-staticmethod
+-shared_ptr
+-enable_shared_from_this
+-andreas_beyer
+-polymorphism
+-polymorphism2
+-auto_ptr
+-minimal
+-args
+-numpy
+-enum
+-exception_translator
+-test_pointer_adoption
+-operators
+-callbacks
+-defaults
+-object
+-list
+-long
+-dict
+-tuple
+-str
+-virtual_functions
+-back_reference
+-implicit
+-data_members
+-ben_scott1
+-bienstman1
+-bienstman2
+-bienstman3
+-multi_arg_constructor
+-extract
+-opaque
+-pickle1
+-pickle2
+-pickle3
+-pickle4
+-nested
+-docstring
+-pytype_function
+-bienstman4
+-bienstman5
+-test_builtin_converters,builtin_converters_ext,test_builtin_converters
+-cltree,cltree,test_cltree
+-m1,m1,newtest
+-m2,m2,newtest
+-iterator,iterator_ext,iterator
+-input_iterator,input_iterator,iterator
+-crossmod_exception_a,crossmod_exception_a,crossmod_exception
+-crossmod_exception_b,crossmod_exception_b,crossmod_exception
+-vector_indexing_suite
+-return_arg
+-keywords,keywords,keywords_test
+-properties
+-map_indexing_suite;int_map_indexing_suite;a_map_indexing_suite,map_indexing_suite_ext,map_indexing_suite
+-injected
+-slice
+-const_argument
+-raw_ctor
+-pointer_vector
+-wrapper_held_type
+-polymorphism2_auto_ptr
+-stl_iterator
+-voidptr
+-crossmod_opaque_a,crossmod_opaque_a,crossmod_opaque
+-crossmod_opaque_b,crossmod_opaque_b,crossmod_opaque
+-""")
+-# non-portable tests are not included above:
+-# calling_conventions
+-# calling_conventions_mf
+-#
+- Import("env_boost_python_ext")
+- test_dir = libtbx.env.under_dist("boost", "libs/python/test")
+- prefix = "#"+os.path.join(
+- os.path.basename(env_etc.boost_dist), "libs", "python", "test")
+- all_tst = []
+- for bpl_test in bpl_tests:
+- flds = bpl_test.split(",")
+- assert len(flds) in (1,3)
+- if (len(flds) == 1):
+- src = bpl_test
+- pyd = bpl_test + "_ext"
+- tst = bpl_test
+- else:
+- src = flds[0]
+- pyd = flds[1]
+- tst = flds[2]
+- env = env_pure_boost_python_ext.Clone()
+- env.Repository(os.path.dirname(env_etc.boost_dist))
+- ok = True
+- source = []
+- for s in src.split(";"):
+- cpp = "%s.cpp" % s
+- file_name = os.path.join(test_dir, cpp)
+- if (not os.path.isfile(file_name)):
+- print "Warning: source file not available:", show_string(file_name)
+- ok = False
+- else:
+- source.append(os.path.join(prefix, cpp))
+- if (ok):
+- if (not tst in all_tst):
+- all_tst.append(tst)
+- env.SharedLibrary(target="#lib/%s" % pyd, source=source)
+- all_tst = [os.path.join(test_dir, tst+".py") for tst in all_tst]
+- #
+- if (sys.platform == "linux2"):
+- base_lib = libtbx.env.under_build(path="base/lib")
+- if (os.path.isdir(base_lib)):
+- env_prog = env.Clone()
+- env_prog.Append(LIBPATH=[base_lib])
+- env_prog.Append(LIBS=[
+- "-lpython%d.%d" % sys.version_info[:2],
+- "-lpthread",
+- "-lutil",
+- "-ldl"])
+- exe = env_prog.Program(
+- target="boost/libs/python/test/exec_dynamic",
+- source=[os.path.join(prefix, "exec.cpp")])
+- libtbx.env.write_dispatcher_in_bin(
+- source_file=exe[0].get_abspath(),
+- target_file="boost_libs_python_test_exec_dynamic")
+- all_tst.append("$ boost_libs_python_test_exec_dynamic %s"
+- % show_string(os.path.join(test_dir, "exec.py")))
+- #
+- if (os.name != "nt"):
+- env.SharedLibrary(
+- target="#lib/boost_adaptbx_char_array_ext",
+- source=["char_array_ext.cpp"])
+- all_tst.append(
+- libtbx.env.under_dist("boost_adaptbx", "tests/tst_char_array.py"))
+- #
+- if (os.name == "nt"):
+- boost_python_run_tests = \
+- "%s\\boost_python_run_tests.bat" % libtbx.env.build_path
+- f = open(boost_python_run_tests, "w")
+- for tst in all_tst:
+- if (tst.startswith("$ ")):
+- print >> f, 'call %s' % tst[2:]
+- else:
+- print >> f, 'call libtbx.python %s' % show_string(tst)
+- f.close()
+- else:
+- boost_python_run_tests = \
+- "%s/boost_python_run_tests.csh" % libtbx.env.build_path
+- f = open(boost_python_run_tests, "w")
+- print >> f, "#! /bin/csh -f"
+- print >> f, "set verbose"
+- for tst in all_tst:
+- if (tst.startswith("$ ")):
+- print >> f, tst[2:]
+- else:
+- print >> f, 'libtbx.python "%s"' % show_string(tst)
+- f.close()
+- os.chmod(boost_python_run_tests, 0755)
+-
+ def write_type_id_eq_h():
+ unsigned_types = [
+ "unsigned short",
+diff --git a/work/cctbx_sources/cbflib_adaptbx/SConscript b/work/cctbx_sources/cbflib_adaptbx/SConscript
+index 78c1297..dffc247 100644
+--- a/work/cctbx_sources/cbflib_adaptbx/SConscript
++++ b/work/cctbx_sources/cbflib_adaptbx/SConscript
+@@ -14,7 +14,6 @@ env_etc.cbflib_common_includes = [
+ env_etc.libtbx_include,
+ env_etc.scitbx_include,
+ env_etc.boost_adaptbx_include,
+- env_etc.boost_include,
+ env_etc.cbflib_dist, # for the adaptor cpp files
+ env_etc.cbflib_include[0], # for the cbflib c-files
+ env_etc.cbflib_include[1], # for the cbflib c-files
+diff --git a/work/cctbx_sources/cctbx/SConscript b/work/cctbx_sources/cctbx/SConscript
+index 6ec7c93..2dfb442 100644
+--- a/work/cctbx_sources/cctbx/SConscript
++++ b/work/cctbx_sources/cctbx/SConscript
+@@ -10,7 +10,6 @@ env_etc.cctbx_common_includes = [
+ env_etc.scitbx_include,
+ env_etc.chiltbx_include,
+ env_etc.omptbx_include,
+- env_etc.boost_include,
+ ]
+
+ env = env_base.Clone(
+diff --git a/work/cctbx_sources/fable/SConscript b/work/cctbx_sources/fable/SConscript
+index bf8e198..b6acccf 100644
+--- a/work/cctbx_sources/fable/SConscript
++++ b/work/cctbx_sources/fable/SConscript
+@@ -13,7 +13,6 @@ if (not env_etc.no_boost_python):
+ env_etc.libtbx_include,
+ env_etc.fable_include,
+ env_etc.boost_adaptbx_include,
+- env_etc.boost_include,
+ env_etc.python_include])
+ env.SharedLibrary(
+ target="#lib/fable_ext",
+diff --git a/work/cctbx_sources/fable/libtbx_config b/work/cctbx_sources/fable/libtbx_config
+index d456588..f00ae86 100644
+--- a/work/cctbx_sources/fable/libtbx_config
++++ b/work/cctbx_sources/fable/libtbx_config
+@@ -1,4 +1,4 @@
+ {
+- "modules_required_for_build": ["boost"],
++ "modules_required_for_build": [],
+ "modules_required_for_use": ["boost_adaptbx"],
+ }
+diff --git a/work/cctbx_sources/fftw3tbx/SConscript b/work/cctbx_sources/fftw3tbx/SConscript
+index ecc3a03..4fc1ec1 100755
+--- a/work/cctbx_sources/fftw3tbx/SConscript
++++ b/work/cctbx_sources/fftw3tbx/SConscript
+@@ -8,7 +8,6 @@ env_etc.fftw3tbx_dist = libtbx.env.dist_path("fftw3tbx")
+ env_etc.fftw3tbx_common_includes = [
+ env_etc.libtbx_include,
+ env_etc.scitbx_include,
+- env_etc.boost_include,
+ ]
+
+ base_include = libtbx.env.under_build("base/include")
+diff --git a/work/cctbx_sources/gltbx/SConscript b/work/cctbx_sources/gltbx/SConscript
+index 56a7115..f6214a4 100644
+--- a/work/cctbx_sources/gltbx/SConscript
++++ b/work/cctbx_sources/gltbx/SConscript
+@@ -7,7 +7,6 @@ env_etc.gltbx_common_includes = [
+ env_etc.libtbx_include,
+ env_etc.gltbx_include,
+ env_etc.scitbx_include,
+- env_etc.boost_include,
+ ]
+
+ if (not env_etc.no_boost_python):
+diff --git a/work/cctbx_sources/iotbx/SConscript b/work/cctbx_sources/iotbx/SConscript
+index df17856..c5cf7da 100644
+--- a/work/cctbx_sources/iotbx/SConscript
++++ b/work/cctbx_sources/iotbx/SConscript
+@@ -10,7 +10,6 @@ env_etc.iotbx_common_includes = [
+ env_etc.iotbx_include,
+ env_etc.cctbx_include,
+ env_etc.scitbx_include,
+- env_etc.boost_include,
+ env_etc.boost_adaptbx_include,
+ ]
+
+@@ -37,7 +36,6 @@ if (not env_etc.no_boost_python):
+ env_etc.include_registry.append(
+ env=env,
+ paths=[env_etc.libtbx_include,
+- env_etc.boost_include,
+ env_etc.python_include])
+ env.SharedLibrary(
+ target="#lib/iotbx_wildcard_ext",
+diff --git a/work/cctbx_sources/mmtbx/SConscript b/work/cctbx_sources/mmtbx/SConscript
+index 0532878..9bcaeb2 100755
+--- a/work/cctbx_sources/mmtbx/SConscript
++++ b/work/cctbx_sources/mmtbx/SConscript
+@@ -10,7 +10,6 @@ env_etc.mmtbx_common_includes = [
+ env_etc.mmtbx_include,
+ env_etc.cctbx_include,
+ env_etc.scitbx_include,
+- env_etc.boost_include,
+ ]
+
+ if (not env_etc.no_boost_python):
+diff --git a/work/cctbx_sources/omptbx/libtbx_config b/work/cctbx_sources/omptbx/libtbx_config
+index d456588..f00ae86 100644
+--- a/work/cctbx_sources/omptbx/libtbx_config
++++ b/work/cctbx_sources/omptbx/libtbx_config
+@@ -1,4 +1,4 @@
+ {
+- "modules_required_for_build": ["boost"],
++ "modules_required_for_build": [],
+ "modules_required_for_use": ["boost_adaptbx"],
+ }
+diff --git a/work/cctbx_sources/rstbx/SConscript b/work/cctbx_sources/rstbx/SConscript
+index 2213c2f..232b5d7 100644
+--- a/work/cctbx_sources/rstbx/SConscript
++++ b/work/cctbx_sources/rstbx/SConscript
+@@ -11,7 +11,6 @@ env_etc.rstbx_common_includes = [
+ env_etc.scitbx_include,
+ env_etc.chiltbx_include,
+ env_etc.omptbx_include,
+- env_etc.boost_include,
+ ]
+
+ env = env_base.Clone(SHLINKFLAGS=env_etc.shlinkflags)
+diff --git a/work/cctbx_sources/scitbx/SConscript b/work/cctbx_sources/scitbx/SConscript
+index f30b9db..10e0967 100644
+--- a/work/cctbx_sources/scitbx/SConscript
++++ b/work/cctbx_sources/scitbx/SConscript
+@@ -9,7 +9,6 @@ env_etc.scitbx_common_includes = [
+ env_etc.scitbx_include,
+ env_etc.omptbx_include,
+ env_etc.boost_adaptbx_include,
+- env_etc.boost_include,
+ ]
+
+ SConscript("error/SConscript")
+diff --git a/work/cctbx_sources/scitbx/libtbx_config b/work/cctbx_sources/scitbx/libtbx_config
+index 87cc3c7..d147819 100644
+--- a/work/cctbx_sources/scitbx/libtbx_config
++++ b/work/cctbx_sources/scitbx/libtbx_config
+@@ -1,4 +1,4 @@
+ {
+- "modules_required_for_build": ["boost"],
++ "modules_required_for_build": [],
+ "modules_required_for_use": ["boost_adaptbx", "omptbx"],
+ }
+diff --git a/work/cctbx_sources/scitbx/libtbx_refresh.py b/work/cctbx_sources/scitbx/libtbx_refresh.py
+index 10d4ee0..c8374b2 100644
+--- a/work/cctbx_sources/scitbx/libtbx_refresh.py
++++ b/work/cctbx_sources/scitbx/libtbx_refresh.py
+@@ -13,8 +13,7 @@ if (self.env.is_ready_for_build()):
+ generate_all.refresh(array_family=os.path.dirname(target_dir))
+ #
+ warn_if_unexpected_md5_hexdigest(
+- path=self.env.under_dist(
+- module_name="boost", path="boost/random/mersenne_twister.hpp"),
++ path="@GENTOO_PORTAGE_EPREFIX@/usr/include/boost/random/mersenne_twister.hpp",
+ expected_md5_hexdigests=[
+ "a2533c79a21f0f773f2e0d29a37371b0", # CVS revision 1.21
+ "378432b5b280c9c0c894f7c80f0dad92", # CVS revision 1.20
+diff --git a/work/cctbx_sources/smtbx/SConscript b/work/cctbx_sources/smtbx/SConscript
+index f5031ee..02f81a4 100644
+--- a/work/cctbx_sources/smtbx/SConscript
++++ b/work/cctbx_sources/smtbx/SConscript
+@@ -7,7 +7,6 @@ env_etc.smtbx_common_includes = [
+ env_etc.cctbx_include,
+ env_etc.scitbx_include,
+ env_etc.chiltbx_include,
+- env_etc.boost_include,
+ ]
+
+ env = env_base.Clone(
+diff --git a/work/cctbx_sources/spotfinder/SConscript b/work/cctbx_sources/spotfinder/SConscript
+index 1d280d4..9dc9195 100644
+--- a/work/cctbx_sources/spotfinder/SConscript
++++ b/work/cctbx_sources/spotfinder/SConscript
+@@ -13,7 +13,6 @@ env_etc.spotfinder_common_includes = [
+ env_etc.iotbx_include,
+ os.path.dirname(env_etc.spotfinder_dist),
+ env_etc.boost_adaptbx_include,
+- env_etc.boost_include,
+ env_etc.annlib_dist,
+ env_etc.annlib_include[0],
+ env_etc.annlib_include[1],
+diff --git a/work/cctbx_sources/tntbx/SConscript b/work/cctbx_sources/tntbx/SConscript
+index e773186..ee29f10 100755
+--- a/work/cctbx_sources/tntbx/SConscript
++++ b/work/cctbx_sources/tntbx/SConscript
+@@ -10,7 +10,6 @@ env_etc.tntbx_common_includes = [
+ env_etc.tntbx_include,
+ env_etc.tntbx_tnt_include,
+ env_etc.scitbx_include,
+- env_etc.boost_include,
+ ]
+
+ Import("env_base", "env_etc")
+--
+1.7.1.1
diff --git a/sci-libs/cctbx/files/2010.03.29.2334-clipper.patch b/sci-libs/cctbx/files/2010.03.29.2334-clipper.patch
new file mode 100644
index 000000000000..8830dd8a054e
--- /dev/null
+++ b/sci-libs/cctbx/files/2010.03.29.2334-clipper.patch
@@ -0,0 +1,77 @@
+diff --git a/cctbx_sources/clipper_adaptbx/SConscript b/cctbx_sources/clipper_adaptbx/SConscript
+index 9cce49e..1046ed0 100644
+--- a/cctbx_sources/clipper_adaptbx/SConscript
++++ b/cctbx_sources/clipper_adaptbx/SConscript
+@@ -1,56 +1,13 @@
+ import libtbx.load_env
+ Import("env_base", "env_etc")
+
+-env_etc.clipper_dist = libtbx.env.dist_path("clipper")
+-env_etc.clipper_include = env_etc.clipper_dist
+-
+ env = env_base.Clone(
+ SHLINKFLAGS=env_etc.shlinkflags,
+ LIBS=env_etc.libm)
+-env.Prepend(CPPPATH=[env_etc.clipper_include])
+-
+-if (env_etc.static_libraries): builder = env.StaticLibrary
+-else: builder = env.SharedLibrary
+-builder(target='#lib/clipper',
+- source = ["../clipper/clipper/core/"+file_name for file_name in """
+- atomsf.cpp
+- cell.cpp
+- clipper_memory.cpp
+- clipper_message.cpp
+- clipper_stats.cpp
+- clipper_types.cpp
+- clipper_util.cpp
+- container.cpp
+- container_hkl.cpp
+- container_map.cpp
+- container_types.cpp
+- coords.cpp
+- derivs.cpp
+- hkl_compute.cpp
+- hkl_data.cpp
+- hkl_datatypes.cpp
+- hkl_info.cpp
+- hkl_lookup.cpp
+- hkl_operators.cpp
+- map_interp.cpp
+- map_utils.cpp
+- nxmap.cpp
+- nxmap_operator.cpp
+- ramachandran.cpp
+- resol_basisfn.cpp
+- resol_fn.cpp
+- resol_targetfn.cpp
+- rotation.cpp
+- spacegroup.cpp
+- spacegroup_data.cpp
+- symop.cpp
+- xmap.cpp
+-""".split()])
+-# fftmap_sparse.cpp
+-# fftmap.cpp
+
+ env_exe = env.Clone()
+-env_exe.Prepend(LIBS=["clipper"])
++env_exe.Prepend(LIBS=["clipper-minimol","clipper-mmdb","clipper-cns","clipper-cif","clipper-contrib","clipper-ccp4","clipper-phs","clipper-core"])
++env_exe.Prepend(SHLINKFLAGS=["-Wl,--as-needed"])
+
+ exe = env_exe.Program(
+ target='#exe_dev/'+env["PROGPREFIX"]+'clipper.symtest'
+@@ -76,12 +33,10 @@ if (hasattr(env_etc, "cctbx_include")):
+ env_etc.include_registry.append(
+ env=env_clipper_boost_python_ext,
+ paths=[
+- env_etc.clipper_include,
+ env_etc.libtbx_include,
+ env_etc.cctbx_include,
+ env_etc.scitbx_include,
+ env_etc.boost_adaptbx_include,
+- env_etc.boost_include,
+ env_etc.python_include])
+ Export("env_clipper_boost_python_ext")
+- SConscript("clipper/SConscript")
++
diff --git a/sci-libs/cctbx/files/2010.03.29.2334-flags.patch b/sci-libs/cctbx/files/2010.03.29.2334-flags.patch
new file mode 100644
index 000000000000..8a8033234713
--- /dev/null
+++ b/sci-libs/cctbx/files/2010.03.29.2334-flags.patch
@@ -0,0 +1,94 @@
+diff --git a/cctbx_sources/libtbx/SConscript b/cctbx_sources/libtbx/SConscript
+index 16d22b6..f85b664 100644
+--- a/cctbx_sources/libtbx/SConscript
++++ b/cctbx_sources/libtbx/SConscript
+@@ -5,6 +5,7 @@ from libtbx.str_utils import show_string
+ from libtbx.path import norm_join, full_command_path
+ import platform
+ import sys, os
++import SCons.Util
+
+ if (hasattr(Environment, "Clone")):
+ Environment.Copy = Environment.Clone # XXX backward compatibility 2008_03_30
+@@ -132,9 +133,7 @@ if (env_etc.compiler == "unix_icpc"):
+ static_exe = libtbx.env.build_options.static_exe
+
+ def gcc_common_warn_options():
+- result = ["-Wall", "-Wno-sign-compare", "-Wno-unknown-pragmas"]
+- if (env_etc.gcc_version >= 40000):
+- result.append("-Winit-self")
++ result = [""]
+ return result
+
+ def enable_more_warnings(env):
+@@ -355,16 +354,22 @@ else:
+ cc = env_etc.compiler.replace("unix_", "")
+ cxx = cc.replace("gcc", "g++")
+ env_etc.gcc_version = libtbx.env_config.get_gcc_version(command_name=cc)
++# linkerflags = os.environ.get("LDFLAGS")
++# link_flags=env_etc.ldflags
++ link_flags=os.environ.get("LDFLAGS")
++ linker_options=SCons.Util.CLVar(os.environ['LDFLAGS'])
+ env_base.Replace(
+ CC=cc,
+ SHCC=cc,
+ CXX=cxx,
+ LINK=cxx,
++ LINKFLAGS=linker_options,
+ SHCXX=cxx,
+ SHLINK=cxx,
+ SHLIBSUFFIX=env_etc.shlibsuffix,
+ )
+- env_etc.c_link = cc
++# linkerflags = env_etc.ldflags
++# env_etc.c_link = cc + " " + linkerflags
+ env_etc.ccflags_base = [
+ "-fPIC",
+ "-fno-strict-aliasing"]
+@@ -380,7 +385,7 @@ else:
+ warn_options = gcc_common_warn_options() + ["-Werror"]
+ env_etc.ccflags_base.extend(warn_options)
+ if (libtbx.env.build_options.optimization):
+- opts = ["-DNDEBUG", "-O3", "-ffast-math"]
++ opts = ["-DNDEBUG"]
+ if (env_etc.gcc_version >= 40300):
+ opts.append("-fno-associative-math")
+ opts.append("-ftrapping-math")
+@@ -401,6 +406,7 @@ else:
+ env_base.Prepend(LINKFLAGS=["-static"])
+ static_exe = None
+ env_etc.shlinkflags = ["-shared"]
++ env_etc.shlinkflags.append(linker_options)
+ env_etc.shlinkflags_bpl = env_etc.shlinkflags
+ if (libtbx.env.build_options.mode == "profile"):
+ env_base.Prepend(LINKFLAGS=["-pg"])
+diff --git a/cctbx_sources/libtbx/env_config.py b/cctbx_sources/libtbx/env_config.py
+index ca510b9..68c58ea 100644
+--- a/cctbx_sources/libtbx/env_config.py
++++ b/cctbx_sources/libtbx/env_config.py
+@@ -1608,6 +1608,7 @@ class build_options:
+ self.env_cxxflags = ""
+ self.env_cflags = ""
+ self.env_cppflags = ""
++ self.env_ldflags = ""
+ flg = os.environ.get("CXXFLAGS")
+ if flg is not None:
+ self.env_cxxflags = flg
+@@ -1617,6 +1618,9 @@ class build_options:
+ flg = os.environ.get("CPPFLAGS")
+ if flg is not None:
+ self.env_cppflags = flg
++ flg = os.environ.get("LDFLAGS")
++ if flg is not None:
++ self.env_ldflags = flg
+
+ def report(self, f=None):
+ if (f is None): f = sys.stdout
+@@ -1640,6 +1644,7 @@ class build_options:
+ print >>f, " CXXFLAGS = ", self.env_cxxflags
+ print >>f, " CFLAGS = ", self.env_cflags
+ print >>f, " CPPFLAGS = ", self.env_cppflags
++ print >>f, " LDFLAGS = ", self.env_ldflags
+
+ class include_registry:
+
diff --git a/sci-libs/cctbx/files/2010.03.29.2334-format-security.patch b/sci-libs/cctbx/files/2010.03.29.2334-format-security.patch
new file mode 100644
index 000000000000..057c135f9953
--- /dev/null
+++ b/sci-libs/cctbx/files/2010.03.29.2334-format-security.patch
@@ -0,0 +1,117 @@
+ cctbx_sources/scitbx/lbfgsb/raw.h | 54 +++++++++++++++++++--------------------
+ 1 file changed, 27 insertions(+), 27 deletions(-)
+
+diff --git a/cctbx_sources/scitbx/lbfgsb/raw.h b/cctbx_sources/scitbx/lbfgsb/raw.h
+index 21afed7..5b15055 100644
+--- a/cctbx_sources/scitbx/lbfgsb/raw.h
++++ b/cctbx_sources/scitbx/lbfgsb/raw.h
+@@ -853,7 +853,7 @@ namespace raw {
+ if (iprint >= 99) {
+ printf(" LINE SEARCH%12d times; norm of step = %.15G\n",
+ iback, xstep);
+- printf(fmt_2001, iter,f,sbgnrm);
++ printf("%s %i %f %f", fmt_2001, iter,f,sbgnrm);
+ if (iprint > 100) {
+ write_ref1(" X =", x);
+ write_ref1(" G =", g);
+@@ -862,7 +862,7 @@ namespace raw {
+ else if (iprint > 0) {
+ int imod = iter % iprint;
+ if (imod == 0) {
+- printf(fmt_2001, iter,f,sbgnrm);
++ printf("%s %i %f %f", fmt_2001, iter,f,sbgnrm);
+ }
+ }
+ if (iprint >= 1) {
+@@ -967,9 +967,9 @@ namespace raw {
+ " 2 rounding error dominate computation.\n";
+ if (task.substr(0,5) == "ERROR") goto lbl_999;
+ if (iprint >= 0) {
+- printf(fmt_3003);
+- printf(fmt_3004);
+- printf(fmt_3005, n,iter,nfgv,nintol,nskip,nact,sbgnrm,f);
++ printf("%s", fmt_3003);
++ printf("%s", fmt_3004);
++ printf("%s %i %i %i %i %i %i %f %f", fmt_3005, n,iter,nfgv,nintol,nskip,nact,sbgnrm,f);
+ if (iprint >= 100) {
+ write_ref1(" X =", x);
+ }
+@@ -977,40 +977,40 @@ namespace raw {
+ }
+ lbl_999:
+ if (iprint >= 0) {
+- printf(fmt_3009, task.c_str());
++ printf("%s %s", fmt_3009, task.c_str());
+ if (info != 0) {
+- if (info == -1) printf(fmt_9011);
+- if (info == -2) printf(fmt_9012);
+- if (info == -3) printf(fmt_9013);
+- if (info == -4) printf(fmt_9014);
+- if (info == -5) printf(fmt_9015);
++ if (info == -1) printf("%s", fmt_9011);
++ if (info == -2) printf("%s", fmt_9012);
++ if (info == -3) printf("%s", fmt_9013);
++ if (info == -4) printf("%s", fmt_9014);
++ if (info == -5) printf("%s", fmt_9015);
+ if (info == -6) {
+ printf(" Input nbd(%12d) is invalid.\n", k);
+ }
+ if (info == -7) {
+ printf(" l(%12d) > u(%12d). No feasible solution.\n", k, k);
+ }
+- if (info == -8) printf(fmt_9018);
+- if (info == -9) printf(fmt_9019);
++ if (info == -8) printf("%s", fmt_9018);
++ if (info == -9) printf("%s", fmt_9019);
+ }
+- if (iprint >= 1) printf(fmt_3007, cachyt,sbtime,lnscht);
+- printf(fmt_3008, time);
++ if (iprint >= 1) printf("%s %f %f %f", fmt_3007, cachyt,sbtime,lnscht);
++ printf("%s %f", fmt_3008, time);
+ if (iprint >= 1) {
+ if (info == -4 || info == -9) {
+- printf(fmt_3002,
++ printf("%s %i %i %i %i %s %i %f %f", fmt_3002,
+ iter,nfgv,nint,nact,word.c_str(),iback,stp,xstep); // itfile
+ }
+- printf(fmt_3009, task.c_str()); // itfile
++ printf("%s %s", fmt_3009, task.c_str()); // itfile
+ if (info != 0) {
+- if (info == -1) printf(fmt_9011); // itfile
+- if (info == -2) printf(fmt_9012); // itfile
+- if (info == -3) printf(fmt_9013); // itfile
+- if (info == -4) printf(fmt_9014); // itfile
+- if (info == -5) printf(fmt_9015); // itfile
+- if (info == -8) printf(fmt_9018); // itfile
+- if (info == -9) printf(fmt_9019); // itfile
++ if (info == -1) printf("%s", fmt_9011); // itfile
++ if (info == -2) printf("%s", fmt_9012); // itfile
++ if (info == -3) printf("%s", fmt_9013); // itfile
++ if (info == -4) printf("%s", fmt_9014); // itfile
++ if (info == -5) printf("%s", fmt_9015); // itfile
++ if (info == -8) printf("%s", fmt_9018); // itfile
++ if (info == -9) printf("%s", fmt_9019); // itfile
+ }
+- printf(fmt_3008, time); // itfile
++ printf("%s %f", fmt_3008, time); // itfile
+ }
+ }
+ }
+@@ -3902,7 +3902,7 @@ namespace raw {
+ " refresh the lbfgs memory and restart the iteration.\n";
+ if (info != 0) {
+ // singular triangular system detected; refresh the lbfgs memory.
+- if(iprint >= 1) printf(fmt_1005);
++ if(iprint >= 1) printf("%s", fmt_1005);
+ info = 0;
+ col = 0;
+ head = 1;
+@@ -3968,7 +3968,7 @@ namespace raw {
+ if (info != 0) {
+ // singular triangular system detected;
+ // refresh the lbfgs memory and restart the iteration.
+- if(iprint >= 1) printf(fmt_1005);
++ if(iprint >= 1) printf("%s", fmt_1005);
+ info = 0;
+ col = 0;
+ head = 1;
diff --git a/sci-libs/cctbx/files/2010.03.29.2334-gcc-4.6.patch b/sci-libs/cctbx/files/2010.03.29.2334-gcc-4.6.patch
new file mode 100644
index 000000000000..e54cfa16838b
--- /dev/null
+++ b/sci-libs/cctbx/files/2010.03.29.2334-gcc-4.6.patch
@@ -0,0 +1,29 @@
+ cctbx_sources/scitbx/array_family/detail/misc.h | 1 +
+ .../scitbx/fortran_io/details/istream_scanner.h | 2 +-
+ 2 files changed, 2 insertions(+), 1 deletions(-)
+
+diff --git a/cctbx_sources/scitbx/array_family/detail/misc.h b/cctbx_sources/scitbx/array_family/detail/misc.h
+index 6ed881e..d7f7f52 100644
+--- a/cctbx_sources/scitbx/array_family/detail/misc.h
++++ b/cctbx_sources/scitbx/array_family/detail/misc.h
+@@ -2,6 +2,7 @@
+ #define SCITBX_ARRAY_FAMILY_MISC_H
+
+ #include <scitbx/array_family/type_traits.h>
++#include <memory>
+
+ namespace scitbx { namespace af {
+
+diff --git a/cctbx_sources/scitbx/fortran_io/details/istream_scanner.h b/cctbx_sources/scitbx/fortran_io/details/istream_scanner.h
+index 8a0ac25..03a0e20 100644
+--- a/cctbx_sources/scitbx/fortran_io/details/istream_scanner.h
++++ b/cctbx_sources/scitbx/fortran_io/details/istream_scanner.h
+@@ -32,7 +32,7 @@ class istream_scanner
+ }
+
+ private:
+- mutable std::basic_istream<CharType> &input;
++ std::basic_istream<CharType> &input;
+ mutable value_t current;
+ };
+
diff --git a/sci-libs/cctbx/files/2010.03.29.2334-gcc-4.7.patch b/sci-libs/cctbx/files/2010.03.29.2334-gcc-4.7.patch
new file mode 100644
index 000000000000..96cb21531bbf
--- /dev/null
+++ b/sci-libs/cctbx/files/2010.03.29.2334-gcc-4.7.patch
@@ -0,0 +1,154 @@
+ .../scitbx/math/boost_python/distributions.cpp | 60 +++++++++++++------
+ cctbx_sources/scitbx/rigid_body/spatial_lib.h | 1 +
+ cctbx_sources/scitbx/rigid_body/tardy.h | 4 +-
+ .../refinement/boost_python/weighting_schemes.cpp | 4 +-
+ .../smtbx/structure_factors/direct/standard_xray.h | 4 +-
+ 5 files changed, 48 insertions(+), 25 deletions(-)
+
+diff --git a/cctbx_sources/scitbx/math/boost_python/distributions.cpp b/cctbx_sources/scitbx/math/boost_python/distributions.cpp
+index a676798..68818e7 100644
+--- a/cctbx_sources/scitbx/math/boost_python/distributions.cpp
++++ b/cctbx_sources/scitbx/math/boost_python/distributions.cpp
+@@ -59,29 +59,51 @@ namespace {
+ {
+ typedef Distribution wt;
+
++ #define NEW_MEMBER(name) \
++ static FloatType name(wt const &self) { \
++ return boost::math::name(self); \
++ }
++
++ NEW_MEMBER(mean);
++ NEW_MEMBER(median);
++ NEW_MEMBER(mode);
++ NEW_MEMBER(variance);
++ NEW_MEMBER(standard_deviation);
++ NEW_MEMBER(skewness);
++ NEW_MEMBER(kurtosis);
++
++ #undef NEW_MEMBER
++
++ #define NEW_MEMBER(name) \
++ static FloatType name(wt const &self, FloatType arg) { \
++ return boost::math::name(self, arg); \
++ }
++
++ NEW_MEMBER(pdf);
++ NEW_MEMBER(cdf);
++ NEW_MEMBER(quantile);
++
++ #undef NEW_MEMBER
++
++ static scitbx::af::shared<FloatType> quantiles(wt const &self, std::size_t n) {
++ return scitbx::math::quantiles<FloatType>(self, n);
++ }
++
+ static void
+ wrap()
+ {
+ using namespace boost::python;
+- def("mean", (FloatType(*)(wt const&)) boost::math::mean);
+- def("median", (FloatType(*)(wt const&)) boost::math::median);
+- def("mode", (FloatType(*)(wt const&)) boost::math::mode);
+- def("variance", (FloatType(*)(wt const&)) boost::math::variance);
+- def("standard_deviation",
+- (FloatType(*)(wt const&)) boost::math::standard_deviation);
+- def("skewness", (FloatType(*)(wt const&)) boost::math::skewness);
+- def("kurtosis", (FloatType(*)(wt const&)) boost::math::kurtosis);
+- def("pdf", (FloatType(*)(wt const&, FloatType const&)) boost::math::pdf);
+- def("cdf", (FloatType(*)(wt const&, FloatType const&)) boost::math::cdf);
+- def("quantile", (FloatType(*)(wt const&, FloatType const&))
+- boost::math::quantile);
+- def("quantiles",
+-#if BOOST_WORKAROUND(__EDG_VERSION__, BOOST_TESTED_AT(306))
+- (scitbx::af::shared<FloatType>(*)(wt const&, std::size_t)) quantiles
+-#else
+- quantiles<FloatType, wt>
+-#endif
+- );
++ def("mean" , mean);
++ def("median" , median);
++ def("mode" , mode);
++ def("variance" , variance);
++ def("standard_deviation", standard_deviation);
++ def("skewness" , skewness);
++ def("kurtosis" , kurtosis);
++ def("pdf" , pdf);
++ def("cdf" , cdf);
++ def("quantile" , quantile);
++ def("quantiles" , quantiles);
+ }
+ };
+
+diff --git a/cctbx_sources/scitbx/rigid_body/spatial_lib.h b/cctbx_sources/scitbx/rigid_body/spatial_lib.h
+index a084f0f..e377292 100755
+--- a/cctbx_sources/scitbx/rigid_body/spatial_lib.h
++++ b/cctbx_sources/scitbx/rigid_body/spatial_lib.h
+@@ -2,6 +2,7 @@
+ #define SCITBX_RIGID_BODY_SPATIAL_LIB_H
+
+ #include <scitbx/rotr3.h>
++#include <scitbx/rigid_body/matrix_helpers.h>
+ #include <scitbx/array_family/versa_matrix.h>
+
+ namespace scitbx { namespace rigid_body {
+diff --git a/cctbx_sources/scitbx/rigid_body/tardy.h b/cctbx_sources/scitbx/rigid_body/tardy.h
+index 104f16b..a8f76cc 100755
+--- a/cctbx_sources/scitbx/rigid_body/tardy.h
++++ b/cctbx_sources/scitbx/rigid_body/tardy.h
+@@ -346,7 +346,7 @@ namespace tardy {
+ unsigned nb = this->bodies_size();
+ af::shared<af::small<ft, 7> > result((af::reserve(nb)));
+ af::shared<af::small<ft, 6> >
+- tau_array = f_ext_as_tau(f_ext_array().const_ref());
++ tau_array = this->f_ext_as_tau(f_ext_array().const_ref());
+ for(unsigned ib=0;ib<nb;ib++) {
+ result.push_back(
+ this->bodies[ib]->joint->tau_as_d_e_pot_d_q(tau_array[ib]));
+@@ -379,7 +379,7 @@ namespace tardy {
+ qdd_array()
+ {
+ if (!qdd_array_) {
+- qdd_array_ = forward_dynamics_ab(
++ qdd_array_ = this->forward_dynamics_ab(
+ /*tau_array*/ af::const_ref<af::small<ft, 6> >(0, 0),
+ f_ext_array().const_ref(),
+ /*grav_accn*/ af::const_ref<ft>(0, 0));
+diff --git a/cctbx_sources/smtbx/refinement/boost_python/weighting_schemes.cpp b/cctbx_sources/smtbx/refinement/boost_python/weighting_schemes.cpp
+index ce0c27b..904e8d7 100644
+--- a/cctbx_sources/smtbx/refinement/boost_python/weighting_schemes.cpp
++++ b/cctbx_sources/smtbx/refinement/boost_python/weighting_schemes.cpp
+@@ -25,9 +25,9 @@ namespace smtbx { namespace refinement { namespace least_squares {
+ : base_t(name, boost::python::no_init)
+ {
+ using namespace boost::python;
+- def("__call__", &wt::operator(),
++ this->def("__call__", &wt::operator(),
+ (arg("fo_sq"), arg("sigma"), arg("fc_sq")));
+- def("__call__", weights,
++ this->def("__call__", weights,
+ (arg("fo_sq"), arg("sigmas"), arg("fc_sq")));
+ }
+ };
+diff --git a/cctbx_sources/smtbx/structure_factors/direct/standard_xray.h b/cctbx_sources/smtbx/structure_factors/direct/standard_xray.h
+index 5e2df76..911bfde 100644
+--- a/cctbx_sources/smtbx/structure_factors/direct/standard_xray.h
++++ b/cctbx_sources/smtbx/structure_factors/direct/standard_xray.h
+@@ -161,7 +161,7 @@ namespace smtbx { namespace structure_factors { namespace direct {
+ for (int k=0; k < hr_ht.groups.size(); ++k) {
+ hr_ht_group<float_type> const &g = hr_ht.groups[k];
+ float_type hrx = g.hr * scatterer.site;
+- complex_type f = exp_i_2pi(hrx + g.ht);
++ complex_type f = this->exp_i_2pi(hrx + g.ht);
+ if (scatterer.flags.use_u_aniso()) {
+ float_type dw = debye_waller_factor_u_star(g.hr, scatterer.u_star);
+ f *= dw;
+@@ -336,7 +336,7 @@ namespace smtbx { namespace structure_factors { namespace direct {
+ for (int k=0; k < hr_ht.groups.size(); ++k) {
+ hr_ht_group<float_type> const &g = hr_ht.groups[k];
+ float_type hrx = g.hr * scatterer.site;
+- complex_type f = exp_i_2pi(hrx + g.ht);
++ complex_type f = this->exp_i_2pi(hrx + g.ht);
+ float_type fa = f.real(), fb = f.imag();
+ if (scatterer.flags.use_u_aniso()) {
+ float_type dw = debye_waller_factor_u_star(g.hr, scatterer.u_star);
diff --git a/sci-libs/cctbx/files/2010.03.29.2334-soname.patch b/sci-libs/cctbx/files/2010.03.29.2334-soname.patch
new file mode 100644
index 000000000000..2c0efcabeb13
--- /dev/null
+++ b/sci-libs/cctbx/files/2010.03.29.2334-soname.patch
@@ -0,0 +1,123 @@
+diff --git a/cctbx_sources/ccp4io_adaptbx/SConscript b/cctbx_sources/ccp4io_adaptbx/SConscript
+index 4ff2232..2ee3991 100644
+--- a/cctbx_sources/ccp4io_adaptbx/SConscript
++++ b/cctbx_sources/ccp4io_adaptbx/SConscript
+@@ -40,6 +40,7 @@ def replace_printf(file_name):
+
+ env = env_base.Clone(
+ SHLINKFLAGS=env_etc.shlinkflags)
++env.Append(SHLINKFLAGS=["-Wl,-soname,libccp4io.so.0.0"])
+ env.Append(CCFLAGS=env_etc.ccp4io_defines)
+ env.Append(SHCCFLAGS=env_etc.ccp4io_defines)
+ env_etc.include_registry.append(
+diff --git a/cctbx_sources/cctbx/SConscript b/cctbx_sources/cctbx/SConscript
+index 6ec7c93..7f2e788 100644
+--- a/cctbx_sources/cctbx/SConscript
++++ b/cctbx_sources/cctbx/SConscript
+@@ -15,6 +15,7 @@ env_etc.cctbx_common_includes = [
+
+ env = env_base.Clone(
+ SHLINKFLAGS=env_etc.shlinkflags)
++env.Append(SHLINKFLAGS=["-Wl,-soname,libcctbx.so.0.0"])
+ env_etc.include_registry.append(
+ env=env,
+ paths=env_etc.cctbx_common_includes)
+diff --git a/cctbx_sources/iotbx/mtz/SConscript b/cctbx_sources/iotbx/mtz/SConscript
+index c0a4bb0..d3c1e45 100644
+--- a/cctbx_sources/iotbx/mtz/SConscript
++++ b/cctbx_sources/iotbx/mtz/SConscript
+@@ -6,6 +6,7 @@ ccp4io_lib = getattr(env_etc, "ccp4io_lib", "cmtz")
+ env.Prepend(LIBS=["cctbx", ccp4io_lib]+env_etc.libm)
+ env.Append(CXXFLAGS=env_etc.ccp4io_defines)
+ env.Append(SHCXXFLAGS=env_etc.ccp4io_defines)
++env.Append(SHLINKFLAGS=["-Wl,-soname,libiotbx_mtz.so.0.0"])
+ env_etc.enable_more_warnings(env=env)
+ if (env_etc.static_libraries): builder = env.StaticLibrary
+ else: builder = env.SharedLibrary
+diff --git a/cctbx_sources/iotbx/pdb/SConscript b/cctbx_sources/iotbx/pdb/SConscript
+index c1415c8..9e1af8d 100644
+--- a/cctbx_sources/iotbx/pdb/SConscript
++++ b/cctbx_sources/iotbx/pdb/SConscript
+@@ -2,6 +2,7 @@ Import("env_base", "env_etc")
+
+ env = env_base.Clone(
+ SHLINKFLAGS=env_etc.shlinkflags)
++env.Append(SHLINKFLAGS=["-Wl,-soname,libiotbx_pdb.so.0.0"])
+ env_etc.enable_more_warnings(env=env)
+ env_etc.include_registry.append(
+ env=env,
+diff --git a/cctbx_sources/mmtbx/masks/SConscript b/cctbx_sources/mmtbx/masks/SConscript
+index e70ab3c..cf2f530 100755
+--- a/cctbx_sources/mmtbx/masks/SConscript
++++ b/cctbx_sources/mmtbx/masks/SConscript
+@@ -17,7 +17,9 @@ builder(
+ target="#lib/mmtbx_masks",
+ source=lib_sources)
+
+-env = env.Clone()
++env = env.Clone(
++ SHLINKFLAGS=env_etc.shlinkflags)
++env.Append(SHLINKFLAGS=["-Wl,-soname,libmmtbx_masks.so.0.0"])
+ env.Prepend(LIBS=["mmtbx_masks", "iotbx_pdb", "cctbx_sgtbx_asu"])
+ env.Program( target = "tst_mask", source="tst_mask.cpp")
+
+diff --git a/cctbx_sources/omptbx/SConscript b/cctbx_sources/omptbx/SConscript
+index 43aac91..ce4b4f3 100644
+--- a/cctbx_sources/omptbx/SConscript
++++ b/cctbx_sources/omptbx/SConscript
+@@ -7,6 +7,7 @@ env_etc.omptbx_include = os.path.dirname(env_etc.omptbx_dist)
+
+ env = env_base.Clone(
+ SHLINKFLAGS=env_etc.shlinkflags)
++env.Append(SHLINKFLAGS=["-Wl,-soname,libomptbx.so.0.0"])
+ env_etc.include_registry.append(
+ env=env,
+ paths=[env_etc.omptbx_include])
+diff --git a/cctbx_sources/rstbx/SConscript b/cctbx_sources/rstbx/SConscript
+index 2213c2f..cae7542 100644
+--- a/cctbx_sources/rstbx/SConscript
++++ b/cctbx_sources/rstbx/SConscript
+@@ -15,6 +15,7 @@ env_etc.rstbx_common_includes = [
+ ]
+
+ env = env_base.Clone(SHLINKFLAGS=env_etc.shlinkflags)
++env.Append(SHLINKFLAGS=["-Wl,-soname,librstbx.so.0.0"])
+ env.Append(LIBS=["cctbx"] + env_etc.libm)
+ env_etc.include_registry.append(
+ env=env,
+diff --git a/cctbx_sources/scitbx/boost_python/SConscript b/cctbx_sources/scitbx/boost_python/SConscript
+index 6f221d0..c4698d8 100644
+--- a/cctbx_sources/scitbx/boost_python/SConscript
++++ b/cctbx_sources/scitbx/boost_python/SConscript
+@@ -4,6 +4,7 @@ Import("env_scitbx_boost_python_ext")
+ env = env_base.Clone(
+ SHLINKFLAGS=env_etc.shlinkflags)
+ env_etc.enable_more_warnings(env=env)
++env.Append(SHLINKFLAGS=["-Wl,-soname,libscitbx_boost_python.so.0.0"])
+ env.Append(CXXFLAGS=env_etc.cxxflags_bpl_defines_base)
+ env.Append(SHCXXFLAGS=env_etc.cxxflags_bpl_defines_base)
+ env.Append(LIBS=["boost_python"])
+diff --git a/cctbx_sources/scitbx/minpack/SConscript b/cctbx_sources/scitbx/minpack/SConscript
+index 7c325cb..cc23a04 100644
+--- a/cctbx_sources/scitbx/minpack/SConscript
++++ b/cctbx_sources/scitbx/minpack/SConscript
+@@ -3,6 +3,7 @@ Import("env_base", "env_etc")
+ env = env_base.Clone(
+ SHLINKFLAGS=env_etc.shlinkflags)
+ env_etc.enable_more_warnings(env=env)
++env.Append(SHLINKFLAGS=["-Wl,-soname,libscitbx_minipack.so.0.0"])
+ env_etc.include_registry.append(
+ env=env,
+ paths=env_etc.scitbx_common_includes)
+diff --git a/cctbx_sources/scitbx/slatec/SConscript b/cctbx_sources/scitbx/slatec/SConscript
+index ca9b6da..9c79d47 100644
+--- a/cctbx_sources/scitbx/slatec/SConscript
++++ b/cctbx_sources/scitbx/slatec/SConscript
+@@ -3,6 +3,7 @@ Import("env_base", "env_etc")
+ env = env_base.Clone(
+ SHLINKFLAGS=env_etc.shlinkflags)
+ env_etc.enable_more_warnings(env=env)
++env.Append(SHLINKFLAGS=["-Wl,-soname,libscitbx_slatec.so.0.0"])
+ env.Append(LIBS=env_etc.libm)
+ if (env_etc.static_libraries): builder = env.StaticLibrary
+ else: builder = env.SharedLibrary
diff --git a/sci-libs/cctbx/files/2010.03.29.2334-tst_server.py.patch b/sci-libs/cctbx/files/2010.03.29.2334-tst_server.py.patch
new file mode 100644
index 000000000000..f6509260d313
--- /dev/null
+++ b/sci-libs/cctbx/files/2010.03.29.2334-tst_server.py.patch
@@ -0,0 +1,15 @@
+diff --git a/mmtbx/monomer_library/tst_server.py b/mmtbx/monomer_library/tst_server.py
+index 519d203..91ba783 100644
+--- cctbx_sources/mmtbx/monomer_library/tst_server.py
++++ cctbx_sources/mmtbx/monomer_library/tst_server.py
+@@ -86,8 +86,8 @@ def exercise():
+ for base_code in ["A", "C", "G"]:
+ rna_atoms = srv.get_comp_comp_id_direct(base_code+"r").atom_dict()
+ dna_atoms = srv.get_comp_comp_id_direct(base_code+"d").atom_dict()
+- for as,bs,c in [(rna_atoms,dna_atoms,"d"), (dna_atoms,rna_atoms,"r")]:
+- for a in as.keys():
++ for as_,bs,c in [(rna_atoms,dna_atoms,"d"), (dna_atoms,rna_atoms,"r")]:
++ for a in as_.keys():
+ b = bs.get(a, None)
+ if (b is None):
+ print "Not in %s: %s" % (base_code+c, a)
diff --git a/sci-libs/cctbx/metadata.xml b/sci-libs/cctbx/metadata.xml
new file mode 100644
index 000000000000..3288d4956c5a
--- /dev/null
+++ b/sci-libs/cctbx/metadata.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>sci-chemistry@gentoo.org</email>
+ <name>Gentoo Chemistry Project</name>
+ </maintainer>
+ <longdescription>
+ The Computational Crystallography Toolbox (cctbx) is being developed
+ as the open source component of the PHENIX system. The goal of
+ the PHENIX project is to advance automation of macromolecular structure
+ determination. PHENIX depends on the cctbx, but not vice versa. This
+ hierarchical approach enforces a clean design as a reusable library.
+ The cctbx is therefore also useful for small-molecule crystallography
+ and even general scientific applications.
+ </longdescription>
+ <upstream>
+ <remote-id type="sourceforge">cctbx</remote-id>
+ </upstream>
+</pkgmetadata>