summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-java/jinput/jinput-2.0.6-r1.ebuild')
-rw-r--r--dev-java/jinput/jinput-2.0.6-r1.ebuild50
1 files changed, 50 insertions, 0 deletions
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 0000000..c86fa33
--- /dev/null
+++ b/dev-java/jinput/jinput-2.0.6-r1.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+COMMIT="790b666"
+JAVA_PKG_IUSE="doc source"
+
+inherit epatch 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/*
+}