On Thu, Dec 28, 2017 at 02:47:34PM +0100, Rubén Llorente wrote:
> * Version bumped to 2.17.0
> * Some old family and reseed certificates removed.
Good.
> * DISTFILE/WORKDIST/GH_* workarounds have been fixed.
It's GH_TAGNAME not GH_TAG and portcheck(1) does throw errors. With GH_*
there's no need for V, DISTNAME or DISTFILES at all.
> * Added README with comments regarding openfile limits.
> * Added a NO_TEST = Yes line.
i2pd has tests and you should use them.
> * Moved devel/boost to LIB_DEPEND only
I added the minimal requirements version.
> * Moved everything in post-install into do-install
That's good. I took the liberty to squash them a little further, what do
you say?
> Have fun testing the hell out of this.
$ mk test
===> Regression tests for i2pd-2.17.0
gmake -C /usr/obj/ports/i2pd-2.17.0/i2pd-2.17.0/tests
gmake: Entering directory
'/usr/obj/ports/i2pd-2.17.0/i2pd-2.17.0/tests'
g++ -Wall -Wextra -pedantic -O0 -g -std=c++11
-D_GLIBCXX_USE_NANOSLEEP=1 -I../libi2pd/ -pthread -o test-gost-sig
../libi2pd/Gost.cpp ../libi2pd/I2PEndian.cpp ../libi2pd/Signature.cpp
../libi2pd/Crypto.cpp ../libi2pd/Log.cpp test-gost-sig.cpp -lcrypto -lssl
-lboost_system
cc1plus: error: unrecognized command line option "-std=c++11"
cc1plus: error: unrecognized command line option "-std=c++11"
cc1plus: error: unrecognized command line option "-std=c++11"
cc1plus: error: unrecognized command line option "-std=c++11"
cc1plus: error: unrecognized command line option "-std=c++11"
cc1plus: error: unrecognized command line option "-std=c++11"
gmake: *** [Makefile:17: test-gost-sig] Error 1
gmake: Leaving directory '/usr/obj/ports/i2pd-2.17.0/i2pd-2.17.0/tests'
*** Error 2 in . (Makefile:44 'do-test')
*** Error 1 in . (/usr/ports/infrastructure/mk/bsd.port.mk:2771
'/usr/obj/ports/i2pd-2.17.0/.test_done')
*** Error 1 in /usr/ports/net/i2pd
(/usr/ports/infrastructure/mk/bsd.port.mk:2419 'test')
Tests need work, it's your turn again. I'd probably start with COMPILER
in bsd.port.mk(5) and work from there; hint: look at
https://i2pd.readthedocs.io/en/latest/devs/building/requirements/ .
The following diff applies to your latest tarball and incorporates my
feedback.
The order of variables throughout the Makefile is taken from
/usr/ports/infrastructure/templates/Makefile.template.
--- Makefile.orig Thu Dec 28 14:40:13 2017
+++ Makefile Thu Dec 28 21:06:44 2017
@@ -1,47 +1,46 @@
# $OpenBSD$
-V = 2.17.0
-DISTNAME = i2pd-${V}
-DISTFILES = i2pd-{}${V}${EXTRACT_SUFX}
+COMMENT = C++ port of the i2p router
+
+GH_ACCOUNT = PurpleI2P
+GH_PROJECT = i2pd
+GH_TAGNAME = 2.17.0
+
CATEGORIES = net
+
HOMEPAGE = http://i2pd.website
-COMMENT = C++ port of the i2p router
MAINTAINER = Ruben Llorente <[email protected]>
# BSD 3-clause
PERMIT_PACKAGE_CDROM = Yes
-GH_ACCOUNT = PurpleI2P
-GH_PROJECT = i2pd
-GH_TAG = ${V}
+WANTLIB += boost_date_time-mt boost_filesystem-mt
+WANTLIB += boost_program_options-mt boost_system-mt
+WANTLIB += ${COMPILER_LIBCXX} c crypto m ssl z
-WANTLIB = ${COMPILER_LIBCXX} boost_date_time boost_filesystem \
- boost_program_options boost_system c crypto m ssl z
-LIB_DEPENDS = devel/boost
+LIB_DEPENDS = devel/boost>=1.49
USE_GMAKE = Yes
-NO_TEST = Yes
-
SYSCONFDIR = ${VARBASE}/i2pd/.i2pd/
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/i2pd ${PREFIX}/bin
- ${INSTALL_DATA} ${WRKSRC}/libi2pd.a ${PREFIX}/lib
- ${INSTALL_DATA} ${WRKSRC}/libi2pdclient.a ${PREFIX}/lib
- ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/i2pd/certificates/family
- ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/i2pd/certificates/reseed
- ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/i2pd/certificates/router
- ${INSTALL_DATA} ${WRKSRC}/contrib/certificates/family/* \
- ${PREFIX}/share/examples/i2pd/certificates/family
- ${INSTALL_DATA} ${WRKSRC}/contrib/certificates/reseed/* \
- ${PREFIX}/share/examples/i2pd/certificates/reseed
- ${INSTALL_DATA} ${WRKSRC}/contrib/certificates/router/* \
- ${PREFIX}/share/examples/i2pd/certificates/router
- ${INSTALL_DATA} ${WRKSRC}/contrib/i2pd.conf \
- ${PREFIX}/share/examples/i2pd/i2pd.conf
- ${INSTALL_DATA} ${WRKSRC}/contrib/tunnels.conf \
- ${PREFIX}/share/examples/i2pd/tunnels.conf
+ ${INSTALL_DATA} ${WRKSRC}/libi2pd{,client}.a ${PREFIX}/lib
+
+.for _d in family reseed router
+ ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/i2pd/certificates/${_d}
+ ${INSTALL_DATA} ${WRKSRC}/contrib/certificates/${_d}/* \
+ ${PREFIX}/share/examples/i2pd/certificates/${_d}
+.endfor
+
+.for _f in i2pd.conf tunnels.conf
+ ${INSTALL_DATA} ${WRKSRC}/contrib/${_f} \
+ ${PREFIX}/share/examples/i2pd/${_f}
+.endfor
+
+do-test:
+ ${MAKE_PROGRAM} -C ${WRKSRC}/tests
.include <bsd.port.mk>