Add support for aarch64 and fix i386 build. okay with maintainer Dimitri

Karamazov
This commit is contained in:
kurt 2021-05-21 11:51:08 +00:00
parent 453057f889
commit a2668f5781
3 changed files with 55 additions and 15 deletions

View File

@ -1,17 +1,11 @@
# $OpenBSD: Makefile,v 1.20 2021/01/06 13:30:22 solene Exp $
# would normally be set in java.port.mk, but i2p pulls in bsd.port.arch.mk
# itself which interferes with ONLY_FOR_ARCHS coming from MODULES.
# list is for jdk 1.8 arches.
ONLY_FOR_ARCHS= amd64 i386
BROKEN-i386= various relocation R_386_PC32 cannot be used against symbol XX
# $OpenBSD: Makefile,v 1.21 2021/05/21 11:51:08 kurt Exp $
COMMENT= Tanuki Java Service Wrapper
V= 3.5.45
DISTNAME= wrapper_${V}_src
PKGNAME= java-tanukiwrapper-${V}
REVISION= 0
CATEGORIES= java
HOMEPAGE= https://wrapper.tanukisoftware.com/
@ -27,11 +21,15 @@ MODULES= java
MODJAVA_VER= 1.8
MODJAVA_BUILD= ant
.include <bsd.port.arch.mk>
.if ${PROPERTIES:Mlp64}
BITS=64
.else
.if ${MACHINE_ARCH} == "i386"
BITS=32
MAKE_ARCH=x86-32
.elif ${MACHINE_ARCH} == "amd64"
BITS=64
MAKE_ARCH=x86-64
.elif ${MACHINE_ARCH} == "aarch64"
BITS=64
MAKE_ARCH=armhf-64
.endif
MODJAVA_BUILD_ARGS= -Dbits=${BITS}
@ -45,10 +43,10 @@ USE_GMAKE= Yes
SUBST_VARS+= CC CFLAGS
post-extract:
cp ${FILESDIR}/Makefile-openbsd-x86-${BITS}.gmake ${WRKSRC}/src/c/
cp ${FILESDIR}/Makefile-openbsd-${MAKE_ARCH}.gmake ${WRKSRC}/src/c/
pre-configure:
${SUBST_CMD} ${WRKSRC}/src/c/Makefile-openbsd-x86-${BITS}.gmake
${SUBST_CMD} ${WRKSRC}/src/c/Makefile-openbsd-${MAKE_ARCH}.gmake
do-install:
${INSTALL_DATA_DIR} ${PREFIX}/share/java/classes/ \

View File

@ -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) $<

View File

@ -7,7 +7,7 @@
# license agreement you entered into with Tanuki Software.
# http://wrapper.tanukisoftware.com/doc/english/licenseOverview.html
CC = ${CC} -Wall -pedantic -DOPENBSD -I${LOCALBASE}/include -L${LOCALBASE}/lib -liconv -DUNICODE -D_UNICODE
CC = ${CC} -Wall -fPIC -pedantic -DOPENBSD -I${LOCALBASE}/include -L${LOCALBASE}/lib -liconv -DUNICODE -D_UNICODE
INCLUDE=$(JAVA_HOME)/include