ipsec-tools: bump version, convert to autotools format and simplify Config.in

Closes #2035

- Remove -Werror from CFLAGS
- Always enable ipv6 support if available in toolchain
- Always install into staging

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
This commit is contained in:
Peter Korsgaard 2010-06-13 14:24:48 +02:00
parent 5485120b47
commit dff1d590b2
3 changed files with 55 additions and 169 deletions

View File

@ -8,8 +8,8 @@
luasocket, rings, wsapi, xavante luasocket, rings, wsapi, xavante
Updated/fixed packages: cdrkit, file, gawk, gstreamer, intltool, Updated/fixed packages: cdrkit, file, gawk, gstreamer, intltool,
iptables, libidn, lmbench, netperf, openssl, php, qt, sqlite, ipsec-tools, iptables, libidn, lmbench, netperf, openssl, php,
tn5250, usbutils, xkeyboard-config qt, sqlite, tn5250, usbutils, xkeyboard-config
Removed packages: modutils Removed packages: modutils
@ -31,6 +31,7 @@
#1957: Bump sqlite to 3.6.23.1 #1957: Bump sqlite to 3.6.23.1
#1987: intltool: Fix spelling mistake #1987: intltool: Fix spelling mistake
#1999: Typo in path checking #1999: Typo in path checking
#2035: ipsec-tools-0.7.2 fails to build with gcc-4.4.x
2010.05, Released May 30th, 2010: 2010.05, Released May 30th, 2010:

View File

@ -6,16 +6,16 @@ config BR2_PACKAGE_IPSEC_TOOLS
help help
This package is required to support IPSec for Linux 2.6+ This package is required to support IPSec for Linux 2.6+
if BR2_PACKAGE_IPSEC_TOOLS
config BR2_PACKAGE_IPSEC_TOOLS_ADMINPORT config BR2_PACKAGE_IPSEC_TOOLS_ADMINPORT
default y default y
depends on BR2_PACKAGE_IPSEC_TOOLS
bool "Enable racoonctl(8)." bool "Enable racoonctl(8)."
help help
Lets racoon to listen to racoon admin port, which is to Lets racoon to listen to racoon admin port, which is to
be contacted by racoonctl(8). be contacted by racoonctl(8).
config BR2_PACKAGE_IPSEC_TOOLS_NATT config BR2_PACKAGE_IPSEC_TOOLS_NATT
depends on BR2_PACKAGE_IPSEC_TOOLS
bool "Enable NAT-Traversal" bool "Enable NAT-Traversal"
help help
This needs kernel support, which is available on Linux. On This needs kernel support, which is available on Linux. On
@ -27,9 +27,7 @@ config BR2_PACKAGE_IPSEC_TOOLS_NATT
live in a country where software patents are legal, using live in a country where software patents are legal, using
NAT-Traversal might infringe a patent. NAT-Traversal might infringe a patent.
config BR2_PACKAGE_IPSEC_TOOLS_FRAG config BR2_PACKAGE_IPSEC_TOOLS_FRAG
depends on BR2_PACKAGE_IPSEC_TOOLS
bool "Enable IKE fragmentation." bool "Enable IKE fragmentation."
help help
Enable IKE fragmentation, which is a workaround for Enable IKE fragmentation, which is a workaround for
@ -37,32 +35,12 @@ config BR2_PACKAGE_IPSEC_TOOLS_FRAG
config BR2_PACKAGE_IPSEC_TOOLS_STATS config BR2_PACKAGE_IPSEC_TOOLS_STATS
default y default y
depends on BR2_PACKAGE_IPSEC_TOOLS
bool "Enable statistics logging function." bool "Enable statistics logging function."
config BR2_PACKAGE_IPSEC_TOOLS_IPV6
default y
depends on BR2_PACKAGE_IPSEC_TOOLS && BR2_INET_IPV6
bool "Enable IPv6 support"
help
This option has no effect if uClibc has been compiled without
IPv6 support.
config BR2_PACKAGE_IPSEC_TOOLS_READLINE config BR2_PACKAGE_IPSEC_TOOLS_READLINE
depends on BR2_PACKAGE_IPSEC_TOOLS
select BR2_PACKAGE_READLINE select BR2_PACKAGE_READLINE
bool "Enable readline input support if available." bool "Enable readline input support if available."
config BR2_PACKAGE_IPSEC_TOOLS_LIBS
bool "Install IPSec libraries under staging_dir/lib"
default y
depends on BR2_PACKAGE_IPSEC_TOOLS
help
Install libipsec.a and libracoon.a under staging_dir/lib for further
development on a host machine.
if BR2_PACKAGE_IPSEC_TOOLS
choice choice
prompt "Security context" prompt "Security context"
default BR2_PACKAGE_IPSEC_SECCTX_DISABLE default BR2_PACKAGE_IPSEC_SECCTX_DISABLE

View File

@ -4,158 +4,65 @@
# #
############################################################# #############################################################
IPSEC_TOOLS_VERSION:=0.7.2 IPSEC_TOOLS_VERSION = 0.7.3
IPSEC_TOOLS_SOURCE:=ipsec-tools-$(IPSEC_TOOLS_VERSION).tar.bz2 IPSEC_TOOLS_SOURCE = ipsec-tools-$(IPSEC_TOOLS_VERSION).tar.bz2
IPSEC_TOOLS_CAT:=$(BZCAT) IPSEC_TOOLS_SITE = http://ftp.sunet.se/pub/NetBSD/misc/ipsec-tools/0.7/
IPSEC_TOOLS_DIR:=$(BUILD_DIR)/ipsec-tools-$(IPSEC_TOOLS_VERSION) IPSEC_TOOLS_INSTALL_STAGING = YES
IPSEC_TOOLS_DEPENDENCIES = openssl flex host-flex
IPSEC_TOOLS_BINARY_SETKEY:=src/setkey/setkey # configure hardcodes -Werror, so override CFLAGS on make invocation
IPSEC_TOOLS_BINARY_RACOON:=src/racoon/racoon IPSEC_TOOLS_MAKE_OPT = CFLAGS='$(TARGET_CFLAGS)'
IPSEC_TOOLS_BINARY_RACOONCTL:=src/racoon/racoonctl
IPSEC_TOOLS_TARGET_BINARY_SETKEY:=usr/sbin/setkey IPSEC_TOOLS_CONF_OPT = \
IPSEC_TOOLS_TARGET_BINARY_RACOON:=usr/sbin/racoon
IPSEC_TOOLS_TARGET_BINARY_RACOONCTL:=usr/sbin/racoonctl
IPSEC_TOOLS_SITE=http://ftp.sunet.se/pub/NetBSD/misc/ipsec-tools/0.7/
ifeq ($(BR2_PACKAGE_IPSEC_TOOLS_ADMINPORT), y)
IPSEC_TOOLS_CONFIG_FLAGS+= --enable-adminport
else
IPSEC_TOOLS_CONFIG_FLAGS+= --disable-adminport
endif
ifeq ($(BR2_PACKAGE_IPSEC_TOOLS_NATT), y)
IPSEC_TOOLS_CONFIG_FLAGS+= --enable-natt
else
IPSEC_TOOLS_CONFIG_FLAGS+= --disable-natt
endif
ifeq ($(BR2_PACKAGE_IPSEC_TOOLS_FRAG), y)
IPSEC_TOOLS_CONFIG_FLAGS+= --enable-frag
else
IPSEC_TOOLS_CONFIG_FLAGS+= --disable-frag
endif
ifeq ($(BR2_PACKAGE_IPSEC_TOOLS_STATS), y)
IPSEC_TOOLS_CONFIG_FLAGS+= --enable-stats
else
IPSEC_TOOLS_CONFIG_FLAGS+= --disable-stats
endif
ifeq ($(BR2_INET_IPV6),y)
ifeq ($(BR2_PACKAGE_IPSEC_TOOLS_IPV6), y)
IPSEC_TOOLS_CONFIG_FLAGS+= --enable-ipv6
else
IPSEC_TOOLS_CONFIG_FLAGS+= $(DISABLE_IPV6)
endif
else # ignore user's choice if it doesn't
IPSEC_TOOLS_CONFIG_FLAGS+= $(DISABLE_IPV6)
endif
ifneq ($(BR2_PACKAGE_IPSEC_TOOLS_READLINE), y)
IPSEC_TOOLS_CONFIG_FLAGS+= --without-readline
endif
ifeq ($(BR2_PACKAGE_IPSEC_SECCTX_DISABLE),y)
IPSEC_TOOLS_CONFIG_FLAGS+= --enable-security-context=no
endif
ifeq ($(BR2_PACKAGE_IPSEC_SECCTX_ENABLE),y)
IPSEC_TOOLS_CONFIG_FLAGS+= --enable-security-context=yes
endif
ifeq ($(BR2_PACKAGE_IPSEC_SECCTX_KERNEL),y)
IPSEC_TOOLS_CONFIG_FLAGS+= --enable-security-context=kernel
endif
$(DL_DIR)/$(IPSEC_TOOLS_SOURCE):
$(call DOWNLOAD,$(IPSEC_TOOLS_SITE),$(IPSEC_TOOLS_SOURCE))
$(IPSEC_TOOLS_DIR)/.patched: $(DL_DIR)/$(IPSEC_TOOLS_SOURCE)
$(IPSEC_TOOLS_CAT) $(DL_DIR)/$(IPSEC_TOOLS_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
toolchain/patch-kernel.sh $(IPSEC_TOOLS_DIR) package/ipsec-tools ipsec-tools-$(IPSEC_TOOLS_VERSION)\*.patch
$(CONFIG_UPDATE) $(IPSEC_TOOLS_DIR)
touch $@
$(IPSEC_TOOLS_DIR)/.configured: $(IPSEC_TOOLS_DIR)/.patched
( cd $(IPSEC_TOOLS_DIR); rm -rf config.cache; \
$(TARGET_CONFIGURE_OPTS) \
$(TARGET_CONFIGURE_ARGS) \
./configure $(QUIET) \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
--build=$(GNU_HOST_NAME) \
--prefix=/usr \
--sysconfdir=/etc \
--disable-hybrid \ --disable-hybrid \
--without-libpam \ --without-libpam \
--disable-gssapi \ --disable-gssapi \
--with-kernel-headers=$(STAGING_DIR)/usr/include \ --with-kernel-headers=$(STAGING_DIR)/usr/include
$(IPSEC_TOOLS_CONFIG_FLAGS) \
)
# simpler than patching that cruft..
(echo '#undef bzero'; \
echo '#define bzero(a, b) memset((a), 0, (b))'; \
echo '#undef bcopy'; \
echo '#define bcopy(src, dest, len) memmove(dest, src, len)'; \
echo '#undef index'; \
echo '#define index(a, b) strchr(a, b)'; \
) >> $(IPSEC_TOOLS_DIR)/config.h
touch $@
$(IPSEC_TOOLS_DIR)/$(IPSEC_TOOLS_BINARY_SETKEY) \
$(IPSEC_TOOLS_DIR)/$(IPSEC_TOOLS_BINARY_RACOON) \
$(IPSEC_TOOLS_DIR)/$(IPSEC_TOOLS_BINARY_RACOONCTL): \
$(IPSEC_TOOLS_DIR)/.configured
$(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(IPSEC_TOOLS_DIR)
$(TARGET_DIR)/$(IPSEC_TOOLS_TARGET_BINARY_SETKEY) \
$(TARGET_DIR)/$(IPSEC_TOOLS_TARGET_BINARY_RACOON) \
$(TARGET_DIR)/$(IPSEC_TOOLS_TARGET_BINARY_RACOONCTL): \
$(IPSEC_TOOLS_DIR)/$(IPSEC_TOOLS_BINARY_SETKEY) \
$(IPSEC_TOOLS_DIR)/$(IPSEC_TOOLS_BINARY_RACOON) \
$(IPSEC_TOOLS_DIR)/$(IPSEC_TOOLS_BINARY_RACOONCTL)
$(MAKE) -C $(IPSEC_TOOLS_DIR) DESTDIR=$(TARGET_DIR) install
$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(REMOVE_SECTION_COMMENT) \
$(REMOVE_SECTION_NOTE) \
$(TARGET_DIR)/$(IPSEC_TOOLS_TARGET_BINARY_SETKEY) \
$(TARGET_DIR)/$(IPSEC_TOOLS_TARGET_BINARY_RACOON) \
$(TARGET_DIR)/$(IPSEC_TOOLS_TARGET_BINARY_RACOONCTL)
ifeq ($(BR2_PACKAGE_IPSEC_TOOLS_LIBS), y)
install -D $(addprefix $(IPSEC_TOOLS_DIR)/src/, \
libipsec/.libs/libipsec.a libipsec/.libs/libipsec.la \
racoon/.libs/libracoon.a racoon/.libs/libracoon.la) \
$(STAGING_DIR)/lib
endif
ifneq ($(BR2_PACKAGE_IPSEC_TOOLS_ADMINPORT), y)
rm -f $(TARGET_DIR)/$(IPSEC_TOOLS_TARGET_BINARY_RACOONCTL)
endif
IPSEC_TOOLS_PROGS= $(TARGET_DIR)/$(IPSEC_TOOLS_TARGET_BINARY_SETKEY) \
$(TARGET_DIR)/$(IPSEC_TOOLS_TARGET_BINARY_RACOON)
ifeq ($(BR2_PACKAGE_IPSEC_TOOLS_ADMINPORT), y) ifeq ($(BR2_PACKAGE_IPSEC_TOOLS_ADMINPORT), y)
IPSEC_TOOLS_PROGS+= $(TARGET_DIR)/$(IPSEC_TOOLS_TARGET_BINARY_RACOONCTL) IPSEC_TOOLS_CONF_OPT+= --enable-adminport
else
IPSEC_TOOLS_CONF_OPT+= --disable-adminport
endif endif
ipsec-tools: openssl flex host-flex $(IPSEC_TOOLS_PROGS) ifeq ($(BR2_PACKAGE_IPSEC_TOOLS_NATT), y)
IPSEC_TOOLS_CONF_OPT+= --enable-natt
ipsec-tools-source: $(DL_DIR)/$(IPSEC_TOOLS_SOURCE) else
IPSEC_TOOLS_CONF_OPT+= --disable-natt
ipsec-tools-uninstall:
ipsec-tools-clean:
-$(MAKE) -C $(IPSEC_TOOLS_DIR) DESTDIR=$(TARGET_DIR) uninstall
-$(MAKE) -C $(IPSEC_TOOLS_DIR) clean
ifeq ($(BR2_PACKAGE_IPSEC_TOOLS_LIBS),y)
rm -f $(addprefix $(STAGING_DIR)/lib/, \
libipsec.a libipsec.la libracoon.a libracoon.la)
endif endif
rm -f $(IPSEC_TOOLS_DIR)/.configured
ipsec-tools-dirclean: ifeq ($(BR2_PACKAGE_IPSEC_TOOLS_FRAG), y)
rm -rf $(IPSEC_TOOLS_DIR) IPSEC_TOOLS_CONF_OPT+= --enable-frag
else
ifeq ($(BR2_PACKAGE_IPSEC_TOOLS), y) IPSEC_TOOLS_CONF_OPT+= --disable-frag
TARGETS+=ipsec-tools
endif endif
ifeq ($(BR2_PACKAGE_IPSEC_TOOLS_STATS), y)
IPSEC_TOOLS_CONF_OPT+= --enable-stats
else
IPSEC_TOOLS_CONF_OPT+= --disable-stats
endif
ifeq ($(BR2_INET_IPV6),y)
IPSEC_TOOLS_CONF_OPT+= --enable-ipv6
else
IPSEC_TOOLS_CONF_OPT+= --disable-ipv6
endif
ifneq ($(BR2_PACKAGE_IPSEC_TOOLS_READLINE), y)
IPSEC_TOOLS_CONF_OPT+= --without-readline
else
IPSEC_DEPENDENCIES += readline
endif
ifeq ($(BR2_PACKAGE_IPSEC_SECCTX_DISABLE),y)
IPSEC_TOOLS_CONF_OPT+= --enable-security-context=no
endif
ifeq ($(BR2_PACKAGE_IPSEC_SECCTX_ENABLE),y)
IPSEC_TOOLS_CONF_OPT+= --enable-security-context=yes
endif
ifeq ($(BR2_PACKAGE_IPSEC_SECCTX_KERNEL),y)
IPSEC_TOOLS_CONF_OPT+= --enable-security-context=kernel
endif
$(eval $(call AUTOTARGETS,package,ipsec-tools))