summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConrad Kostecki <conikost@gentoo.org>2022-09-04 23:06:03 +0200
committerConrad Kostecki <conikost@gentoo.org>2022-09-04 23:06:03 +0200
commit2c9d72cfcf3c5347db501372818c3e46ba0bf5ac (patch)
treee42b73f11c6975d2756e14164e98bfb3f694a800 /dev-java
parentnet-wireless/blueman: Stabilize 2.3.2 arm64, #868459 (diff)
downloadgentoo-2c9d72cfcf3c5347db501372818c3e46ba0bf5ac.tar.gz
gentoo-2c9d72cfcf3c5347db501372818c3e46ba0bf5ac.tar.bz2
gentoo-2c9d72cfcf3c5347db501372818c3e46ba0bf5ac.zip
dev-java/protobuf-java: add 3.20.1
Signed-off-by: Conrad Kostecki <conikost@gentoo.org>
Diffstat (limited to 'dev-java')
-rw-r--r--dev-java/protobuf-java/Manifest1
-rw-r--r--dev-java/protobuf-java/protobuf-java-3.20.1.ebuild54
2 files changed, 55 insertions, 0 deletions
diff --git a/dev-java/protobuf-java/Manifest b/dev-java/protobuf-java/Manifest
index 445bb0b6652e..dfb0564c5120 100644
--- a/dev-java/protobuf-java/Manifest
+++ b/dev-java/protobuf-java/Manifest
@@ -1 +1,2 @@
DIST protobuf-3.19.3.tar.gz 5293258 BLAKE2B c05b70ffca97f7166ea6a511a36907eed125edf1ebf17f908718221d9b851be84dfb2b1b39973f2faf35f6ade630e6ba4f9e8b91b8fbc922c5db97079323ee6e SHA512 1c003e7cbc8eae6a038f46e688b401ee202ba47f502561e909df79770f6e8b7daf3dc1ccc727e31bfb5b52cd04cb4fef7d2d2a28d650c13f396872ad4aa076c6
+DIST protobuf-3.20.1.tar.gz 5368262 BLAKE2B 1ce1aef2e4c4f3ea4863629cc75d89fe17d0c7ac0c342ac641c787456fd4a12756c2892a27ddadedc94a7201494ec84566638ce33a03cb0c867b04e9eee0edb3 SHA512 fde3eb9f13946887ddfd87df428c5615ad09aaf191e4478b24e98e5e13231feeff4e70b4ca6a2ff7d9b9b2e2c60bc1d5479526edeafa78f9a8ed3bef2e0bacb0
diff --git a/dev-java/protobuf-java/protobuf-java-3.20.1.ebuild b/dev-java/protobuf-java/protobuf-java-3.20.1.ebuild
new file mode 100644
index 000000000000..f0eaf379e6de
--- /dev/null
+++ b/dev-java/protobuf-java/protobuf-java-3.20.1.ebuild
@@ -0,0 +1,54 @@
+# Copyright 2008-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+JAVA_PKG_IUSE="doc source"
+
+inherit java-pkg-2 java-pkg-simple
+
+if [[ "${PV}" == "9999" ]]; then
+ inherit git-r3
+
+ EGIT_CHECKOUT_DIR="${WORKDIR}/protobuf-${PV}"
+ EGIT_REPO_URI="https://github.com/protocolbuffers/protobuf"
+ EGIT_SUBMODULES=()
+fi
+
+DESCRIPTION="Google's Protocol Buffers - Java bindings"
+HOMEPAGE="https://developers.google.com/protocol-buffers/ https://github.com/protocolbuffers/protobuf"
+if [[ "${PV}" == "9999" ]]; then
+ SRC_URI=""
+else
+ SRC_URI="https://github.com/protocolbuffers/protobuf/archive/v${PV}.tar.gz -> protobuf-${PV}.tar.gz"
+fi
+S="${WORKDIR}/protobuf-${PV}/java"
+
+LICENSE="BSD"
+SLOT="0/31"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86 ~amd64-linux ~x86-linux ~x64-macos"
+
+COMMON_DEPEND=">=virtual/jdk-1.8:*"
+BDEPEND="
+ ~dev-libs/protobuf-${PV}
+ ${COMMON_DEPEND}
+"
+DEPEND="${COMMON_DEPEND}"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ pushd "${WORKDIR}/protobuf-${PV}" > /dev/null || die
+ eapply_user
+ popd > /dev/null || die
+
+ java-pkg-2_src_prepare
+}
+
+src_compile() {
+ "${BROOT}/usr/bin/protoc" --java_out=core/src/main/java -I../src ../src/google/protobuf/descriptor.proto || die
+ JAVA_SRC_DIR="core/src/main/java" JAVA_JAR_FILENAME="protobuf.jar" java-pkg-simple_src_compile
+}
+
+src_install() {
+ JAVA_SRC_DIR="core/src/main/java" JAVA_JAR_FILENAME="protobuf.jar" java-pkg-simple_src_install
+}