[RFC,v6,04/11] backported libuecc update to v7

Submitted by Jan Kraus on Dec. 5, 2016, 8:40 p.m.

Details

Message ID 1480970449-5332-5-git-send-email-mayosemmel@gmail.com
State Superseded
Headers show

Commit Message

Jan Kraus Dec. 5, 2016, 8:40 p.m.
Signed-off-by: Jan Kraus <mayosemmel@gmail.com>
---
 .../0001-backported-libuecc-update.patch           | 26 ++++++++++
 ...uecc-use-shared-instead-of-static-library.patch | 60 ++++++++++++++++++++++
 buildscript                                        |  5 ++
 3 files changed, 91 insertions(+)
 create mode 100644 build_patches/openwrt-packages/0001-backported-libuecc-update.patch
 create mode 100644 build_patches/openwrt-packages/0002-libuecc-use-shared-instead-of-static-library.patch

Patch hide | download patch | download mbox

diff --git a/build_patches/openwrt-packages/0001-backported-libuecc-update.patch b/build_patches/openwrt-packages/0001-backported-libuecc-update.patch
new file mode 100644
index 0000000..c31b55d
--- /dev/null
+++ b/build_patches/openwrt-packages/0001-backported-libuecc-update.patch
@@ -0,0 +1,26 @@ 
+--- libs/libuecc/Makefile	2016-11-14 23:42:38.215777463 +0100
++++ libs/libuecc/Makefile	2016-11-14 23:47:44.859781597 +0100
+@@ -1,5 +1,5 @@
+ #
+-# Copyright (C) 2012-2015 OpenWrt.org
++# Copyright (C) 2012-2016 OpenWrt.org
+ #
+ # This is free software, licensed under the GNU General Public License v2.
+ # See /LICENSE for more information.
+@@ -8,13 +8,13 @@
+ include $(TOPDIR)/rules.mk
+ 
+ PKG_NAME:=libuecc
+-PKG_VERSION:=5
++PKG_VERSION:=7
+ PKG_RELEASE:=1
+ 
+ PKG_MAINTAINER:=Matthias Schiffer <mschiffer@universe-factory.net>
+ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
+-PKG_SOURCE_URL:=https://projects.universe-factory.net/attachments/download/80
+-PKG_MD5SUM:=cd03c947931c2f4b0eea0bf45654bd34
++PKG_SOURCE_URL:=https://projects.universe-factory.net/attachments/download/85
++PKG_MD5SUM:=5cd543cb8e7bce83a22c07a0579c95a1
+ 
+ PKG_LICENSE:=BSD-2-Clause
+ PKG_LICENSE_FILES:=COPYRIGHT
diff --git a/build_patches/openwrt-packages/0002-libuecc-use-shared-instead-of-static-library.patch b/build_patches/openwrt-packages/0002-libuecc-use-shared-instead-of-static-library.patch
new file mode 100644
index 0000000..747a30e
--- /dev/null
+++ b/build_patches/openwrt-packages/0002-libuecc-use-shared-instead-of-static-library.patch
@@ -0,0 +1,60 @@ 
+--- libs/libuecc/Makefile
++++ libs/libuecc/Makefile
+@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
+ 
+ PKG_NAME:=libuecc
+ PKG_VERSION:=7
+-PKG_RELEASE:=1
++PKG_RELEASE:=2
+ 
+ PKG_MAINTAINER:=Matthias Schiffer <mschiffer@universe-factory.net>
+ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
+@@ -35,11 +35,16 @@ CMAKE_OPTIONS += \
+ 	-DCMAKE_BUILD_TYPE:String="MINSIZEREL"
+ 
+ 
++define Package/libuecc/install
++	$(INSTALL_DIR) $(1)/usr/lib
++	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libuecc.so* $(1)/usr/lib/
++endef
++
+ define Build/InstallDev
+ 	$(INSTALL_DIR) $(1)/usr/include
+ 	$(CP) $(PKG_INSTALL_DIR)/usr/include/libuecc-$(PKG_VERSION) $(1)/usr/include/
+ 	$(INSTALL_DIR) $(1)/usr/lib
+-	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libuecc.a $(1)/usr/lib/
++	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libuecc.so* $(1)/usr/lib/
+ 	$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
+ 	$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libuecc.pc $(1)/usr/lib/pkgconfig/
+ endef
+diff --git a/net/fastd/Makefile b/net/fastd/Makefile
+index 5c550d8..aeaa1df 100644
+--- net/fastd/Makefile
++++ net/fastd/Makefile
+@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
+ 
+ PKG_NAME:=fastd
+ PKG_VERSION:=17
+-PKG_RELEASE:=1
++PKG_RELEASE:=2
+ 
+ PKG_MAINTAINER:=Matthias Schiffer <mschiffer@universe-factory.net>
+ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
+@@ -42,7 +42,7 @@ PKG_CONFIG_DEPENDS:=\
+ 	CONFIG_FASTD_WITH_STATUS_SOCKET
+ 
+ 
+-PKG_BUILD_DEPENDS:=nacl libuecc
++PKG_BUILD_DEPENDS:=nacl
+ 
+ include $(INCLUDE_DIR)/package.mk
+ include $(INCLUDE_DIR)/cmake.mk
+@@ -50,7 +50,7 @@ include $(INCLUDE_DIR)/cmake.mk
+ define Package/fastd
+   SECTION:=net
+   CATEGORY:=Network
+-  DEPENDS:=+kmod-tun +librt +libpthread +FASTD_WITH_STATUS_SOCKET:libjson-c
++  DEPENDS:=+kmod-tun +librt +libpthread +libuecc +FASTD_WITH_STATUS_SOCKET:libjson-c
+   TITLE:=Fast and Secure Tunneling Daemon
+   URL:=https://projects.universe-factory.net/projects/fastd
+   SUBMENU:=VPN
diff --git a/buildscript b/buildscript
index eaaa06a..a9cc5f5 100755
--- a/buildscript
+++ b/buildscript
@@ -122,6 +122,11 @@  patch_target() {
             patch --no-backup-if-mismatch -p0 -d "$target" -i "$patch"
         done
     fi
+    if [ "$(find "$PWD"/build_patches/openwrt-packages/*.patch 2> /dev/null | wc -l)" -ge 1 ]; then
+        for patch in "$PWD"/build_patches/openwrt-packages/*.patch; do
+            patch -N -r - --no-backup-if-mismatch -p0 -d "$PWD/src/packages/openwrt" -i "$patch"
+        done
+    fi
 }
 
 prepare() {