diff options
author | Philip Miess <Philip_Miess@yahoo.com> | 2023-03-26 09:47:25 -0400 |
---|---|---|
committer | Philip Miess <Philip_Miess@yahoo.com> | 2023-03-26 09:47:25 -0400 |
commit | 7e0245ba0117df53702508ba93c298fb9f8a1134 (patch) | |
tree | ef097317b1214ddc84dc966f229be071a0a14c99 | |
parent | resurrect apt-mirror (diff) | |
download | superposition-7e0245ba0117df53702508ba93c298fb9f8a1134.tar.gz superposition-7e0245ba0117df53702508ba93c298fb9f8a1134.tar.bz2 superposition-7e0245ba0117df53702508ba93c298fb9f8a1134.zip |
resurrect asm
Signed-off-by: Philip Miess <Philip_Miess@yahoo.com>
-rw-r--r-- | dev-java/asm/Manifest | 3 | ||||
-rw-r--r-- | dev-java/asm/asm-9.4.ebuild | 90 | ||||
-rw-r--r-- | dev-java/asm/metadata.xml | 30 |
3 files changed, 123 insertions, 0 deletions
diff --git a/dev-java/asm/Manifest b/dev-java/asm/Manifest new file mode 100644 index 0000000..69315c8 --- /dev/null +++ b/dev-java/asm/Manifest @@ -0,0 +1,3 @@ +DIST asm-ASM_9_4.tar.bz2 1380417 BLAKE2B 612fc6669294f2926ec77522f642f2878a96a9c977579ceda9feb955041ff53fa698c75b26c27bae478a41dca59357d9cf824263df39d60ea5c6722e5f0efc75 SHA512 a59268808ac54a238bd6e117eb0164d28c5c3572c12d7ad42c2f3dbd32714c03056f330255756511db4f1ede8d66bf32c7347128b8ec179beba11cca27927687 +EBUILD asm-9.4.ebuild 2363 BLAKE2B 36b4ba331468998e388a6d240c99d0c195cee271c135f8180cdaebdce6546a6837c4a1533333889aee4dec0352dbc883de936d86bea6c80477e616c01cdd3b57 SHA512 2ead6c41436c36bc9011963a74d2fac092ffc22e31ca9cf7f5d5fcbfe05754223d3ca88f2bea77b4c72c3ef610978a23b525513e16b1d6e151a4590aad6889b4 +MISC metadata.xml 1233 BLAKE2B 13faf251d3d40ed558c83262972ea106892cc3be0f7a1b95a0b484123d93473bd867b2f7b53c3e5ccc2f1fe249ebe66cb9e757e19ad36c8d3e3eac6a7a981d98 SHA512 59a292291ac757818e41d009e2cdbb73b6d914c1f552c34e9360635cb468f1ebfdf9c58d6642710d5218689d08797320102c8ccb6d5f4bc9478883feb9b9b397 diff --git a/dev-java/asm/asm-9.4.ebuild b/dev-java/asm/asm-9.4.ebuild new file mode 100644 index 0000000..b7a5d43 --- /dev/null +++ b/dev-java/asm/asm-9.4.ebuild @@ -0,0 +1,90 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +# No tests because: +# package org.junit.jupiter.api does not exist +# package org.junit.jupiter.params does not exist +JAVA_PKG_IUSE="doc source" +MAVEN_PROVIDES="org.ow2.asm:asm-bom:9.4 org.ow2.asm:asm:9.4" + +inherit java-pkg-2 java-pkg-simple + +DESCRIPTION="Bytecode manipulation framework for Java" +HOMEPAGE="https://asm.ow2.io" +MY_P="ASM_${PV//./_}" +SRC_URI="https://gitlab.ow2.org/asm/asm/-/archive/${MY_P}/asm-${MY_P}.tar.bz2" + +LICENSE="BSD" +SLOT="9" +KEYWORDS="amd64 ~arm arm64 ppc64 x86 ~x64-macos" + +DEPEND=">=virtual/jdk-11:*" +RDEPEND=">=virtual/jre-1.8:*" + +ASM_MODULES=( "asm" "asm-tree" "asm-analysis" "asm-commons" "asm-util" ) + +S="${WORKDIR}/asm-${MY_P}" + +src_prepare() { + default + local module + touch "${T}/asm.module" || die + for module in "${ASM_MODULES[@]}"; do + module=${module/-/.} + cat > ${module/./-}/src/main/java/module-info.java <<-EOF || die + open module org.objectweb.${module/analysis/tree.analysis} { + $(cat ${T}/asm.module) + requires java.base; + exports org.objectweb.${module/analysis/tree.analysis}; + } + EOF + echo "requires transitive org.objectweb.${module/analysis/tree.analysis};" \ + >> "${T}/asm.module" || die + done + sed -e '/^$/d' \ + -e '/asm;/p;s:\(asm\)\(;\):\1.signature\2:' \ + -i asm/src/main/java/module-info.java || die + sed -e '/analysis/d' \ + -i asm-commons/src/main/java/module-info.java || die + sed -e '/commons/d' \ + -i asm-util/src/main/java/module-info.java || die +} + +src_compile() { + local module + for module in "${ASM_MODULES[@]}"; do + einfo "Compiling ${module}" + JAVA_JAR_FILENAME="${module}.jar" + JAVA_SRC_DIR="${module}/src/main/java" + java-pkg-simple_src_compile + JAVA_GENTOO_CLASSPATH_EXTRA+=":${module}.jar" + rm -r target || die + done + + if use doc; then + einfo "Compiling javadocs" + JAVA_JAR_FILENAME="ignoreme.jar" + JAVA_SRC_DIR=() + for module in "${ASM_MODULES[@]}"; do + rm "${module}/src/main/java/module-info.java" || die + JAVA_SRC_DIR+=("${module}/src/main/java") + done + java-pkg-simple_src_compile + fi +} + +src_install() { + local module + for module in "${ASM_MODULES[@]}"; do + java-pkg_dojar ${module}.jar + if use source; then + java-pkg_dosrc "${module}/src/main/java/*" + fi + done + if use doc; then + java-pkg_dojavadoc target/api + fi + default +} diff --git a/dev-java/asm/metadata.xml b/dev-java/asm/metadata.xml new file mode 100644 index 0000000..930ec62 --- /dev/null +++ b/dev-java/asm/metadata.xml @@ -0,0 +1,30 @@ +<?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> + <name>Java</name> + </maintainer> + <maintainer type="person" proxied="yes"> + <email>kaiboma06@gmail.com</email> + <name>Kaibo Ma</name> + </maintainer> + <longdescription> + ASM is a Java bytecode manipulation framework. It can be used to + dynamically generate stub classes or other proxy classes, directly in + binary form, or to dynamically modify classes at load time, i.e., just + before they are loaded into the Java Virtual Machine. + + ASM offers similar functionalities as BCEL or SERP, but is much more + smaller (25KB instead of 350KB for BCEL and 150KB for SERP) and faster + than these tools (the overhead of a load time class transformation is of + the order of 60% with ASM, 700% or more with BCEL, and 1100% or more + with SERP). Indeed ASM was designed to be used in a dynamic way* and was + therefore designed and implemented to be as small and as fast as + possible. + </longdescription> + <upstream> + <doc>https://asm.ow2.io/documentation.html</doc> + <bugs-to>https://gitlab.ow2.org/asm/asm/-/issues</bugs-to> + </upstream> +</pkgmetadata> |