diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2018-07-14 21:03:06 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2018-07-14 21:03:06 +0100 |
commit | 8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch) | |
tree | 7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /dev-java/protobuf-java/protobuf-java-3.5.1.1.ebuild | |
parent | 30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff) |
gentoo resync : 14.07.2018
Diffstat (limited to 'dev-java/protobuf-java/protobuf-java-3.5.1.1.ebuild')
-rw-r--r-- | dev-java/protobuf-java/protobuf-java-3.5.1.1.ebuild | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/dev-java/protobuf-java/protobuf-java-3.5.1.1.ebuild b/dev-java/protobuf-java/protobuf-java-3.5.1.1.ebuild new file mode 100644 index 000000000000..2bea730d3d21 --- /dev/null +++ b/dev-java/protobuf-java/protobuf-java-3.5.1.1.ebuild @@ -0,0 +1,66 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="6" +JAVA_PKG_IUSE="doc source" + +inherit java-pkg-2 java-pkg-simple + +DESCRIPTION="Google's Protocol Buffers - Java bindings" +HOMEPAGE="https://developers.google.com/protocol-buffers/ https://github.com/google/protobuf" +SRC_URI="https://github.com/google/protobuf/archive/v${PV}.tar.gz -> protobuf-${PV}.tar.gz" + +LICENSE="BSD" +SLOT="0/15" +KEYWORDS="amd64 ~arm ~arm64 ppc64 ~sh x86 ~amd64-linux ~arm-linux ~x86-linux ~x64-macos ~x86-macos" +IUSE="nano" + +# Protobuf is only a build-time dep, but depends on the exact same version +# (excluding revision), since we are using the same tarball. +# But probably same subslot is sufficient. +DEPEND=">=virtual/jdk-1.7 + ~dev-libs/protobuf-${PV}" + +RDEPEND=">=virtual/jre-1.7 + !<dev-libs/protobuf-3[java(-)]" + +S="${WORKDIR}/protobuf-${PV}" + +src_prepare() { + default + java-pkg-2_src_prepare +} + +src_compile() { + pushd "${S}/java" >/dev/null || die + einfo "Compiling Java library ..." + "${EPREFIX}"/usr/bin/protoc --java_out=core/src/main/java -I../src ../src/google/protobuf/descriptor.proto || die + JAVA_SRC_DIR="${S}/java/core/src/main/java" + JAVA_JAR_FILENAME="protobuf.jar" + java-pkg-simple_src_compile + popd >/dev/null || die + if use nano; then + einfo "Compiling Java Nano library ..." + pushd "${S}/javanano" >/dev/null || die + "${EPREFIX}"/usr/bin/protoc --java_out=src/main/java -I../src ../src/google/protobuf/descriptor.proto || die + JAVA_SRC_DIR="${S}/javanano/src/main/java" + JAVA_GENTOO_CLASSPATH_EXTRA="${S}/java/core/src/main/java/" + JAVA_JAR_FILENAME="protobuf-nano.jar" + java-pkg-simple_src_compile + popd >/dev/null || die + fi +} + +src_install() { + JAVA_JAR_FILENAME="${S}/java/protobuf.jar" + JAVA_SRC_DIR="${S}/java/core/src/main/java" + if use nano; then + JAVA_JAR_FILENAME="${JAVA_JAR_FILENAME} ${S}/javanano/protobuf-nano.jar" + JAVA_SRC_DIR="${JAVA_SRC_DIR} ${S}/javanano/src/main/java" + fi + mv "${S}/java/target" . || die + if use nano; then + cp -Rvf "${S}/javanano/target" . || die + fi + java-pkg-simple_src_install +} |