On Mon, November 23, 2020 12:43, Stuart Henderson wrote: > On 2020/11/23 09:13, Dimitri Karamazov wrote: > >> 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. > > This script is not called in the build. > > > ??
/usr/obj/ports/i2p-0.9.47/i2p-0.9.47/core/c/build.sh[12]: jar: not found Native code built into jbigi.jar The above error is caused even on amd64, so I fix the jar location by making changes to ${WRKSRC}/core/c/build.sh which is called here. post-build: cd ${WRKSRC}/core/c && CC=${CC} BITS=${BITS} \ ${WRKSRC}/core/c/build.sh I didn't catch it earlier since JAVA_HOME was appended to PATH. I set MAKE_ENV employ it above, which is required to pass JAVA_HOME and CFLAGS. Could you elucidate on why the changes aren't necessary? I've added a mirror to MASTER_SITES. 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 13:39:56 -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 @@ -20,7 +20,8 @@ PERMIT_PACKAGE= Yes WANTLIB += gmp -MASTER_SITES= https://download.i2p2.de/releases/$V/ +MASTER_SITES= https://download.i2p2.de/releases/$V/ \ + https://launchpad.net/i2p/trunk/$V/+download/ MODULES= java MODJAVA_VER= 1.8 @@ -43,6 +44,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 +57,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 13:39:56 -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