From 5e91acbaa94c19c80a18cb0dc677dce6c677d5d8 Mon Sep 17 00:00:00 2001 From: Alexander Boettcher Date: Mon, 29 Apr 2013 09:33:29 +0200 Subject: [PATCH] lwip: use git and master branch --- libports/lib/mk/lwip.mk | 4 ++-- libports/ports/lwip.inc | 2 +- libports/ports/lwip.mk | 21 ++++++++++++++------- 3 files changed, 17 insertions(+), 10 deletions(-) diff --git a/libports/lib/mk/lwip.mk b/libports/lib/mk/lwip.mk index e821d0ef8..7fb8f2916 100644 --- a/libports/lib/mk/lwip.mk +++ b/libports/lib/mk/lwip.mk @@ -13,10 +13,10 @@ SRC_CC = nic.cc printf.cc sys_arch.cc # Core files SRC_C = init.c mem.c memp.c netif.c pbuf.c stats.c udp.c raw.c sys.c \ - tcp.c tcp_in.c tcp_out.c dhcp.c dns.c timers.c def.c + tcp.c tcp_in.c tcp_out.c dhcp.c dns.c timers.c def.c inet_chksum.c # IPv4 files -SRC_C += icmp.c inet.c ip_addr.c ip.c ip_frag.c inet_chksum.c +SRC_C += icmp.c igmp.c ip4_addr.c ip4.c ip_frag.c # API files SRC_C += err.c api_lib.c api_msg.c netbuf.c netdb.c netifapi.c sockets.c \ diff --git a/libports/ports/lwip.inc b/libports/ports/lwip.inc index cfb7f4553..e08ad8cfb 100644 --- a/libports/ports/lwip.inc +++ b/libports/ports/lwip.inc @@ -1,2 +1,2 @@ -LWIP_VERSION = STABLE-1_4_1 +LWIP_VERSION = git LWIP = lwip-$(LWIP_VERSION) diff --git a/libports/ports/lwip.mk b/libports/ports/lwip.mk index ce43aa278..528a92105 100644 --- a/libports/ports/lwip.mk +++ b/libports/ports/lwip.mk @@ -1,7 +1,7 @@ include ports/lwip.inc -LWIP_TGZ = $(LWIP).tar.gz -LWIP_URL = http://git.savannah.gnu.org/cgit/lwip.git/snapshot/$(LWIP_TGZ) +LWIP_URL = git://git.savannah.nongnu.org/lwip.git +LWIP_REV = fe63f36656bd66b4051bdfab93e351a584337d7c # # Interface to top-level prepare Makefile @@ -11,7 +11,8 @@ PORTS += $(LWIP) # # Check for tools # -$(call check_tool,unzip) +$(call check_tool, git) +$(call check_tool, patch) prepare-lwip: $(CONTRIB_DIR)/$(LWIP) include/lwip/lwip include/lwip/netif @@ -20,18 +21,24 @@ $(CONTRIB_DIR)/$(LWIP): clean-lwip # # Port-specific local rules # -$(DOWNLOAD_DIR)/$(LWIP_TGZ): - $(VERBOSE)wget -c -P $(DOWNLOAD_DIR) $(LWIP_URL) && touch $@ +$(DOWNLOAD_DIR)/$(LWIP)/.git: + $(VERBOSE)git clone $(LWIP_URL) $(DOWNLOAD_DIR)/$(LWIP) && \ + cd download/$(LWIP) && \ + git reset --hard $(LWIP_REV) && \ + cd ../.. && touch $@ -$(CONTRIB_DIR)/$(LWIP): $(DOWNLOAD_DIR)/$(LWIP_TGZ) - $(VERBOSE)tar xvzf $< -C $(CONTRIB_DIR) && touch $@ +$(CONTRIB_DIR)/$(LWIP)/.git: $(DOWNLOAD_DIR)/$(LWIP)/.git + $(VERBOSE)git clone $(DOWNLOAD_DIR)/$(LWIP) $(CONTRIB_DIR)/$(LWIP) $(VERBOSE)find ./src/lib/lwip/ -name "*.patch" |\ xargs -ixxx sh -c "patch -p1 -r - -N -d $(CONTRIB_DIR)/$(LWIP) < xxx" || true +$(CONTRIB_DIR)/$(LWIP): $(CONTRIB_DIR)/$(LWIP)/.git + include/lwip/lwip: $(VERBOSE)mkdir -p $@ $(VERBOSE)ln -s $(addprefix ../../../, $(wildcard $(CONTRIB_DIR)/$(LWIP)/src/include/lwip/*.h)) -t $@ $(VERBOSE)ln -s $(addprefix ../../../, $(wildcard $(CONTRIB_DIR)/$(LWIP)/src/include/ipv4/lwip/*.h)) -t $@ + $(VERBOSE)ln -s $(addprefix ../../../, $(wildcard $(CONTRIB_DIR)/$(LWIP)/src/include/ipv6/lwip/*.h)) -t $@ include/lwip/netif: $(VERBOSE)mkdir -p $@