summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Lecher <jlec@gentoo.org>2010-05-22 08:21:17 +0000
committerJustin Lecher <jlec@gentoo.org>2010-05-22 08:21:17 +0000
commit7544fffc4389f74018f21bb921dba63158754719 (patch)
treea44bd64b8ba3dc7fb5cc95f48332d7da00af0ce3 /sci-libs/cctbx
parentRemove old. (diff)
downloadhistorical-7544fffc4389f74018f21bb921dba63158754719.tar.gz
historical-7544fffc4389f74018f21bb921dba63158754719.tar.bz2
historical-7544fffc4389f74018f21bb921dba63158754719.zip
Version bump
Package-Manager: portage-2.2_rc67/cvs/Linux x86_64
Diffstat (limited to 'sci-libs/cctbx')
-rw-r--r--sci-libs/cctbx/ChangeLog8
-rw-r--r--sci-libs/cctbx/Manifest14
-rw-r--r--sci-libs/cctbx/cctbx-2010.03.29.2334.ebuild202
3 files changed, 222 insertions, 2 deletions
diff --git a/sci-libs/cctbx/ChangeLog b/sci-libs/cctbx/ChangeLog
index ef5c47df8534..c6cb34171831 100644
--- a/sci-libs/cctbx/ChangeLog
+++ b/sci-libs/cctbx/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for sci-libs/cctbx
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sci-libs/cctbx/ChangeLog,v 1.2 2010/02/14 18:14:34 jlec Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/cctbx/ChangeLog,v 1.3 2010/05/22 08:21:17 jlec Exp $
+
+*cctbx-2010.03.29.2334 (22 May 2010)
+
+ 22 May 2010; Justin Lecher <jlec@gentoo.org>
+ +cctbx-2010.03.29.2334.ebuild:
+ Version bump
14 Feb 2010; Justin Lecher (jlec) <jlec@gentoo.org>
-cctbx-2009.11.01.0123.ebuild, +cctbx-2009.11.01.0123-r1.ebuild:
diff --git a/sci-libs/cctbx/Manifest b/sci-libs/cctbx/Manifest
index 42d5493e0c8e..058c6a2464a3 100644
--- a/sci-libs/cctbx/Manifest
+++ b/sci-libs/cctbx/Manifest
@@ -1,4 +1,16 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
DIST cctbx-2009.11.01.0123.tar.gz 14604079 RMD160 77cc84d4b9e35e7a87f807d8669efb939b2e82ce SHA1 7db71a62786b82f47999919a9411938b123d5b4d SHA256 31e7f79424360f963c6eae528a9d289db4b53c1f7fe4aa9de71201e9d14bc5af
+DIST cctbx-2010.03.29.2334.tar.gz 15570372 RMD160 e543578dbe6568f5f8f80b3ce7a20b10e01193bc SHA1 1442dbd5d1ef3b91e718dce039a24fc1637104d3 SHA256 e1fae804caaf8593c7a3f32e4544046f4c00293063d9099721578cc8fbd17213
EBUILD cctbx-2009.11.01.0123-r1.ebuild 5819 RMD160 62b33e04a21926f2fa491cd71bcd87d3f9095308 SHA1 edf5d313ff7670476a6b7eb6d1ae2b9726808482 SHA256 dfcc1c86ea53c869232c192834392e30ca08a6b30b953b48e1fb9626c5e5ea09
-MISC ChangeLog 713 RMD160 17f8cbbc777b3867a1c534111ab62e4da655da93 SHA1 07e611b531e1cf400bbaf2b3c256e9547e7a4481 SHA256 104d54be699d6ec9ffc23b52cee50bf5ec503cdeeba3e9512933e376aa4f7d14
+EBUILD cctbx-2010.03.29.2334.ebuild 5890 RMD160 99db8f23cc00d0cf47113279d79f1676e7e01556 SHA1 d66e36045129ca550dee4bbb291cd72c83c63ab1 SHA256 023a594a5e1b4b70cf053a11efc7420885a368025770eeabffb1e01702b36261
+MISC ChangeLog 847 RMD160 8c654f3e9dfaa325a4c04bcbb2f210fdec37c389 SHA1 dbe4acc16197ac6a6766be0d95007413f602f45a SHA256 fedfb24046e071c5d8ac032b577922c263e34293891f4ff5ceebc0ffb11ed0ae
MISC metadata.xml 767 RMD160 c2fc3bcc534e407e6066ee98beb6878d78a0f6e9 SHA1 a653677e160cf0726e1747b06b5d0cd95e51ac5f SHA256 ef36fc1a1d5d657ba67f88b303f08eef5a1a814d22a2091c07616dc16928e3fa
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2.0.14 (GNU/Linux)
+
+iEYEARECAAYFAkv3lAIACgkQgAnW8HDreRYKaACfcE43wGXyd4OlOEgPgjO0L/E8
+TdUAn2S+3Yzqkk90yOUGx7CywLigRVTb
+=Jpng
+-----END PGP SIGNATURE-----
diff --git a/sci-libs/cctbx/cctbx-2010.03.29.2334.ebuild b/sci-libs/cctbx/cctbx-2010.03.29.2334.ebuild
new file mode 100644
index 000000000000..e5aca3644451
--- /dev/null
+++ b/sci-libs/cctbx/cctbx-2010.03.29.2334.ebuild
@@ -0,0 +1,202 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/cctbx/cctbx-2010.03.29.2334.ebuild,v 1.1 2010/05/22 08:21:17 jlec Exp $
+
+EAPI="3"
+PYTHON_DEPEND="2"
+
+inherit eutils python 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 ~x86"
+IUSE="+minimal openmp threads"
+
+RDEPEND="
+ >dev-libs/boost-1.39
+ sci-libs/fftw
+ !minimal? (
+ sci-chemistry/cns
+ sci-chemistry/shelx )"
+DEPEND="${RDEPEND}
+ >=dev-util/scons-1.2"
+
+S="${WORKDIR}"
+MY_S="${WORKDIR}"/cctbx_sources
+MY_B="${WORKDIR}"/cctbx_build
+
+pkg_setup() {
+ if use openmp &&
+ [[ $(tc-getCC)$ == *gcc* ]] &&
+ ( [[ $(gcc-major-version)$(gcc-minor-version) -lt 42 ]] ||
+ ! built_with_use sys-devel/gcc openmp )
+ then
+ ewarn "You are using gcc and OpenMP is only available with gcc >= 4.2 "
+ ewarn "If you want to build ${PN} with OpenMP, abort now,"
+ ewarn "and switch CC to an OpenMP capable compiler"
+ fi
+ python_set_active_version 2
+}
+
+src_prepare() {
+ local opts
+ local optsld
+
+ rm -rf "${MY_S}/scons"
+
+ mkdir -p "${MY_S}"/scons/src/ "${MY_S}/boost"
+
+ ln -sf "${EPREFIX}"/usr/$(get_libdir)/scons-* "${MY_S}"/scons/src/engine || die
+
+ # Get CXXFLAGS in format suitable for substitition into SConscript
+ for i in ${CXXFLAGS}; do
+ opts="${opts} \"${i}\","
+ done
+
+ # Strip off the last comma
+ opts=${opts%,}
+
+ # Fix CXXFLAGS
+ sed -i \
+ -e "s:\"-O3\", \"-ffast-math\":${opts}:g" \
+ ${MY_S}/libtbx/SConscript
+
+ # Get LDFLAGS in format suitable for substitition into SConscript
+ for i in ${LDFLAGS}; do
+ optsld="${optsld} \"${i}\","
+ done
+
+ optsld=${optsld%,}
+
+ # Fix LDFLAGS which should be as-needed ready
+ sed -i \
+ -e "s:\"-shared\":\"-shared\", ${optsld}:g" \
+ ${MY_S}/libtbx/SConscript
+}
+
+src_configure() {
+ local compiler
+ local myconf
+
+ myconf="${MY_S}/libtbx/configure.py"
+
+ # Get compiler in the right way
+ compiler=$(expr match "$(tc-getCC)" '.*\([a-z]cc\)')
+ myconf="${myconf} --compiler=${compiler}"
+
+ # Precompiling python scripts. It is done in upstreams install script.
+ # Perhaps use python_mod_compile, but as this script works we should stick to it.
+ $(PYTHON -a) "${MY_S}/libtbx/command_line/py_compile_all.py"
+
+ # Additional USE flag usage
+ check_use openmp
+ myconf="${myconf} --enable-openmp-if-possible=${USE_openmp}"
+
+ use threads && USEthreads="--enable-boost-threads" && \
+ ewarn "If using boost threads openmp support is disabled"
+
+ myconf="${myconf} ${USE_threads} --scan-boost"
+
+ mkdir "${MY_B}" && myconf="${myconf} --current_working_directory=${MY_B}"
+ cd "${MY_B}"
+
+ myconf="${myconf} --build=release fftw3tbx rstbx smtbx mmtbx clipper fable"
+ einfo "configuring with ${python} ${myconf}"
+
+ $(PYTHON -a) ${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(){
+ # This is what Bill Scott does in the fink package. Do we need this as well?
+# -e "s:prepend:append:g" \
+
+ 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"
+
+ ebegin "removing unnessary files"
+ rm -r "${S}"/cctbx_sources/{boost,scons} || die "failed to remove uneeded scons"
+ find "${S}" -type f -name "*conftest*" -delete || die "failed to remove uneeded *.o"
+ find "${S}" -type f -name "*.o" -delete || die "failed to remove uneeded *.o"
+ find "${S}" -type f -name "*.c" -delete || die "failed to remove uneeded *.c"
+ find "${S}" -type f -name "*.f" -delete || die "failed to remove uneeded *.c"
+ find "${S}" -type f -name "*.cpp" -delete || die "failed to remove uneeded *.cpp"
+ find "${S}" -type f -name "*.pyc" -delete || die "failed to remove uneeded *.pyc"
+ find "${S}" -type d -empty -delete || die
+ eend
+
+ insinto /usr/$(get_libdir)/${PN}
+ doins -r cctbx_sources cctbx_build || die
+
+# fperms cannot handle wildcards
+ chmod 775 "${D}"/usr/$(get_libdir)/${PN}/cctbx_build/*sh && \
+ chmod 775 "${D}"/usr/$(get_libdir)/${PN}/cctbx_build/lib/* && \
+ chmod 775 "${D}"/usr/$(get_libdir)/${PN}/cctbx_build/scitbx/array_family/* && \
+ chmod 775 "${D}"/usr/$(get_libdir)/${PN}/cctbx_build/scitbx/serialization/* && \
+ chmod 775 "${D}"/usr/$(get_libdir)/${PN}/cctbx_build/scitbx/error/* && \
+ chmod 775 "${D}"/usr/$(get_libdir)/${PN}/cctbx_build/scitbx/fftpack/timing/* && \
+ chmod 775 "${D}"/usr/$(get_libdir)/${PN}/cctbx_build/scitbx/lbfgs/* && \
+ chmod 775 "${D}"/usr/$(get_libdir)/${PN}/cctbx_build/chiltbx/handle_test && \
+ chmod 775 "${D}"/usr/$(get_libdir)/${PN}/cctbx_build/bin/* || \
+ die
+
+ insinto /etc/profile.d/
+ newins "${MY_B}"/setpaths.sh 30cctbx.sh || die
+ newins "${MY_B}"/setpaths.csh 30cctbx.csh || die
+
+ cat >> "${T}"/30cctbx <<- EOF
+ LDPATH="${EPREFIX}/usr/$(get_libdir)/${PN}/cctbx_build/lib"
+ EOF
+
+ doenvd "${T}"/30cctbx || die
+}
+
+pkg_postinst () {
+ python_need_rebuild
+ python_mod_optimize /usr/$(get_libdir)/${PN}/cctbx_sources
+}
+
+pkg_postrm () {
+ python_mod_cleanup /usr/$(get_libdir)/${PN}/cctbx_sources
+}
+
+check_use() {
+ for var in $@; do
+ if use ${var}; then
+ printf -v "USE_$var" True
+ else
+ printf -v "USE_$var" False
+ fi
+ shift
+ done
+}