Add support for sparc64. okay?

Index: Makefile
===================================================================
RCS file: /cvs/ports/java/tanukiwrapper/Makefile,v
retrieving revision 1.21
diff -u -p -u -r1.21 Makefile
--- Makefile    21 May 2021 11:51:08 -0000      1.21
+++ Makefile    16 Jul 2021 14:22:36 -0000
@@ -5,7 +5,7 @@ COMMENT=        Tanuki Java Service Wrapper
 V=             3.5.45
 DISTNAME=      wrapper_${V}_src
 PKGNAME=       java-tanukiwrapper-${V}
-REVISION=      0
+REVISION=      1
 CATEGORIES=    java
 
 HOMEPAGE=      https://wrapper.tanukisoftware.com/
@@ -23,13 +23,18 @@ MODJAVA_BUILD=      ant
 
 .if ${MACHINE_ARCH} == "i386"
 BITS=32
+.else
+BITS=64
+.endif
+
+.if ${MACHINE_ARCH} == "i386"
 MAKE_ARCH=x86-32
 .elif ${MACHINE_ARCH} == "amd64"
-BITS=64
 MAKE_ARCH=x86-64
 .elif ${MACHINE_ARCH} == "aarch64"
-BITS=64
 MAKE_ARCH=armhf-64
+.elif ${MACHINE_ARCH} == "sparc64"
+MAKE_ARCH=sparc-64
 .endif
 
 MODJAVA_BUILD_ARGS= -Dbits=${BITS}
Index: files/Makefile-openbsd-sparc-64.gmake
===================================================================
RCS file: files/Makefile-openbsd-sparc-64.gmake
diff -N files/Makefile-openbsd-sparc-64.gmake
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ files/Makefile-openbsd-sparc-64.gmake       16 Jul 2021 14:22:36 -0000
@@ -0,0 +1,42 @@
+# Copyright (c) 1999, 2013 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 = ${CC} -Wall -fPIC -pedantic -DOPENBSD -DJSW64 -I${LOCALBASE}/include 
-L${LOCALBASE}/lib -liconv -DUNICODE -D_UNICODE
+
+INCLUDE=$(JAVA_HOME)/include
+
+CFLAGS = ${CFLAGS} -I$(INCLUDE) -I$(INCLUDE)/openbsd
+
+wrapper_SOURCE = wrapper.c wrapperinfo.c wrappereventloop.c wrapper_unix.c 
property.c logger.c logger_file.c wrapper_file.c wrapper_i18n.c 
wrapper_hashmap.c wrapper_ulimit.c wrapper_encoding.c wrapper_jvminfo.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 -rdynamic -lc -pthread -o $(BIN)/wrapper
+
+libwrapper.so: $(libwrapper_so_OBJECTS)
+       $(CC) -shared -rdynamic -lc -pthread $(libwrapper_so_OBJECTS) -o 
$(LIB)/libwrapper.so
+
+#%.o: %.c
+#      $(COMPILE) -c $(DEFS) $<
Index: patches/patch-build-tests_xml
===================================================================
RCS file: /cvs/ports/java/tanukiwrapper/patches/patch-build-tests_xml,v
retrieving revision 1.3
diff -u -p -u -r1.3 patch-build-tests_xml
--- patches/patch-build-tests_xml       4 Nov 2020 20:45:00 -0000       1.3
+++ patches/patch-build-tests_xml       16 Jul 2021 14:22:36 -0000
@@ -2,9 +2,10 @@ $OpenBSD: patch-build-tests_xml,v 1.3 20
 
 add OpenBSD target
 
---- build-tests.xml.orig       Fri Jul 31 18:04:03 2020
-+++ build-tests.xml    Fri Jul 31 18:04:58 2020
-@@ -114,11 +114,15 @@
+Index: build-tests.xml
+--- build-tests.xml.orig
++++ build-tests.xml
+@@ -85,11 +85,15 @@
          <property name="is.Unix" value="true"/>
          <property name="is.shell.sh" value="true"/>
      </target>
Index: patches/patch-build_xml
===================================================================
RCS file: /cvs/ports/java/tanukiwrapper/patches/patch-build_xml,v
retrieving revision 1.3
diff -u -p -u -r1.3 patch-build_xml
--- patches/patch-build_xml     4 Nov 2020 20:45:00 -0000       1.3
+++ patches/patch-build_xml     16 Jul 2021 14:22:36 -0000
@@ -2,9 +2,10 @@ $OpenBSD: patch-build_xml,v 1.3 2020/11/
 
 define OpenBSD property
 
---- build.xml.orig     Fri Jul 31 18:06:35 2020
-+++ build.xml  Fri Jul 31 18:10:16 2020
-@@ -83,6 +83,9 @@
+Index: build.xml
+--- build.xml.orig
++++ build.xml
+@@ -98,6 +98,9 @@
          <condition property="dist.os" value="os400">
              <equals arg1="${os.name}" arg2="OS/400"/>
          </condition>
@@ -14,7 +15,7 @@ define OpenBSD property
          <property name="dist.os" value="${os.name}"/>
          
          <!-- Resolve an architecture to use in release names. -->
-@@ -386,6 +389,7 @@
+@@ -421,6 +424,7 @@
          <condition property="make.name" value="gmake">
              <or>
                  <isset property="is.freebsd"/>
@@ -22,7 +23,7 @@ define OpenBSD property
                  <isset property="is.solaris"/>
              </or>
          </condition>
-@@ -403,6 +407,7 @@
+@@ -438,6 +442,7 @@
              <or>
                  <isset property="is.linux"/>
                  <isset property="is.freebsd"/>
@@ -30,12 +31,14 @@ define OpenBSD property
                  <isset property="is.solaris"/>
              </or>
          </condition>
-@@ -1823,6 +1828,8 @@ wrapper.filter.action.999=NONE]]></replacevalue>
+@@ -1881,6 +1886,10 @@ wrapper.filter.action.999=NONE]]></replacevalue>
          <release-delta-extract-platform osname="linux"   osarch="armel"     
bits="32" wrapperbinhead="wrapper" wrapperbintail=""     
wrapperlibhead="libwrapper" wrapperlibtail=".so"     archivetype="tar.gz"/>
          <release-delta-extract-platform osname="linux"   osarch="armhf"     
bits="32" wrapperbinhead="wrapper" wrapperbintail=""     
wrapperlibhead="libwrapper" wrapperlibtail=".so"     archivetype="tar.gz"/>
          <release-delta-extract-platform osname="linux"   osarch="armhf"     
bits="64" wrapperbinhead="wrapper" wrapperbintail=""     
wrapperlibhead="libwrapper" wrapperlibtail=".so"     archivetype="tar.gz"/>
 +        <release-delta-extract-platform osname="openbsd"   osarch="x86"     
bits="32" wrapperbinhead="wrapper" wrapperbintail=""     
wrapperlibhead="libwrapper" wrapperlibtail=".so"     archivetype="tar.gz"/>
 +        <release-delta-extract-platform osname="openbsd"   osarch="x86"     
bits="64" wrapperbinhead="wrapper" wrapperbintail=""     
wrapperlibhead="libwrapper" wrapperlibtail=".so"     archivetype="tar.gz"/>
++        <release-delta-extract-platform osname="openbsd"   osarch="armhf"   
bits="64" wrapperbinhead="wrapper" wrapperbintail=""     
wrapperlibhead="libwrapper" wrapperlibtail=".so"     archivetype="tar.gz"/>
++        <release-delta-extract-platform osname="openbsd"   osarch="sparc"   
bits="64" wrapperbinhead="wrapper" wrapperbintail=""     
wrapperlibhead="libwrapper" wrapperlibtail=".so"     archivetype="tar.gz"/>
      </target>
      <target name="release-delta" depends="pre-release:check, 
release-delta:init, release-delta:extract-platforms">
          <property name="deltareleasefile" 
value="wrapper-delta-pack-${version}"/>
Index: patches/patch-src_c_wrapper_c
===================================================================
RCS file: /cvs/ports/java/tanukiwrapper/patches/patch-src_c_wrapper_c,v
retrieving revision 1.3
diff -u -p -u -r1.3 patch-src_c_wrapper_c
--- patches/patch-src_c_wrapper_c       4 Nov 2020 20:45:00 -0000       1.3
+++ patches/patch-src_c_wrapper_c       16 Jul 2021 14:22:36 -0000
@@ -2,8 +2,9 @@ $OpenBSD: patch-src_c_wrapper_c,v 1.3 20
 
 add OpenBSD support
 
---- src/c/wrapper.c.orig       Thu Mar  5 09:25:57 2020
-+++ src/c/wrapper.c    Fri Jul 31 18:32:51 2020
+Index: src/c/wrapper.c
+--- src/c/wrapper.c.orig
++++ src/c/wrapper.c
 @@ -104,7 +104,7 @@
    #include <sys/errno.h>
    #include <sys/fcntl.h>
@@ -13,7 +14,7 @@ add OpenBSD support
    #include <sys/param.h>
    #include <errno.h>
   #else /* LINUX */
-@@ -5784,7 +5784,7 @@ int wrapperRunCommonInner() {
+@@ -5885,7 +5885,7 @@ int wrapperRunCommonInner() {
          tz1 = tzname[0];
          tz2 = tzname[1];
  #endif
@@ -22,7 +23,7 @@ add OpenBSD support
                  log_printf(WRAPPER_SOURCE_WRAPPER, LEVEL_DEBUG, 
TEXT("Timezone:     %s (%s) Offset: %ld, hasDaylight: %d"),
                          tz1, tz2, timezone, daylight);
  #else
-@@ -6454,7 +6454,7 @@ int checkIfBinary(const TCHAR *filename) {
+@@ -6560,7 +6560,7 @@ int checkIfBinary(const TCHAR *filename) {
              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]);
          }
  
@@ -31,7 +32,7 @@ add OpenBSD support
          if (head[1] == 'E' && head[2] == 'L' && head[3] == 'F') {
              return 1; /*ELF */
  #elif defined(AIX)
-@@ -7882,7 +7882,7 @@ int wrapperBuildJavaCommandArrayInner(TCHAR **strings,
+@@ -8226,7 +8226,7 @@ int wrapperBuildJavaCommandArrayInner(TCHAR **strings,
  
      /* See if the auto bits parameter is set.  Ignored by all but the 
following platforms. */
  
@@ -40,7 +41,7 @@ add OpenBSD support
  
      if (wrapperData->javaVersion->major < 9) {
          if (getBooleanProperty(properties,
-@@ -7897,6 +7897,8 @@ int wrapperBuildJavaCommandArrayInner(TCHAR **strings,
+@@ -8241,6 +8241,8 @@ int wrapperBuildJavaCommandArrayInner(TCHAR **strings,
                                
TEXT("wrapper.java.additional.auto_bits.solaris"),
  #elif defined(FREEBSD)
                                
TEXT("wrapper.java.additional.auto_bits.freebsd"),

Reply via email to