Package: service-wrapper-java

Version: 3.5.51

Severity: wishlist

Tags: patch

User: debian-de...@lists.debian.org

Usertags: loongarch64

Dear Maintainers,

I hope this email finds you well. We would like to add service-wrapper-java build support for loong64.

I copy Makefile-linux-arm-64.make to Makefile-linux-loongarch64-64.make and build success.

The patch is in the attachment and the changes is very simple.

Thank you for your time and consideration of this request.

Sincerely,

Xuefeng Pan



diff --git a/changelog b/changelog
index 280e04a..80db063 100644
--- a/changelog
+++ b/changelog
@@ -1,3 +1,9 @@
+service-wrapper-java (3.5.51-2) unstable; urgency=medium
+
+  * Add LoongArch support
+
+ -- Xuefeng Pan <panxuef...@loongson.cn>  Tue, 26 Sep 2023 20:39:48 +0800
+
 service-wrapper-java (3.5.51-1) unstable; urgency=medium
 
   * Team upload
diff --git a/patches/loongarch64-support.patch b/patches/loongarch64-support.patch
new file mode 100644
index 0000000..84b794d
--- /dev/null
+++ b/patches/loongarch64-support.patch
@@ -0,0 +1,56 @@
+diff --git a/src/c/Makefile-linux-loongarch64-64.make b/src/c/Makefile-linux-loongarch64-64.make
+new file mode 100644
+index 0000000..6dbcdf7
+--- /dev/null
++++ b/src/c/Makefile-linux-loongarch64-64.make
+@@ -0,0 +1,50 @@
++# Copyright (c) 1999, 2022 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
++
++COMPILE = gcc -g -O3 -fPIC -Wall --pedantic -DLINUX -D_FORTIFY_SOURCE=2 -DJSW64 -D_FILE_OFFSET_BITS=64 -fpic -D_GNU_SOURCE -DUNICODE -D_UNICODE
++
++WRAPPER_LINK_OPTS = -Wl,-z,relro,-z,now
++
++INCLUDE=$(JAVA_HOME)/include
++
++DEFS = -I$(INCLUDE) -I$(INCLUDE)/linux
++
++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)
++	$(COMPILE) $(WRAPPER_LINK_OPTS) -pthread $(wrapper_SOURCE) -lm -o $(BIN)/wrapper
++
++libwrapper.so: $(libwrapper_so_OBJECTS)
++	${COMPILE} -shared $(libwrapper_so_OBJECTS) -o $(LIB)/libwrapper.so
++
++%.o: %.c
++	@echo '$(COMPILE) -c $<'; \
++	$(COMPILE) -pthread $(DEFS) -Wp,-MD,.deps/$(*F).pp -c $<
++	@-cp .deps/$(*F).pp .deps/$(*F).P; \
++	tr ' ' '\012' < .deps/$(*F).pp \
++	| sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
++	>> .deps/$(*F).P; \
++	rm .deps/$(*F).pp
diff --git a/patches/series b/patches/series
index d12affa..4e51ca9 100644
--- a/patches/series
+++ b/patches/series
@@ -4,3 +4,4 @@
 fix-as-needed-ppc.patch
 building_with_debug_symbols.patch
 riscv64-support.patch
+loongarch64-support.patch

Reply via email to