diff options
author | 2023-03-25 13:16:23 -0400 | |
---|---|---|
committer | 2023-03-25 13:16:23 -0400 | |
commit | d31b13a4f0b64014decfbc30e7157629c0298d24 (patch) | |
tree | 45a7f361aaf70e9e7be9d41254d306b308ad55fa /dev-java | |
parent | update hash (diff) | |
download | superposition-d31b13a4f0b64014decfbc30e7157629c0298d24.tar.gz superposition-d31b13a4f0b64014decfbc30e7157629c0298d24.tar.bz2 superposition-d31b13a4f0b64014decfbc30e7157629c0298d24.zip |
restore lwjgl
Signed-off-by: Philip Miess <Philip_Miess@yahoo.com>
Diffstat (limited to 'dev-java')
-rw-r--r-- | dev-java/lwjgl/Manifest | 1 | ||||
-rw-r--r-- | dev-java/lwjgl/files/asm-4.patch | 53 | ||||
-rw-r--r-- | dev-java/lwjgl/lwjgl-2.9.3.ebuild | 85 | ||||
-rw-r--r-- | dev-java/lwjgl/metadata.xml | 15 |
4 files changed, 154 insertions, 0 deletions
diff --git a/dev-java/lwjgl/Manifest b/dev-java/lwjgl/Manifest new file mode 100644 index 0000000..d39eaf7 --- /dev/null +++ b/dev-java/lwjgl/Manifest @@ -0,0 +1 @@ +DIST lwjgl-source-2.9.3.zip 3183783 SHA256 098696a3752321979e6b1dc798c694d4d3daf64a71217ee8d7b04123b5b18a5a SHA512 271b1a5f3824265137bfab6144b4c4d28204051ef82a5ae5e08c05077710a70fd445b4778489ed1c18170d84b8a263e721bcd12d0f24e0c44f0b79444fa76f43 WHIRLPOOL a1d5dcf633bd8983cb8d37edaa8034196c78341628f93d7331b2efc8e56b3d8325ffddef181f21fe7642132184647c336eac670b6ffc98d17bad46f014c0b75a diff --git a/dev-java/lwjgl/files/asm-4.patch b/dev-java/lwjgl/files/asm-4.patch new file mode 100644 index 0000000..bd44e0d --- /dev/null +++ b/dev-java/lwjgl/files/asm-4.patch @@ -0,0 +1,53 @@ +From 80eda482aaac0baee4ab565544b14fd15e4b9701 Mon Sep 17 00:00:00 2001 +From: James Le Cuirot <chewi@aura-online.co.uk> +Date: Tue, 3 Mar 2015 19:52:05 +0000 +Subject: [PATCH] Compatibility with ASM 4 final instead of RC1 + +--- + src/java/org/lwjgl/util/mapped/MappedObjectTransformer.java | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/src/java/org/lwjgl/util/mapped/MappedObjectTransformer.java b/src/java/org/lwjgl/util/mapped/MappedObjectTransformer.java +index cf2aac8..c2bc9f9 100644 +--- a/src/java/org/lwjgl/util/mapped/MappedObjectTransformer.java ++++ b/src/java/org/lwjgl/util/mapped/MappedObjectTransformer.java +@@ -265,7 +265,7 @@ public class MappedObjectTransformer { + static byte[] transformMappedObject(byte[] bytecode) {
+ final ClassWriter cw = new ClassWriter(0);
+
+- ClassVisitor cv = new ClassAdapter(cw) {
++ ClassVisitor cv = new ClassVisitor(Opcodes.ASM4, cw) {
+
+ private final String[] DEFINALIZE_LIST = {
+ VIEWADDRESS_METHOD_NAME,
+@@ -322,8 +322,8 @@ public class MappedObjectTransformer { + return bytecode;
+ }
+
+- private static ClassAdapter getMethodGenAdapter(final String className, final ClassVisitor cv) {
+- return new ClassAdapter(cv) {
++ private static ClassVisitor getMethodGenAdapter(final String className, final ClassVisitor cv) {
++ return new ClassVisitor(Opcodes.ASM4, cv) {
+
+ @Override
+ public void visitEnd() {
+@@ -493,14 +493,14 @@ public class MappedObjectTransformer { + };
+ }
+
+- private static class TransformationAdapter extends ClassAdapter {
++ private static class TransformationAdapter extends ClassVisitor {
+
+ final String className;
+
+ boolean transformed;
+
+ TransformationAdapter(final ClassVisitor cv, final String className) {
+- super(cv);
++ super(Opcodes.ASM4, cv);
+ this.className = className;
+ }
+
+-- +2.0.4 + diff --git a/dev-java/lwjgl/lwjgl-2.9.3.ebuild b/dev-java/lwjgl/lwjgl-2.9.3.ebuild new file mode 100644 index 0000000..2b0271e --- /dev/null +++ b/dev-java/lwjgl/lwjgl-2.9.3.ebuild @@ -0,0 +1,85 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +JAVA_PKG_IUSE="doc source" + +inherit eutils java-pkg-2 java-ant-2 + +DESCRIPTION="The Lightweight Java Game Library (LWJGL)" +HOMEPAGE="http://www.lwjgl.org" +SRC_URI="mirror://sourceforge/java-game-lib/Official%20Releases/LWJGL%20${PV}/${PN}-source-${PV}.zip" +LICENSE="BSD" +SLOT="2.9" +KEYWORDS="~amd64 ~x86" +IUSE="gles" + +CDEPEND="dev-java/apple-java-extensions-bin:0 + dev-java/apt-mirror:0 + dev-java/asm:4 + dev-java/jinput:0 + dev-java/jutils:0 + x11-libs/libX11 + x11-libs/libXcursor + x11-libs/libXrandr + x11-libs/libXxf86vm + gles? ( media-libs/mesa[egl,gles2] )" + +DEPEND="${CDEPEND} + >=virtual/jdk-1.7 + x11-proto/xproto" + +RDEPEND="${CDEPEND} + >=virtual/jre-1.7 + media-libs/openal + virtual/opengl + x11-apps/xrandr" + +S="${WORKDIR}" + +JAVA_PKG_BSFIX_NAME="build.xml build-generator.xml" +JAVA_ANT_REWRITE_CLASSPATH="true" +EANT_GENTOO_CLASSPATH="apple-java-extensions-bin,apt-mirror,asm-4,jinput,jutils" + +java_prepare() { + # We don't want a prerelease in the tree. + epatch "${FILESDIR}/asm-4.patch" + + # This file is missing. + # Output separate JARs for GLES. + sed -i -r \ + -e "/build-updatesite\.xml/d" \ + -e '/<target name="-createjars_es">/,/<\/target>/s/lwjgl([^.]*\.jar)/lwjgles\1/g' \ + build.xml || die +} + +compile_native() { + # Their native build script sucks. + cd "${S}/src/native" || die + LIBRARY_PATH="$(java-config -g LDPATH)" gcc -shared -fPIC -std=c99 -pthread -Wall -Wl,--version-script=linux/${PN}.map -Wl,-z -Wl,defs ${CFLAGS} ${LDFLAGS} $(java-pkg_get-jni-cflags) -I{common,linux}{,/open$2} {common,linux}{,/open$2}/*.c generated/open{al,cl,$2}/*.c $3 -lm -lX11 -lXcursor -lXrandr -lXxf86vm -ljawt -ldl -o lib${PN%gl}$2$1.so || die +} + +src_compile() { + EANT_BUILD_TARGET="headers jars" + use gles && EANT_BUILD_TARGET+=" jars_es" + + # Build the JARs and headers. + java-pkg-2_src_compile + + # Add "64" for amd64. + local BITS= + use amd64 && BITS=64 + + compile_native "${BITS}" "gl" "" + use gles && compile_native "${BITS}" "gles" "-lEGL" +} + +src_install() { + java-pkg_dojar libs/${PN}*.jar + java-pkg_doso src/native/lib${PN}*.so + + use doc && java-pkg_dojavadoc doc/javadoc + use source && java-pkg_dosrc src/java/org +} diff --git a/dev-java/lwjgl/metadata.xml b/dev-java/lwjgl/metadata.xml new file mode 100644 index 0000000..7d1492c --- /dev/null +++ b/dev-java/lwjgl/metadata.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>java@gentoo.org</email> + <name>Java</name> + </maintainer> + <longdescription>The Lightweight Java Game Library (LWJGL) is a solution aimed directly at professional and amateur Java programmers alike to enable commercial quality games to be written in Java. LWJGL provides developers access to high performance crossplatform libraries such as OpenGL (Open Graphics Library) and OpenAL (Open Audio Library) allowing for state of the art 3D games and 3D sound.</longdescription> + <upstream> + <remote-id type="github">LWJGL/lwjgl</remote-id> + </upstream> + <use> + <flag name="gles">Build with OpenGL ES support as well as OpenGL support</flag> + </use> +</pkgmetadata> |