diff options
author | Volkmar W. Pogatzki <gentoo@pogatzki.net> | 2022-09-11 00:42:55 +0200 |
---|---|---|
committer | Florian Schmaus <flow@gentoo.org> | 2022-10-04 11:38:38 +0200 |
commit | 7d9aaa700b43a52211495505b56c4387c2cc99db (patch) | |
tree | d8b3ab05c25fbb63423a9acbfb647a3a5ba8860d /dev-java | |
parent | dev-java/easymock: add 2.5.2 (diff) | |
download | gentoo-7d9aaa700b43a52211495505b56c4387c2cc99db.tar.gz gentoo-7d9aaa700b43a52211495505b56c4387c2cc99db.tar.bz2 gentoo-7d9aaa700b43a52211495505b56c4387c2cc99db.zip |
dev-java/felix-framework: new package, add 7.0.5
Signed-off-by: Volkmar W. Pogatzki <gentoo@pogatzki.net>
Signed-off-by: Florian Schmaus <flow@gentoo.org>
Diffstat (limited to 'dev-java')
-rw-r--r-- | dev-java/felix-framework/Manifest | 1 | ||||
-rw-r--r-- | dev-java/felix-framework/felix-framework-7.0.5.ebuild | 106 | ||||
-rw-r--r-- | dev-java/felix-framework/metadata.xml | 12 |
3 files changed, 119 insertions, 0 deletions
diff --git a/dev-java/felix-framework/Manifest b/dev-java/felix-framework/Manifest new file mode 100644 index 000000000000..7c129e4b6fc7 --- /dev/null +++ b/dev-java/felix-framework/Manifest @@ -0,0 +1 @@ +DIST felix-framework-7.0.5.tar.gz 505118 BLAKE2B 3652d46dfb4c9c5b43b159450b81ad896483fb2df40165d7e7b8bbd718c8e3297163065474bd10f3858ff7fc2646134ed470e34ede8eeb5efc05cec75f1a7aec SHA512 58fa96500fed827c348a47ac8672aeb4e5b94bfd681c4cde610b3a453fd2abfe2d631742281a192c76718ee83fc4c30980a5179926ff3bc7b8ea649ef07f34a3 diff --git a/dev-java/felix-framework/felix-framework-7.0.5.ebuild b/dev-java/felix-framework/felix-framework-7.0.5.ebuild new file mode 100644 index 000000000000..e80a2eac3786 --- /dev/null +++ b/dev-java/felix-framework/felix-framework-7.0.5.ebuild @@ -0,0 +1,106 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +# Skeleton command: +# java-ebuilder --generate-ebuild --workdir . --pom pom.xml --download-uri mirror://apache/felix/org.apache.felix.framework-7.0.5-source-release.tar.gz --slot 0 --keywords "~amd64" --ebuild felix-framework-7.0.5.ebuild + +EAPI=8 + +JAVA_PKG_IUSE="doc source test" +MAVEN_ID="org.apache.felix:org.apache.felix.framework:7.0.5" +JAVA_TESTING_FRAMEWORKS="junit-4" + +inherit java-pkg-2 java-pkg-simple + +DESCRIPTION="Implementation of the OSGi R8 core framework specification" +HOMEPAGE="https://felix.apache.org/documentation/subprojects/apache-felix-framework.html" +SRC_URI="mirror://apache/felix/org.apache.${PN//-/.}-${PV}-source-release.tar.gz -> ${P}.tar.gz" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64" + +# Common dependencies +# POM: pom.xml +# org.codehaus.mojo:animal-sniffer-annotations:1.9 -> >=dev-java/animal-sniffer-annotations-1.15:0 + +CP_DEPEND="dev-java/animal-sniffer-annotations:0" + +# Compile dependencies +# POM: pom.xml +# org.apache.felix:org.apache.felix.resolver:2.0.4 -> >=dev-java/felix-resolver-2.0.4:0 +# org.osgi:org.osgi.annotation:6.0.0 -> !!!artifactId-not-found!!! +# POM: pom.xml +# test? junit:junit:4.12 -> >=dev-java/junit-4.13.2:4 +# test? org.easymock:easymock:2.5.2 -> >=dev-java/easymock-2.5.2:2.5 +# test? org.mockito:mockito-all:1.10.19 -> !!!artifactId-not-found!!! +# test? org.ow2.asm:asm-all:5.2 -> !!!artifactId-not-found!!! + +DEPEND=" + >=virtual/jdk-11:* + ${CP_DEPEND} + dev-java/osgi-annotation:0 + dev-java/felix-resolver:0 + test? ( + dev-java/asm:4 + dev-java/easymock:2.5 + dev-java/mockito:0 + ) +" + +RDEPEND=" + >=virtual/jre-1.8:* + ${CP_DEPEND}" + +S="${WORKDIR}/org.apache.felix.framework-${PV}" + +JAVA_CLASSPATH_EXTRA="felix-resolver,osgi-annotation" +JAVA_SRC_DIR="src/main/java" +JAVA_RESOURCE_DIRS="src/main/resources" + +JAVA_TEST_GENTOO_CLASSPATH="asm-4,junit-4,easymock-2.5,mockito" +JAVA_TEST_SRC_DIR="src/test/java" + +src_prepare() { + default + # 58,91 pom.xml + cat > src/main/java/module-info.java <<-EOF + $( sed -n '/<moduleInfoSource>/,/<\/moduleInfoSource/p' pom.xml \ + | grep -v moduleInfoSource ) + EOF + + sed -e 's/{dollar}//g' -i src/main/resources/default.properties || die + + sed -e "s:\${pom.version}:${PV}:" \ + -i src/main/resources/org/apache/felix/framework/Felix.properties || die + + # bundling some classes from felix-resolver according to 99,132 pom.xml + # if we don't bundle compilation would fail with: + # src/main/java/module-info.java:23: error: package is empty or does not exist: org.osgi.service.resolver + cd src/main/resources || die + jar xvf "$(java-pkg_getjar --build-only felix-resolver felix-resolver.jar)" \ + org/{apache/felix,osgi/service}/resolver/ || die +} + +src_compile() { + java-pkg-simple_src_compile + + # according to pom.xml, line 129 + # grep the line between <Add-opens> and </Add-opens> from pom.xml + local ADD_OPENS="$( sed -n '/<Add-opens>/,/<\/Add-opens/p' pom.xml \ + | grep -v Add-opens | tr -s '[:space:]')" || die + echo "Add-opens:${ADD_OPENS}" > "${T}/Add-opens-to-MANIFEST.MF" \ + || die "Add-opens-to-MANIFEST.MF failed" + jar ufmv ${JAVA_JAR_FILENAME} "${T}/Add-opens-to-MANIFEST.MF" \ + || die "updating MANIFEST.MF failed" +} + +src_test() { + # java.base does not "opens java.lang" to unnamed module + # adding it to MANIFEST.MF would not fix the test failures. + local vm_version="$(java-config -g PROVIDES_VERSION)" + if ver_test "${vm_version}" -ge 17; then + JAVA_TEST_EXTRA_ARGS+=( --add-opens=java.base/java.lang=ALL-UNNAMED ) + fi + java-pkg-simple_src_test +} diff --git a/dev-java/felix-framework/metadata.xml b/dev-java/felix-framework/metadata.xml new file mode 100644 index 000000000000..e6816da2d497 --- /dev/null +++ b/dev-java/felix-framework/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>java@gentoo.org</email> + </maintainer> + <upstream> + <bugs-to>https://issues.apache.org/jira/browse/FELIX</bugs-to> + <doc>https://felix.apache.org/documentation/subprojects/apache-felix-framework.html</doc> + <remote-id type="github">apache/felix-dev</remote-id> + </upstream> +</pkgmetadata> |