Permalink
Browse files

dev-libs/thrift-0.9.9999: Thrift pulls its own libtool version

WARNING: Thrift very often breaks due to a "libtool version mismatch".

This page states that libtool 1.5.24 is required:
http://thrift.apache.org/docs/install/ (2012-09-29)

Unfortunately, that particular version does not work. The error
message says, no matter what your libtool version is:
"You should recreate aclocal.m4 with macros from libtool 2.4"
If you installed 2.4, things will still break with that error
message.

I will not try out every possible libtool version. When you find
one that is working (modify the head of this ebuild), then please
drop me a line.
  • Loading branch information...
1 parent a3bed6f commit 7831744640d106cdc5ce202a6d037198c1d2a87a @wmark committed Sep 29, 2012
Showing with 32 additions and 9 deletions.
  1. +2 −1 dev-libs/thrift/Manifest
  2. +30 −8 dev-libs/thrift/thrift-0.9.9999.ebuild
View
@@ -1,3 +1,4 @@
+DIST libtool-2.4.tar.xz 852248 SHA256 afcce660d3dc54c63a0a5ba3cf05272239dc3c54bbeba20f6bad250f9dc007ae SHA512 6b706656cbe8a18d9b377b913d7430984abe4bcff1db1bfba3e32e7eff38eca433cd95a507f8aafd96daf28e6426eed14c98fcdb79bae63d56c93503d107b4df WHIRLPOOL 1330996e0a30dcb187eedc88a4548fab11f0585e4a30774572e65b9fde02502fc0c032c3c342ccb0bcf2fd4b895f1ea2c17c81c1f5f4c2f7b5a1b8dfe6a52ef8
DIST thrift-0.8.0.tar.gz 2336261 SHA256 5e280097d88400f5e2db75595a04e1981538e48869cd6915bb9c4831605f0793 SHA512 86cec05b6889bf05ba1d510c0a8ce793c0c4331d377b619c2f140e3a87f8e660b16836dbf0811d8b2fabf71a59d55488008a1e301aeb425cb3097fcc20f4c471 WHIRLPOOL 0019e39c29d910b860374960942a49580449056e61a2316ca006773051574923c9d1decf6f722f3c9eabdbb67cd864576e5a4b7b751b85255b22fd2b876a62c1
EBUILD thrift-0.8.0.ebuild 1675 SHA256 20e584fdcbe5d5a943ee962efe14c2ec8c0af729f872650034c4e4f7fd7e5bfc SHA512 92f7e7717f23a76421eb34d96a0f1c2e22c953faba12a4b28cc8e1de896e864ecc52308bc3e2da53d02ae9bdf978006e053d7c98b6f80c874a4860c1042df9b7 WHIRLPOOL eabca30bfec0bd03e1a3b007c7838ecf83342cf3e16bcf6a21a032e677f19d83cd6df761b5d974bca4c58a70b7bc55ddc3eba11300ec3184fa112098b46e25a8
-EBUILD thrift-0.9.9999.ebuild 1883 SHA256 e0e8891fed154afedff77a1adfb6114651e1264b53a1ab74078e764621d0f9b4 SHA512 b480d891ef87abb098edacb1ec93cf1f564416c6838862be0b7dc55350ce9e6fe672f713999af4265b44b67970cfd55092d6873a6c638c2780399c2b20cfdc66 WHIRLPOOL e0041fc200d042a4c38f549402dfa4f28fe847191c7d35a4e66672227635ba297ca32d37e54412ee83f37ea01e21a0a62334f3bdd02908a018adf89f173f4e9c
+EBUILD thrift-0.9.9999.ebuild 2786 SHA256 f6b1adde9d41d16a1f2f734a72821f0e8d09b552667c59165c8b0734e02566a9 SHA512 723fbaa34d6363ef86e064dade1e078dd28aa77c3c8922e34e82d7be672681b23d7f9229466c1bdde48cfb59614b582f3cb0fad5ea14a6ebc4f105714d644a72 WHIRLPOOL 5d913ed625e25d387d520794d28f97aba8c9a1158e2548f10e060093aa3d04c9a09e800ebe45b1348be6cfead38b363af0705158ec790676a96bc7b2d417fca0
@@ -5,13 +5,16 @@
EAPI="3"
inherit autotools eutils subversion flag-o-matic autotools
+LIBTOOL_PV="2.4"
+
DESCRIPTION="Data serialization and communication toolwork"
HOMEPAGE="http://thrift.apache.org/about/"
ESVN_REPO_URI="http://svn.apache.org/repos/asf/thrift/trunk/"
+SRC_URI="mirror://gnu/libtool/libtool-${LIBTOOL_PV}.tar.xz"
LICENSE="Apache-2.0"
SLOT="0"
-KEYWORDS="~amd64 ~arm ~x86"
+KEYWORDS=""
IUSE="+pic cpp c_glib csharp java erlang python perl php php_extension ruby haskell go"
RDEPEND=">=dev-libs/boost-1.40.0
@@ -49,15 +52,34 @@ RDEPEND=">=dev-libs/boost-1.40.0
DEPEND="${RDEPEND}
>=sys-devel/gcc-4.2.0
c_glib? ( dev-libs/glib )
- =sys-devel/libtool-1.5.24*
"
S="${WORKDIR}/${P/_beta[0-9]/}"
+S_LIBTOOL="${WORKDIR}/libtool-${LIBTOOL_PV}"
+LIBTOOL_D="${WORKDIR}/local/usr"
+
+src_unpack() {
+ subversion_src_unpack
+ unpack ${A}
+}
src_prepare() {
- sh bootstrap.sh || die "bootstrap failed"
- eautoreconf
- elibtoolize
+ # this is for the specific libtool version which thrift relies on
+ cd "$S_LIBTOOL"
+ econf --disable-static --prefix="$LIBTOOL_D"
+ emake
+ emake DESTDIR="$LIBTOOL_D" install
+ LIBTOOL_REAL_D=$(dirname $(find "$LIBTOOL_D" -name 'libtoolize' | head -n 1))
+ mv "${LIBTOOL_REAL_D}"/../include "${LIBTOOL_REAL_D}"/../lib* "${LIBTOOL_REAL_D}" "${LIBTOOL_D}/"
+ mv "${LIBTOOL_D}"/usr/* "${LIBTOOL_D}"/
+ rm -r "${LIBTOOL_D}"/usr "${LIBTOOL_D}"/tmp
+ sed -i -e "s:/usr/share:${LIBTOOL_D}/share:g" "${LIBTOOL_D}"/bin/libtoolize
+
+ # now comes thrift
+ cd "$S"
+ PATH="${LIBTOOL_D}/bin:${PATH}" sh bootstrap.sh || die "bootstrap failed"
+# PATH="${LIBTOOL_D}/bin:${PATH}" eautoreconf
+ PATH="${LIBTOOL_D}/bin:${PATH}" elibtoolize
}
src_configure() {
@@ -70,17 +92,17 @@ src_configure() {
# or byzantine runtime behaviour.
filter-flags -fwhole-program -fwhopr
- econf \
+ PATH="${LIBTOOL_D}/bin:${PATH}" econf \
--enable-libtool-lock \
${myconf}
}
src_compile() {
if use cpp; then
# -jx fails for x > 1 with use cpp
- emake -j1 || die "emake install failed"
+ PATH="${LIBTOOL_D}/bin:${PATH}" emake -j1 || die "emake install failed"
else
- emake || die "emake install failed"
+ PATH="${LIBTOOL_D}/bin:${PATH}" emake || die "emake install failed"
fi
}

1 comment on commit 7831744

@vitalyrepin
Contributor

Seems to be right! Thanks!

Please sign in to comment.