Building devel/bitkeeper on stable/12 using ports-mgmt/synth isn’t straight forward as of r532246.

The build log would end abruptly with:

--------------------------------------------------------------------------------
--  Phase: build
--------------------------------------------------------------------------------
===>  Building for bitkeeper-7.3.3
gmake[1]: Entering directory '/construction/xports/devel/bitkeeper/work/bk-7.3.3/src'
sh mkconf.sh > conf.mk || { rm -f conf.mk; false; }
TOMCRYPT required to build bk
Makefile:46: conf.mk: No such file or directory
gmake[1]: *** [Makefile:675: conf.mk] Error 1
gmake[1]: Leaving directory '/construction/xports/devel/bitkeeper/work/bk-7.3.3/src'
*** Error code 2

Stop.
make: stopped in /xports/devel/bitkeeper

By making this change to devel/bitkeeper/Makefile:

Index: devel/bitkeeper/Makefile
===================================================================
--- devel/bitkeeper/Makefile    (revision 532602)
+++ devel/bitkeeper/Makefile    (working copy)
@@ -26,6 +26,9 @@
 WRKSRC=	${WRKDIR}/bk-${PORTVERSION}/src
 ALL_TARGET=	p

+pre-patch:
+	@cp ${WRKSRC}/conf.mk.local.template ${WRKSRC}/conf.mk.local
+
 do-build:
	@(cd ${WRKSRC}; ${MAKE_CMD} ${ALL_TARGET})

and adding this patch

--- conf.mk.local.orig  2020-04-23 11:29:27 UTC
+++ conf.mk.local
@@ -21,11 +21,14 @@
 # PCRE_CPPFLAGS="-I/usr/local/include"
 # PCRE_LDFLAGS="-L/usr/local/lib -lpcre"

-# TOMCRYPT_CPPFLAGS="-I/usr/local/include"
-# TOMCRYPT_LDFLAGS="-L/usr/local/lib -ltomcrypt"
+TOMCRYPT_CPPFLAGS="-I/usr/local/include"
+TOMCRYPT_LDFLAGS="-L/usr/local/lib -ltomcrypt"

-# TOMMATH_CPPFLAGS="-I/usr/local/include"
-# TOMMATH_LDFLAGS="-L/usr/local/lib -ltommath"
+TOMMATH_CPPFLAGS="-I/usr/local/include"
+TOMMATH_LDFLAGS="-L/usr/local/lib -ltommath"

-# LZ4_CPPFLAGS="-I/usr/local/include"
-# LZ4_LDFLAGS="-L/usr/local/lib -llz4"
+LZ4_CPPFLAGS="-I/usr/local/include"
+LZ4_LDFLAGS="-L/usr/local/lib -llz4"
+
+ZLIB_CPPFLAGS="-I/usr/include"
+ZLIB_LDFLAGS="-L/usr/lib -lz"

the build succeeded.

I tried adding MAKE_ENV to devel/bitkeeper/Makefile to avoid copying the template file and later patch it, but maybe I didn’t do it right or the environment variables simply aren’t honoured.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>