isc-dhcp: fix build on macos
authorSergey V. Lobanov <sergey@lobanov.in>
Wed, 26 Jan 2022 23:45:47 +0000 (02:45 +0300)
committerRosen Penev <rosenp@gmail.com>
Fri, 28 Jan 2022 20:08:27 +0000 (12:08 -0800)
isc-dhcp uses system ar tool so build fails on Darwin build host.
Embedded bind lib uses system ar and ranlib tools and fails on Darwin

This patch explicitly specifies ar and ranlib tools for target build

Signed-off-by: Sergey V. Lobanov <sergey@lobanov.in>
net/isc-dhcp/Makefile
net/isc-dhcp/patches/510-bind-CC.patch
net/isc-dhcp/patches/520-bind-no-catgets.patch

index 46921ba3f329ea87c4bdae4fc958ca2545de61f6..d89b4ca2e3f0b245cc4606a0807dbf7fbbe5f8e8 100644 (file)
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
 PKG_NAME:=isc-dhcp
 UPSTREAM_NAME:=dhcp
 PKG_VERSION:=4.4.1
-PKG_RELEASE:=18
+PKG_RELEASE:=19
 
 PKG_LICENSE:=BSD-3-Clause
 PKG_LICENSE_FILES:=LICENSE
@@ -194,6 +194,7 @@ CONFIGURE_ARGS += \
        --enable-paranoia               \
        --disable-dependency-tracking   \
        --with-randomdev=/dev/urandom \
+       ac_cv_path_AR=$(TARGET_AR) \
        ac_cv_file__dev_random=yes
 
 ifeq ($(BUILD_VARIANT),ipv4)
@@ -209,6 +210,8 @@ define Build/Compile
        $(MAKE) -C $(PKG_BUILD_DIR)                     \
                BUILD_CC="$(HOSTCC_NOCACHE)"            \
                CROSS_CC="$(TARGET_CC)"                 \
+               TARGET_AR="$(TARGET_AR)"                \
+               TARGET_RANLIB="$(TARGET_RANLIB)"        \
                host_alias="$(GNU_TARGET_NAME)"         \
                target_alias="$(GNU_TARGET_NAME)"       \
                build_alias="$(GNU_HOST_NAME)"          \
@@ -217,6 +220,8 @@ define Build/Compile
                DESTDIR="$(PKG_INSTALL_DIR)"            \
                BUILD_CC="$(HOSTCC_NOCACHE)"            \
                CROSS_CC="$(TARGET_CC)"                 \
+               TARGET_AR="$(TARGET_AR)"                \
+               TARGET_RANLIB="$(TARGET_RANLIB)"        \
                host_alias="$(GNU_TARGET_NAME)"         \
                target_alias="$(GNU_TARGET_NAME)"       \
                build_alias="$(GNU_HOST_NAME)"          \
index c100f71c3aeb2d06be8a324aace718e7f89fa676..a2acec3d5f3539104269d5cf47a08bd04710860f 100644 (file)
@@ -5,7 +5,7 @@
                rm -rf ${cleandirs} ${cleanfiles} ;                     \
                (cd ${bindsrcdir} &&                                    \
 -                 ./configure ${bindconfig} > ${binddir}/configure.log); \
-+               export CC=${CROSS_CC} &&                               \
++               export CC=${CROSS_CC} AR=${TARGET_AR} RANLIB=${TARGET_RANLIB} && \
 +                ./configure ${bindconfig} --disable-atomic             \
 +               --disable-kqueue --disable-epoll --disable-kqueue      \
 +                --disable-epoll --disable-devpoll --without-openssl    \
index ed8a4b063a17979c628f1fc0f116aae66f06f413..bd956032cd83ae7bd0b06d79b8a70167adaeaebe 100644 (file)
@@ -3,7 +3,7 @@
 @@ -57,6 +57,7 @@ bind1:
                rm -rf ${cleandirs} ${cleanfiles} ;                     \
                (cd ${bindsrcdir} &&                                    \
-                export CC=${CROSS_CC} &&                               \
+                export CC=${CROSS_CC} AR=${TARGET_AR} RANLIB=${TARGET_RANLIB} && \
 +               ac_cv_func_catgets=no                                  \
                  ./configure ${bindconfig} --disable-atomic             \
                 --disable-kqueue --disable-epoll --disable-kqueue      \