Add aarch64 support. okay?
Index: Makefile
===================================================================
RCS file: /cvs/ports/net/i2p/Makefile,v
retrieving revision 1.8
diff -u -p -u -r1.8 Makefile
--- Makefile 19 May 2021 01:50:30 -0000 1.8
+++ Makefile 20 May 2021 13:50:23 -0000
@@ -11,6 +11,7 @@ GH_ACCOUNT= i2p
GH_PROJECT= i2p.i2p
GH_COMMIT= 5d5e6fa3c2365f6c9956d3691d620eb5797091f8
DISTNAME= i2p-0.9.49
+REVISION= 0
CATEGORIES= net
@@ -41,11 +42,17 @@ BITS=64
BITS=32
.endif
+.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64"
+PKG_ARGS+= -Dx86=1
+.else
+PKG_ARGS+= -Dx86=0
+.endif
+
DB_DIR= ${LOCALSTATEDIR}/i2p
SUBST_VARS= DB_DIR JAVA_HOME
-MAKE_ENV= CC=${CC} BITS=${BITS}
+MAKE_ENV= CC=${CC} BITS=${BITS} MACHINE_ARCH=${MACHINE_ARCH}
# test requires addition dependencies (atleast: junit, hamcrest, jmockfit)
NO_TEST= Yes
@@ -69,8 +76,10 @@ do-install:
.for dir in lib webapps docs eepsite geoip certificates
cp -Rp ${WRKSRC}/pkg-temp/${dir} ${PREFIX}/share/i2p
.endfor
+.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64"
cp ${WRKSRC}/core/c/t/freenet/support/CPUInformation/libjcpuid*.so \
${PREFIX}/share/i2p/lib/libjcpuid.so
+.endif
cp ${WRKSRC}/core/c/t/libjbigi.so ${PREFIX}/share/i2p/lib
rm -rf ${PREFIX}/share/i2p/lib/{wrapper,wrapper.jar}
Index: patches/patch-core_c_build_sh
===================================================================
RCS file: /cvs/ports/net/i2p/patches/patch-core_c_build_sh,v
retrieving revision 1.1
diff -u -p -u -r1.1 patch-core_c_build_sh
--- patches/patch-core_c_build_sh 23 Nov 2020 14:40:26 -0000 1.1
+++ patches/patch-core_c_build_sh 20 May 2021 13:50:23 -0000
@@ -1,17 +1,24 @@
$OpenBSD: patch-core_c_build_sh,v 1.1 2020/11/23 14:40:26 sthen Exp $
-fix jar location
+fix jar location and jcpuid is x86 only
Index: core/c/build.sh
--- core/c/build.sh.orig
+++ core/c/build.sh
-@@ -1,4 +1,4 @@
+@@ -1,14 +1,16 @@
-#!/bin/sh
+#!/bin/sh -e
(cd jcpuid ; sh build.sh ; cd ..)
(cd jbigi ; sh build.sh ; cd ..)
-@@ -9,6 +9,6 @@ cp jcpuid/lib/freenet/support/CPUInformation/*jcpuid*
+
+-mkdir -p t/freenet/support/CPUInformation/
+-cp jcpuid/lib/freenet/support/CPUInformation/*jcpuid*
t/freenet/support/CPUInformation/
++if [ "${MACHINE_ARCH}" == "i386" -o "${MACHINE_ARCH}" == "amd64" ] ; then
++ mkdir -p t/freenet/support/CPUInformation/
++ cp jcpuid/lib/freenet/support/CPUInformation/*jcpuid*
t/freenet/support/CPUInformation/
++fi
+
mkdir -p t/net/i2p/util/
cp jbigi/lib/*jbigi* t/
Index: pkg/PFRAG.x86
===================================================================
RCS file: pkg/PFRAG.x86
diff -N pkg/PFRAG.x86
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ pkg/PFRAG.x86 20 May 2021 13:50:23 -0000
@@ -0,0 +1,2 @@
+@comment $OpenBSD: PFRAG.x86,v$
+@so share/i2p/lib/libjcpuid.so
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/net/i2p/pkg/PLIST,v
retrieving revision 1.4
diff -u -p -u -r1.4 PLIST
--- pkg/PLIST 5 Mar 2021 20:52:23 -0000 1.4
+++ pkg/PLIST 20 May 2021 13:50:23 -0000
@@ -414,7 +414,6 @@ share/i2p/lib/jetty-xml.jar
share/i2p/lib/jrobin.jar
share/i2p/lib/jstl.jar
@so share/i2p/lib/libjbigi.so
-@so share/i2p/lib/libjcpuid.so
share/i2p/lib/mstreaming.jar
share/i2p/lib/org.mortbay.jetty.jar
share/i2p/lib/org.mortbay.jmx.jar
@@ -433,3 +432,4 @@ share/i2p/webapps/routerconsole.war
share/i2p/webapps/susidns.war
share/i2p/webapps/susimail.war
share/i2p/wrapper.config
+%%x86%%