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
|
Description: supporting kfreebsd
Author: Kill Your TV <killyourtv@i2pmail.org>
Forwarded: support@tanukisoftware.com
Last-Update: 2022-06-08
--- a/build.xml
+++ b/build.xml
@@ -92,6 +92,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="unixware">
<equals arg1="${os.name}" arg2="UNIX_SV"/>
</condition>
@@ -222,7 +225,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
@@ -73,7 +73,7 @@
#include <sys/errno.h>
#include <sys/fcntl.h>
#elif defined(AIX) || defined(HPUX) || defined(MACOSX)
- #elif defined(FREEBSD)
+ #elif defined(FREEBSD) || defined(KFREEBSD)
#include <sys/param.h>
#include <errno.h>
#else /* LINUX */
--- a/src/c/wrapper.c
+++ b/src/c/wrapper.c
@@ -105,7 +105,7 @@
#include <sys/errno.h>
#include <sys/fcntl.h>
#elif defined(AIX) || defined(HPUX) || defined(MACOSX)
- #elif defined(FREEBSD)
+ #elif defined(FREEBSD) || defined(KFREEBSD)
#include <sys/param.h>
#include <errno.h>
#else /* LINUX */
@@ -6609,7 +6609,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)
@@ -8356,6 +8356,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
|