include $(TOPDIR)/rules.mk
PKG_NAME:=softethervpn5
-PKG_VERSION:=5.01.9670
+PKG_VERSION:=5.01.9671
PKG_RELEASE:=1
PKG_MAINTAINER:=Andy Walsh <andy.walsh44+github@gmail.com>
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=COPYING
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/SoftEtherVPN/SoftEtherVPN.git
-PKG_SOURCE_VERSION:=$(PKG_VERSION)
-PKG_MIRROR_HASH:=a7de5cf5e109450297af1bf79bc5f9ae15229d24da86b134b6251f8354b3dfb8
+PKG_SOURCE_URL:=https://github.com/SoftEtherVPN/SoftEtherVPN/releases/download/$(PKG_VERSION)/
+PKG_SOURCE:=softether-vpn-src-$(PKG_VERSION).tar.gz
+PKG_HASH:=56930110ad5e21a3b7c69008bdb3efd368c0ebafc1d0d97b48a76a3563ec8e24
+
+HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/SoftEtherVPN-$(PKG_VERSION)
+PKG_BUILD_DIR:=$(BUILD_DIR)/SoftEtherVPN-$(PKG_VERSION)
HOST_BUILD_DEPENDS:=ncurses/host readline/host
PKG_BUILD_DEPENDS:=softethervpn5/host
# BUG: outdated host/include/elf.h
HOST_CFLAGS += $(FPIC) -DAT_HWCAP2=26
TARGET_CFLAGS += $(FPIC)
+CMAKE_OPTIONS = -DICONV_LIB_PATH="$(ICONV_PREFIX)/lib"
# static build for host (hamcorebuilder), avoid -fpic on ncurses/host and shared libs can't be found on host
define Host/Prepare
--- /dev/null
+From a4ed6560017d0b9edcd7cab93ca05d80f794ec10 Mon Sep 17 00:00:00 2001
+From: Rosen Penev <rosenp@gmail.com>
+Date: Wed, 10 Jul 2019 17:01:01 -0700
+Subject: [PATCH] Mayaqua: Replace GNU specific sys/poll.h header with POSIX
+ poll.h
+
+Fixes warning from the musl libc:
+
+warning redirecting incorrect #include <sys/poll.h> to <poll.h>
+---
+ src/Mayaqua/Mayaqua.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/Mayaqua/Mayaqua.h b/src/Mayaqua/Mayaqua.h
+index 0f46d52a..63c2edc3 100644
+--- a/src/Mayaqua/Mayaqua.h
++++ b/src/Mayaqua/Mayaqua.h
+@@ -157,8 +157,8 @@ int PASCAL WinMain(HINSTANCE hInst, HINSTANCE hPrev, char *CmdLine, int CmdShow)
+ #ifdef UNIX_SOLARIS\r
+ #include <sys/filio.h>\r
+ #endif // UNIX_SOLARIS\r
+-#include <sys/poll.h>\r
+ #include <sys/resource.h>\r
++#include <poll.h>\r
+ #include <pthread.h>\r
+ #ifdef UNIX_LINUX\r
+ #include <sys/prctl.h>\r
--- /dev/null
+--- a/src/Mayaqua/Mayaqua.h 2019-07-11
++++ b/src/Mayaqua/Mayaqua.h 2019-07-11
+@@ -178,7 +178,7 @@ int PASCAL WinMain(HINSTANCE hInst, HINS
+ #include <ifaddrs.h>\r
+ #endif // MAYAQUA_SUPPORTS_GETIFADDRS\r
+ \r
+-#ifdef UNIX_LINUX\r
++#if 0\r
+ typedef void *iconv_t;\r
+ iconv_t iconv_open (__const char *__tocode, __const char *__fromcode);\r
+ size_t iconv (iconv_t __cd, char **__restrict __inbuf,\r
--- /dev/null
+--- a/src/Mayaqua/CMakeLists.txt 2019-07-10
++++ b/src/Mayaqua/CMakeLists.txt 2019-07-11
+@@ -59,7 +59,7 @@ if(UNIX)
+ find_package(ZLIB REQUIRED)
+
+ # In some cases libiconv is not included in libc
+- find_library(LIB_ICONV iconv)
++ find_library(LIB_ICONV iconv HINTS "${ICONV_LIB_PATH}")
+
+ find_library(LIB_RT rt)
+