diff options
author | Michael Januszewski <spock@gentoo.org> | 2008-12-06 22:31:17 +0000 |
---|---|---|
committer | Michael Januszewski <spock@gentoo.org> | 2008-12-06 22:31:17 +0000 |
commit | 825f6cf26d885825fd8c20e3e90ec330ab5277bc (patch) | |
tree | 6a1bb163cd4df7a2aa3cfb53a0ca3f17cd429bc0 /dev-libs/protobuf | |
parent | Fixed as-needed, bug 232416 and 247814, thanks to a-v and idl0r on freenode (diff) | |
download | gentoo-2-825f6cf26d885825fd8c20e3e90ec330ab5277bc.tar.gz gentoo-2-825f6cf26d885825fd8c20e3e90ec330ab5277bc.tar.bz2 gentoo-2-825f6cf26d885825fd8c20e3e90ec330ab5277bc.zip |
Version bump.
(Portage version: 2.1.6_rc3/cvs/Linux 2.6.27 x86_64)
Diffstat (limited to 'dev-libs/protobuf')
-rw-r--r-- | dev-libs/protobuf/ChangeLog | 9 | ||||
-rw-r--r-- | dev-libs/protobuf/files/protobuf-2.0.3-decoder_test_64bit_fix.patch | 17 | ||||
-rw-r--r-- | dev-libs/protobuf/protobuf-2.0.3.ebuild | 77 |
3 files changed, 102 insertions, 1 deletions
diff --git a/dev-libs/protobuf/ChangeLog b/dev-libs/protobuf/ChangeLog index fe67603d2408..77bfb577a5e1 100644 --- a/dev-libs/protobuf/ChangeLog +++ b/dev-libs/protobuf/ChangeLog @@ -1,6 +1,13 @@ # 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.3 2008/10/30 14:22:14 spock Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-libs/protobuf/ChangeLog,v 1.4 2008/12/06 22:31:17 spock Exp $ + +*protobuf-2.0.3 (06 Dec 2008) + + 06 Dec 2008; Michał Januszewski <spock@gentoo.org> + +files/protobuf-2.0.3-decoder_test_64bit_fix.patch, + +protobuf-2.0.3.ebuild: + Version bump. 30 Oct 2008; Michał Januszewski <spock@gentoo.org> protobuf-2.0.1.ebuild: Install the vim syntax file into vimfiles/syntax instead of vimfiles. diff --git a/dev-libs/protobuf/files/protobuf-2.0.3-decoder_test_64bit_fix.patch b/dev-libs/protobuf/files/protobuf-2.0.3-decoder_test_64bit_fix.patch new file mode 100644 index 000000000000..5a88a119e538 --- /dev/null +++ b/dev-libs/protobuf/files/protobuf-2.0.3-decoder_test_64bit_fix.patch @@ -0,0 +1,17 @@ +diff -Naurp protobuf-2.0.3-orig/python/google/protobuf/internal/decoder_test.py protobuf-2.0.3/python/google/protobuf/internal/decoder_test.py +--- protobuf-2.0.3-orig/python/google/protobuf/internal/decoder_test.py 2008-12-05 19:07:15.000000000 +0100 ++++ protobuf-2.0.3/python/google/protobuf/internal/decoder_test.py 2008-12-06 22:11:48.000000000 +0100 +@@ -106,6 +106,13 @@ class DecoderTest(unittest.TestCase): + self.mox.ReplayAll() + result = decoder_method(d) + self.assertEqual(expected_result, result) ++ # HACK: Convert all ints to longs so that different behavior ++ # between 32-bit and 64-bit systems does not impact the result ++ # of the test. ++ if isinstance(result, int): ++ result = long(result) ++ if isinstance(expected_result, int): ++ expected_result = long(expected_result) + self.assert_(isinstance(result, type(expected_result))) + self.mox.VerifyAll() + self.mox.ResetAll() diff --git a/dev-libs/protobuf/protobuf-2.0.3.ebuild b/dev-libs/protobuf/protobuf-2.0.3.ebuild new file mode 100644 index 000000000000..6c9622eaf8ac --- /dev/null +++ b/dev-libs/protobuf/protobuf-2.0.3.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.3.ebuild,v 1.1 2008/12/06 22:31:17 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}/protobuf-2.0.3-decoder_test_64bit_fix.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/syntax + 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 +} |