From 1b35e331c4c8be8f5c5e4e2749362c8802d15d3a Mon Sep 17 00:00:00 2001 From: "Justin Lecher (jlec)" Date: Tue, 9 Jun 2009 23:50:19 +0200 Subject: cctbx should be linkable now --- sci-libs/cctbx/ChangeLog | 6 + sci-libs/cctbx/Manifest | 4 +- sci-libs/cctbx/cctbx-2009.02.15.2320-r1.ebuild | 195 ------------------------ sci-libs/cctbx/cctbx-2009.02.15.2320-r3.ebuild | 199 +++++++++++++++++++++++++ 4 files changed, 207 insertions(+), 197 deletions(-) delete mode 100644 sci-libs/cctbx/cctbx-2009.02.15.2320-r1.ebuild create mode 100644 sci-libs/cctbx/cctbx-2009.02.15.2320-r3.ebuild (limited to 'sci-libs') diff --git a/sci-libs/cctbx/ChangeLog b/sci-libs/cctbx/ChangeLog index 52dffdab3..47593324a 100644 --- a/sci-libs/cctbx/ChangeLog +++ b/sci-libs/cctbx/ChangeLog @@ -2,6 +2,12 @@ # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 # $Header: $ +*cctbx-2009.02.15.2320-r3 (09 Jun 2009) + + 09 Jun 2009; Justin Lecher (jlec) + -cctbx-2009.02.15.2320-r1.ebuild, +cctbx-2009.02.15.2320-r3.ebuild: + fixed bad bug which breaks the libs + 08 Jun 2009; Justin Lecher (jlec) cctbx-2009.02.15.2320-r1.ebuild: Hopefully fixed problem with installation diff --git a/sci-libs/cctbx/Manifest b/sci-libs/cctbx/Manifest index 825e45722..21e4c2bac 100644 --- a/sci-libs/cctbx/Manifest +++ b/sci-libs/cctbx/Manifest @@ -1,6 +1,6 @@ AUX 2009.02.15.2320-sandbox-violations-chmod.patch 467 RMD160 11a55d71c9a238cf8c40f1760344c27c65a53922 SHA1 03ce887b4ddaf72310986d97c8add9a7a73c6fb0 SHA256 1c79b9f3bb0215dca39def9b6ba0bdb678022b51345da1567d0f4952951bdcd1 DIST cctbx-2009.02.15.2320.tar.gz 12800622 RMD160 8d95db0054e8ba9378e46e9d5d2d7b333418eeb4 SHA1 1d3e5aad9d1c4fd6617295fc3346c079e7c758d9 SHA256 336946867246ed3cf7f697dc9bf0cc21443b7fb9600b24696b4d8d3cb5773200 -EBUILD cctbx-2009.02.15.2320-r1.ebuild 5467 RMD160 c7efd88e36165aa6e27584e198fa6710a28f6626 SHA1 74ddd0f842645f6fe6d314aae07d3980b9750591 SHA256 377ba72a4f9aeaf095173a2af2d249209c777550aea82d6d19542c860e88323f EBUILD cctbx-2009.02.15.2320-r2.ebuild 4639 RMD160 69285fb2b9ef6207a8338e0ed6b335432b23c825 SHA1 fd65e7d76f45a4152fbfaaf286e14ee315edfc83 SHA256 21db2dcc51a47440950b854aa54e5f7612128bb0446e69a1877330af003668b7 -MISC ChangeLog 1294 RMD160 654a7ecddbc1531f5e5c6f580ce1b8aa19002de8 SHA1 3731cebd730f7311bf63e8cacdcfde3a25f7a5e2 SHA256 3378786bd75d9b55bff5ed49b36e75788d8e7c1dfe19a2a1884f6a2cd7d6c895 +EBUILD cctbx-2009.02.15.2320-r3.ebuild 5677 RMD160 1fd505556d4c2b02ea33a4da0c2494134fcf9c88 SHA1 304f631bcdbb37baf19d1f5ce5210e1b7429d3b3 SHA256 1a932ef54671f97fc40f5affec24b6bc6331df6e68a911583523240d606dab07 +MISC ChangeLog 1501 RMD160 8b2435c8ce96ffb22ff65eb967c982e473879762 SHA1 1756eb00a128e815151fbfc676d2481a846b88eb SHA256 47d4a83db06e93fb9828686bba3046ded3128746058e6a7b92343ad5d23fbb13 MISC metadata.xml 438 RMD160 79ad38c94abc71ba32abccdcd670f2f6802c2df3 SHA1 1ebbff28f7e4d135b26b951b6111f6803f78413c SHA256 94d589a2836bffe732cdf993e9b38afc1cde4683a5e5669c44daf6b69595e8da diff --git a/sci-libs/cctbx/cctbx-2009.02.15.2320-r1.ebuild b/sci-libs/cctbx/cctbx-2009.02.15.2320-r1.ebuild deleted file mode 100644 index 0ec1e93ce..000000000 --- a/sci-libs/cctbx/cctbx-2009.02.15.2320-r1.ebuild +++ /dev/null @@ -1,195 +0,0 @@ -# Copyright 1999-2009 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -EAPI="2" - -inherit toolchain-funcs python eutils - -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="~x86 ~amd64" -IUSE="minimal openmp threads" - -RDEPEND="!minimal? ( ( sci-chemistry/cns ) - x86? ( 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 fftw with OpenMP, abort now," - ewarn "and switch CC to an OpenMP capable compiler" - fi -} - -src_prepare() { - # Wants to chmod /usr/bin/python - epatch "${FILESDIR}"/${PV}-sandbox-violations-chmod.patch - - rm -rf "${MY_S}/clipper" "${MY_S}/scons" # "${MY_S}/boost" - - mkdir -p "${MY_S}"/scons/src/ "${MY_S}/boost" - - ln -sf /usr/$(get_libdir)/scons-1.2.0 "${MY_S}"/scons/src/engine || die -# ln -sf /usr/include/boost "${MY_S}/boost/" -} - -src_compile() { - python_version - - local MYCONF - local MAKEOPTS_EXP - local OPTS - local OPTSLD - - MYCONF="${MY_S}/libtbx/configure.py" - - MAKEOPTS_EXP=${MAKEOPTS/j/j } - MAKEOPTS_EXP=${MAKEOPTS_EXP%-l[0-9]*} - - # 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 - - # Fix LDFLAGS which should be as-needed ready - sed -i \ - -e "s:\"-shared\":${OPTSLD} \"-shared\":g" \ - ${MY_S}/libtbx/SConscript - - # 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} "${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" - einfo "configuring with ${python} ${MYCONF}" - - ${python} ${MYCONF} \ - || die "configure failed" - - 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)/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 -exec \ - sed -e "s:${MY_S}:/usr/$(get_libdir)/cctbx/cctbx_sources:g" \ - -e "s:${MY_B}:/usr/$(get_libdir)/cctbx/cctbx_build:g" \ - -i '{}' \; || die "Fail to correct path" - - - ebegin "removing unnessary files" - rm -r "${S}"/cctbx_sources/scons || die "failed to remove uneeded scons" - find "${S}" -type f -name "*.o" -exec rm -f '{}' \; || die "failed to remove uneeded *.o" - find "${S}" -type f -name "*.c" -exec rm -f '{}' \; || die "failed to remove uneeded *.c" - find "${S}" -type f -name "*.cpp" -exec rm -f '{}' \; || die "failed to remove uneeded *.cpp" - find "${S}" -type f -name "*.pyc" -exec rm -f '{}' \; || die "failed to remove uneeded *.pyc" - 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/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 && \ - newins "${MY_B}"/setpaths.csh 30cctbx.csh || \ - die - - cat >> "${T}"/30cctbx <<- EOF - LDPATH="/usr/$(get_libdir)/${PN}/cctbx_build/lib" - EOF - - doenvd "${T}"/30cctbx || die -} - -pkg_postinst () { - 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 -} - diff --git a/sci-libs/cctbx/cctbx-2009.02.15.2320-r3.ebuild b/sci-libs/cctbx/cctbx-2009.02.15.2320-r3.ebuild new file mode 100644 index 000000000..2e040fe52 --- /dev/null +++ b/sci-libs/cctbx/cctbx-2009.02.15.2320-r3.ebuild @@ -0,0 +1,199 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI="2" + +inherit toolchain-funcs python eutils + +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="~x86 ~amd64" +IUSE="minimal openmp threads" + +RDEPEND="!minimal? ( ( sci-chemistry/cns ) + x86? ( 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 fftw with OpenMP, abort now," + ewarn "and switch CC to an OpenMP capable compiler" + fi +} + +src_prepare() { + # Wants to chmod /usr/bin/python + epatch "${FILESDIR}"/${PV}-sandbox-violations-chmod.patch + + rm -rf "${MY_S}/scons" # "${MY_S}/boost" + + mkdir -p "${MY_S}"/scons/src/ "${MY_S}/boost" + + ln -sf /usr/$(get_libdir)/scons-1.2.0 "${MY_S}"/scons/src/engine || die +# ln -sf /usr/include/boost "${MY_S}/boost/" +} + +src_compile() { + python_version + + local MYCONF + local MAKEOPTS_EXP + local OPTS + local OPTSLD + + MYCONF="${MY_S}/libtbx/configure.py" + + MAKEOPTS_EXP=${MAKEOPTS/j/j } + MAKEOPTS_EXP=${MAKEOPTS_EXP%-l[0-9]*} + + # 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 + + # 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} "${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" + einfo "configuring with ${python} ${MYCONF}" + + ${python} ${MYCONF} \ + || die "configure failed" + + 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)/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}:/usr/$(get_libdir)/cctbx/cctbx_sources:g" \ + -e "s:${MY_B}:/usr/$(get_libdir)/cctbx/cctbx_build:g" \ + -i '{}' \; || die "Fail to correct path" + + + ebegin "removing unnessary files" + rm -r "${S}"/cctbx_sources/scons || die "failed to remove uneeded scons" + find "${S}" -type f -name "*conftest*" -exec rm -f '{}' \; || die "failed to remove uneeded *.o" + find "${S}" -type f -name "*.o" -exec rm -f '{}' \; || die "failed to remove uneeded *.o" + find "${S}" -type f -name "*.c" -exec rm -f '{}' \; || die "failed to remove uneeded *.c" + find "${S}" -type f -name "*.cpp" -exec rm -f '{}' \; || die "failed to remove uneeded *.cpp" + find "${S}" -type f -name "*.pyc" -exec rm -f '{}' \; || die "failed to remove uneeded *.pyc" + 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 && \ + newins "${MY_B}"/setpaths.csh 30cctbx.csh || \ + die + + cat >> "${T}"/30cctbx <<- EOF + LDPATH="/usr/$(get_libdir)/${PN}/cctbx_build/lib" + EOF + + doenvd "${T}"/30cctbx || die +} + +pkg_postinst () { + 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 +} + -- cgit v1.2.3-65-gdbad