diff options
author | Matthew Schultz (mschultz) <mattsch@gmail.com> | 2012-03-12 18:36:06 +0000 |
---|---|---|
committer | Matthew Schultz (mschultz) <mattsch@gmail.com> | 2012-03-12 18:36:06 +0000 |
commit | 71475f262614832914d43a5fa5f39a688de284f9 (patch) | |
tree | 0e1f1177f827bb7e8cacacb7fe57436c28253263 /dev-libs | |
parent | www-apps/davical: Added a php dependency on calendar and curl uses (diff) | |
download | sunrise-71475f262614832914d43a5fa5f39a688de284f9.tar.gz sunrise-71475f262614832914d43a5fa5f39a688de284f9.tar.bz2 sunrise-71475f262614832914d43a5fa5f39a688de284f9.zip |
dev-libs/librets: Upgraded to EAPI 4 and fixed ruby extension compilation failure if multiple versions of boost were installed.
svn path=/sunrise/; revision=12794
Diffstat (limited to 'dev-libs')
-rw-r--r-- | dev-libs/librets/ChangeLog | 9 | ||||
-rw-r--r-- | dev-libs/librets/Manifest | 5 | ||||
-rw-r--r-- | dev-libs/librets/files/extconf.rb.patch | 16 | ||||
-rw-r--r-- | dev-libs/librets/librets-1.5.2-r4.ebuild (renamed from dev-libs/librets/librets-1.5.2-r3.ebuild) | 71 |
4 files changed, 70 insertions, 31 deletions
diff --git a/dev-libs/librets/ChangeLog b/dev-libs/librets/ChangeLog index f9ff59acb..91b731738 100644 --- a/dev-libs/librets/ChangeLog +++ b/dev-libs/librets/ChangeLog @@ -1,7 +1,14 @@ # ChangeLog for dev-libs/librets -# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 +# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 # $Header: $ +*librets-1.5.2-r4 (12 Mar 2012) + + 12 Mar 2012; Matthew Schultz (mschultz) <mattsch@gmail.com> + -librets-1.5.2-r3.ebuild, +librets-1.5.2-r4.ebuild, +files/extconf.rb.patch: + Upgraded to EAPI 4 and fixed ruby extension compilation failure if multiple + versions of boost were installed. + 21 Dec 2011; Thomas Sachau (Tommy[D]) <tommy@gentoo.org> librets-1.5.2-r3.ebuild: remove php:5.2 target, masked for removal and unsupported diff --git a/dev-libs/librets/Manifest b/dev-libs/librets/Manifest index e84ca4ca9..3dbb4654a 100644 --- a/dev-libs/librets/Manifest +++ b/dev-libs/librets/Manifest @@ -1,10 +1,11 @@ AUX dotnet.patch 3455 RMD160 1aa58621db217a576427c13dc6b18d31bb330b71 SHA1 727980aec242d70f9c8caf8309d11dd41be9de53 SHA256 8ead4f481df2ef5f0b0dbe7b235bf2d09dfef2de8090611122a9606062028f9e +AUX extconf.rb.patch 773 RMD160 ff2cf3ceb431f7bdbf7ae48bc6695b796f953a20 SHA1 8ee0f585c4e4524c2531002c5656798ab2197c74 SHA256 f21d12ddd90316592fa8fb0d7575bb619051727aac1025df5c9c243064f80e29 AUX java.mk.patch 783 RMD160 1ba38cbea393c1646f1517665c515402a3834135 SHA1 049e24d2240fe8b3c22325f4e476afa4f901b063 SHA256 9709b787b2c55c9c390a22677fbe15d821beb588e6ccedb48e1277fff47345de AUX librets.snk 596 RMD160 437c0db04bccb0da482d0e6c9dc38f21757ce17b SHA1 aec4dcf1e29aa0f8519e710f19a5bac308566bfd SHA256 6bf3c8c92df3bda29091d32608e402132516553b1591c9665f234305ed4f6d6f AUX perl.mk.patch 1088 RMD160 7054d8bb712814434e3978c69c36ff267c102a5a SHA1 660fa197034f316aa7523a17c2a0ea065876e975 SHA256 200c4fa5f034478b406892fbac17156655be49164f46dcaba094e13745993198 AUX python.mk.patch 501 RMD160 611578ad08ee095d4364e538e6b69e4f5727d401 SHA1 803f4678b974d87008e772115d09034fb31bb8fe SHA256 8ba69a842499dcfeaaba25ac8fb9f4723d7243293b7fba7734510bca47eb89cb AUX swig.m4.patch 462 RMD160 d0e5b1f14b78d514a7bcee9e052e433645a02162 SHA1 6003ea54742da9aff9b9a320643819ad34f1cf7b SHA256 aa217a9442f967196027ef589e114eeca2d5583506b69eeae72dd9107f8594d1 DIST librets-1.5.2.tar.gz 1157546 RMD160 154a4fff9bbf994b739a1d30b3bb5eed9ecdd5d3 SHA1 cc856a41bc8120865937d199c918542bf3d82a95 SHA256 5d9c32eefd1a20b90c58ef117010768d8161c56ee0138efa4dd8b1ab82a433ce -EBUILD librets-1.5.2-r3.ebuild 8004 RMD160 4468079b607021cfbf24db47208c6113ddb73170 SHA1 52eb6d2429ad9b33e8c8e54d5d3ce883cb853365 SHA256 43fa6223cd67196a4ab7faeac197d81476fc228d4cbc67189b5417e37caebbb2 -MISC ChangeLog 2240 RMD160 4be97e7efe69891d0e0c991d47708c1a1bf4b9a8 SHA1 5f93a77033c292411cf539cfb8c11a9a5b7a43ec SHA256 a60389793828fd2d9ed6520adbd08b17c5dd8f089320ac8a33a8d1e55f4633a1 +EBUILD librets-1.5.2-r4.ebuild 8524 RMD160 7545678d9108ba47e99a1a47b01751e67e080d07 SHA1 12e105d4a707a733022cda6bcb9072a663012b76 SHA256 8e2f2734de65326c47b0441f630d38e51df3d7efb7749c602061e649e36386f5 +MISC ChangeLog 2529 RMD160 226646e07f0337a4afb855022dc30b06c433066b SHA1 517a66626b2c398b566daa6fa5b05236203fe797 SHA256 b3a36c845e1366b7e1703a5e6405fcec712ed838a584a0b330f67c73e4124071 MISC metadata.xml 830 RMD160 50a58e8cd7c132469fd2b693be4eb9bda93136f1 SHA1 83ab36379a556b91023d0a2b5f15fb2109f4eb3c SHA256 05f6e383376e2d49d18dfd40738f55ba069dee9f697829619ba9a3d0e6693748 diff --git a/dev-libs/librets/files/extconf.rb.patch b/dev-libs/librets/files/extconf.rb.patch new file mode 100644 index 000000000..42c7acee1 --- /dev/null +++ b/dev-libs/librets/files/extconf.rb.patch @@ -0,0 +1,16 @@ +Index: project/swig/ruby/extconf.rb +=================================================================== +--- project/swig/ruby/extconf.rb (revision 1547) ++++ project/swig/ruby/extconf.rb (revision 1549) +@@ -60,6 +60,11 @@ + create_makefile('librets_native') + + orig_makefile = IO::read("Makefile") ++if RUBY_PLATFORM =~ /linux/ ++ # Make sure the proper version boost libraries are detected first by changing ruby's create_makefile library declaration order ++ orig_makefile.gsub!(/LIBS = \$\(LIBRUBYARG_SHARED\)(.+)/, "LIBS = \\1 \$\(LIBRUBYARG_SHARED\)"); ++ orig_makefile.gsub!(/(-o \$@ \$\(OBJS\))( \$\(LIBPATH\) \$\(DLDFLAGS\) \$\(LOCAL_LIBS\))( \$\(LIBS\))/, "\\1\\3\\2") ++end + File.open("Makefile", "w") do |mfile| + mfile << makefile_prefix + mfile << orig_makefile diff --git a/dev-libs/librets/librets-1.5.2-r3.ebuild b/dev-libs/librets/librets-1.5.2-r4.ebuild index c8558767c..ed87327b5 100644 --- a/dev-libs/librets/librets-1.5.2-r3.ebuild +++ b/dev-libs/librets/librets-1.5.2-r4.ebuild @@ -1,12 +1,13 @@ -# Copyright 1999-2011 Gentoo Foundation +# Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ -EAPI="3" +EAPI="4" PHP_EXT_OPTIONAL_USE="php" PHP_EXT_NAME="librets" PHP_EXT_SKIP_PHPIZE="yes" +# Will add php5-4 support as soon as someone fixes gentoo bug 404453 USE_PHP="php5-3" PYTHON_DEPEND="python? 2" @@ -25,6 +26,11 @@ LICENSE="BSD-NAR" SLOT="0" KEYWORDS="~amd64 ~x86" IUSE="debug doc java mono perl php python ruby sql-compiler threads" +# Enabling threads for perl, php, python or ruby causes segmentation faults. +REQUIRED_USE="perl? ( !threads ) + php? ( !threads ) + python? ( !threads ) + ruby? ( !threads )" for i in java perl php python ruby; do SWIG_DEPEND+=" ${i}? ( dev-lang/swig )" @@ -50,11 +56,26 @@ RDEPEND=" ${SWIG_RDEPEND}" DEPEND="${RDEPEND} ${SWIG_DEPEND}" +# Reset to the default $S since ruby-ng overrides it +S="${WORKDIR}/${P}" unset SWIG_DEPEND unset SWIG_RDEPEND unset i +# Since php-ext-source-r2_src_install tries to install non-existant headers +# and a bad emake fails on EAPI 4, a copied subset must be used instead (bug 404307). +_php-ext-source-r2_src_install() { + local slot + for slot in $(php_get_slots); do + php_init_slot_env ${slot} + # Let's put the default module away + insinto "${EXT_DIR}" + newins "modules/${PHP_EXT_NAME}.so" "${PHP_EXT_NAME}.so" || die "Unable to install extension" + done + php-ext-source-r2_createinifiles +} + _php-move_swig_build_to_modules_dir() { mkdir "${1}"/modules || die "Could not create directory for php slot" mv build/swig/php5/* "${1}"/modules || die "Could not move php slot build" @@ -98,13 +119,15 @@ src_prepare() { epatch "${FILESDIR}"/swig.m4.patch # Patch to allow dotnet binding to build and set snk key file epatch "${FILESDIR}"/dotnet.patch + # Patch to allow the ruby extension to compile when multiple versions of boost are installed + epatch "${FILESDIR}"/extconf.rb.patch local myboostpackage=$(best_version "<dev-libs/boost-1.46") local myboostpackagever=${myboostpackage/*boost-/} local myboostver=$(get_version_component_range 1-2 ${myboostpackagever}) local myboostslot=$(replace_version_separator 1 _ ${myboostver}) - sed -i -e "s|boost_include_dir=\"include\"|boost_include_dir=\"include/boost-${myboostslot}\"|g" project/build/ac-macros/boost.m4 - sed -i -e "s|/lib/libboost|/lib/boost-${myboostslot}/liboost|g" project/build/ac-macros/boost.m4 - sed -i -e "s|-L\${BOOST_PREFIX}/lib|-L\${BOOST_PREFIX}/lib/boost-${myboostslot}|g" project/build/ac-macros/boost.m4 + sed -i -e "s|boost_include_dir=\"include\"|boost_include_dir=\"include/boost-${myboostslot}\"|g" project/build/ac-macros/boost.m4 || die + sed -i -e "s|/lib/libboost|/lib/boost-${myboostslot}/libboost|g" project/build/ac-macros/boost.m4 || die + sed -i -e "s|-L\${BOOST_PREFIX}/lib|-L\${BOOST_PREFIX}/lib/boost-${myboostslot}|g" project/build/ac-macros/boost.m4 || die einfo "Using boost version ${myboostver}" eautoreconf use php && php-ext-source-r2_src_prepare @@ -129,15 +152,7 @@ src_configure() { myconf="${myconf} --enable-maintainer-documentation" fi - if use threads; then - if use perl || use php || use python || use ruby; then - ewarn "Enabling threads for perl, php, python or ruby causes segmentation faults." - ewarn "Disabling threads" - myconf="${myconf} --disable-thread-safe" - else - myconf="${myconf} --enable-thread-safe" - fi - fi + use threads && myconf="${myconf} --enable-thread-safe" if use ruby; then MYRUBYIMPLS=($(ruby_get_use_implementations)) @@ -169,7 +184,7 @@ src_compile() { _php-replace_config_with_selected_config ${myphpfirstslot} ${myphpconfig} myphpconfig="${PHPCONFIG}" fi - emake || die "emake failed" + emake if use php; then # Move the current slotted build of php to another dir so other slots can be built _php-move_swig_build_to_modules_dir "${WORKDIR}/${myphpfirstslot}" @@ -178,7 +193,7 @@ src_compile() { _php-replace_config_with_selected_config ${slot} ${myphpconfig} myphpconfig="${PHPCONFIG}" # Build the current slot - emake build/swig/php5/${PN}.so || die "Unable to make php${slot} extension" + emake build/swig/php5/${PN}.so _php-move_swig_build_to_modules_dir ${PHP_EXT_S} done fi @@ -197,7 +212,7 @@ src_compile() { project/build/ruby.mk || die "sed ruby implementation change failed" MYRUBYIMPL="$(ruby_implementation_command ${impl})" # Build the current implementation - emake build/swig/ruby/${PN}_native.bundle || die "Unable to make ${impl} extension" + emake build/swig/ruby/${PN}_native.bundle _ruby-move_swig_build_to_impl_dir "${WORKDIR}/${impl}" done unset MYRUBYIMPLS @@ -206,36 +221,36 @@ src_compile() { each_ruby_install() { exeinto "$(ruby_rbconfig_value archdir)" - doexe "${S}"/librets_native.so || die - doruby "${S}"/librets.rb || die + doexe "${S}"/librets_native.so + doruby "${S}"/librets.rb } src_install() { - dolib.a build/${PN}/lib/${PN}.a || die + dolib.a build/${PN}/lib/${PN}.a insinto /usr/include - doins -r project/${PN}/include/${PN} || die + doins -r project/${PN}/include/${PN} - dobin "${PN}-config" || die + dobin "${PN}-config" if use php; then - php-ext-source-r2_src_install + _php-ext-source-r2_src_install insinto /usr/share/php - doins "${WORKDIR}"/php"${PHP_CURRENTSLOT}"/modules/${PN}.php || die + doins "${WORKDIR}"/php"${PHP_CURRENTSLOT}"/modules/${PN}.php fi if use perl; then # Install manually since the package install has sandbox violations insinto ${SITE_ARCH} insopts "-m755" - doins -r "${S}"/build/swig/perl/blib/arch/auto || die + doins -r "${S}"/build/swig/perl/blib/arch/auto insopts "-m644" - doins "${S}"/build/swig/perl/${PN}.pm || die + doins "${S}"/build/swig/perl/${PN}.pm fi if use java; then - java-pkg_dojar "${S}"/build/swig/java/${PN}.jar || die - LIBOPTIONS="-m755" java-pkg_doso "${S}"/build/swig/java/${PN}.so || die + java-pkg_dojar "${S}"/build/swig/java/${PN}.jar + LIBOPTIONS="-m755" java-pkg_doso "${S}"/build/swig/java/${PN}.so fi use ruby && ruby-ng_src_install |