On Mon, November 23, 2020 08:05, Stuart Henderson wrote:
> On 2020/11/23 05:14, Dimitri Karamazov wrote:
>
>>>> /usr/obj/ports/i2p-0.9.47/i2p-0.9.47/core/c/build.sh
>>>> Building openbsd .sos
>>>> Please ensure you have a Java SDK installed
>>>> and/or set JAVA_HOME then re-run this script. ERROR: Cannot find jni.h!
>>>> Looked in "/include/jni.h" Please set
>>>> JAVA_HOME to a java home that has the JNI
>>>>
>> The error until this part is probably because of jdk11 being set as builddep,
>> even though it requires jdk1.8 as is defined in the Makefile
>
> Yes this is strange because the port shouldn't build on aarch64 at all
> (set by java.port.mk).
>
>
> $ cd /usr/ports/net/i2p; make show=ONLY_FOR_ARCHS
> i386 amd64
>
>>>> http://build-failures.rhaalovely.net/aarch64/2020-11-20/java/tanukiwrapper.log
>>>>
>
> same here
>
>
Don't know the reason for above, maybe one should check if the rest
of the ports with MODJAVA_VER=1.8 are compatible with version 11.
That could be the reason they didn't give out any errors.
Forgot to add REVISION bump.
The below changes are necessary, unless JAVA_HOME is manually appended to PATH
while building, not a thing to leave up to chance.
Index: Makefile
===================================================================
RCS file: /cvs/ports/net/i2p/Makefile,v
retrieving revision 1.3
diff -u -p -r1.3 Makefile
--- Makefile 5 Nov 2020 19:54:50 -0000 1.3
+++ Makefile 23 Nov 2020 09:00:04 -0000
@@ -6,7 +6,7 @@ V= 0.9.47
DISTNAME= i2psource_${V}
EXTRACT_SUFX= .tar.bz2
PKGNAME= i2p-${V}
-REVISION= 0
+REVISION= 1
CATEGORIES= net
@@ -43,6 +43,8 @@ DB_DIR= ${LOCALSTATEDIR}/i2p
SUBST_VARS= DB_DIR JAVA_HOME
+MAKE_ENV= CC=${CC} BITS=${BITS}
+
WRKDIST= ${WRKDIR}/${PKGNAME}
# test requires addition dependencies (atleast: junit, hamcrest, jmockfit)
@@ -54,8 +56,7 @@ post-patch:
${SUBST_CMD} ${WRKSRC}/installer/resources/eepget
post-build:
- cd ${WRKSRC}/core/c && CC=${CC} BITS=${BITS} \
- ${WRKSRC}/core/c/build.sh
+ cd ${WRKSRC}/core/c && ${MAKE_ENV} ${WRKSRC}/core/c/build.sh
do-install:
${INSTALL_DATA_DIR} ${PREFIX}/share/i2p
Index: patches/patch-core_c_build_sh
===================================================================
RCS file: patches/patch-core_c_build_sh
diff -N patches/patch-core_c_build_sh
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-core_c_build_sh 23 Nov 2020 09:00:04 -0000
@@ -0,0 +1,14 @@
+$OpenBSD$
+
+fix jar location
+
+--- core/c/build.sh.orig Mon Nov 23 09:30:07 2020
++++ core/c/build.sh Mon Nov 23 09:30:50 2020
+@@ -9,6 +9,6 @@ cp jcpuid/lib/freenet/support/CPUInformation/*jcpuid*
+ mkdir -p t/net/i2p/util/
+ cp jbigi/lib/*jbigi* t/
+
+-(cd t ; jar cf ../jbigi.jar . ; cd ..)
++(cd t ; ${JAVA_HOME}/bin/jar cf ../jbigi.jar . ; cd ..)
+
+ echo "Native code built into jbigi.jar"
regards,
Dimitri