> On May 21, 2021, at 3:20 AM, Dimitri Karamazov <[email protected]> 
> wrote:
> 
> Do we need ONLY_FOR_ARCHS? It is already set in java.port.mk, no use of
> bsd.port.arch.mk which can mess it up either.
> 
> *Removed ONLY_FOR_ARCHS
> 
> I don't own any of these arch's to test but ports-wise okay.

Good catch, I committed it with that removed.

> On Thu, May 20, 2021 at 09:45:37AM -0400, [email protected] wrote:
>> Add support for aarch64 and fix i386 build. okay?
>> 
> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/java/tanukiwrapper/Makefile,v
> retrieving revision 1.20
> diff -u -p -r1.20 Makefile
> --- Makefile  6 Jan 2021 13:30:22 -0000       1.20
> +++ Makefile  21 May 2021 06:19:56 -0000
> @@ -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
> -
> 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/  \
> Index: files/Makefile-openbsd-armhf-64.gmake
> ===================================================================
> RCS file: files/Makefile-openbsd-armhf-64.gmake
> diff -N files/Makefile-openbsd-armhf-64.gmake
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ files/Makefile-openbsd-armhf-64.gmake     21 May 2021 06:19:56 -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: files/Makefile-openbsd-x86-32.gmake
> ===================================================================
> RCS file: /cvs/ports/java/tanukiwrapper/files/Makefile-openbsd-x86-32.gmake,v
> retrieving revision 1.5
> diff -u -p -r1.5 Makefile-openbsd-x86-32.gmake
> --- files/Makefile-openbsd-x86-32.gmake       4 Nov 2020 20:45:00 -0000       
> 1.5
> +++ files/Makefile-openbsd-x86-32.gmake       21 May 2021 06:19:56 -0000
> @@ -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
> 

Reply via email to