File: 0002-kfreebsd-support.patch

package info (click to toggle)
service-wrapper-java 3.5.30-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 4,824 kB
  • sloc: ansic: 25,951; java: 14,530; xml: 3,955; sh: 1,976; cpp: 32; makefile: 23; php: 2
file content (166 lines) | stat: -rw-r--r-- 5,721 bytes parent folder | download | duplicates (2)
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
From: Kill Your TV <killyourtv@i2pmail.org>
Date: Sun, 18 Nov 2012 10:33:13 +0000
Subject: kfreebsd support

---
 build.xml                           |  5 ++++-
 src/c/Makefile-kfreebsd-x86-32.make | 42 +++++++++++++++++++++++++++++++++++++
 src/c/Makefile-kfreebsd-x86-64.make | 42 +++++++++++++++++++++++++++++++++++++
 src/c/logger.c                      |  3 ++-
 src/c/wrapper.c                     |  6 ++++--
 5 files changed, 94 insertions(+), 4 deletions(-)
 create mode 100644 src/c/Makefile-kfreebsd-x86-32.make
 create mode 100644 src/c/Makefile-kfreebsd-x86-64.make

--- a/build.xml
+++ b/build.xml
@@ -89,6 +89,9 @@
         <condition property="dist.os" value="freebsd">
             <equals arg1="${os.name}" arg2="FreeBSD"/>
         </condition>
+        <condition property="dist.os" value="kfreebsd">
+            <equals arg1="${os.name}" arg2="GNU/kFreeBSD"/>
+        </condition>
         <condition property="dist.os" value="irix">
             <equals arg1="${os.name}" arg2="Irix"/>
         </condition>
@@ -189,7 +192,7 @@
         
         <!-- Not all JVMs support the sun.arch.data.model property.  Default to 32-bit. -->
         <property name="sun.arch.data.model" value="32"/>
-        <condition property="bits-mismatch" value="true">
+        <condition property="bits-mismatch-DISABLED" value="true">
             <and>
                 <not>
                     <equals arg1="${sun.arch.data.model}" arg2="${bits}"/>
--- /dev/null
+++ b/src/c/Makefile-kfreebsd-x86-32.make
@@ -0,0 +1,42 @@
+# Copyright (c) 1999, 2012 Tanuki Software, Ltd.
+# http://www.tanukisoftware.com
+# All rights reserved.
+#
+# This software is the proprietary information of Tanuki Software.
+# You shall use it only in accordance with the terms of the
+# license agreement you entered into with Tanuki Software.
+# http://wrapper.tanukisoftware.com/doc/english/licenseOverview.html
+
+CC = gcc -Wall -pedantic -DKFREEBSD -fPIC -I/usr/include -L/usr/lib -DUNICODE -D_UNICODE
+
+INCLUDE=$(JAVA_HOME)/include
+
+CFLAGS = -I$(INCLUDE) -I$(INCLUDE)/freebsd
+
+wrapper_SOURCE = wrapper.c wrapperinfo.c wrappereventloop.c wrapper_unix.c property.c logger.c wrapper_file.c wrapper_i18n.c wrapper_hashmap.c
+
+libwrapper_so_OBJECTS = wrapper_i18n.o wrapperjni_unix.o wrapperinfo.o wrapperjni.o loggerjni.o
+
+BIN = ../../bin
+LIB = ../../lib
+
+all: init wrapper libwrapper.so
+
+clean:
+	rm -f *.o
+
+cleanall: clean
+	rm -rf *~ .deps
+	rm -f $(BIN)/wrapper $(LIB)/libwrapper.so
+
+init:
+	if test ! -d .deps; then mkdir .deps; fi
+
+wrapper: $(wrapper_SOURCE)
+	$(CC) $(wrapper_SOURCE) -lm -pthread $(LDFLAGS) -o $(BIN)/wrapper
+
+libwrapper.so: $(libwrapper_so_OBJECTS)
+	$(CC) -shared $(libwrapper_so_OBJECTS) $(LDFLAGS) -o $(LIB)/libwrapper.so
+
+#%.o: %.c
+#	$(COMPILE) -c $(DEFS) $<
--- /dev/null
+++ b/src/c/Makefile-kfreebsd-x86-64.make
@@ -0,0 +1,42 @@
+# Copyright (c) 1999, 2012 Tanuki Software, Ltd.
+# http://www.tanukisoftware.com
+# All rights reserved.
+#
+# This software is the proprietary information of Tanuki Software.
+# You shall use it only in accordance with the terms of the
+# license agreement you entered into with Tanuki Software.
+# http://wrapper.tanukisoftware.com/doc/english/licenseOverview.html
+
+CC = gcc -Wall -pedantic -DKFREEBSD -DJSW64 -fPIC -I/usr/include -L/usr/lib -DUNICODE -D_UNICODE
+
+INCLUDE=$(JAVA_HOME)/include
+
+CFLAGS = -I$(INCLUDE) -I$(INCLUDE)/freebsd
+
+wrapper_SOURCE = wrapper.c wrapperinfo.c wrappereventloop.c wrapper_unix.c property.c logger.c wrapper_file.c wrapper_i18n.c wrapper_hashmap.c
+
+libwrapper_so_OBJECTS = wrapper_i18n.o wrapperjni_unix.o wrapperinfo.o wrapperjni.o loggerjni.o
+
+BIN = ../../bin
+LIB = ../../lib
+
+all: init wrapper libwrapper.so
+
+clean:
+	rm -f *.o
+
+cleanall: clean
+	rm -rf *~ .deps
+	rm -f $(BIN)/wrapper $(LIB)/libwrapper.so
+
+init:
+	if test ! -d .deps; then mkdir .deps; fi
+
+wrapper: $(wrapper_SOURCE)
+	$(CC) $(wrapper_SOURCE) -lm -pthread $(LDFLAGS) -o $(BIN)/wrapper
+
+libwrapper.so: $(libwrapper_so_OBJECTS)
+	$(CC) -shared $(libwrapper_so_OBJECTS) $(LDFLAGS) -o $(LIB)/libwrapper.so
+
+#%.o: %.c
+#	$(COMPILE) -c $(DEFS) $<
--- a/src/c/logger.c
+++ b/src/c/logger.c
@@ -74,7 +74,8 @@
   #include <sys/fcntl.h>
  #elif defined(AIX) || defined(HPUX) || defined(MACOSX) || defined(OSF1)
  #elif defined(IRIX)
- #elif defined(FREEBSD)
+  #define PATH_MAX FILENAME_MAX
+ #elif defined(FREEBSD) || defined(KFREEBSD)
   #include <sys/param.h>
   #include <errno.h>
  #else /* LINUX */
--- a/src/c/wrapper.c
+++ b/src/c/wrapper.c
@@ -99,7 +99,7 @@
  #elif defined(AIX) || defined(HPUX) || defined(MACOSX) || defined(OSF1)
  #elif defined(IRIX)
   #define PATH_MAX FILENAME_MAX
- #elif defined(FREEBSD)
+ #elif defined(FREEBSD) || defined(KFREEBSD)
   #include <sys/param.h>
   #include <errno.h>
  #else /* LINUX */
@@ -5466,7 +5466,7 @@
             log_printf(WRAPPER_SOURCE_WRAPPER, LEVEL_DEBUG, TEXT("Magic number for file %s: 0x%02x%02x%02x%02x"), filename, head[0], head[1], head[2], head[3]);
         }
 
-#if defined(LINUX) || defined(FREEBSD) || defined(SOLARIS) 
+#if defined(LINUX) || defined(FREEBSD) || defined(KFREEBSD) || defined(SOLARIS)
         if (head[1] == 'E' && head[2] == 'L' && head[3] == 'F') {
             return 1; /*ELF */
 #elif defined(AIX)
@@ -6797,6 +6797,8 @@
                               TEXT("wrapper.java.additional.auto_bits.solaris"),
 #elif defined(FREEBSD)
                               TEXT("wrapper.java.additional.auto_bits.freebsd"),
+#elif defined(KFREEBSD)
+                              TEXT("wrapper.java.additional.auto_bits.kfreebsd"),
 #elif defined(MACOSX)
                               TEXT("wrapper.java.additional.auto_bits.macosx"),
 #endif