summaryrefslogtreecommitdiff
path: root/dev-java
diff options
context:
space:
mode:
authorLiguros - Gitlab CI/CD [develop] <gitlab@liguros.net>2022-02-06 13:44:15 +0000
committerLiguros - Gitlab CI/CD [develop] <gitlab@liguros.net>2022-02-06 13:44:15 +0000
commitf001d73742671206e73085be095e851b1eb7d019 (patch)
tree5717dd7d4093e487c0d3ddb2c0e1e07a5d66d492 /dev-java
parente0126a15b33f25dd633819df7dec0b1f3154bcff (diff)
downloadbaldeagleos-repo-f001d73742671206e73085be095e851b1eb7d019.tar.gz
baldeagleos-repo-f001d73742671206e73085be095e851b1eb7d019.tar.xz
baldeagleos-repo-f001d73742671206e73085be095e851b1eb7d019.zip
Adding metadata
Diffstat (limited to 'dev-java')
-rw-r--r--dev-java/commons-collections/Manifest1
-rw-r--r--dev-java/commons-collections/commons-collections-4.1-r1.ebuild53
-rw-r--r--dev-java/lz4-java/Manifest1
-rw-r--r--dev-java/lz4-java/files/lz4-java-1.8.0-Makefile47
-rw-r--r--dev-java/lz4-java/files/lz4-java-1.8.0-gentoo-classpath.xml7
-rw-r--r--dev-java/lz4-java/files/lz4-java-1.8.0-print-os-props.patch31
-rw-r--r--dev-java/lz4-java/files/lz4-java-1.8.0-skip-ivy.patch91
-rw-r--r--dev-java/lz4-java/lz4-java-1.8.0.ebuild101
-rw-r--r--dev-java/lz4-java/metadata.xml10
9 files changed, 288 insertions, 54 deletions
diff --git a/dev-java/commons-collections/Manifest b/dev-java/commons-collections/Manifest
index 466c5b01284b..a70cf6348c0f 100644
--- a/dev-java/commons-collections/Manifest
+++ b/dev-java/commons-collections/Manifest
@@ -1,3 +1,2 @@
DIST commons-collections-3.2.2-src.tar.gz 630693 BLAKE2B a70cebe9526291d5207db7edd7c9b50060413880d41dcb28c01cf05f7e00a9f5e1560012c3c3c763162412282db9512bc2b64a5788f210c5c8866943d912dafb SHA512 2e8ef638f07515b028a3e7e97851fcf1d9023a2c188e211bd1e936f35d3d91c2885adf3b1103ad17dfb7aeea6e7a67ce7826ee346a8a29c1aa7c6b0cf14e9230
DIST commons-collections-4.4-src.tar.gz 703008 BLAKE2B f4a0e858eb7412bdd431894f923a4731685ceb2463bee002401d8048cc40534f002ec0291aa67297e061a50b624d3de8f64e227f513ab1f3620e38d1d6858255 SHA512 2110e73eda97ca52a886cb708f21d8609a83655861594f3b6eb7a15b777d42eeeefc5d3b28ffc6ecc5e4f0b3fd5407f80019c2ce006f970f55455ef33eee47ee
-DIST commons-collections4-4.1-src.tar.gz 704671 BLAKE2B dea1b630168373013ca937c9b02414b92845fdd9ddf7a22a05c4d7f8d30ff26d73f3a2d399d7a4c026f8ec43a282120fdf3d3cb1042a311c3b490ffed1774e30 SHA512 c5666f41b68c9fdba3731730595616b16f98579c077cf047f421a46729b5a65476a8707125a2c0b0c6c024ca94df8c2633123bd99e705149fcb1afadcd3bf68b
diff --git a/dev-java/commons-collections/commons-collections-4.1-r1.ebuild b/dev-java/commons-collections/commons-collections-4.1-r1.ebuild
deleted file mode 100644
index 228b947a439d..000000000000
--- a/dev-java/commons-collections/commons-collections-4.1-r1.ebuild
+++ /dev/null
@@ -1,53 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-JAVA_PKG_IUSE="doc source"
-MAVEN_ID="org.apache.commons:commons-collections4:4.1"
-
-inherit java-pkg-2 java-pkg-simple
-
-SLOT="4"
-MY_P="${PN}${SLOT}-${PV}"
-
-DESCRIPTION="Extends the JCF classes with new interfaces, implementations and utilities"
-HOMEPAGE="https://commons.apache.org/collections/"
-SRC_URI="mirror://apache/${PN/-//}/source/${MY_P}-src.tar.gz"
-LICENSE="Apache-2.0"
-KEYWORDS="amd64 arm64 ppc64 x86"
-IUSE="test"
-RESTRICT="!test? ( test )"
-
-DEPEND="
- >=virtual/jdk-1.8
- test? (
- dev-java/easymock:3.2
- dev-java/junit:4
- )"
-
-RDEPEND="
- >=virtual/jre-1.8"
-
-S="${WORKDIR}/${MY_P}-src"
-
-JAVA_SRC_DIR="src/main/java"
-
-src_install() {
- java-pkg-simple_src_install
- dodoc RELEASE-NOTES.txt
- docinto html
- dodoc {DEVELOPERS-GUIDE,PROPOSAL}.html
-}
-
-src_test() {
- local DIR=src/test/java
- local CP="${DIR}:${DIR}/../resources:${PN}.jar:$(java-pkg_getjars easymock-3.2,junit-4)"
- local TESTS=$(find ${DIR} -name "*Test.java" ! -name "Abstract*" ! -name "BulkTest.*")
- TESTS="${TESTS//src\/test\/java\/}"
- TESTS="${TESTS//.java}"
- TESTS="${TESTS//\//.}"
-
- ejavac -cp "${CP}" -d ${DIR} $(find ${DIR} -name "*.java")
- ejunit4 -classpath "${CP}" ${TESTS}
-}
diff --git a/dev-java/lz4-java/Manifest b/dev-java/lz4-java/Manifest
new file mode 100644
index 000000000000..47194c6142a1
--- /dev/null
+++ b/dev-java/lz4-java/Manifest
@@ -0,0 +1 @@
+DIST lz4-java-1.8.0.tar.gz 1069398 BLAKE2B 02ee363fc42eeeade01f04649416dd874513f4517264c6e1b6474d64e8b81e2ee9ff1f55e51b508608929e8d78cb30e98d929cc4a118c03f86b0e69bae237e8a SHA512 ae78748d984d2ede18018d5e9ae6aee0d5fe6ac8b56d717f863968cfad6e9f85b62305692345ba16002bee68278e87a0364aa98aeb92e2af6dc169e5d5b612d4
diff --git a/dev-java/lz4-java/files/lz4-java-1.8.0-Makefile b/dev-java/lz4-java/files/lz4-java-1.8.0-Makefile
new file mode 100644
index 000000000000..8d59aa8df84a
--- /dev/null
+++ b/dev-java/lz4-java/files/lz4-java-1.8.0-Makefile
@@ -0,0 +1,47 @@
+# Gentoo custom Makefile for the JNI portion of lz4-java
+#
+# Adapted from the logic for target "compile-jni" in build.xml,
+# but uses lz4 installed on the system. This Makefile respects
+# custom CFLAGS and LDFLAGS settings, whereas build.xml does not.
+
+# Java system properties read by build.xml
+PLATFORM ?= linux
+SRC ?= src
+BUILD ?= build
+JAVA_HOME ?=
+# Requires lz4-java-*-print-os-props.patch
+OS_ARCH := $(shell ant os-props 2>&1 > /dev/null && \
+ grep 'os\.arch=' os.properties | sed -e 's/os\.arch=//')
+
+MKDIR_P = mkdir -p
+
+SRC_DIR := $(SRC)/jni
+OBJS_DIR_PREFIX := $(BUILD)/objects
+OBJS_DIR := $(OBJS_DIR_PREFIX)/$(SRC_DIR)
+OUT_DIR := $(BUILD)/jni/net/jpountz/util/$(PLATFORM)/$(OS_ARCH)
+
+SRC_FILES := $(wildcard $(SRC_DIR)/*.c)
+OBJS := $(addprefix $(OBJS_DIR_PREFIX)/,$(SRC_FILES:.c=.o))
+SONAME = liblz4-java.so
+
+# C compiler arguments may be obtained by running 'ant -v compile-jni',
+# as long as dev-java/cpptasks is in the classpath
+CFLAGS := -fPIC $(CFLAGS)
+# '--as-needed' causes test failure
+LDFLAGS := $(LDFLAGS) -Wl,--no-as-needed
+
+$(OUT_DIR)/$(SONAME): $(OBJS) | $(OUT_DIR)
+ $(CC) $(CFLAGS) -shared $(LDFLAGS) -Wl,-soname,$(SONAME) -o $@ -llz4 $^
+
+$(OBJS_DIR_PREFIX)/%.o: %.c | $(OBJS_DIR)
+ $(CC) $(CFLAGS) -c -o $@ \
+ -I$(JAVA_HOME)/../include -I$(JAVA_HOME)/../include/$(PLATFORM) \
+ -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/$(PLATFORM) \
+ -I$(BUILD)/jni-headers \
+ $<
+
+$(OUT_DIR):
+ $(MKDIR_P) $@
+
+$(OBJS_DIR):
+ $(MKDIR_P) $@
diff --git a/dev-java/lz4-java/files/lz4-java-1.8.0-gentoo-classpath.xml b/dev-java/lz4-java/files/lz4-java-1.8.0-gentoo-classpath.xml
new file mode 100644
index 000000000000..2392679c4a69
--- /dev/null
+++ b/dev-java/lz4-java/files/lz4-java-1.8.0-gentoo-classpath.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<project name="gentoo-classpath">
+ <path id="mvel.classpath">
+ <pathelement path="${gentoo.classpath}" />
+ </path>
+</project>
diff --git a/dev-java/lz4-java/files/lz4-java-1.8.0-print-os-props.patch b/dev-java/lz4-java/files/lz4-java-1.8.0-print-os-props.patch
new file mode 100644
index 000000000000..d4363b6853e4
--- /dev/null
+++ b/dev-java/lz4-java/files/lz4-java-1.8.0-print-os-props.patch
@@ -0,0 +1,31 @@
+From b8d50d44ba1c0e4b5bf297f7499ad0fb5b82706e Mon Sep 17 00:00:00 2001
+From: Yuan Liao <liaoyuan@gmail.com>
+Date: Wed, 19 Jan 2022 10:09:14 -0800
+Subject: [PATCH] build.xml: Add target that prints JVM system properties os.*
+
+The Gentoo custom JNI Makefile needs some of those properties.
+
+Signed-off-by: Yuan Liao <liaoyuan@gmail.com>
+---
+ build.xml | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/build.xml b/build.xml
+index b7940ab..96e52ea 100644
+--- a/build.xml
++++ b/build.xml
+@@ -62,6 +62,11 @@
+ <javaversion atleast="10"/>
+ </condition>
+
++ <target name="os-props"
++ description="echo values of JVM system properties os.* to file os.properties">
++ <echoproperties prefix="os." destfile="os.properties" />
++ </target>
++
+ <target name="clean" description="clean working copy">
+ <delete dir="${build}" />
+ <delete dir="${dist}" />
+--
+2.34.1
+
diff --git a/dev-java/lz4-java/files/lz4-java-1.8.0-skip-ivy.patch b/dev-java/lz4-java/files/lz4-java-1.8.0-skip-ivy.patch
new file mode 100644
index 000000000000..26c09e147072
--- /dev/null
+++ b/dev-java/lz4-java/files/lz4-java-1.8.0-skip-ivy.patch
@@ -0,0 +1,91 @@
+From 95ae85542f39cecd1af6a3e661ad6120195d2304 Mon Sep 17 00:00:00 2001
+From: Yuan Liao <liaoyuan@gmail.com>
+Date: Mon, 20 Dec 2021 09:57:31 -0800
+Subject: [PATCH] build.xml: Skip Ivy logic and use Gentoo classpath
+
+Signed-off-by: Yuan Liao <liaoyuan@gmail.com>
+---
+ build.xml | 22 +++++++---------------
+ 1 file changed, 7 insertions(+), 15 deletions(-)
+
+diff --git a/build.xml b/build.xml
+index b7940ab..ff321c6 100644
+--- a/build.xml
++++ b/build.xml
+@@ -20,6 +20,8 @@
+ xmlns:junit4="antlib:com.carrotsearch.junit4"
+ xmlns:mvn="antlib:org.apache.maven.artifact.ant">
+
++ <import file="gentoo-classpath.xml" />
++
+ <property name="src" location="src"/>
+ <property name="build" location="build"/>
+ <property name="dist" location="dist"/>
+@@ -81,8 +83,6 @@
+ </target>
+
+ <target name="install-cpptasks" unless="cpptasks.available">
+- <ivy:cachepath organisation="ant-contrib" module="cpptasks" revision="1.0b5"
+- inline="true" conf="default" transitive="true" pathid="cpptasks.classpath"/>
+ <taskdef uri="antlib:net.sf.antcontrib.cpptasks" resource="net/sf/antcontrib/cpptasks/antlib.xml" classpathref="cpptasks.classpath"/>
+ <property name="cpptasks.available" value="true"/>
+ </target>
+@@ -117,22 +117,14 @@
+
+ <target name="init">
+ <tstamp />
+- <ivy:resolve file="${ivy.xml.name}" conf="test" />
+- <ivy:retrieve />
+ </target>
+
+ <target name="install-junit4" depends="init" unless="junit4.available">
+- <taskdef uri="antlib:com.carrotsearch.junit4">
+- <classpath>
+- <fileset dir="${lib}" includes="*.jar" />
+- </classpath>
+- </taskdef>
++ <taskdef uri="antlib:com.carrotsearch.junit4" resource="com/carrotsearch/junit4/antlib.xml" classpath="${gentoo.classpath}"/>
+ <property name="junit4.available" value="true" />
+ </target>
+
+ <target name="generate-sources" depends="init">
+- <ivy:cachepath organisation="org.mvel" module="mvel2" revision="2.3.2.Final"
+- inline="true" conf="default" transitive="true" pathid="mvel.classpath"/>
+ <mkdir dir="${build}/java" />
+ <java
+ fork="true"
+@@ -244,12 +236,12 @@
+ <pathelement path="${build}/classes" />
+ <pathelement path="${build}/unsafe-classes" />
+ <pathelement path="${build}/generated-classes" />
+- <fileset dir="lib" includes="*.jar" />
++ <pathelement path="${gentoo.classpath}" />
+ </path>
+
+ <path id="compile.tests.classpath.with.jar">
+ <pathelement path="${lz4-java.jar}" />
+- <fileset dir="lib" includes="*.jar" />
++ <pathelement path="${gentoo.classpath}" />
+ </path>
+
+ <path id="test.classpath">
+@@ -260,14 +252,14 @@
+ <pathelement path="${build}/unsafe-classes" />
+ <pathelement path="${build}/generated-classes" />
+ <pathelement path="${build}/test-classes" />
+- <fileset dir="${lib}" includes="*.jar" />
++ <pathelement path="${gentoo.classpath}" />
+ </path>
+
+ <path id="test.classpath.with.jar">
+ <pathelement path="${lz4-java.jar}" />
+ <pathelement path="${src}/test-resources" />
+ <pathelement path="${build}/test-classes" />
+- <fileset dir="${lib}" includes="*.jar" />
++ <pathelement path="${gentoo.classpath}" />
+ </path>
+
+ <target name="test" description="run tests">
+--
+2.32.0
+
diff --git a/dev-java/lz4-java/lz4-java-1.8.0.ebuild b/dev-java/lz4-java/lz4-java-1.8.0.ebuild
new file mode 100644
index 000000000000..15c53d947049
--- /dev/null
+++ b/dev-java/lz4-java/lz4-java-1.8.0.ebuild
@@ -0,0 +1,101 @@
+# Copyright 2021-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+JAVA_PKG_IUSE="doc source test"
+MAVEN_ID="org.lz4:lz4-java:1.8.0"
+
+inherit java-pkg-2 java-ant-2 toolchain-funcs
+
+DESCRIPTION="LZ4 compression for Java"
+HOMEPAGE="https://github.com/lz4/lz4-java"
+SRC_URI="https://github.com/lz4/lz4-java/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"
+
+# Tests require com.carrotsearch.randomizedtesting:junit4-ant, which is yet to
+# be packaged. Some extra steps are required before running the tests:
+# 1. Download junit4-ant 2.7.x from https://mvnrepository.com/artifact/com.carrotsearch.randomizedtesting/junit4-ant
+# 2. Set EANT_GENTOO_CLASSPATH_EXTRA to the path to junit4-ant-2.7.*.jar
+# 3. arm, arm64 and ppc64 only: Install test dependencies that are unkeyworded
+# 4. Set ALLOW_TEST="all"
+RESTRICT="test"
+
+CDEPEND="
+ app-arch/lz4
+"
+
+# The version requirement on mvel is strict; mvel-2.4.* generates source files
+# incorrectly, which causes build failure of this package
+DEPEND="
+ >=virtual/jdk-1.8:*
+ dev-java/mvel:2.3
+ dev-libs/xxhash
+ test? (
+ dev-java/junit:4
+ !arm? ( !arm64? ( !ppc64? (
+ dev-java/randomized-runner:0
+ ) ) )
+ )
+ ${CDEPEND}
+"
+
+RDEPEND="
+ >=virtual/jre-1.8:*
+ ${CDEPEND}
+"
+
+# Ant is only needed to generate JNI headers;
+# the JNI shared object will be built by the custom Makefile
+EANT_BUILD_TARGET="compile-java generate-headers"
+EANT_DOC_TARGET="docs"
+EANT_EXTRA_ARGS="-Djava.io.tmpdir=${T}"
+EANT_TEST_GENTOO_CLASSPATH="randomized-runner"
+
+pkg_setup() {
+ java-pkg-2_pkg_setup
+ local build_only_cp="$(java-pkg_getjars --build-only mvel-2.3)"
+ if [[ -z "${EANT_GENTOO_CLASSPATH_EXTRA}" ]]; then
+ EANT_GENTOO_CLASSPATH_EXTRA="${build_only_cp}"
+ else
+ EANT_GENTOO_CLASSPATH_EXTRA+=":${build_only_cp}"
+ fi
+}
+
+src_prepare() {
+ eapply "${FILESDIR}/${P}-print-os-props.patch"
+ eapply "${FILESDIR}/${P}-skip-ivy.patch"
+ cp "${FILESDIR}/${P}-Makefile" Makefile || die "Failed to copy Makefile"
+ cp "${FILESDIR}/${P}-gentoo-classpath.xml" gentoo-classpath.xml ||
+ die "Failed to copy Gentoo classpath injection XML"
+ java-pkg-2_src_prepare
+ rm -r src/resources || die "Failed to remove pre-built shared libraries"
+}
+
+src_compile() {
+ java-pkg-2_src_compile
+ emake CC="$(tc-getCC)" JAVA_HOME="${JAVA_HOME}"
+ # JNI has already been built by the Makefile at this point
+ # Also pretend cpptasks is available, which is required by build.xml
+ EANT_EXTRA_ARGS+=" -Dcpptasks.available=true -Dskip.jni=true"
+ # Manually call 'ant jar' to include the JNI shared object in JAR
+ eant jar -f "${EANT_BUILD_XML}" ${EANT_EXTRA_ARGS}
+}
+
+src_test() {
+ java-pkg-2_src_test
+}
+
+src_install() {
+ java-pkg_newjar 'dist/${ivy.module}.jar'
+ java-pkg_doso $(find build/jni -name "*.so")
+ use doc && java-pkg_dojavadoc build/docs
+ # Ant project's 'sources' target generates a source JAR rather than a Zip
+ # archive; we simply let java-utils-2.eclass create the source Zip archive
+ # from the same source directories the 'sources' target would access
+ # https://github.com/lz4/lz4-java/blob/1.8.0/build.xml#L323-L330
+ use source && java-pkg_dosrc src/java/* src/java-unsafe/*
+}
diff --git a/dev-java/lz4-java/metadata.xml b/dev-java/lz4-java/metadata.xml
new file mode 100644
index 000000000000..e25b5c52aab3
--- /dev/null
+++ b/dev-java/lz4-java/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://liguros.gitlab.io/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>java@gentoo.org</email>
+ <name>Java</name>
+ </maintainer>
+
+ <origin>gentoo-staging</origin>
+</pkgmetadata> \ No newline at end of file