diff options
-rw-r--r-- | java/java-rxtx/0000-configure-java-version.patch | 93 | ||||
-rw-r--r-- | java/java-rxtx/0001-makefile-destdir.patch (renamed from java/java-rxtx/destdir.patch) | 7 | ||||
-rw-r--r-- | java/java-rxtx/0002-makefile-javadoc-dir.patch | 13 | ||||
-rw-r--r-- | java/java-rxtx/0003-lockdir-location.patch | 18 | ||||
-rw-r--r-- | java/java-rxtx/ChangeLog.txt | 8 | ||||
-rw-r--r-- | java/java-rxtx/GroupMembership.txt | 7 | ||||
-rw-r--r-- | java/java-rxtx/PKGBUILD | 83 | ||||
-rw-r--r-- | java/java-rxtx/java7-configure.patch | 38 |
8 files changed, 196 insertions, 71 deletions
diff --git a/java/java-rxtx/0000-configure-java-version.patch b/java/java-rxtx/0000-configure-java-version.patch new file mode 100644 index 000000000..c9e37258a --- /dev/null +++ b/java/java-rxtx/0000-configure-java-version.patch @@ -0,0 +1,93 @@ +Make the JAVA_VERSION checks future-proof (for Java 6 and 7) + +At this point Java is mature enough that support for older versions isn't +going to be dropped, so instead of having a growing list of new versions that +work by default, have a short list of old versions that need special measures. +--- RXTX.orig/configure.in 2012-10-29 01:13:58.000000000 -0400 ++++ RXTX/configure.in 2012-10-29 10:56:18.000000000 -0400 +@@ -463,12 +463,6 @@ + CFLAGS=$CFLAGS" -D__need_timespec" + case $JAVA_VERSION in + +- 1.2*|1.3*|1.4*|1.5*) +- #fix_parameters $JPATH/jre/lib/javax.comm.properties +- CLASSPATH=".:\$(TOP):\$(TOP)/src:"`find $JPATH/ -name RXTXcomm.jar |head -n1` +- JHOME=$JPATH"/jre/lib/ext" +- RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" +- ;; + 1.1*) + CLASSPATH=".:\$(TOP):\$(TOP)/src:"` \ + if [ -d $JPATH/share/kaffe/ ]; then +@@ -498,6 +492,12 @@ + JHOME=$JPATH/"lib" + fi + ;; ++ *) ++ #fix_parameters $JPATH/jre/lib/javax.comm.properties ++ CLASSPATH=".:\$(TOP):\$(TOP)/src:"`find $JPATH/ -name RXTXcomm.jar |head -n1` ++ JHOME=$JPATH"/jre/lib/ext" ++ RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" ++ ;; + esac + + # Cross Compilers +@@ -533,12 +533,6 @@ + TARGETLIB="\$(target_triplet)/librxtxSerial.la \ + \$(target_triplet)/librxtxParallel.la" + case $JAVA_VERSION in +- 1.2*|1.3*|1.4*|1.5*) +- #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)" +- JHOME=$JPATH/"jre/lib/ext" +- ;; + 1.1*) + check_prefix + #fix_parameters $JPATH/lib/javax.comm.properties +@@ -570,6 +564,10 @@ + JHOME=$JPATH/"lib" + ;; + *) ++ #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)" ++ JHOME=$JPATH/"jre/lib/ext" + ;; + esac + ;; +@@ -669,15 +667,15 @@ + + WIN32) + case $JAVA_VERSION in +- 1.2*|1.3*|1.4*|1.5*) +- CLASSPATH=".:\$(TOP):\$(TOP)/src:`find $JPATH/ -name RXTXcomm.jar |head -n1`:$CLASSPATH" +- JHOME=$JPATH"/jre/lib/ext" +- ;; + 1.1*) + CLASSPATH=".:\$(TOP):\$(TOP)/src:\$(JPATH)/lib/classes.zip:\$(JPATH)/lib/RXTXcomm.jar:$CLASSPATH" + RXTX_PATH="\$(prefix)/lib/" + JHOME=$JPATH/"lib" + ;; ++ *) ++ CLASSPATH=".:\$(TOP):\$(TOP)/src:`find $JPATH/ -name RXTXcomm.jar |head -n1`:$CLASSPATH" ++ JHOME=$JPATH"/jre/lib/ext" ++ ;; + esac + if test x$WIN32INCLUDE = x; then + echo "We need to know what directory the windows java include files" +@@ -721,12 +719,12 @@ + 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*) +- RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" +- ;; + 1.1*) + RXTX_PATH="\$(JPATH)/lib/" + ;; ++ *) ++ RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" ++ ;; + esac + ;; + diff --git a/java/java-rxtx/destdir.patch b/java/java-rxtx/0001-makefile-destdir.patch index 11416841f..944654ab6 100644 --- a/java/java-rxtx/destdir.patch +++ b/java/java-rxtx/0001-makefile-destdir.patch @@ -1,6 +1,7 @@ ---- 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 @@ +Add DESTDIR support to Makefile +--- RXTX.orig/Makefile.am ++++ RXTX/Makefile.am +@@ -81,13 +81,15 @@ # install librxtxSerial.so into the proper directory and copy $(JARTARGET) to its # proper location install: all diff --git a/java/java-rxtx/0002-makefile-javadoc-dir.patch b/java/java-rxtx/0002-makefile-javadoc-dir.patch new file mode 100644 index 000000000..9b4eb0692 --- /dev/null +++ b/java/java-rxtx/0002-makefile-javadoc-dir.patch @@ -0,0 +1,13 @@ +Place the Javadoc output in its own directory +--- RXTX.orig/Makefile.am ++++ RXTX/Makefile.am +@@ -99,7 +99,8 @@ + + # create the javadoc files. + docs: $(CLASSES) +- $(JAVADOC) $(javafiles) ++ mkdir javadoc ++ cd javadoc && $(JAVADOC) $(javafiles) + + ################ WIN32 CrossCompiling from here down ####################### + diff --git a/java/java-rxtx/0003-lockdir-location.patch b/java/java-rxtx/0003-lockdir-location.patch new file mode 100644 index 000000000..78a757f81 --- /dev/null +++ b/java/java-rxtx/0003-lockdir-location.patch @@ -0,0 +1,18 @@ +Fix the location of device lock files. + +Use the new semi-standard device lock file directory on GNU/Linux. This is +nescessary on (at least) Arch Linux and Parabola GNU/Linux. + +http://lists.freedesktop.org/archives/systemd-devel/2011-March/001823.html + +--- RXTX.orig/src/SerialImp.h ++++ RXTX/src/SerialImp.h +@@ -109,7 +109,7 @@ + /* Ports known on the OS */ + #if defined(__linux__) + # define DEVICEDIR "/dev/" +-# define LOCKDIR "/var/lock" ++# define LOCKDIR "/var/lock/lockdev" + # define LOCKFILEPREFIX "LCK.." + # define FHS + #endif /* __linux__ */ diff --git a/java/java-rxtx/ChangeLog.txt b/java/java-rxtx/ChangeLog.txt deleted file mode 100644 index 7efab2514..000000000 --- a/java/java-rxtx/ChangeLog.txt +++ /dev/null @@ -1,8 +0,0 @@ -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/GroupMembership.txt b/java/java-rxtx/GroupMembership.txt new file mode 100644 index 000000000..dd5c47076 --- /dev/null +++ b/java/java-rxtx/GroupMembership.txt @@ -0,0 +1,7 @@ +In order to use a program that makes use of rxtx, you must be a member +of the groups: + * uucp: for access to hardware devices in /dev + * lock: for access to hardware lockfiles in /var/lock/lockdev + +Most documentation indicates that you must be in one or the other, +depending on your distro; you must actually be in both. diff --git a/java/java-rxtx/PKGBUILD b/java/java-rxtx/PKGBUILD index 30ed25967..8d609f5ae 100644 --- a/java/java-rxtx/PKGBUILD +++ b/java/java-rxtx/PKGBUILD @@ -1,54 +1,93 @@ # 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 +#### + +pkgname=java-rxtx +pkgver=${_pkgver//-/.} pkgdesc="A native library providing serial and parallel communication for Java" +license=(LGPL2.1) + +pkgrel=2 arch=('i686' 'x86_64') -depends=('java-environment') +depends=('java-runtime') +makedepends=('java-environment' 'pacman>4.0.3') 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 + source=("git://github.com/arduino/RXTX.git#${_gitver}") + md5sums=('SKIP') _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') + source=("http://rxtx.qbang.org/pub/rxtx/rxtx-${_pkgver}.zip") + md5sums=('9290b4832d46199f8d798a531209640b') _dirname=rxtx-{$_pkgver} ;; esac +source+=( + 0000-configure-java-version.patch + 0001-makefile-destdir.patch + 0002-makefile-javadoc-dir.patch + 0003-lockdir-location.patch + GroupMembership.txt) + +md5sums+=('a36caaca717018341d69605f962d1c2a' + '39c88043032de742c6b51d90a26eee2c' + 'a910e0c75a9c687d2b2f782e3d9982e3' + '19b19c2514bce563be2a812888e1d9b4' + '9dc461eab358e3b78c4b688977997116') + +_MAKEFLAGS=('JHOME=/usr/share/java' 'RXTX_PATH=/usr/lib') + +_changelog() { + t="`echo -e '\t'`" + + # Parabola changes + ls "$srcdir"/*.patch | sort -r | while read file; do + echo "${file##*/}" + sed "1s/./$t$t&/;1q" "$file" + done + + # Arduino changes + if [[ -d "$srcdir/$_dirname/.git" ]]; then + pushd "$srcdir/$_dirname" > /dev/null + git log --pretty=format:"%h %ad%n$t$t%s" --date=short|head -n-2 + popd > /dev/null + fi + + # RXTX ChangeLog + grep "^[0-9 $t]" "$srcdir/$_dirname/ChangeLog" +} + build() { + _changelog > "$srcdir/ChangeLog.txt" cd "$srcdir/$_dirname" . /etc/profile.d/jdk.sh - patch -i "$srcdir/java7-configure.patch" - patch -i "$srcdir/destdir.patch" + patch -Np1 -i "$srcdir/0000-configure-java-version.patch" # requires autogen + patch -Np1 -i "$srcdir/0001-makefile-destdir.patch" # requires autogen + patch -Np1 -i "$srcdir/0002-makefile-javadoc-dir.patch" # requires autogen + patch -Np1 -i "$srcdir/0003-lockdir-location.patch" + rm *.m4 && ./autogen.sh ./configure --prefix=/usr - make + make "${_MAKEFLAGS[@]}" all docs } package() { cd "$srcdir/$_dirname" . /etc/profile.d/jdk.sh - make DESTDIR="$pkgdir" install -} + make "${_MAKEFLAGS[@]}" DESTDIR="$pkgdir" install -md5sums=('SKIP' - 'f07bc244660852dd9b016c190e38e1c9' - '90be9bdf1d8cbe5304739df066559a13') + install -d "$pkgdir/usr/share/doc/$pkgname/" + install -m644 "$srcdir/ChangeLog.txt" "$pkgdir/usr/share/doc/$pkgname/" + install -m644 "$srcdir/GroupMembership.txt" "$pkgdir/usr/share/doc/$pkgname/" + cp -r javadoc "$pkgdir/usr/share/doc/$pkgname/" +} diff --git a/java/java-rxtx/java7-configure.patch b/java/java-rxtx/java7-configure.patch deleted file mode 100644 index fed710200..000000000 --- a/java/java-rxtx/java7-configure.patch +++ /dev/null @@ -1,38 +0,0 @@ ---- 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*) |