summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorriastradh <riastradh@pkgsrc.org>2013-05-10 00:58:06 +0000
committerriastradh <riastradh@pkgsrc.org>2013-05-10 00:58:06 +0000
commit49f8085bdc74f889b045bc5ffb8f65b2130709b2 (patch)
tree7038717e6159de08f643a16d5138ca33b2da2f2e /net
parent90acbe9a9dfbc42339ec81c26f8964f9e5d128a1 (diff)
downloadpkgsrc-49f8085bdc74f889b045bc5ffb8f65b2130709b2.tar.gz
Fix net/isc-dhcp4 cross-build on NetBSD.
Requires a hack to patch and configure the internal copy of bind for cross-compilation. Bump pkgrevision in case the way I did this hack changes anything. ok agc
Diffstat (limited to 'net')
-rw-r--r--net/isc-dhcp4/Makefile4
-rw-r--r--net/isc-dhcp4/Makefile.common39
-rw-r--r--net/isc-dhcp4/distinfo3
-rw-r--r--net/isc-dhcp4/patches/patch-bind_bind-9.8.4-P2_lib_export_dns_Makefile.in17
4 files changed, 58 insertions, 5 deletions
diff --git a/net/isc-dhcp4/Makefile b/net/isc-dhcp4/Makefile
index 0e110beaafd..5d95933d19d 100644
--- a/net/isc-dhcp4/Makefile
+++ b/net/isc-dhcp4/Makefile
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.11 2013/04/10 11:31:26 fhajny Exp $
+# $NetBSD: Makefile,v 1.12 2013/05/10 00:58:06 riastradh Exp $
#
PKGNAME= isc-dhcp-${DHVER}
-PKGREVISION= 1
+PKGREVISION= 2
COMMENT= ISC Dynamic Host Configuration Protocol (DHCP) Base
BUILD_SUBDIR= bind includes tests common # dst
SUBDIR= includes common # dst
diff --git a/net/isc-dhcp4/Makefile.common b/net/isc-dhcp4/Makefile.common
index c90371833b1..8ae9f87e2b0 100644
--- a/net/isc-dhcp4/Makefile.common
+++ b/net/isc-dhcp4/Makefile.common
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.common,v 1.20 2013/04/10 11:31:27 fhajny Exp $
+# $NetBSD: Makefile.common,v 1.21 2013/05/10 00:58:06 riastradh Exp $
#
# used by net/isc-dhcp4/Makefile
# used by net/isc-dhcpd4/Makefile
@@ -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,14 @@ CONFIGURE_ARGS+= --with-srv6-pid-file=${DHCP_PID}/isc-dhcpd6.pid
CONFIGURE_ARGS+= --with-cli6-pid-file=${DHCP_PID}/isc-dhclient6.pid
CONFIGURE_ARGS+= --with-relay6-pid-file=${DHCP_PID}/isc-dhcrelay6.pid
+.if !empty(USE_CROSS_COMPILE:M[yY][eE][sS])
+CONFIGURE_ENV+= BUILD_CC=${NATIVE_CC:Q}
+. if ${OPSYS} == "NetBSD"
+# Target will have /dev/random.
+CONFIGURE_ENV+= ac_cv_file__dev_random=yes
+. endif
+.endif
+
SUBST_CLASSES+= config
SUBST_STAGE.config= post-patch
SUBST_FILES.config= includes/dhcpd.h
@@ -57,4 +65,31 @@ SUBST_MESSAGE.config= Fixing configuration files.
BUILD_DIRS= ${BUILD_SUBDIR}
INSTALL_DIRS= ${SUBDIR}
+# XXX 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"
diff --git a/net/isc-dhcp4/distinfo b/net/isc-dhcp4/distinfo
index 80d91fe6a59..10ef8b0c449 100644
--- a/net/isc-dhcp4/distinfo
+++ b/net/isc-dhcp4/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.16 2013/04/10 11:31:27 fhajny Exp $
+$NetBSD: distinfo,v 1.17 2013/05/10 00:58:06 riastradh Exp $
SHA1 (dhcp-4.2.5-P1.tar.gz) = 120b6e476b2ac0d35e1dc8dee53752c42449b925
RMD160 (dhcp-4.2.5-P1.tar.gz) = 8633cea4a2e5a1900c8a6dac3ebcbd6ff53c2fa9
@@ -6,5 +6,6 @@ Size (dhcp-4.2.5-P1.tar.gz) = 8255960 bytes
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
diff --git a/net/isc-dhcp4/patches/patch-bind_bind-9.8.4-P2_lib_export_dns_Makefile.in b/net/isc-dhcp4/patches/patch-bind_bind-9.8.4-P2_lib_export_dns_Makefile.in
new file mode 100644
index 00000000000..174a33fa71c
--- /dev/null
+++ b/net/isc-dhcp4/patches/patch-bind_bind-9.8.4-P2_lib_export_dns_Makefile.in
@@ -0,0 +1,17 @@
+$NetBSD: patch-bind_bind-9.8.4-P2_lib_export_dns_Makefile.in,v 1.1 2013/05/10 00:58:06 riastradh Exp $
+
+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