Fix net/isc-dhcp4 cross-build on NetBSD. XXX Should have `.if ${OPSYS} == "NetBSD"' for the ac_cv_* settings. Index: net/isc-dhcp4/Makefile.common =================================================================== RCS file: /cvsroot/pkgsrc/net/isc-dhcp4/Makefile.common,v retrieving revision 1.20 diff -p -u -r1.20 Makefile.common --- net/isc-dhcp4/Makefile.common 10 Apr 2013 11:31:27 -0000 1.20 +++ net/isc-dhcp4/Makefile.common 23 Apr 2013 13:29:19 -0000 @@ -26,7 +26,7 @@ DHCP_HOME?= ${VARBASE}/db/isc-dhcp DHCP_PID?= ${VARBASE}/run/isc-dhcp PKG_SYSCONFSUBDIR= dhcp -USE_TOOLS+= gmake +USE_TOOLS+= gmake gzip tar USE_LANGUAGES+= c c++ PATCHDIR= ${.CURDIR}/../isc-dhcp4/patches @@ -47,6 +47,10 @@ CONFIGURE_ARGS+= --with-srv6-pid-file=${ CONFIGURE_ARGS+= --with-cli6-pid-file=${DHCP_PID}/isc-dhclient6.pid CONFIGURE_ARGS+= --with-relay6-pid-file=${DHCP_PID}/isc-dhcrelay6.pid +# [TRC 20130325: Kludge for cross-compilation.] +CONFIGURE_ENV+= ac_cv_file__dev_random=yes +CONFIGURE_ENV+= BUILD_CC=${NATIVE_CC:Q} + SUBST_CLASSES+= config SUBST_STAGE.config= post-patch SUBST_FILES.config= includes/dhcpd.h @@ -57,4 +61,31 @@ SUBST_MESSAGE.config= Fixing configura BUILD_DIRS= ${BUILD_SUBDIR} INSTALL_DIRS= ${SUBDIR} +# [TRC 20130326: This crap should replaced by a dependency on +# net/libbind, but that seems to be a different version of libbind.] +post-extract: + (cd ${WRKSRC}/bind && gunzip -c bind.tar.gz | tar xf -) + +BIND_CONFIGURE_ARGS+= --disable-kqueue +BIND_CONFIGURE_ARGS+= --disable-epoll +BIND_CONFIGURE_ARGS+= --disable-devpoll +BIND_CONFIGURE_ARGS+= --without-openssl +BIND_CONFIGURE_ARGS+= --without-libxml2 +BIND_CONFIGURE_ARGS+= --enable-exportlib +BIND_CONFIGURE_ARGS+= --enable-threads=no +BIND_CONFIGURE_ARGS+= --with-export-includedir=${WRKSRC}/bind/include +BIND_CONFIGURE_ARGS+= --with-export-libdir=${WRKSRC}/bind/lib +BIND_CONFIGURE_ARGS+= --with-gssapi=no + +BIND_WRKSRC= ${WRKSRC}/bind/bind-9.8.4-P2 + +post-configure: + ${RUN}${_ULIMIT_CMD} \ + cd ${BIND_WRKSRC} && \ + ${PKGSRC_SETENV} ${_CONFIGURE_SCRIPT_ENV} \ + ${CONFIG_SHELL} ${CONFIG_SHELL_FLAGS} \ + ${CONFIGURE_SCRIPT} \ + ${CONFIGURE_ARGS} \ + ${BIND_CONFIGURE_ARGS} + .include "../../security/openssl/buildlink3.mk" Index: net/isc-dhcp4/distinfo =================================================================== RCS file: /cvsroot/pkgsrc/net/isc-dhcp4/distinfo,v retrieving revision 1.16 diff -p -u -r1.16 distinfo --- net/isc-dhcp4/distinfo 10 Apr 2013 11:31:27 -0000 1.16 +++ net/isc-dhcp4/distinfo 23 Apr 2013 13:29:19 -0000 @@ -6,5 +6,6 @@ Size (dhcp-4.2.5-P1.tar.gz) = 8255960 by SHA1 (patch-aa) = cdb64616f16ee79bf14f496518a2958352ce1fc9 SHA1 (patch-ab) = 3a36eb65c6b0a865f2d8a350fa083fa2fe549efd SHA1 (patch-ac) = 97af5dd9e787c63ca387fb05df20f42d90b985fb +SHA1 (patch-bind_bind-9.8.4-P2_lib_export_dns_Makefile.in) = 4369cced9a567eed16617459daa5ddaa1ffecb23 SHA1 (patch-common_dlpi.c) = e58c1b8d7a6badc62e59677e093c4d01f75b9379 SHA1 (patch-includes_Makefile.in) = 6004f66e28cd53c0acd09746a284eefe70a3aef2 Index: net/isc-dhcp4/patches/patch-bind_bind-9.8.4-P2_lib_export_dns_Makefile.in =================================================================== RCS file: net/isc-dhcp4/patches/patch-bind_bind-9.8.4-P2_lib_export_dns_Makefile.in diff -N net/isc-dhcp4/patches/patch-bind_bind-9.8.4-P2_lib_export_dns_Makefile.in --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ net/isc-dhcp4/patches/patch-bind_bind-9.8.4-P2_lib_export_dns_Makefile.in 23 Apr 2013 13:29:19 -0000 @@ -0,0 +1,17 @@ +$NetBSD$ + +Build gen with BUILD_CC and the associated BUILD_* flags so it can run +on the build platform when cross-compiling. + +--- bind/bind-9.8.4-P2/lib/export/dns/Makefile.in.orig 2012-10-26 04:52:55.000000000 +0000 ++++ bind/bind-9.8.4-P2/lib/export/dns/Makefile.in +@@ -166,7 +166,8 @@ code.h: gen + ./gen -s ${srcdir} > code.h + + gen: ${srcdir}/gen.c +- ${CC} ${ALL_CFLAGS} ${LDFLAGS} -o $@ ${srcdir}/gen.c ${LIBS} ++ ${BUILD_CC} ${BUILD_CFLAGS} -I${top_srcdir}/lib/isc/include \ ++ ${BUILD_CPPFLAGS} ${BUILD_LDFLAGS} -o $@ ${srcdir}/gen.c ${BUILD_LIBS} + + #We don't need rbtdb64 for this library + #rbtdb64.@O@: rbtdb.c