Updated patch to fix as-needed issue (bug #271509, thanks to Xarthisius). Added stati...
authorTiziano Müller <dev-zero@gentoo.org>
Sat, 12 Jun 2010 07:03:16 +0000 (07:03 +0000)
committerTiziano Müller <dev-zero@gentoo.org>
Sat, 12 Jun 2010 07:03:16 +0000 (07:03 +0000)
Package-Manager: portage-2.2_rc67/cvs/Linux x86_64

dev-libs/protobuf/ChangeLog
dev-libs/protobuf/Manifest
dev-libs/protobuf/files/protobuf-2.3.0-asneeded-2.patch [new file with mode: 0644]
dev-libs/protobuf/protobuf-2.3.0-r1.ebuild [new file with mode: 0644]

index a40bea14d1d091852efcd613cf173171e1de0825..94f710c5b707c3b96266bad39341fb70d7eee12e 100644 (file)
@@ -1,6 +1,13 @@
 # ChangeLog for dev-libs/protobuf
 # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/protobuf/ChangeLog,v 1.19 2010/05/15 12:15:57 ssuominen Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/protobuf/ChangeLog,v 1.20 2010/06/12 07:03:16 dev-zero Exp $
+
+*protobuf-2.3.0-r1 (12 Jun 2010)
+
+  12 Jun 2010; Tiziano Müller <dev-zero@gentoo.org>
+  +protobuf-2.3.0-r1.ebuild, +files/protobuf-2.3.0-asneeded-2.patch:
+  Updated patch to fix as-needed issue (bug #271509, thanks to Xarthisius).
+  Added static-libs USE flag.
 
   15 May 2010; Samuli Suominen <ssuominen@gentoo.org> protobuf-2.3.0.ebuild,
   +files/protobuf-2.3.0-asneeded.patch:
index cea3c04e5329de780013453cad63a6c4d06e08a9..74acb2880ac8a5f924e16af3168bdfd51a478b94 100644 (file)
@@ -1,6 +1,8 @@
 AUX 70protobuf-gentoo.el 170 RMD160 f6208c9a555325c1a6e1b26daee6fbc425cbfd98 SHA1 8f8f8ce9bdab9a8f9a11b16236be383488277cb3 SHA256 b6e5c2f11a63f9eb4a9382227ce8f41bfcf23213166d2fb212e21e237b2f264d
+AUX protobuf-2.3.0-asneeded-2.patch 705 RMD160 b52f82889f932e6a25a73f4a4d0c7e000e6bb2fe SHA1 5fc75e8ddb84204b2b2500eef42ecffb79b0e63e SHA256 558ea98a54e544919837f88d133b8887ad5101b4493a62737d3cea94ae58464c
 AUX protobuf-2.3.0-asneeded.patch 1224 RMD160 8a59e9cc17e8650e84a8b1d5fd7c90dfca50af00 SHA1 f9e05456ffe091aedb5d6336de3c7578793341d4 SHA256 97bc007faafac8472d898c875bb2eabe062239088ec614ebd0c3ba2915e15d53
 DIST protobuf-2.3.0.tar.bz2 1424966 RMD160 92b9c374ce3ccbb0b0d22d08e9f9d3a5a68d1ac8 SHA1 db0fbdc58be22a676335a37787178a4dfddf93c6 SHA256 760c7707c3fe9ce801916bbd3067d711a33aa550c01b32d1e1761119cf6280ac
+EBUILD protobuf-2.3.0-r1.ebuild 2865 RMD160 6a1612d8dbfec8cafe7d81a3381aea977362ddbc SHA1 933e89d5125ad302afd977ed9d133a3247fc2c4d SHA256 917b66183f7960454d7480a1adc24699a3c9be37eb668798569a1a05a887ac0e
 EBUILD protobuf-2.3.0.ebuild 2663 RMD160 82a85d6fcf19911d12a99c9b1e0d8e7ab1295a28 SHA1 a464e81bc815adc94c5b63cc1932eef9ab5f0de3 SHA256 961421046cd85db37c2d3dc64d19b3afb6e9a7723701be61162ba840097e8b30
-MISC ChangeLog 3425 RMD160 7c068a3ba4eb03987a5a8a7f117a69cb1b2d668b SHA1 4f0ffc29a0037f54cb3ce05b72395e63bf044c89 SHA256 c2fc8ca121991b6a87d392107222c93cd211655530fde4caa735950e3af5ab08
+MISC ChangeLog 3687 RMD160 fe3810980b88964634fddcf1a7d846e5a46e892a SHA1 b6177edcfb38604f370d1bfef97471ce222a8675 SHA256 4ad3284bdf5892a818b201b5f8cbf983ea8ce0b06d7258afa13883f101d61e05
 MISC metadata.xml 259 RMD160 854ca28d16ec40e1d7e59e2416c9633513d97454 SHA1 09b1f80597e496801e479f5b2642cd04aafadb74 SHA256 e4352d15b7bff1306476d49687525386bd7acca33010e3f06ed91b963e3d5893
diff --git a/dev-libs/protobuf/files/protobuf-2.3.0-asneeded-2.patch b/dev-libs/protobuf/files/protobuf-2.3.0-asneeded-2.patch
new file mode 100644 (file)
index 0000000..418622e
--- /dev/null
@@ -0,0 +1,28 @@
+Fixing as-needed issue
+
+http://bugs.gentoo.org/show_bug.cgi?id=271509
+
+--- m4/acx_pthread.m4
++++ m4/acx_pthread.m4
+@@ -278,7 +278,8 @@
+          fi
+       fi
+       
+-      if test x"$done" = xno; then
++      if test x"$done" = xyes; then
++         done="no"
+          AC_MSG_CHECKING([whether -pthread is sufficient with -shared])
+          AC_TRY_LINK([#include <pthread.h>],
+             [pthread_t th; pthread_join(th, 0);
+--- gtest/m4/acx_pthread.m4
++++ gtest/m4/acx_pthread.m4
+@@ -278,7 +278,8 @@
+          fi
+       fi
+       
+-      if test x"$done" = xno; then
++      if test x"$done" = xyes; then
++         done="no"
+          AC_MSG_CHECKING([whether -pthread is sufficient with -shared])
+          AC_TRY_LINK([#include <pthread.h>],
+             [pthread_t th; pthread_join(th, 0);
diff --git a/dev-libs/protobuf/protobuf-2.3.0-r1.ebuild b/dev-libs/protobuf/protobuf-2.3.0-r1.ebuild
new file mode 100644 (file)
index 0000000..9531172
--- /dev/null
@@ -0,0 +1,125 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/protobuf/protobuf-2.3.0-r1.ebuild,v 1.1 2010/06/12 07:03:16 dev-zero Exp $
+
+EAPI="2"
+
+JAVA_PKG_IUSE="source"
+PYTHON_DEPEND="python? 2"
+
+inherit autotools eutils distutils python java-pkg-opt-2 elisp-common
+
+DESCRIPTION="Google's Protocol Buffers -- an efficient method of encoding structured data"
+HOMEPAGE="http://code.google.com/p/protobuf/"
+SRC_URI="http://protobuf.googlecode.com/files/${P}.tar.bz2"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~x64-macos"
+IUSE="emacs examples java python static-libs vim-syntax"
+
+DEPEND="${DEPEND} java? ( >=virtual/jdk-1.5 )
+       python? ( dev-python/setuptools )
+       emacs? ( virtual/emacs )"
+RDEPEND="${RDEPEND} java? ( >=virtual/jre-1.5 )
+       emacs? ( virtual/emacs )"
+
+PYTHON_MODNAME="google/protobuf"
+DISTUTILS_SRC_TEST="setup.py"
+
+src_prepare() {
+       epatch "${FILESDIR}"/${P}-asneeded-2.patch
+       eautoreconf
+
+       use python && {
+               python_convert_shebangs -r 2 .
+               distutils_src_prepare
+       }
+}
+
+src_configure() {
+       econf \
+               $(use_enable static-libs static)
+}
+
+src_compile() {
+       emake || die "emake failed"
+
+       if use python; then
+               einfo "Compiling Python library ..."
+               pushd python
+               distutils_src_compile
+               popd
+       fi
+
+       if use java; then
+               einfo "Compiling Java library ..."
+               src/protoc --java_out=java/src/main/java --proto_path=src src/google/protobuf/descriptor.proto
+               mkdir java/build
+               pushd java/src/main/java
+               ejavac -d ../../../build $(find . -name '*.java') || die "java compilation failed"
+               popd
+               jar cf "${PN}.jar" -C java/build . || die "jar failed"
+       fi
+
+       if use emacs; then
+               elisp-compile "${S}/editors/protobuf-mode.el" || die "elisp-compile failed!"
+       fi
+}
+
+src_install() {
+       emake DESTDIR="${D}" install || die "emake install failed"
+       dodoc CHANGES.txt CONTRIBUTORS.txt README.txt
+
+       use static-libs || rm -rf "${D}"/usr/lib*/*.la
+
+       if use python; then
+               pushd python
+               distutils_src_install
+               popd
+       fi
+
+       if use java; then
+               java-pkg_dojar ${PN}.jar
+               use source && java-pkg_dosrc java/src/main/java/*
+       fi
+
+       if use vim-syntax; then
+               insinto /usr/share/vim/vimfiles/syntax
+               doins editors/proto.vim
+       fi
+
+       if use emacs; then
+               elisp-install ${PN} editors/protobuf-mode.el* || die "elisp-install failed!"
+               elisp-site-file-install "${FILESDIR}/70${PN}-gentoo.el"
+       fi
+
+       if use examples; then
+               insinto /usr/share/doc/${PF}/examples
+               doins -r examples/* || die "doins examples failed"
+       fi
+}
+
+src_test() {
+       emake check || die "emake check failed"
+
+       if use python; then
+                pushd python
+                distutils_src_test
+                popd
+       fi
+}
+
+pkg_setup() {
+       use python && python_set_active_version 2
+}
+
+pkg_postinst() {
+       use emacs && elisp-site-regen
+       use python && distutils_pkg_postinst
+}
+
+pkg_postrm() {
+       use emacs && elisp-site-regen
+       use python && distutils_pkg_postrm
+}