dnsmasq: bump to version 2.60
authorGustavo Zacarias <gustavo@zacarias.com.ar>
Tue, 13 Mar 2012 13:20:15 +0000 (10:20 -0300)
committerPeter Korsgaard <jacmet@sunsite.dk>
Tue, 13 Mar 2012 13:47:41 +0000 (14:47 +0100)
Bump to version 2.60 of dnsmasq with the new lua scripting option.
Switch LDFLAGS from MAKE_ENV to MAKE_OPT to make it work properly.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
package/dnsmasq/Config.in
package/dnsmasq/dnsmasq.mk

index e9c4870af872daa9890baef0c96aaebc7a35563b..f434b8ba5d0ad0c7fa438d54afe104c1bcaa6e7b 100644 (file)
@@ -6,26 +6,33 @@ config BR2_PACKAGE_DNSMASQ
 
          http://www.thekelleys.org.uk/dnsmasq/
 
+if BR2_PACKAGE_DNSMASQ
+
 config BR2_PACKAGE_DNSMASQ_TFTP
        bool "tftp support"
        default y
-       depends on BR2_PACKAGE_DNSMASQ
        help
          Enable TFTP support in dnsmasq.
 
 config BR2_PACKAGE_DNSMASQ_DHCP
        bool "dhcp support"
        default y
-       depends on BR2_PACKAGE_DNSMASQ
        help
          Enable DHCP server support in dnsmasq.
 
 config BR2_PACKAGE_DNSMASQ_IDN
        bool "IDN support (BIG!)"
-       depends on BR2_PACKAGE_DNSMASQ
        depends on BR2_USE_WCHAR
        select BR2_PACKAGE_LIBINTL
        select BR2_PACKAGE_LIBIDN
        help
          Enable IDN support in dnsmasq.
          This option is a big space taker since is pulls in many libraries.
+
+config BR2_PACKAGE_DNSMASQ_LUA
+       bool "Lua scripting support"
+       select BR2_PACKAGE_LUA
+       help
+         Enable lua scripting for dnsmasq
+
+endif
index fc43abdf0ec4bdec7c86ef2e14a6b9a3db123697..c1995a0a619029c42056eb6fae44ca38330b4187 100644 (file)
@@ -4,11 +4,11 @@
 #
 #############################################################
 
-DNSMASQ_VERSION = 2.59
+DNSMASQ_VERSION = 2.60
 DNSMASQ_SITE = http://thekelleys.org.uk/dnsmasq
-DNSMASQ_MAKE_ENV = CC="$(TARGET_CC)" LDFLAGS="$(TARGET_LDFLAGS)"
+DNSMASQ_MAKE_ENV = CC="$(TARGET_CC)"
 DNSMASQ_MAKE_OPT = COPTS="$(DNSMASQ_COPTS)" PREFIX=/usr CFLAGS="$(TARGET_CFLAGS)"
-DNSMASQ_MAKE_OPT += DESTDIR=$(TARGET_DIR)
+DNSMASQ_MAKE_OPT += DESTDIR=$(TARGET_DIR) LDFLAGS="$(TARGET_LDFLAGS)"
 
 ifneq ($(BR2_INET_IPV6),y)
        DNSMASQ_COPTS += -DNO_IPV6
@@ -25,7 +25,20 @@ endif
 ifeq ($(BR2_PACKAGE_DNSMASQ_IDN),y)
        DNSMASQ_MAKE_OPT += all-i18n
        DNSMASQ_DEPENDENCIES += libidn libintl
-       DNSMASQ_MAKE_ENV += LDFLAGS+="-lintl -lidn"
+       DNSMASQ_MAKE_OPT += LDFLAGS+="-lintl -lidn"
+endif
+
+ifeq ($(BR2_PACKAGE_DNSMASQ_LUA),y)
+       DNSMASQ_DEPENDENCIES += lua
+       DNSMASQ_MAKE_OPT += LDFLAGS+="-ldl"
+endif
+
+ifeq ($(BR2_PACKAGE_DNSMASQ_LUA),y)
+define DNSMASQ_ENABLE_LUA
+       $(SED) 's/lua5.1/lua/g' $(DNSMASQ_DIR)/Makefile
+       $(SED) 's^.*#define HAVE_LUASCRIPT.*^#define HAVE_LUASCRIPT^' \
+               $(DNSMASQ_DIR)/src/config.h
+endef
 endif
 
 ifneq ($(BR2_LARGEFILE),y)
@@ -36,12 +49,15 @@ ifeq ($(BR2_PACKAGE_DBUS),y)
        DNSMASQ_DEPENDENCIES += host-pkg-config dbus
 endif
 
+define DNSMASQ_FIX_PKGCONFIG
+       $(SED) 's^PKG_CONFIG = pkg-config^PKG_CONFIG = $(PKG_CONFIG_HOST_BINARY)^' \
+               $(DNSMASQ_DIR)/Makefile
+endef
+
 ifeq ($(BR2_PACKAGE_DBUS),y)
 define DNSMASQ_ENABLE_DBUS
        $(SED) 's^.*#define HAVE_DBUS.*^#define HAVE_DBUS^' \
                $(DNSMASQ_DIR)/src/config.h
-       $(SED) 's^PKG_CONFIG = pkg-config^PKG_CONFIG = $(PKG_CONFIG_HOST_BINARY)^' \
-               $(DNSMASQ_DIR)/Makefile
 endef
 else
 define DNSMASQ_ENABLE_DBUS
@@ -51,7 +67,9 @@ endef
 endif
 
 define DNSMASQ_BUILD_CMDS
+       $(DNSMASQ_FIX_PKGCONFIG)
        $(DNSMASQ_ENABLE_DBUS)
+       $(DNSMASQ_ENABLE_LUA)
        $(DNSMASQ_MAKE_ENV) $(MAKE) -C $(@D) $(DNSMASQ_MAKE_OPT)
 endef