summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2012-09-26 16:51:19 -0400
committerLuke Shumaker <LukeShu@sbcglobal.net>2012-09-26 16:59:39 -0400
commite6450f3c0b59d3b51886f62d4fbd28ce66ec769a (patch)
tree96bdb1ca1ac89cc8f114adcd46799a48b6a2a6c6
parentad1725db924d8330ec3c9cd738f214f51fbc4504 (diff)
downloadabslibre-e6450f3c0b59d3b51886f62d4fbd28ce66ec769a.tar.gz
abslibre-e6450f3c0b59d3b51886f62d4fbd28ce66ec769a.tar.bz2
abslibre-e6450f3c0b59d3b51886f62d4fbd28ce66ec769a.zip
add java/java-rxtx, a dependency of arduino
-rw-r--r--java/java-rxtx/ChangeLog.txt8
-rw-r--r--java/java-rxtx/PKGBUILD54
-rw-r--r--java/java-rxtx/destdir.patch20
-rw-r--r--java/java-rxtx/java7-configure.patch38
4 files changed, 120 insertions, 0 deletions
diff --git a/java/java-rxtx/ChangeLog.txt b/java/java-rxtx/ChangeLog.txt
new file mode 100644
index 000000000..7efab2514
--- /dev/null
+++ b/java/java-rxtx/ChangeLog.txt
@@ -0,0 +1,8 @@
+Differences from rxtx-2.1-7r2 made by Arduino:
+ * Adding support for /dev/ttyACM* devices on Linux.
+ * Fixing (I hope) problems on 64-bit Linux systems.
+ * Adding checks for Java 1.6.
+ * Removing unnecessary compiler warning.
+
+Differences from Arduino's version:
+ * Adding checks for Java 1.7.
diff --git a/java/java-rxtx/PKGBUILD b/java/java-rxtx/PKGBUILD
new file mode 100644
index 000000000..30ed25967
--- /dev/null
+++ b/java/java-rxtx/PKGBUILD
@@ -0,0 +1,54 @@
+# Maintainer (Parabola): Luke Shumaker <lukeshu@sbcglobal.net>
+# Maintainer (AUR): PyroPeter <googlemail.com@abi1789>
+
+pkgname=java-rxtx
+_pkgver=2.1-7r2-arduino4
+_gitver='commit=a8cd90f8505d7c472b57550b1192fe67885dd638'
+pkgver=${_pkgver//-/.}
+
+pkgrel=1
+pkgdesc="A native library providing serial and parallel communication for Java"
+arch=('i686' 'x86_64')
+depends=('java-environment')
+
+case "$_pkgver" in
+ *arduino*)
+ url="https://github.com/arduino/RXTX"
+ source=("git://github.com/arduino/RXTX.git#${_gitver}"
+ java7-configure.patch
+ destdir.patch)
+ license=(LGPL)
+ changelog=ChangeLog.txt
+ _dirname=RXTX
+ ;;
+ *)
+ url="http://rxtx.qbang.org/"
+ source=("http://rxtx.qbang.org/pub/rxtx/rxtx-${_pkgver}.zip"
+ destdir.patch)
+ # Todo: patch for Java 6 AND Java 7
+ license=('custom:LGPL-with-java-exception')
+ _dirname=rxtx-{$_pkgver}
+ ;;
+esac
+
+build() {
+ cd "$srcdir/$_dirname"
+ . /etc/profile.d/jdk.sh
+
+ patch -i "$srcdir/java7-configure.patch"
+ patch -i "$srcdir/destdir.patch"
+
+ ./configure --prefix=/usr
+ make
+}
+
+package() {
+ cd "$srcdir/$_dirname"
+ . /etc/profile.d/jdk.sh
+
+ make DESTDIR="$pkgdir" install
+}
+
+md5sums=('SKIP'
+ 'f07bc244660852dd9b016c190e38e1c9'
+ '90be9bdf1d8cbe5304739df066559a13')
diff --git a/java/java-rxtx/destdir.patch b/java/java-rxtx/destdir.patch
new file mode 100644
index 000000000..11416841f
--- /dev/null
+++ b/java/java-rxtx/destdir.patch
@@ -0,0 +1,20 @@
+--- Makefile.in.orig 2012-09-21 15:21:00.000000000 -0400
++++ Makefile.in 2012-09-21 15:21:07.000000000 -0400
+@@ -566,13 +566,15 @@
+ # install librxtxSerial.so into the proper directory and copy $(JARTARGET) to its
+ # proper location
+ install: all
++ $(mkinstalldirs) $(DESTDIR)$(RXTX_PATH)
++ $(mkinstalldirs) $(DESTDIR)$(JHOME)
+ @$(LIBTOOL_INST) \
+ `for i in $(TARGETLIB);do \
+ if [ -f $$i ];then \
+ echo $$i; \
+ fi; \
+- done` $(RXTX_PATH)
+- $(INSTALL_PROGRAM) $(JARTARGET) $(JHOME)/
++ done` $(DESTDIR)$(RXTX_PATH)
++ $(INSTALL_PROGRAM) $(JARTARGET) $(DESTDIR)$(JHOME)/
+
+ clean-generic:
+ rm -rf $(DEST) $(TOP)/$(CLASSTOP)
diff --git a/java/java-rxtx/java7-configure.patch b/java/java-rxtx/java7-configure.patch
new file mode 100644
index 000000000..fed710200
--- /dev/null
+++ b/java/java-rxtx/java7-configure.patch
@@ -0,0 +1,38 @@
+--- configure.orig 2012-09-21 15:02:54.000000000 -0400
++++ configure 2012-09-21 15:03:38.000000000 -0400
+@@ -21541,7 +21541,7 @@
+ CFLAGS=$CFLAGS" -D__need_timespec"
+ case $JAVA_VERSION in
+
+- 1.2*|1.3*|1.4*|1.5*|1.6*)
++ 1.2*|1.3*|1.4*|1.5*|1.6*|1.7*)
+ #fix_parameters $JPATH/jre/lib/javax.comm.properties
+ CLASSPATH=".:\$(TOP):\$(TOP)/src:"`find $JPATH/ -name RXTXcomm.jar |head -n1`
+ JHOME=$JPATH"/jre/lib/ext"
+@@ -21611,7 +21611,7 @@
+ TARGETLIB="\$(target_triplet)/librxtxSerial.la \
+ \$(target_triplet)/librxtxParallel.la"
+ case $JAVA_VERSION in
+- 1.2*|1.3*|1.4*|1.5*|1.6*)
++ 1.2*|1.3*|1.4*|1.5*|1.6*|1.7*)
+ #fix_parameters $JPATH/jre/lib/javax.comm.properties
+ CLASSPATH=".:\$(TOP):\$(TOP)/src:"`find $JPATH/ -name RXTXcomm.jar |head -n1`
+ RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)"
+@@ -21747,7 +21747,7 @@
+
+ WIN32)
+ case $JAVA_VERSION in
+- 1.2*|1.3*|1.4*|1.5*|1.6*)
++ 1.2*|1.3*|1.4*|1.5*|1.6*|1.7*)
+ CLASSPATH=".:\$(TOP):\$(TOP)/src:`find $JPATH/ -name RXTXcomm.jar |head -n1`:$CLASSPATH"
+ JHOME=$JPATH"/jre/lib/ext"
+ ;;
+@@ -21799,7 +21799,7 @@
+ CLASSPATH=".:\$(TOP):\$(TOP)/src:\$(JPATH)/lib/classes.zip:\$(JPATH)/lib/RXTXcomm.jar:$CLASSPATH"
+
+ case $JAVA_VERSION in
+- 1.2*|1.3*|1.4*|1.5*|1.6*)
++ 1.2*|1.3*|1.4*|1.5*|1.6*|1.7*)
+ RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)"
+ ;;
+ 1.1*)