summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Spencer <nobbutl@yahoo.co.uk>2010-05-12 23:31:24 +0200
committerDavid Somero <xgizzmo@slackbuilds.org>2010-05-12 23:31:24 +0200
commit95aaf7eae42814f6ce8a130015012d5b6354b875 (patch)
tree41745e133732bf66c2410ec82652cf48322b6cb6
parente6111e0ea9e4a5625489fc7788304b91215672d2 (diff)
downloadslackbuilds-95aaf7eae42814f6ce8a130015012d5b6354b875.tar.gz
libraries/rxtx: Added to 12.2 repository
-rw-r--r--libraries/rxtx/README9
-rw-r--r--libraries/rxtx/rxtx.SlackBuild89
-rw-r--r--libraries/rxtx/rxtx.info8
-rw-r--r--libraries/rxtx/rxtx.patch94
-rw-r--r--libraries/rxtx/slack-desc12
5 files changed, 212 insertions, 0 deletions
diff --git a/libraries/rxtx/README b/libraries/rxtx/README
new file mode 100644
index 0000000000..6bb2800c28
--- /dev/null
+++ b/libraries/rxtx/README
@@ -0,0 +1,9 @@
+RXTX is a Java library providing serial and parallel port communication.
+
+Note: this is an obsolete version of RXTX intended for use with JMRI
+(available at SlackBuilds.org). It is not necessarily suitable for use
+with other applications.
+
+To build RXTX requires the jdk package (available in Slackware's extra/
+directory) and javacomm (available at SlackBuilds.org). To run RXTX
+requires javacomm but not jdk.
diff --git a/libraries/rxtx/rxtx.SlackBuild b/libraries/rxtx/rxtx.SlackBuild
new file mode 100644
index 0000000000..18accd19ee
--- /dev/null
+++ b/libraries/rxtx/rxtx.SlackBuild
@@ -0,0 +1,89 @@
+#!/bin/sh
+
+# Slackware build script for rxtx
+# Written by David Spencer <nobbutl@yahoo.co.uk>
+# This script is dedicated to the public domain
+
+PRGNAM=rxtx
+VERSION=2.0_7pre2
+ARCH=${ARCH:-i486}
+BUILD=${BUILD:-2}
+TAG=${TAG:-_SBo}
+
+SRCVER=$(echo $VERSION | sed 's/_/-/')
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+fi
+
+# Let's make sure that jdk is installed and the relevant environment variables
+# are set correctly (we need JAVA_HOME):
+if [ -r /etc/profile.d/jdk.sh ]; then
+ . /etc/profile.d/jdk.sh
+else
+ echo "JDK does not appear to be installed; exiting..."
+ exit 1
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$SRCVER
+tar xvf $CWD/$PRGNAM-$SRCVER.tar.gz
+cd $PRGNAM-$SRCVER
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+# Patch JDK and kernel version tests, and add DESTDIR support
+cat $CWD/rxtx.patch | patch -p1
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --libdir=/usr/lib${LIBDIRSUFFIX}
+
+make
+make install DESTDIR=$PKG
+
+( cd $PKG
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null || true
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null
+)
+
+mkdir -p $PKG/$JAVA_HOME/lib/
+cat << EOF > $PKG/$JAVA_HOME/lib/javax.comm.properties
+Driver=gnu.io.RXTXCommDriver
+EOF
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a \
+ AUTHORS COPYING ChangeLog INSTALL PORTING README README.JRE \
+ SerialPortInstructions.txt TODO \
+ $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz
diff --git a/libraries/rxtx/rxtx.info b/libraries/rxtx/rxtx.info
new file mode 100644
index 0000000000..a4d3736f4f
--- /dev/null
+++ b/libraries/rxtx/rxtx.info
@@ -0,0 +1,8 @@
+PRGNAM="rxtx"
+VERSION="2.0_7pre2"
+HOMEPAGE="http://users.frii.com/jarvi/rxtx/"
+DOWNLOAD="ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre2.tar.gz"
+MD5SUM="43127b18cb2e06684100b400d4b8263e"
+MAINTAINER="David Spencer"
+EMAIL="nobbutl@yahoo.co.uk"
+APPROVED="dsomero"
diff --git a/libraries/rxtx/rxtx.patch b/libraries/rxtx/rxtx.patch
new file mode 100644
index 0000000000..ddd5178ec3
--- /dev/null
+++ b/libraries/rxtx/rxtx.patch
@@ -0,0 +1,94 @@
+diff -u -r rxtx-2.0-7pre2_original/Makefile.in rxtx-2.0-7pre2_patched/Makefile.in
+--- rxtx-2.0-7pre2_original/Makefile.in 2004-04-15 08:07:57.000000000 +0100
++++ rxtx-2.0-7pre2_patched/Makefile.in 2009-02-21 16:46:13.000000000 +0000
+@@ -442,13 +442,15 @@
+ # install librxtxSerial.so into the proper directory and copy $(JARTARGET) to its
+ # proper location
+ install: all
++ $(INSTALL_PROGRAM) -d $(DESTDIR)$(RXTX_PATH)
+ @$(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) -d $(DESTDIR)$(JHOME)
++ $(INSTALL_DATA) $(JARTARGET) $(DESTDIR)$(JHOME)/
+
+ clean-generic:
+ rm -rf $(DEST) $(TOP)/$(CLASSTOP)
+diff -u -r rxtx-2.0-7pre2_original/configure rxtx-2.0-7pre2_patched/configure
+--- rxtx-2.0-7pre2_original/configure 2005-01-17 18:52:47.000000000 +0000
++++ rxtx-2.0-7pre2_patched/configure 2009-02-21 16:46:53.000000000 +0000
+@@ -10066,10 +10066,10 @@
+ fi
+ if test -d $JPATH/share/kaffe/
+ then fix_comm_jar $JPATH/share/kaffe/comm.jar
+-elif test -d $JPATH/jre/lib/ext
+- then fix_comm_jar $JPATH/jre/lib/ext/comm.jar
+ elif test -d $JPATH/lib/ext
+ then fix_comm_jar $JPATH/lib/ext/comm.jar
++elif test -d $JPATH/jre/lib/ext
++ then fix_comm_jar $JPATH/jre/lib/ext/comm.jar
+ elif test -d $JPATH/lib
+ then fix_comm_jar $JPATH/lib/comm.jar
+ fi
+@@ -10079,13 +10079,16 @@
+ case $OS_NAME in
+ Linux)
+ LDFLAGS=-lpthread
+- check_kernel_headers
+ check_java_headers
+ CFLAGS=$CFLAGS" -D__need_timespec"
+ case $JAVA_VERSION in
+
++ 1.6*)
++ CLASSPATH=".:\$(TOP):\$(TOP)/src:"`find $JPATH/ -name comm.jar |head -n1`
++ JHOME=$JPATH"/lib/ext"
++ RXTX_PATH="\$(JPATH)/lib/\$(OS_ARCH)"
++ ;;
+ 1.2*|1.3*|1.4*|1.5*)
+- fix_parameters $JPATH/jre/lib/javax.comm.properties
+ CLASSPATH=".:\$(TOP):\$(TOP)/src:"`find $JPATH/ -name comm.jar |head -n1`
+ JHOME=$JPATH"/jre/lib/ext"
+ RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)"
+diff -u -r rxtx-2.0-7pre2_original/src/SerialImp.c rxtx-2.0-7pre2_patched/src/SerialImp.c
+--- rxtx-2.0-7pre2_original/src/SerialImp.c 2005-01-17 17:48:41.000000000 +0000
++++ rxtx-2.0-7pre2_patched/src/SerialImp.c 2009-02-21 16:46:13.000000000 +0000
+@@ -295,6 +295,7 @@
+ gettimeofday (&seloop, NULL);
+ #endif /* DEBUG_TIMING */
+ #if defined(DEBUG) && defined(__linux__)
++#if 0
+ /* Lets let people who upgraded kernels know they may have problems */
+ if (uname (&name) == -1)
+ {
+@@ -310,6 +311,7 @@
+ getchar ();
+ }
+ LEAVE ("RXTXPort:Initialize");
++#endif
+ #endif /* DEBUG && __linux__ */
+ }
+
+diff -u -r rxtx-2.0-7pre2_original/src/SerialImp.cpp rxtx-2.0-7pre2_patched/src/SerialImp.cpp
+--- rxtx-2.0-7pre2_original/src/SerialImp.cpp 2003-10-17 11:11:08.000000000 +0100
++++ rxtx-2.0-7pre2_patched/src/SerialImp.cpp 2009-02-21 16:46:13.000000000 +0000
+@@ -130,6 +130,7 @@
+ if( !handler.sa_handler ) signal( SIGIO, SIG_IGN );
+ #endif /* !__FreeBSD__ */
+ #ifdef DEBUG
++#if 0
+ /* Lets let people who upgraded kernels know they may have problems */
+ if (uname (&name) == -1)
+ {
+@@ -142,6 +143,7 @@
+ name.release);
+ getchar();
+ }
++#endif
+ #endif /* DEBUG */
+ #endif /* __BEOS__ */
+ #endif /* WIN32 */
diff --git a/libraries/rxtx/slack-desc b/libraries/rxtx/slack-desc
new file mode 100644
index 0000000000..6958eba2ae
--- /dev/null
+++ b/libraries/rxtx/slack-desc
@@ -0,0 +1,12 @@
+ |-----handy-ruler------------------------------------------------------|
+rxtx: rxtx (Java library for serial and parallel communication)
+rxtx:
+rxtx: RXTX is a Java library providing serial and parallel communication
+rxtx: for the Java Development Toolkit (JDK).
+rxtx:
+rxtx: Homepage: http://users.frii.com/jarvi/rxtx/
+rxtx:
+rxtx:
+rxtx:
+rxtx:
+rxtx: