From 0a4f88e56712a5e31492c587944c962609192bbe Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Wed, 10 Jul 2019 12:37:25 -0700 Subject: [PATCH] softethervpn: Really fix iconv support softethervpn overrides nls.mk by defining its iconv functions. This only works if the libc has iconv. In addition, it does not allow external libiconv usage. TARGET_LDFLAGS is also the wrong place to add -liconv. Signed-off-by: Rosen Penev (cherry-picked from fb480e297c04f6e428324cb787d276c9c3cfe0a6) --- net/softethervpn/Makefile | 2 +- net/softethervpn/patches/130-iconv.patch | 39 ++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 net/softethervpn/patches/130-iconv.patch diff --git a/net/softethervpn/Makefile b/net/softethervpn/Makefile index 38cd8816ce..e3bb089bfa 100644 --- a/net/softethervpn/Makefile +++ b/net/softethervpn/Makefile @@ -25,7 +25,7 @@ PKG_LICENSE:=GPL-2.0 PKG_LICENSE_FILES:=COPYING PKG_BUILD_DEPENDS:=softethervpn/host -HOST_BUILD_DEPENDS:=readline/host +HOST_BUILD_DEPENDS:=readline/host libiconv/host HAMCORE_SE2:=$(STAGING_DIR_HOST)/share/softethervpn/hamcore.se2 diff --git a/net/softethervpn/patches/130-iconv.patch b/net/softethervpn/patches/130-iconv.patch new file mode 100644 index 0000000000..dee56d5f9a --- /dev/null +++ b/net/softethervpn/patches/130-iconv.patch @@ -0,0 +1,39 @@ +diff --git a/src/Mayaqua/Mayaqua.h b/src/Mayaqua/Mayaqua.h +index 194f8e6..177129e 100644 +--- a/src/Mayaqua/Mayaqua.h ++++ b/src/Mayaqua/Mayaqua.h +@@ -292,7 +292,7 @@ int PASCAL WinMain(HINSTANCE hInst, HINSTANCE hPrev, char *CmdLine, int CmdShow) + #include + #endif // MAYAQUA_SUPPORTS_GETIFADDRS + +-#ifdef UNIX_LINUX ++#if 0 + typedef void *iconv_t; + iconv_t iconv_open (__const char *__tocode, __const char *__fromcode); + size_t iconv (iconv_t __cd, char **__restrict __inbuf, +diff --git a/src/makefiles/linux_32bit.mak b/src/makefiles/linux_32bit.mak +index 8219d5d..8020290 100644 +--- a/src/makefiles/linux_32bit.mak ++++ b/src/makefiles/linux_32bit.mak +@@ -31,7 +31,7 @@ OPTIONS_LINK_DEBUG=-g -fsigned-char -lm -ldl -lrt -lpthread -lssl -lcrypto -lrea + + OPTIONS_COMPILE_RELEASE=-DNDEBUG -DVPN_SPEED -DUNIX -DUNIX_LINUX -D_REENTRANT -DREENTRANT -D_THREAD_SAFE -D_THREADSAFE -DTHREAD_SAFE -DTHREADSAFE -D_FILE_OFFSET_BITS=64 -I./src/ -I./src/Cedar/ -I./src/Mayaqua/ -O2 -fsigned-char + +-OPTIONS_LINK_RELEASE=-O2 -fsigned-char -lm -ldl -lrt -lpthread -lssl -lcrypto -lreadline -lncurses -lz ++OPTIONS_LINK_RELEASE=-O2 -fsigned-char -lm -ldl -lrt -liconv -lpthread -lssl -lcrypto -lreadline -lncurses -lz + + INSTALL_BINDIR=/usr/bin/ + INSTALL_VPNSERVER_DIR=/usr/vpnserver/ +diff --git a/src/makefiles/linux_64bit.mak b/src/makefiles/linux_64bit.mak +index 7f81b58..a36e0de 100644 +--- a/src/makefiles/linux_64bit.mak ++++ b/src/makefiles/linux_64bit.mak +@@ -31,7 +31,7 @@ OPTIONS_LINK_DEBUG=-g -fsigned-char -m64 -lm -ldl -lrt -lpthread -lssl -lcrypto + + OPTIONS_COMPILE_RELEASE=-DNDEBUG -DVPN_SPEED -DUNIX -DUNIX_LINUX -DCPU_64 -D_REENTRANT -DREENTRANT -D_THREAD_SAFE -D_THREADSAFE -DTHREAD_SAFE -DTHREADSAFE -D_FILE_OFFSET_BITS=64 -I./src/ -I./src/Cedar/ -I./src/Mayaqua/ -O2 -fsigned-char + +-OPTIONS_LINK_RELEASE=-O2 -fsigned-char -lm -ldl -lrt -lpthread -lssl -lcrypto -lreadline -lncurses -lz ++OPTIONS_LINK_RELEASE=-O2 -fsigned-char -lm -ldl -lrt -liconv -lpthread -lssl -lcrypto -lreadline -lncurses -lz + + INSTALL_BINDIR=/usr/bin/ + INSTALL_VPNSERVER_DIR=/usr/vpnserver/ -- 2.30.2