Merge pull request #298 from dedeckeh/pr_nat46_xlat
authorJo-Philipp Wich <jo@mein.io>
Thu, 8 Jun 2017 09:19:21 +0000 (11:19 +0200)
committerGitHub <noreply@github.com>
Thu, 8 Jun 2017 09:19:21 +0000 (11:19 +0200)
Rework 464xlat

ohybridproxy/patches/0001-find-libubox.patch [new file with mode: 0644]
poprouting/Makefile
poprouting/patches/001-cflags.patch [new file with mode: 0644]

diff --git a/ohybridproxy/patches/0001-find-libubox.patch b/ohybridproxy/patches/0001-find-libubox.patch
new file mode 100644 (file)
index 0000000..e29db5c
--- /dev/null
@@ -0,0 +1,26 @@
+From c015e7e62ed4c7645595f7f83cf156810433d0cd Mon Sep 17 00:00:00 2001
+From: Florian Fainelli <f.fainelli@gmail.com>
+Date: Mon, 5 Jun 2017 17:56:33 -0700
+Subject: [PATCH] Cmake: Search and find libubox/utils.h
+
+---
+ CMakeLists.txt | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 2556669d2a52..1c970d92ff56 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -16,6 +16,9 @@ else(${APPLE})
+ set(dns_sd "dns_sd")
+ endif(${APPLE})
++FIND_PATH(ubox_include_dir libubox/utils.h)
++INCLUDE_DIRECTORIES(${ubox_include_dir})
++
+ set(CORE src/cache.c src/io.c src/socket.c)
+ add_executable(ohybridproxy src/ohybridproxy.c src/dns2mdns.c ${CORE})
+-- 
+2.9.3
+
index 0f51a8b1866e3a800e878d2ccb605539ad63c207..6bede93212ed07b6abe38b29e0783a39175d6477 100644 (file)
@@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=prince
 PKG_VERSION:=v0.3.1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
 PKG_USE_MIPS16:=0
@@ -14,14 +14,13 @@ PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_SOURCE_VERSION)
 include $(INCLUDE_DIR)/package.mk
 
 define Package/prince
-       SECTION :=net
-       CATEGORY :=Network
-       SUBMENU :=Routing and Redirection
-       Mantainer :=Gabriele Gemmi <gabriel@autistici.org>
-       TITLE :=PopRouting daemon
-       URL :=https://github.com/gabri94/poprouting
-       MENU :=0
-       DEPENDS := +libjson-c +libpthread
+  SECTION:=net
+  CATEGORY:=Network
+  SUBMENU:=Routing and Redirection
+  MAINTAINER:=Gabriele Gemmi <gabriel@autistici.org>
+  TITLE:=PopRouting daemon
+  URL:=https://github.com/gabri94/poprouting
+  DEPENDS:= +libjson-c +libpthread
 endef
 
 define Package/prince/description
@@ -34,6 +33,9 @@ the timer's value are optimized. Finally the timers are pushed back to the routi
 Currently it only supports OLSRd2 (aka OONF).
 endef
 
+CFLAGS += $(TARGET_CFLAGS) $(TARGET_CPPFLAGS)
+LDFLAGS += $(TARGET_LDFLAGS)
+
 define Package/prince/install
        $(INSTALL_DIR) $(1)/usr/lib
        $(INSTALL_DIR) $(1)/usr/sbin
diff --git a/poprouting/patches/001-cflags.patch b/poprouting/patches/001-cflags.patch
new file mode 100644 (file)
index 0000000..c1f13a1
--- /dev/null
@@ -0,0 +1,27 @@
+From dda5c5a0cd2204816f2f83f18e7820ded6c962df Mon Sep 17 00:00:00 2001
+From: Florian Fainelli <f.fainelli@gmail.com>
+Date: Mon, 5 Jun 2017 17:30:24 -0700
+Subject: [PATCH] Honor CFLAGS and LDFLAGS when passed
+
+---
+ Makefile | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+Index: prince-v0.3.1/Makefile
+===================================================================
+--- prince-v0.3.1.orig/Makefile
++++ prince-v0.3.1/Makefile
+@@ -1,11 +1,11 @@
+ CFLAGS+=-lm -ldl -ljson-c -pthread
+ poprouting:out libs
+       cp prince/src/common_c.h prince/src/common.h
+-      $(CC) $(LDFLAGS) prince/src/prince.c prince/src/lib/ini.c prince/src/parser.c prince/src/socket.c graph-parser_c/src/brandes.c graph-parser_c/src/biconnected.c  graph-parser_c/src/graph_parser.c graph-parser_c/src/graph/graph.c graph-parser_c/src/graph/list.c graph-parser_c/src/network_change.c -o output/prince   $(CFLAGS)
++      $(CC) $(LDFLAGS) $(CFLAGS) prince/src/prince.c prince/src/lib/ini.c prince/src/parser.c prince/src/socket.c graph-parser_c/src/brandes.c graph-parser_c/src/biconnected.c  graph-parser_c/src/graph_parser.c graph-parser_c/src/graph/graph.c graph-parser_c/src/graph/list.c graph-parser_c/src/network_change.c -o output/prince
+       rm prince/src/common.h
+ libs:
+       cp prince/src/common_c.h prince/src/common.h
+-      $(CC) -shared -fPIC -o output/libprince_oonf_c.so prince/src/oonf.c prince/src/socket.c prince/src/parser.c graph-parser_c/src/brandes.c graph-parser_c/src/biconnected.c  graph-parser_c/src/graph_parser.c graph-parser_c/src/graph/graph.c graph-parser_c/src/graph/list.c graph-parser_c/src/network_change.c
++      $(CC) $(LDFLAGS) $(CFLAGS) -shared -fPIC -o output/libprince_oonf_c.so prince/src/oonf.c prince/src/socket.c prince/src/parser.c graph-parser_c/src/brandes.c graph-parser_c/src/biconnected.c  graph-parser_c/src/graph_parser.c graph-parser_c/src/graph/graph.c graph-parser_c/src/graph/list.c graph-parser_c/src/network_change.c
+ clean:
+       rm output/*