kumquat-buildroot/package/iproute2/iproute2.mk
Baruch Siach ed7f7f7129 iproute2: bump to version 4.16.0
Drop uClibc-ng compatibility patch. Current uClibc-ng provides the
needed definitions.

Drop the libc-config.h musl compatibility workaround patch. iproute2
update its headers copy to current kernel version for which this
workaround is no longer needed.

Don't modify tc/Makefile to make XT_LIB_DIR get the value of
IPT_LIB_DIR. Pass the correct value directly in CFLAGS.

Add a patch removing arpd dependency on threading support.

Rename IPROUTE2_WITH_IPTABLES to IPROUTE2_DISABLE_IPTABLES which better
describes what it does.

Don't patch the configure script for the cross compiler. The CC
environment variable is enough.

Don't force the CCOPTS make variable. The CFLAGS environment variable
does the trick for target code.

Don't patch CCOPTS out of netem/Makefile. The CBUILD_CFLAGS environment
variable can pass the host CFLAGS to host code.

The ifcfg script is now POSIX shell compatible. Remove its installation
dependency on bash.

Pass installation DESTDIR in the environment. Don't force SBINDIR, DOCDIR, and
MANDIR. The default values are fine.

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-05-01 21:25:49 +02:00

56 lines
1.6 KiB
Makefile

################################################################################
#
# iproute2
#
################################################################################
IPROUTE2_VERSION = 4.16.0
IPROUTE2_SOURCE = iproute2-$(IPROUTE2_VERSION).tar.xz
IPROUTE2_SITE = $(BR2_KERNEL_MIRROR)/linux/utils/net/iproute2
IPROUTE2_DEPENDENCIES = host-bison host-flex host-pkgconf \
$(if $(BR2_PACKAGE_LIBMNL),libmnl)
IPROUTE2_LICENSE = GPL-2.0+
IPROUTE2_LICENSE_FILES = COPYING
# If both iproute2 and busybox are selected, make certain we win
# the fight over who gets to have their utils actually installed.
ifeq ($(BR2_PACKAGE_BUSYBOX),y)
IPROUTE2_DEPENDENCIES += busybox
endif
ifeq ($(BR2_PACKAGE_ELFUTILS),y)
IPROUTE2_DEPENDENCIES += elfutils
endif
ifeq ($(BR2_PACKAGE_IPTABLES)x$(BR2_STATIC_LIBS),yx)
IPROUTE2_DEPENDENCIES += iptables
else
define IPROUTE2_DISABLE_IPTABLES
# m_xt.so is built unconditionally
echo "TC_CONFIG_XT:=n" >>$(@D)/config.mk
endef
endif
ifeq ($(BR2_PACKAGE_BERKELEYDB_COMPAT185),y)
IPROUTE2_DEPENDENCIES += berkeleydb
endif
define IPROUTE2_CONFIGURE_CMDS
cd $(@D) && $(TARGET_CONFIGURE_OPTS) ./configure
$(IPROUTE2_DISABLE_IPTABLES)
endef
define IPROUTE2_BUILD_CMDS
$(TARGET_MAKE_ENV) LDFLAGS="$(TARGET_LDFLAGS)" \
CFLAGS="$(TARGET_CFLAGS) -DXT_LIB_DIR=\\\"/usr/lib/xtables\\\"" \
CBUILD_CFLAGS="$(HOST_CFLAGS)" $(MAKE) V=1 LIBDB_LIBS=-lpthread \
DBM_INCLUDE="$(STAGING_DIR)/usr/include" \
SHARED_LIBS="$(if $(BR2_STATIC_LIBS),n,y)" -C $(@D)
endef
define IPROUTE2_INSTALL_TARGET_CMDS
$(TARGET_MAKE_ENV) DESTDIR="$(TARGET_DIR)" $(MAKE) -C $(@D) install
endef
$(eval $(generic-package))