Skip to content

Commit

Permalink
Patching the Thrift header.
Browse files Browse the repository at this point in the history
  • Loading branch information
mgregson committed Apr 3, 2012
1 parent ed1bf6a commit 8d02709
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 5 deletions.
3 changes: 2 additions & 1 deletion dev-libs/thrift/Manifest
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
AUX have-config-h.patch 348 RMD160 e30dc4902893e6e2b6cd2f0e9e7f03ce22418fc7 SHA1 9347457be3f0d585657d1673e2c2abed22975d28 SHA256 4cfb84f611a6e613da91fb180ceb74e63e79c76c6c62b5a6c996db76ec09baa3
DIST thrift-0.5.0.tar.gz 1822087 RMD160 a89dca0263ccdc6cc08faa7ba1409099922fb6e5 SHA1 f6bef78306fd7b407646d3a03ce4cd3bd05424a0 SHA256 9ba5655a1b995db5f9c61c05ff8e3a8d2cafb254ad9d5b2f153ac8a8406f7b2a
DIST thrift-0.7.0.tar.gz 2248326 RMD160 d9db8ff077347134101cd017e086511c4317b052 SHA1 b8f6877bc75878984355da4efe171ad99ff05b6a SHA256 ca830156f6f1f94e77823eb5db6ff8f532ed5ccb9e913df83d0c3d6c4ddb9009
DIST thrift-0.8.0.tar.gz 2336261 RMD160 bb0e1d2b6d30b70590752a7f9318e14de285c505 SHA1 1d652d7078d9cc70e2a45d3119b13e86ebd446da SHA256 5e280097d88400f5e2db75595a04e1981538e48869cd6915bb9c4831605f0793
EBUILD thrift-0.5.0.ebuild 1485 RMD160 14298b9014704e2ee276ced7581803767c22235c SHA1 cfba2831b8a0d597fbf972b18ef04f705b48983a SHA256 103e770833ec8734673298ae83f5f9e8db20846eaf4ad89bd7a99d1488915ad7
EBUILD thrift-0.7.0.ebuild 2456 RMD160 4fd27192b0a8012fb755a47262d7d05860b1008c SHA1 9762989c29c1b7b6cad809e67ca69b3d48cc1867 SHA256 45e8d80bbc522cdc7d3914307eaaebd8cee818886a3590391ff0e26e6ec62267
EBUILD thrift-0.8.0.ebuild 2564 RMD160 52d317be16694745562b0c1f42909dac35b97082 SHA1 903066cb6d03623b05c4a40f8c16b5aadf297d03 SHA256 6a7fc80aefc7a4fe1bfe3428f0f305c2d50ca20566875cfbf63c4317d633f5d6
EBUILD thrift-0.8.0.ebuild 2484 RMD160 9525fccc627100eb4fcf660ee09882069a3e629f SHA1 696a96ac293b771401ffdfa618d37e83e3b5ea30 SHA256 5efdaa029dea9c796bb366ce519d361f3aa9cb4643b94580054cdb7589249c8a
EBUILD thrift-9999.ebuild 2319 RMD160 cf386d3305351867112bec338a09f7628a30519b SHA1 f2c7e269dbb6aef17fc3b5f4daca515ce02e70a9 SHA256 f87c029c17fc75d0b51b7cc57a69127a203519679fab1e3fbe86099670f45989
14 changes: 14 additions & 0 deletions dev-libs/thrift/files/have-config-h.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
--- a/lib/cpp/src/Thrift.h 2011-11-26 14:00:42.000000000 -0500
+++ b/lib/cpp/src/Thrift.h 2012-04-02 23:14:11.000000000 -0400
@@ -31,10 +31,8 @@
#include <assert.h>

#include <sys/types.h>
-#ifdef HAVE_NETINET_IN_H
+#ifndef HAVE_CONFIG_H
#include <netinet/in.h>
-#endif
-#ifdef HAVE_INTTYPES_H
#include <inttypes.h>
#endif
#include <string>
13 changes: 9 additions & 4 deletions dev-libs/thrift/thrift-0.8.0.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -36,22 +36,29 @@ KEYWORDS="~amd64 ~x86"
SLOT="0"
SRC_URI="http://apache.raffsoftware.com/${PN}/${PV}/${P}.tar.gz"

src_unpack()
{
unpack "${A}"
cd "${S}"
epatch "${FILESDIR}"/have-config-h.patch
}

src_prepare()
{
append-flags "-DHAVE_NETINET_IN_H -DHAVE_INTTYPES_H"
sh bootstrap.sh
if use fb303
then
einfo "Bootstrapping for fb303..."
cd contrib/fb303;
sh bootstrap.sh CFLAGS="$CFLAGS -DHAVE_NETINET_IN_H -DHAVE_INTTYPES_H"
sh bootstrap.sh
cd -;
fi
}

src_configure()
{
chmod +x configure
append-flags "-DHAVE_NETINET_IN_H -DHAVE_INTTYPES_H"
econf \
$(use_enable c gen-c_glib) \
$(use_with c c_glib) \
Expand All @@ -78,7 +85,6 @@ src_configure()
then
einfo "Running configure for fb303..."
cd contrib/fb303;
append-flags "-DHAVE_NETINET_IN_H -DHAVE_INTTYPES_H"
econf --with-thriftpath=${D}/usr
cd -;
fi
Expand All @@ -96,7 +102,6 @@ src_install()
then
einfo "Running make for fb303..."
cd contrib/fb303;
append-flags "-DHAVE_NETINET_IN_H -DHAVE_INTTYPES_H"
emake || die
cd -;
einfo "Running 'make install' for fb303..."
Expand Down

0 comments on commit 8d02709

Please sign in to comment.