dhcp: fix build on platforms needing libatomic
This commit is contained in:
parent
70b487a7d4
commit
6b4951d414
2 changed files with 199 additions and 2 deletions
185
srcpkgs/dhcp/patches/libatomic.patch
Normal file
185
srcpkgs/dhcp/patches/libatomic.patch
Normal file
|
@ -0,0 +1,185 @@
|
||||||
|
commit dd8fa93bf34a2e8a74d0e9687fe38793e1c0ca87
|
||||||
|
Author: q66 <daniel@octaforge.org>
|
||||||
|
Date: Fri Feb 7 14:26:35 2020 +0100
|
||||||
|
|
||||||
|
Add libatomic templating
|
||||||
|
|
||||||
|
This will be substituted from our build template on as-needed basis.
|
||||||
|
|
||||||
|
diff --git client/Makefile.am client/Makefile.am
|
||||||
|
index d177159..5793903 100644
|
||||||
|
--- client/Makefile.am
|
||||||
|
+++ client/Makefile.am
|
||||||
|
@@ -17,6 +17,6 @@ dhclient_LDADD = ../common/libdhcp.@A@ ../omapip/libomapi.@A@ \
|
||||||
|
@BINDLIBIRSDIR@/libirs.@A@ \
|
||||||
|
@BINDLIBDNSDIR@/libdns.@A@ \
|
||||||
|
@BINDLIBISCCFGDIR@/libisccfg.@A@ \
|
||||||
|
- @BINDLIBISCDIR@/libisc.@A@
|
||||||
|
+ @BINDLIBISCDIR@/libisc.@A@ @LIBATOMIC@
|
||||||
|
man_MANS = dhclient.8 dhclient-script.8 dhclient.conf.5 dhclient.leases.5
|
||||||
|
EXTRA_DIST = $(man_MANS)
|
||||||
|
diff --git client/tests/Makefile.am client/tests/Makefile.am
|
||||||
|
index 8f1f058..fbf3e82 100644
|
||||||
|
--- client/tests/Makefile.am
|
||||||
|
+++ client/tests/Makefile.am
|
||||||
|
@@ -22,7 +22,7 @@ DHCPLIBS = $(top_builddir)/common/libdhcp.@A@ \
|
||||||
|
@BINDLIBIRSDIR@/libirs.@A@ \
|
||||||
|
@BINDLIBDNSDIR@/libdns.@A@ \
|
||||||
|
@BINDLIBISCCFGDIR@/libisccfg.@A@ \
|
||||||
|
- @BINDLIBISCDIR@/libisc.@A@
|
||||||
|
+ @BINDLIBISCDIR@/libisc.@A@ @LIBATOMIC@
|
||||||
|
|
||||||
|
ATF_TESTS =
|
||||||
|
if HAVE_ATF
|
||||||
|
diff --git common/tests/Makefile.am common/tests/Makefile.am
|
||||||
|
index a515265..8bd616c 100644
|
||||||
|
--- common/tests/Makefile.am
|
||||||
|
+++ common/tests/Makefile.am
|
||||||
|
@@ -17,7 +17,7 @@ alloc_unittest_LDADD += ../libdhcp.@A@ ../../omapip/libomapi.@A@ \
|
||||||
|
@BINDLIBIRSDIR@/libirs.@A@ \
|
||||||
|
@BINDLIBDNSDIR@/libdns.@A@ \
|
||||||
|
@BINDLIBISCCFGDIR@/libisccfg.@A@ \
|
||||||
|
- @BINDLIBISCDIR@/libisc.@A@
|
||||||
|
+ @BINDLIBISCDIR@/libisc.@A@ @LIBATOMIC@
|
||||||
|
|
||||||
|
dns_unittest_SOURCES = dns_unittest.c $(top_srcdir)/tests/t_api_dhcp.c
|
||||||
|
dns_unittest_LDADD = $(ATF_LDFLAGS)
|
||||||
|
@@ -25,7 +25,7 @@ dns_unittest_LDADD += ../libdhcp.@A@ ../../omapip/libomapi.@A@ \
|
||||||
|
@BINDLIBIRSDIR@/libirs.@A@ \
|
||||||
|
@BINDLIBDNSDIR@/libdns.@A@ \
|
||||||
|
@BINDLIBISCCFGDIR@/libisccfg.@A@ \
|
||||||
|
- @BINDLIBISCDIR@/libisc.@A@
|
||||||
|
+ @BINDLIBISCDIR@/libisc.@A@ @LIBATOMIC@
|
||||||
|
|
||||||
|
misc_unittest_SOURCES = misc_unittest.c $(top_srcdir)/tests/t_api_dhcp.c
|
||||||
|
misc_unittest_LDADD = $(ATF_LDFLAGS)
|
||||||
|
@@ -33,7 +33,7 @@ misc_unittest_LDADD += ../libdhcp.@A@ ../../omapip/libomapi.@A@ \
|
||||||
|
@BINDLIBIRSDIR@/libirs.@A@ \
|
||||||
|
@BINDLIBDNSDIR@/libdns.@A@ \
|
||||||
|
@BINDLIBISCCFGDIR@/libisccfg.@A@ \
|
||||||
|
- @BINDLIBISCDIR@/libisc.@A@
|
||||||
|
+ @BINDLIBISCDIR@/libisc.@A@ @LIBATOMIC@
|
||||||
|
|
||||||
|
ns_name_unittest_SOURCES = ns_name_test.c $(top_srcdir)/tests/t_api_dhcp.c
|
||||||
|
ns_name_unittest_LDADD = $(ATF_LDFLAGS)
|
||||||
|
@@ -41,7 +41,7 @@ ns_name_unittest_LDADD += ../libdhcp.@A@ ../../omapip/libomapi.@A@ \
|
||||||
|
@BINDLIBIRSDIR@/libirs.@A@ \
|
||||||
|
@BINDLIBDNSDIR@/libdns.@A@ \
|
||||||
|
@BINDLIBISCCFGDIR@/libisccfg.@A@ \
|
||||||
|
- @BINDLIBISCDIR@/libisc.@A@
|
||||||
|
+ @BINDLIBISCDIR@/libisc.@A@ @LIBATOMIC@
|
||||||
|
|
||||||
|
option_unittest_SOURCES = option_unittest.c $(top_srcdir)/tests/t_api_dhcp.c
|
||||||
|
option_unittest_LDADD = $(ATF_LDFLAGS)
|
||||||
|
@@ -49,7 +49,7 @@ option_unittest_LDADD += ../libdhcp.@A@ ../../omapip/libomapi.@A@ \
|
||||||
|
@BINDLIBIRSDIR@/libirs.@A@ \
|
||||||
|
@BINDLIBDNSDIR@/libdns.@A@ \
|
||||||
|
@BINDLIBISCCFGDIR@/libisccfg.@A@ \
|
||||||
|
- @BINDLIBISCDIR@/libisc.@A@
|
||||||
|
+ @BINDLIBISCDIR@/libisc.@A@ @LIBATOMIC@
|
||||||
|
|
||||||
|
domain_name_unittest_SOURCES = domain_name_test.c \
|
||||||
|
$(top_srcdir)/tests/t_api_dhcp.c
|
||||||
|
@@ -58,7 +58,7 @@ domain_name_unittest_LDADD += ../libdhcp.@A@ ../../omapip/libomapi.@A@ \
|
||||||
|
@BINDLIBIRSDIR@/libirs.@A@ \
|
||||||
|
@BINDLIBDNSDIR@/libdns.@A@ \
|
||||||
|
@BINDLIBISCCFGDIR@/libisccfg.@A@ \
|
||||||
|
- @BINDLIBISCDIR@/libisc.@A@
|
||||||
|
+ @BINDLIBISCDIR@/libisc.@A@ @LIBATOMIC@
|
||||||
|
|
||||||
|
check: $(ATF_TESTS)
|
||||||
|
@if test $(top_srcdir) != ${top_builddir}; then \
|
||||||
|
diff --git configure.ac configure.ac
|
||||||
|
index 3a583a5..453bbd5 100644
|
||||||
|
--- configure.ac
|
||||||
|
+++ configure.ac
|
||||||
|
@@ -990,6 +990,9 @@ esac
|
||||||
|
|
||||||
|
AC_C_FLEXIBLE_ARRAY_MEMBER
|
||||||
|
|
||||||
|
+LIBATOMIC=
|
||||||
|
+AC_SUBST(LIBATOMIC)
|
||||||
|
+
|
||||||
|
AC_CONFIG_FILES([
|
||||||
|
Makefile
|
||||||
|
client/Makefile
|
||||||
|
diff --git dhcpctl/Makefile.am dhcpctl/Makefile.am
|
||||||
|
index 0d66971..413ad25 100644
|
||||||
|
--- dhcpctl/Makefile.am
|
||||||
|
+++ dhcpctl/Makefile.am
|
||||||
|
@@ -14,7 +14,7 @@ omshell_LDADD = libdhcpctl.a ../common/libdhcp.a ../omapip/libomapi.a \
|
||||||
|
$(BINDLIBIRSDIR)/libirs.a \
|
||||||
|
$(BINDLIBDNSDIR)/libdns.a \
|
||||||
|
$(BINDLIBISCCFGDIR)/libisccfg.a \
|
||||||
|
- $(BINDLIBISCDIR)/libisc.a
|
||||||
|
+ $(BINDLIBISCDIR)/libisc.a @LIBATOMIC@
|
||||||
|
|
||||||
|
libdhcpctl_a_SOURCES = dhcpctl.c callback.c remote.c
|
||||||
|
|
||||||
|
@@ -23,4 +23,4 @@ cltest_LDADD = libdhcpctl.a ../common/libdhcp.a ../omapip/libomapi.a \
|
||||||
|
$(BINDLIBIRSDIR)/libirs.a \
|
||||||
|
$(BINDLIBDNSDIR)/libdns.a \
|
||||||
|
$(BINDLIBISCCFGDIR)/libisccfg.a \
|
||||||
|
- $(BINDLIBISCDIR)/libisc.a
|
||||||
|
+ $(BINDLIBISCDIR)/libisc.a @LIBATOMIC@
|
||||||
|
diff --git omapip/Makefile.am omapip/Makefile.am
|
||||||
|
index 5b61581..bd5664f 100644
|
||||||
|
--- omapip/Makefile.am
|
||||||
|
+++ omapip/Makefile.am
|
||||||
|
@@ -19,4 +19,4 @@ svtest_LDADD = libomapi.a \
|
||||||
|
$(BINDLIBIRSDIR)/libirs.a \
|
||||||
|
$(BINDLIBDNSDIR)/libdns.a \
|
||||||
|
$(BINDLIBISCCFGDIR)/libisccfg.a \
|
||||||
|
- $(BINDLIBISCDIR)/libisc.a
|
||||||
|
+ $(BINDLIBISCDIR)/libisc.a @LIBATOMIC@
|
||||||
|
diff --git relay/Makefile.am relay/Makefile.am
|
||||||
|
index 5562b69..8b788b7 100644
|
||||||
|
--- relay/Makefile.am
|
||||||
|
+++ relay/Makefile.am
|
||||||
|
@@ -8,6 +8,6 @@ dhcrelay_LDADD = ../common/libdhcp.@A@ ../omapip/libomapi.@A@ \
|
||||||
|
@BINDLIBIRSDIR@/libirs.@A@ \
|
||||||
|
@BINDLIBDNSDIR@/libdns.@A@ \
|
||||||
|
@BINDLIBISCCFGDIR@/libisccfg.@A@ \
|
||||||
|
- @BINDLIBISCDIR@/libisc.@A@
|
||||||
|
+ @BINDLIBISCDIR@/libisc.@A@ @LIBATOMIC@
|
||||||
|
man_MANS = dhcrelay.8
|
||||||
|
EXTRA_DIST = $(man_MANS)
|
||||||
|
diff --git relay/tests/Makefile.am relay/tests/Makefile.am
|
||||||
|
index fce3115..acbe68b 100644
|
||||||
|
--- relay/tests/Makefile.am
|
||||||
|
+++ relay/tests/Makefile.am
|
||||||
|
@@ -19,7 +19,7 @@ DHCPLIBS = $(top_builddir)/common/libdhcp.@A@ \
|
||||||
|
@BINDLIBIRSDIR@/libirs.@A@ \
|
||||||
|
@BINDLIBDNSDIR@/libdns.@A@ \
|
||||||
|
@BINDLIBISCCFGDIR@/libisccfg.@A@ \
|
||||||
|
- @BINDLIBISCDIR@/libisc.@A@
|
||||||
|
+ @BINDLIBISCDIR@/libisc.@A@ @LIBATOMIC@
|
||||||
|
|
||||||
|
ATF_TESTS =
|
||||||
|
if HAVE_ATF
|
||||||
|
diff --git server/Makefile.am server/Makefile.am
|
||||||
|
index 787efca..f019d97 100644
|
||||||
|
--- server/Makefile.am
|
||||||
|
+++ server/Makefile.am
|
||||||
|
@@ -18,7 +18,7 @@ dhcpd_LDADD = ../common/libdhcp.@A@ ../omapip/libomapi.@A@ \
|
||||||
|
$(BINDLIBIRSDIR)/libirs.@A@ \
|
||||||
|
$(BINDLIBDNSDIR)/libdns.@A@ \
|
||||||
|
$(BINDLIBISCCFGDIR)/libisccfg.@A@ \
|
||||||
|
- $(BINDLIBISCDIR)/libisc.@A@ $(LDAP_LIBS)
|
||||||
|
+ $(BINDLIBISCDIR)/libisc.@A@ $(LDAP_LIBS) @LIBATOMIC@
|
||||||
|
|
||||||
|
man_MANS = dhcpd.8 dhcpd.conf.5 dhcpd.leases.5
|
||||||
|
EXTRA_DIST = $(man_MANS)
|
||||||
|
diff --git server/tests/Makefile.am server/tests/Makefile.am
|
||||||
|
index 699a0b6..3d97990 100644
|
||||||
|
--- server/tests/Makefile.am
|
||||||
|
+++ server/tests/Makefile.am
|
||||||
|
@@ -23,7 +23,7 @@ DHCPLIBS = $(top_builddir)/common/libdhcp.@A@ \
|
||||||
|
$(BINDLIBIRSDIR)/libirs.@A@ \
|
||||||
|
$(BINDLIBDNSDIR)/libdns.@A@ \
|
||||||
|
$(BINDLIBISCCFGDIR)/libisccfg.@A@ \
|
||||||
|
- $(BINDLIBISCDIR)/libisc.@A@
|
||||||
|
+ $(BINDLIBISCDIR)/libisc.@A@ @LIBATOMIC@
|
||||||
|
|
||||||
|
ATF_TESTS =
|
||||||
|
if HAVE_ATF
|
|
@ -4,7 +4,7 @@ version=4.4.2
|
||||||
revision=1
|
revision=1
|
||||||
wrksrc="dhcp-${version/P/-P}"
|
wrksrc="dhcp-${version/P/-P}"
|
||||||
build_style=gnu-configure
|
build_style=gnu-configure
|
||||||
hostmakedepends="perl tar"
|
hostmakedepends="perl tar automake libtool"
|
||||||
short_desc="Server from the Internet Software Consortium's implementation of DHCP"
|
short_desc="Server from the Internet Software Consortium's implementation of DHCP"
|
||||||
maintainer="Enno Boland <gottox@voidlinux.org>"
|
maintainer="Enno Boland <gottox@voidlinux.org>"
|
||||||
license="ISC"
|
license="ISC"
|
||||||
|
@ -13,7 +13,8 @@ distfiles="http://ftp.isc.org/isc/dhcp/${version/P/-P}/dhcp-${version/P/-P}.tar.
|
||||||
checksum=1a7ccd64a16e5e68f7b5e0f527fd07240a2892ea53fe245620f4f5f607004521
|
checksum=1a7ccd64a16e5e68f7b5e0f527fd07240a2892ea53fe245620f4f5f607004521
|
||||||
|
|
||||||
case "$XBPS_TARGET_MACHINE" in
|
case "$XBPS_TARGET_MACHINE" in
|
||||||
armv[56]*|ppc|ppc-musl*) broken="libisc must be linked against libatomic";;
|
ppc64*) ;;
|
||||||
|
armv[56]*|ppc*) makedepends+=" libatomic-devel";;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
disable_parallel_build=yes
|
disable_parallel_build=yes
|
||||||
|
@ -21,6 +22,15 @@ conf_files="/etc/dhcpd.conf"
|
||||||
|
|
||||||
make_dirs="/var/lib/dhcp 0755 root root"
|
make_dirs="/var/lib/dhcp 0755 root root"
|
||||||
|
|
||||||
|
post_patch() {
|
||||||
|
case "$XBPS_TARGET_MACHINE" in
|
||||||
|
ppc64*) ;;
|
||||||
|
armv[56]*|ppc*|mips*)
|
||||||
|
sed -i "/LIBATOMIC=/s/$/-latomic/" configure.ac
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
pre_configure() {
|
pre_configure() {
|
||||||
local _args=" --sbindir=/usr/bin --enable-paranoia
|
local _args=" --sbindir=/usr/bin --enable-paranoia
|
||||||
--with-srv-lease-file=/var/lib/dhcp/dhcpd.leases
|
--with-srv-lease-file=/var/lib/dhcp/dhcpd.leases
|
||||||
|
@ -32,6 +42,8 @@ pre_configure() {
|
||||||
|
|
||||||
# set real configure_args
|
# set real configure_args
|
||||||
export configure_args+="${_args}"
|
export configure_args+="${_args}"
|
||||||
|
|
||||||
|
autoreconf -if
|
||||||
}
|
}
|
||||||
post_install() {
|
post_install() {
|
||||||
mv ${DESTDIR}/etc/dhclient.conf.example ${DESTDIR}/etc/dhclient.conf
|
mv ${DESTDIR}/etc/dhclient.conf.example ${DESTDIR}/etc/dhclient.conf
|
||||||
|
|
Loading…
Reference in a new issue