diff options
author | Krzysztof Pawlik <nelchael@gentoo.org> | 2010-04-18 13:15:29 +0000 |
---|---|---|
committer | Krzysztof Pawlik <nelchael@gentoo.org> | 2010-04-18 13:15:29 +0000 |
commit | f6ae19e481e6c283e31287e8f739e6ff917e78ca (patch) | |
tree | 4b3deadbf71c141eb361c77989212d90316e8b6e /dev-libs | |
parent | Fix Prefix support (diff) | |
download | gentoo-2-f6ae19e481e6c283e31287e8f739e6ff917e78ca.tar.gz gentoo-2-f6ae19e481e6c283e31287e8f739e6ff917e78ca.tar.bz2 gentoo-2-f6ae19e481e6c283e31287e8f739e6ff917e78ca.zip |
Improve Python support.
(Portage version: 2.1.8.3/cvs/Linux x86_64)
Diffstat (limited to 'dev-libs')
-rw-r--r-- | dev-libs/protobuf/ChangeLog | 5 | ||||
-rw-r--r-- | dev-libs/protobuf/protobuf-2.3.0.ebuild | 36 |
2 files changed, 30 insertions, 11 deletions
diff --git a/dev-libs/protobuf/ChangeLog b/dev-libs/protobuf/ChangeLog index f9c0c4198b43..449f35c712cc 100644 --- a/dev-libs/protobuf/ChangeLog +++ b/dev-libs/protobuf/ChangeLog @@ -1,6 +1,9 @@ # 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.15 2010/04/17 22:57:30 nelchael Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-libs/protobuf/ChangeLog,v 1.16 2010/04/18 13:15:29 nelchael Exp $ + + 18 Apr 2010; Krzysztof Pawlik <nelchael@gentoo.org> protobuf-2.3.0.ebuild: + Improve Python support. 17 Apr 2010; Krzysztof Pawlik <nelchael@gentoo.org> -files/protobuf-2.0.3-decoder_test_64bit_fix.patch, diff --git a/dev-libs/protobuf/protobuf-2.3.0.ebuild b/dev-libs/protobuf/protobuf-2.3.0.ebuild index f6bb3e575001..8a22b393c5a9 100644 --- a/dev-libs/protobuf/protobuf-2.3.0.ebuild +++ b/dev-libs/protobuf/protobuf-2.3.0.ebuild @@ -1,10 +1,11 @@ # 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.ebuild,v 1.2 2010/04/02 19:22:47 grobian Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-libs/protobuf/protobuf-2.3.0.ebuild,v 1.3 2010/04/18 13:15:29 nelchael Exp $ EAPI="2" JAVA_PKG_IUSE="source" +PYTHON_DEPEND="python? 2" inherit eutils distutils python java-pkg-opt-2 elisp-common @@ -23,14 +24,22 @@ DEPEND="${DEPEND} java? ( >=virtual/jdk-1.5 ) RDEPEND="${RDEPEND} java? ( >=virtual/jre-1.5 ) emacs? ( virtual/emacs )" +src_prepare() { + use python && python_convert_shebangs -r 2 . +} + src_compile() { emake || die if use python; then - cd python; distutils_src_compile; cd .. + 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 @@ -49,7 +58,14 @@ src_install() { dodoc CHANGES.txt CONTRIBUTORS.txt README.txt if use python; then - cd python; distutils_src_install; cd .. + 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 @@ -66,22 +82,22 @@ src_install() { insinto /usr/share/doc/${PF}/examples doins -r examples/* || die "doins examples failed" fi - - if use java; then - java-pkg_dojar ${PN}.jar - use source && java-pkg_dosrc java/src/main/java/* - fi } src_test() { emake check if use python; then - cd python; ${python} setup.py test || die "python test failed" - cd .. + pushd python + "$(PYTHON)" setup.py test || die "python tests failed" + popd fi } +pkg_setup() { + use python && python_set_active_version 2 +} + pkg_postinst() { use emacs && elisp-site-regen } |