summaryrefslogtreecommitdiff
path: root/java/java-rxtx/0000-configure-java-version.patch
blob: c9e37258abf282e5a182aacdae4dcc85b81c0de4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
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
 ;;