From 7cfef7bf97d9db01e6671edf580fd79fc725b68e Mon Sep 17 00:00:00 2001 From: "Alexandros C. Couloumbis" Date: Tue, 12 Oct 2010 13:26:27 +0000 Subject: [PATCH] net/click: update to click-20101002 git (#8072) SVN-Revision: 23411 --- net/click/Makefile | 109 +++++++++--------------- net/click/patches/100-compile_fix.patch | 62 +++++--------- net/click/patches/200-roofnet_fix.patch | 30 ------- 3 files changed, 61 insertions(+), 140 deletions(-) delete mode 100644 net/click/patches/200-roofnet_fix.patch diff --git a/net/click/Makefile b/net/click/Makefile index 640cbd8a4..6422bc1dc 100644 --- a/net/click/Makefile +++ b/net/click/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2006-2009 OpenWrt.org +# Copyright (C) 2006-2010 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -8,101 +8,76 @@ include $(TOPDIR)/rules.mk PKG_NAME:=click -PKG_VERSION:=cvs.2006.03.02 -PKG_RELEASE:=1 -PKG_MD5SUM:=7aed4ba94926010d76febb797b288e98 +PKG_VERSION:=20101002 -ROOFNET_VERSION:=0.0.1 - -PKG_SOURCE_URL:=http://pdos.csail.mit.edu/~jbicket/click_snapshots/ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=git://read.cs.ucla.edu/git/click +PKG_SOURCE_PROTO:=git +PKG_SOURCE_VERSION:=04f9a6ea146793881caa6b1721872a92d8c2ddcf +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) +PKG_MD5SUM:=e2f144265b5b61804b0634bf567bee5b +PKG_CAT:=zcat + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) include $(INCLUDE_DIR)/package.mk define Package/click - SECTION:=net - CATEGORY:=Network - DEPENDS:=@BROKEN - MENU:=1 - TITLE:=The Click Modular Router - URL:=http://www.read.cs.ucla.edu/click/ -endef - -define Package/click/description -The Click Modular Router -endef - -define Package/roofnet - SECTION:=net - CATEGORY:=Network - DEPENDS:=@BROKEN click - TITLE:=roofnet mesh networking scripts - URL:=http://pdos.csail.mit.edu/roofnet/ + SECTION:=net + CATEGORY:=Network + DEPENDS:=@BROKEN + TITLE:=Click Modular Router + URL:=http://read.cs.ucla.edu/click endef -define Package/roofnet/description -roofnet mesh networking scripts +define Package/click/Description + The Click Modular Router userspace package endef -BUILDOPTS = \ - BUILD_CXX="g++ -I $(PKG_BUILD_DIR)/include-host" \ - BUILD_DL_LIBS="-ldl" +TARGET_CFLAGS += "-static -O2 -MD" +TARGET_CXXFLAGS += "-static -O2 -MD" define Build/Configure (cd $(PKG_BUILD_DIR); \ rm -rf config.{cache,status} ; \ - CONFIG_SITE= \ - ./configure; \ - rm -rf include-host; \ - $(CP) include include-host; \ + "./configure \ + --prefix=/usr \ + --enable-userlevel \ + --enable-wifi \ + --enable-fixincludes \ + --disable-linuxmodule" ; \ rm -rf config.{cache,status} ; \ - $(TARGET_CONFIGURE_OPTS) \ - CXXFLAGS="-static -Os -MD" \ - CFLAGS="-static -MD" \ - CPPFLAGS="$(TARGET_CPPFLAGS)" \ - LDFLAGS="$(TARGET_LDFLAGS)" \ - $(BUILDOPTS) \ ./configure \ - --prefix=/usr \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --enable-wifi \ - --disable-linuxmodule \ - --enable-tools=mixed \ - --disable-dynamic-linking \ + --prefix=/usr \ + --target=$(GNU_TARGET_NAME) \ + --host=$(GNU_TARGET_NAME) \ + --build=$(GNU_HOST_NAME) \ + --enable-tools=mixed \ + --enable-userlevel \ + --enable-wifi \ + --enable-fixincludes \ + --disable-linuxmodule \ ) endef - define Build/Compile - $(CONF_OPTS) \ $(MAKE) -C $(PKG_BUILD_DIR) \ - $(BUILDOPTS) \ tools elementmap.xml (cd $(PKG_BUILD_DIR)/userlevel; \ - ../tools/click-mkmindriver/click-mkmindriver -p roofnet -C .. \ - -f $(PKG_BUILD_DIR)/conf/wifi/sample.click \ - -A --all -E IPNameInfo -E FromHost -E ToHost -E Discard; \ - $(MAKE) -f Makefile.roofnet; \ + ../tools/click-mkmindriver/click-mkmindriver -p $(PKG_NAME) -C .. \ + -f $(PKG_BUILD_DIR)/conf/wifi/dump.click \ + -A --all -E Discard -E Print; \ ) + $(MAKE) -C $(PKG_BUILD_DIR) MINDRIVER=$(PKG_NAME) endef define Package/click/install + $(INSTALL_DIR) $(1)/usr $(INSTALL_DIR) $(1)/usr/bin - $(CP) $(PKG_BUILD_DIR)/userlevel/roofnetclick $(1)/usr/bin/click + $(INSTALL_DIR) $(1)/usr/share/click + $(CP) $(PKG_BUILD_DIR)/userlevel/$(PKG_NAME)click $(1)/usr/bin/click $(CP) $(PKG_BUILD_DIR)/tools/click-align/click-align $(1)/usr/bin/click-align -endef - -define Package/roofnet/install - $(INSTALL_DIR) $(1)/usr/bin - $(CP) $(PKG_BUILD_DIR)/conf/wifi/gen_config_roofnet.sh $(1)/usr/bin - $(CP) $(PKG_BUILD_DIR)/conf/wifi/srcr.click $(1)/usr/bin - $(CP) $(PKG_BUILD_DIR)/conf/wifi/read_handler $(1)/usr/bin - $(CP) $(PKG_BUILD_DIR)/conf/wifi/write_handler $(1)/usr/bin - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/roofnet.init $(1)/etc/init.d/roofnet + $(CP) $(PKG_BUILD_DIR)/elementmap.xml $(1)/usr/share/click/elementmap.xml endef $(eval $(call BuildPackage,click)) -$(eval $(call BuildPackage,roofnet)) diff --git a/net/click/patches/100-compile_fix.patch b/net/click/patches/100-compile_fix.patch index 75a669c0b..f798254ea 100644 --- a/net/click/patches/100-compile_fix.patch +++ b/net/click/patches/100-compile_fix.patch @@ -1,46 +1,22 @@ -diff -urN click.old/configure click.dev/configure ---- click.old/configure 2006-03-02 17:51:04.000000000 +0100 -+++ click.dev/configure 2006-08-04 20:40:20.518827296 +0200 -@@ -6689,23 +6689,8 @@ - echo "$as_me:$LINENO: result: $ac_cv_uint64_t" >&5 - echo "${ECHO_T}$ac_cv_uint64_t" >&6 +--- a/tools/click-mkmindriver/Makefile.in ++++ b/tools/click-mkmindriver/Makefile.in +@@ -60,7 +60,7 @@ DEPCFLAGS = @DEPCFLAGS@ + DEFS = @DEFS@ + INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include \ + -I$(top_srcdir)/tools/lib -I$(srcdir) +-LDFLAGS = @LDFLAGS@ ++LDFLAGS = @LDFLAGS@ -lrt + LIBS = @LIBS@ @POSIX_CLOCK_LIBS@ $(DL_LIBS) -- have_int64_types= - if test $ac_cv_int64_t = no -o $ac_cv_uint64_t = no; then -- { { echo "$as_me:$LINENO: error: --========================================= -- --int64_t types not defined by $inttypes_hdr! --Compile with '--disable-int64'. -- --=========================================" >&5 --echo "$as_me: error: --========================================= -- --int64_t types not defined by $inttypes_hdr! --Compile with '--disable-int64'. -- --=========================================" >&2;} -- { (exit 1); exit 1; }; } -+ have_int64_types= - else + CXXCOMPILE = $(CXX) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CXXFLAGS) $(DEPCFLAGS) +--- a/configure ++++ b/configure +@@ -7135,7 +7135,7 @@ fi + $as_echo "$ac_cv_va_list_addr" >&6; } + if test "x$ac_cv_va_list_addr" = xyes; then - cat >>confdefs.h <<\_ACEOF -diff -urN click.old/m4/click.m4 click.dev/m4/click.m4 ---- click.old/m4/click.m4 2006-03-02 17:51:06.000000000 +0100 -+++ click.dev/m4/click.m4 2006-08-04 20:40:49.953352568 +0200 -@@ -536,13 +536,7 @@ +-$as_echo "#define HAVE_ADDRESSABLE_VA_LIST 1" >>confdefs.h ++$as_echo "#define HAVE_ADDRESSABLE_VA_LIST 0" >>confdefs.h + + fi - have_int64_types= - if test $ac_cv_int64_t = no -o $ac_cv_uint64_t = no; then -- AC_MSG_ERROR([ --========================================= -- --int64_t types not defined by $inttypes_hdr! --Compile with '--disable-int64'. -- --=========================================]) -+ have_int64_types=no - else - AC_DEFINE([HAVE_INT64_TYPES], [1], [Define if 64-bit integer types are enabled.]) - have_int64_types=yes diff --git a/net/click/patches/200-roofnet_fix.patch b/net/click/patches/200-roofnet_fix.patch deleted file mode 100644 index 25355d451..000000000 --- a/net/click/patches/200-roofnet_fix.patch +++ /dev/null @@ -1,30 +0,0 @@ -diff -urN click-cvs.2006.03.02.old/conf/wifi/gen_config_roofnet.sh click-cvs.2006.03.02/conf/wifi/gen_config_roofnet.sh ---- click-cvs.2006.03.02.old/conf/wifi/gen_config_roofnet.sh 2007-05-12 09:12:48.346397229 +0100 -+++ click-cvs.2006.03.02/conf/wifi/gen_config_roofnet.sh 2007-05-12 10:00:52.579345023 +0100 -@@ -12,7 +12,7 @@ - fi - - --mac=$(/sbin/ifconfig ath0 | sed -n 's/^.*HWaddr \([0-9A-Za-z:]*\).*/\1/p') -+mac=$(/sbin/ifconfig wifi0 | sed -n 's/^.*HWaddr \([0-9A-Za-z-]*\).*/\1/p'| sed 's/-/:/g' | cut -c -17) - # extract the bottom three octects to use as IP - - hi_hex=$(echo $mac | sed -n 's/.*:.*:.*:\([0-9A-Za-z:]*\):.*:.*.*/\1/p') -@@ -23,7 +23,7 @@ - mid="0x$mid_hex"; - lo="0x$lo_hex"; - --SUFFIX=$(printf "%d.%d.%d" $hi $mid $lo) -+SUFFIX=$(printf "%d.%d.%d" $((hi)) $((mid)) $((lo))) - WIRELESS_MAC=$mac - SRCR_IP="5.$SUFFIX" - SRCR_NM="255.0.0.0" -@@ -40,7 +40,7 @@ - /sbin/ifconfig $DEV txqueuelen 5 - /sbin/ifconfig $DEV up - echo '804' > /proc/sys/net/$DEV/dev_type --/sbin/modprobe tun > /dev/null 2>&1 -+/sbin/insmod tun > /dev/null 2>&1 - - MODE="g" - PROBES="2 60 2 1500 4 1500 11 1500 22 1500" -- 2.30.2