summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Le Cuirot <chewi@gentoo.org>2015-04-13 22:21:44 +0000
committerJames Le Cuirot <chewi@gentoo.org>2015-04-13 22:21:44 +0000
commit12aa3ecc80c297773840543bd38b3fd08715f718 (patch)
tree0a8eb74ffd05823a019a202fd5b56a96decbb76e /dev-java/jinput
parentRemove old. (diff)
downloadhistorical-12aa3ecc80c297773840543bd38b3fd08715f718.tar.gz
historical-12aa3ecc80c297773840543bd38b3fd08715f718.tar.bz2
historical-12aa3ecc80c297773840543bd38b3fd08715f718.zip
Migrating from java-overlay. Required by LWJGL, the key library used
by several games. Starting at r1 to deal with the missing jutils SLOT in the overlay version. Package-Manager: portage-2.2.18/cvs/Linux x86_64 Manifest-Sign-Key: 0x9C6D7DE4
Diffstat (limited to 'dev-java/jinput')
-rw-r--r--dev-java/jinput/ChangeLog12
-rw-r--r--dev-java/jinput/Manifest30
-rw-r--r--dev-java/jinput/files/javah-classpath.patch10
-rw-r--r--dev-java/jinput/files/nostrip.patch12
-rw-r--r--dev-java/jinput/files/remove-getDeviceUsageBits.patch90
-rw-r--r--dev-java/jinput/files/unbundle.patch10
-rw-r--r--dev-java/jinput/jinput-2.0.6-r1.ebuild51
-rw-r--r--dev-java/jinput/metadata.xml6
8 files changed, 221 insertions, 0 deletions
diff --git a/dev-java/jinput/ChangeLog b/dev-java/jinput/ChangeLog
new file mode 100644
index 000000000000..3277dc0c1fac
--- /dev/null
+++ b/dev-java/jinput/ChangeLog
@@ -0,0 +1,12 @@
+# ChangeLog for dev-java/jinput
+# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-java/jinput/ChangeLog,v 1.1 2015/04/13 22:21:38 chewi Exp $
+
+*jinput-2.0.6-r1 (13 Apr 2015)
+
+ 13 Apr 2015; James Le Cuirot <chewi@gentoo.org> +files/javah-classpath.patch,
+ +files/nostrip.patch, +files/remove-getDeviceUsageBits.patch,
+ +files/unbundle.patch, +jinput-2.0.6-r1.ebuild, +metadata.xml:
+ Migrating from java-overlay. Required by LWJGL, the key library used by
+ several games. Starting at r1 to deal with the missing jutils SLOT in the
+ overlay version.
diff --git a/dev-java/jinput/Manifest b/dev-java/jinput/Manifest
new file mode 100644
index 000000000000..562fb65ff74d
--- /dev/null
+++ b/dev-java/jinput/Manifest
@@ -0,0 +1,30 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA256
+
+AUX javah-classpath.patch 469 SHA256 7653b41686f8cea84aa926cc58b796ef3b9474f3208116043026f61779e9f7a5 SHA512 a10b34e593980e24e0d9dbf0419cdacdb9c03059b54d3a811f3dadc8838d223cc3e4800feeb1ad0cf3b65d75117a0dbc7061740b40e051c683c4180a323bc916 WHIRLPOOL ff7806ee4a1e5cda6fba848b6bf5d05ad3af91d9e064b0d12936a1eb6e708e559215a18a6b3f0bfb0e120ba175f78479e6757b5341286b05ec6268a733525713
+AUX nostrip.patch 431 SHA256 f9c1622eb8795429cea8aa91f5f30ab829cadd50215f1f4214bc67d81371c1fe SHA512 0f1cccfef58afca9c1db074ae179bc9d06c0ae758a859671e362c229279d2b3c570356ca2e06bd319f1ba6674f601f4fd15479adf1e1410779a52eec9e1172c9 WHIRLPOOL 5ea4f713e84b9ac2100e86fd9d30ce0f70daf04d41d0e7cdc8dbad0aede1f4efda554d20ed17e3fd87085b06ce1637600e24c1e796bc99cc7b8a3167a9ac04bb
+AUX remove-getDeviceUsageBits.patch 4109 SHA256 25cc77c93bc82689ed7f78934c245551a88d3a2fa2d8f4b90174964491e6295d SHA512 e5d5a2c4715b00a08b909965079fffb2a0797a0a762481c76135692a66f208bc86b7610db525ed82997c90bb5c70f590ba1062833c00104b86112b0a1e0d6176 WHIRLPOOL bd7cd28a387ccae991bf54d94a20229d2d19c00f5ae1fb71d47b12bc7c62a2cb2f25b9e6f89904a8b53689ae34313ec5ae0c0754b075766140f94b42ddcac30f
+AUX unbundle.patch 354 SHA256 70ff37191145a870738e4753e9b81c8a7e43820865be26e8d3f8d4f57fd79e44 SHA512 99d933a2bf501fe209df2bdfe8dbc0f756b78715c322f6f4c605e40b96aa3773cb8592c52ac2d752e720245bbb310e7bcf52409e97a74e06175f3c995a55454e WHIRLPOOL 887840f774dd1aeec353ef965879bfe6a7fbfc96383cd0d9201e0426a0d390a915b77617bdafff5ca1c41483fcb9378eec5fa8cfaccba6dc0370fa5dafc9395e
+DIST jinput-2.0.6.tar.gz 1590738 SHA256 220f5cb5c9ab8d3fdce4429393f1cba4fb47f835c5cfb9a982292709d39b02f4 SHA512 770b3a0724334b9182098797923cc11e575b42cb67c5583d8aac7aeb432ec80189199daf1ef624a56923c4ecce271f05adf0481c13b8cd6997bb1862a7a91eba WHIRLPOOL 04e487510976980891b588c56be2245bce8d13145579f192761621c2b43511060c7a06fcbc3baf27f3ab31a55d735d0fa66bc0c3e2bdb068032014f118743bd0
+EBUILD jinput-2.0.6-r1.ebuild 1363 SHA256 c47d5fe3599a73a0c5abd96cc78f0d1902b5727550d29e28387046217a021013 SHA512 6d930c3a0fa72fd5d8a5fa6fae6a8f38dd320f47490bad327eb2a693b67d6f33495071330b68410571485ee7ddbf842d3033262aefa6c2196b9861f9048e3ee4 WHIRLPOOL ed14c1b1d3591c0b623372f1074c07e7f42ece4c751d2f17e5345fad95b35bf7ea1b5c92cbc29e1c4a4944bf666fca3e03c0e07133bd01d98098aa40d00a52bb
+MISC ChangeLog 612 SHA256 a70858e4e5502d12372691223375f0a6bc78bf0e21bd358917751aafc1b73cce SHA512 c22a88737921a28cd0945d3708036673122043ddcbfffe861102e230c1f124b371516aacdb27011c64e31575dac3f4b065a0b0bc2a22076211f8ecb19a4f975a WHIRLPOOL cf305246fa8ef4b2c2eb3377b3a302edf43c7071d4943ede0ad8f2d42252f31d5c9a77682cb300e3894a705a07cea46c2e872cb7ad2e686f522782032623eed2
+MISC metadata.xml 490 SHA256 eee7bae2253d6fd17957531cc2d0d8be9dd1cb80933431df322c5a0709b5076c SHA512 dd799685ff83e6cf4b661a79ef3f6a1037bfff36d674d59f7de14fd75bf2b2cd628b17355d5d7a7d805614289e385df18a8cd32f8cce74c98025519b5d3503ed WHIRLPOOL 730bce8488c24f1f42a017778ce05930c7162647f0c330afaca306621e1da5bea38ed9ac82897b5371923b3d3d590f478178f83d1860b3d2bcd772d14ad795f6
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2.0
+
+iQJ8BAEBCABmBQJVLEFzXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
+ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ1MjhERTZCRDg2OTFBNDM5MUZEQTJFRDQy
+MUM2MzIxMjlDNkQ3REU0AAoJECHGMhKcbX3klCwP/jWhzOCkUuvKQZVmbotCo7If
+xHBbeq/gxenzAZ+HB5R0BGhaEt25TI+0tMr0kIqtFQFfB4HfUneghQq902Y8WiLA
+bMYudvfIFq/FW1rKXFbRnH7tIG5F55xy1JqsTboFyKirJ5AClRf4PmgPRDh6NrXu
+CKzNQn34POwcLtTKUbIDszihRYDsCFH+YDyw/cXpQA48/0GMAOR5zQpRgLTnpp6x
+sp6fG05l7i9yUa9n0R9PReXcDYF/jd8G2bVTXD6RH1DubRlkDATOWRz0XhnO5U7C
+z3qHuzANgiddKeXguQdi6DLiDasVdwFmdf3yTJVXC8WOZTNfBziraQrWt9o2FFrS
+hHfQBcWvvEU4IRASwrW0F7PjeC4WnFURAPZizVY0oKV8Wo5FEsKucc6ukznDuYbD
+VHIeR6sk9YdUEw6Y16jNBWqm/SdctfHDsvXjV5rZLAMPfar11pm6v8rOh0cov+jF
+7ExdjBplI4PSwkAbOxYd0P+Y6KdFJK1RVkK4atLroV8Q1VsRNnA4TTWMRMdcmO9+
+KKsO9T4vB9/5Pjazhh6re6/GwOs61mH1YiVcrkyOqeKJ04EQAse3Zmig+mRVsGvt
+PbBUgy4GuJSxBrcU4DjgPDI8FrKSOq1jp+JQ2pyTebjylrJPRTOyx43Idy0CHdgM
+p+1Fjy57xSK/4PJwj4WP
+=RsR7
+-----END PGP SIGNATURE-----
diff --git a/dev-java/jinput/files/javah-classpath.patch b/dev-java/jinput/files/javah-classpath.patch
new file mode 100644
index 000000000000..ae90584691b8
--- /dev/null
+++ b/dev-java/jinput/files/javah-classpath.patch
@@ -0,0 +1,10 @@
+--- plugins/linux/build.xml.orig 2006-07-11 22:07:38.000000000 +0100
++++ plugins/linux/build.xml 2011-11-16 15:49:21.140789781 +0000
+@@ -56,6 +56,7 @@
+ <javah destdir="src/native">
+ <classpath>
+ <pathelement location="classes"/>
++ <pathelement location="../../coreAPI/classes"/>
+ </classpath>
+ <class name="net.java.games.input.LinuxEventDevice"/>
+ <class name="net.java.games.input.LinuxJoystickDevice"/>
diff --git a/dev-java/jinput/files/nostrip.patch b/dev-java/jinput/files/nostrip.patch
new file mode 100644
index 000000000000..8627c0d12251
--- /dev/null
+++ b/dev-java/jinput/files/nostrip.patch
@@ -0,0 +1,12 @@
+--- plugins/linux/src/native/build.xml.orig 2013-03-25 18:01:56.000000000 +0000
++++ plugins/linux/src/native/build.xml 2015-04-12 17:36:36.020105790 +0100
+@@ -46,9 +46,6 @@
+ <arg line="-shared -O2 -Wall -o ${libname}"/>
+ <fileset dir="." includes="*.o"/>
+ </apply>
+- <apply dir="." parallel="true" executable="strip" os="Linux" failonerror="true">
+- <fileset file="${libname}"/>
+- </apply>
+ </target>
+ </project>
+
diff --git a/dev-java/jinput/files/remove-getDeviceUsageBits.patch b/dev-java/jinput/files/remove-getDeviceUsageBits.patch
new file mode 100644
index 000000000000..038473d5ba00
--- /dev/null
+++ b/dev-java/jinput/files/remove-getDeviceUsageBits.patch
@@ -0,0 +1,90 @@
+From 3f8a5394be4cddfb5bec584170678aac0f28b763 Mon Sep 17 00:00:00 2001
+From: Endolf <endolf@java.net>
+Date: Fri, 22 Aug 2014 14:38:30 +0100
+Subject: [PATCH] Remove usage_bits call as it doesn't work on v3 kernels.
+
+---
+ .../net/java/games/input/LinuxEventDevice.java | 32 ----------------------
+ .../native/net_java_games_input_LinuxEventDevice.c | 14 ----------
+ 2 files changed, 46 deletions(-)
+
+diff --git a/plugins/linux/src/java/net/java/games/input/LinuxEventDevice.java b/plugins/linux/src/java/net/java/games/input/LinuxEventDevice.java
+index a28c4c7..41a4fee 100644
+--- a/plugins/linux/src/java/net/java/games/input/LinuxEventDevice.java
++++ b/plugins/linux/src/java/net/java/games/input/LinuxEventDevice.java
+@@ -94,34 +94,11 @@ private final static int countComponents(List components, Class id_type, boolean
+ }
+
+ private final Controller.Type guessType() throws IOException {
+- Controller.Type type_from_usages = guessTypeFromUsages();
+- if (type_from_usages == Controller.Type.UNKNOWN)
+- return guessTypeFromComponents();
+- else
+- return type_from_usages;
+- }
+-
+- private final Controller.Type guessTypeFromUsages() throws IOException {
+- byte[] usage_bits = getDeviceUsageBits();
+- if (isBitSet(usage_bits, NativeDefinitions.USAGE_MOUSE))
+- return Controller.Type.MOUSE;
+- else if (isBitSet(usage_bits, NativeDefinitions.USAGE_KEYBOARD))
+- return Controller.Type.KEYBOARD;
+- else if (isBitSet(usage_bits, NativeDefinitions.USAGE_GAMEPAD))
+- return Controller.Type.GAMEPAD;
+- else if (isBitSet(usage_bits, NativeDefinitions.USAGE_JOYSTICK))
+- return Controller.Type.STICK;
+- else
+- return Controller.Type.UNKNOWN;
+- }
+-
+- private final Controller.Type guessTypeFromComponents() throws IOException {
+ List components = getComponents();
+ if (components.size() == 0)
+ return Controller.Type.UNKNOWN;
+ int num_rel_axes = countComponents(components, Component.Identifier.Axis.class, true);
+ int num_abs_axes = countComponents(components, Component.Identifier.Axis.class, false);
+- int num_keys = countComponents(components, Component.Identifier.Key.class, false);
+ int mouse_traits = 0;
+ int keyboard_traits = 0;
+ int joystick_traits = 0;
+@@ -342,15 +319,6 @@ private final List getDeviceComponents() throws IOException {
+ }
+ private final static native void nGetBits(long fd, int ev_type, byte[] evtype_bits) throws IOException;
+
+- private final byte[] getDeviceUsageBits() throws IOException {
+- byte[] bits = new byte[NativeDefinitions.USAGE_MAX/8 + 1];
+- if (getVersion() >= 0x010001) {
+- nGetDeviceUsageBits(fd, bits);
+- }
+- return bits;
+- }
+- private final static native void nGetDeviceUsageBits(long fd, byte[] type_bits) throws IOException;
+-
+ public final synchronized void pollKeyStates() throws IOException {
+ nGetKeyStates(fd, key_states);
+ }
+diff --git a/plugins/linux/src/native/net_java_games_input_LinuxEventDevice.c b/plugins/linux/src/native/net_java_games_input_LinuxEventDevice.c
+index 90eff09..18913c2 100644
+--- a/plugins/linux/src/native/net_java_games_input_LinuxEventDevice.c
++++ b/plugins/linux/src/native/net_java_games_input_LinuxEventDevice.c
+@@ -112,20 +112,6 @@ JNIEXPORT jint JNICALL Java_net_java_games_input_LinuxEventDevice_nGetNumEffects
+ return num_effects;
+ }
+
+-JNIEXPORT void JNICALL Java_net_java_games_input_LinuxEventDevice_nGetDeviceUsageBits(JNIEnv *env, jclass unused, jlong fd_address, jbyteArray usages_array) {
+-#if EV_VERSION >= 0x010001
+- int fd = (int)fd_address;
+- jsize len = (*env)->GetArrayLength(env, usages_array);
+- jbyte *usages = (*env)->GetByteArrayElements(env, usages_array, NULL);
+- if (usages == NULL)
+- return;
+- int res = ioctl(fd, EVIOCGUSAGE(len), usages);
+- (*env)->ReleaseByteArrayElements(env, usages_array, usages, 0);
+- if (res == -1)
+- throwIOException(env, "Failed to get device usages (%d)\n", errno);
+-#endif
+-}
+-
+ JNIEXPORT void JNICALL Java_net_java_games_input_LinuxEventDevice_nGetBits(JNIEnv *env, jclass unused, jlong fd_address, jint evtype, jbyteArray bits_array) {
+ int fd = (int)fd_address;
+ jsize len = (*env)->GetArrayLength(env, bits_array);
diff --git a/dev-java/jinput/files/unbundle.patch b/dev-java/jinput/files/unbundle.patch
new file mode 100644
index 000000000000..1a8686308d71
--- /dev/null
+++ b/dev-java/jinput/files/unbundle.patch
@@ -0,0 +1,10 @@
+--- build.xml.orig 2013-03-25 18:01:56.000000000 +0000
++++ build.xml 2015-04-12 17:11:45.869203820 +0100
+@@ -137,7 +137,6 @@
+ <fileset dir="plugins/wintab/classes">
+ <include name="**/*.class"/>
+ </fileset>
+- <zipfileset src="lib/jutils.jar" includes="**/*.class"/>
+ <manifest>
+ <attribute name="Sealed" value="true"/>
+ </manifest>
diff --git a/dev-java/jinput/jinput-2.0.6-r1.ebuild b/dev-java/jinput/jinput-2.0.6-r1.ebuild
new file mode 100644
index 000000000000..6a97cbdeb6dc
--- /dev/null
+++ b/dev-java/jinput/jinput-2.0.6-r1.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-java/jinput/jinput-2.0.6-r1.ebuild,v 1.1 2015/04/13 22:21:38 chewi Exp $
+
+EAPI=5
+
+COMMIT="790b666"
+JAVA_PKG_IUSE="doc source"
+
+inherit eutils toolchain-funcs java-pkg-2 java-ant-2 vcs-snapshot
+
+DESCRIPTION="An implementation of an API for game controller discovery and polled input"
+HOMEPAGE="https://java.net/projects/jinput"
+SRC_URI="https://github.com/${PN}/${PN}/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+CDEPEND="dev-java/jutils:0"
+
+RDEPEND=">=virtual/jre-1.4
+ ${CDEPEND}"
+
+DEPEND=">=virtual/jdk-1.4
+ ${CDEPEND}"
+
+JAVA_PKG_BSFIX="off"
+EANT_BUILD_TARGET="dist"
+
+src_prepare() {
+ # http://java.net/jira/browse/JINPUT-44
+ # http://java.net/jira/browse/JINPUT-45
+ epatch "${FILESDIR}"/{javah-classpath,nostrip,remove-getDeviceUsageBits,unbundle}.patch
+
+ sed -i \
+ -e "s/\"cc\"/\"$(tc-getCC)\"/g" \
+ -e "s/-O[0-9]/${CFLAGS} ${LDFLAGS}/g" \
+ plugins/linux/src/native/build.xml || die
+
+ java-pkg_jar-from --into lib jutils
+}
+
+src_install() {
+ java-pkg_dojar dist/${PN}.jar
+ java-pkg_doso dist/lib${PN}-*.so
+
+ # Only core API docs, others would conflict.
+ use doc && java-pkg_dojavadoc coreAPI/apidocs
+ use source && java-pkg_dosrc */src/java/* */**/src/java/*
+}
diff --git a/dev-java/jinput/metadata.xml b/dev-java/jinput/metadata.xml
new file mode 100644
index 000000000000..352a387a3647
--- /dev/null
+++ b/dev-java/jinput/metadata.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>java</herd>
+ <longdescription>The JInput Project hosts an implementation of an API for game controller discovery and polled input. It is part of a suite of open-source technologies initiated by the Game Technology Group at Sun Microsystems with intention of making the development of high performance games in Java a reality.</longdescription>
+</pkgmetadata>