summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Januszewski <spock@gentoo.org>2008-09-11 20:16:54 +0000
committerMichael Januszewski <spock@gentoo.org>2008-09-11 20:16:54 +0000
commit8f5a5d92f8af8bc70972f4c78fc7b28716c6ced5 (patch)
tree34dfa32ff97b383b7d5d611f3037c63f12693378 /dev-libs/protobuf
parentamd64 stable, bug #234137 (diff)
downloadgentoo-2-8f5a5d92f8af8bc70972f4c78fc7b28716c6ced5.tar.gz
gentoo-2-8f5a5d92f8af8bc70972f4c78fc7b28716c6ced5.tar.bz2
gentoo-2-8f5a5d92f8af8bc70972f4c78fc7b28716c6ced5.zip
Version bump.
(Portage version: 2.2_rc8/cvs/Linux 2.6.27-rc5 x86_64)
Diffstat (limited to 'dev-libs/protobuf')
-rw-r--r--dev-libs/protobuf/ChangeLog8
-rw-r--r--dev-libs/protobuf/files/protobuf-2.0.1-python-unittest.patch13
-rw-r--r--dev-libs/protobuf/protobuf-2.0.1.ebuild77
3 files changed, 97 insertions, 1 deletions
diff --git a/dev-libs/protobuf/ChangeLog b/dev-libs/protobuf/ChangeLog
index 69bea4acbc53..50ca4be2e8c5 100644
--- a/dev-libs/protobuf/ChangeLog
+++ b/dev-libs/protobuf/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for dev-libs/protobuf
# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/protobuf/ChangeLog,v 1.1 2008/07/17 23:16:44 spock Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/protobuf/ChangeLog,v 1.2 2008/09/11 20:16:54 spock Exp $
+
+*protobuf-2.0.1 (11 Sep 2008)
+
+ 11 Sep 2008; Michał Januszewski <spock@gentoo.org>
+ +files/protobuf-2.0.1-python-unittest.patch, +protobuf-2.0.1.ebuild:
+ Version bump.
*protobuf-2.0.0_beta (17 Jul 2008)
diff --git a/dev-libs/protobuf/files/protobuf-2.0.1-python-unittest.patch b/dev-libs/protobuf/files/protobuf-2.0.1-python-unittest.patch
new file mode 100644
index 000000000000..f187e4b69f34
--- /dev/null
+++ b/dev-libs/protobuf/files/protobuf-2.0.1-python-unittest.patch
@@ -0,0 +1,13 @@
+diff -Naurp protobuf-2.0.1-orig/python/setup.py protobuf-2.0.1/python/setup.py
+--- protobuf-2.0.1-orig/python/setup.py 2008-09-11 21:52:47.000000000 +0200
++++ protobuf-2.0.1/python/setup.py 2008-09-11 21:53:58.000000000 +0200
+@@ -47,6 +47,9 @@ def generate_proto(source):
+ sys.exit(-1)
+
+ def MakeTestSuite():
++ if 'google' in sys.modules:
++ del sys.modules['google']
++
+ generate_proto("../src/google/protobuf/unittest.proto")
+ generate_proto("../src/google/protobuf/unittest_import.proto")
+ generate_proto("../src/google/protobuf/unittest_mset.proto")
diff --git a/dev-libs/protobuf/protobuf-2.0.1.ebuild b/dev-libs/protobuf/protobuf-2.0.1.ebuild
new file mode 100644
index 000000000000..689ad6bae75a
--- /dev/null
+++ b/dev-libs/protobuf/protobuf-2.0.1.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/protobuf/protobuf-2.0.1.ebuild,v 1.1 2008/09/11 20:16:54 spock Exp $
+
+inherit eutils distutils python java-pkg-opt-2
+
+MY_P=${PN}-${PV//_/}
+
+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/${MY_P}.tar.bz2"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="examples java python vim-syntax"
+
+DEPEND="${DEPEND} java? ( >=virtual/jdk-1.5 )"
+RDEPEND="${RDEPEND} java? ( >=virtual/jre-1.5 )"
+
+S="${WORKDIR}/${MY_P}"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/${P}-python-unittest.patch
+}
+
+src_compile() {
+ econf || die
+ emake || die
+
+ if use python; then
+ cd python; distutils_src_compile; cd ..
+ fi
+
+ if use java; then
+ src/protoc --java_out=java/src/main/java --proto_path=src src/google/protobuf/descriptor.proto
+ mkdir java/build
+ cd java/src/main/java
+ ejavac -d ../../../build $(find . -name '*.java') || die "java compilation failed"
+ cd ../../../..
+ jar cf ${PN}.jar -C java/build . || die "jar failed"
+ fi
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ dodoc CHANGES.txt CONTRIBUTORS.txt README.txt
+
+ if use python; then
+ cd python; distutils_src_install; cd ..
+ fi
+
+ if use vim-syntax; then
+ insinto /usr/share/vim/vimfiles
+ doins editors/proto.vim
+ fi
+
+ if use examples; then
+ insinto /usr/share/doc/${PF}/examples
+ doins -r examples/* || die "doins examples failed"
+ fi
+
+ if use java; then
+ java-pkg_dojar ${PN}.jar
+ fi
+}
+
+src_test() {
+ emake check
+
+ if use python; then
+ cd python; ${python} setup.py test || die "python test failed"
+ cd ..
+ fi
+}