From f0c5f73386ec86db0b31426706d027b6fc811b43 Mon Sep 17 00:00:00 2001 From: Tee KOBAYASHI Date: Sat, 23 Apr 2022 23:52:25 +0900 Subject: [PATCH] wxwidgets: Update to 3.1.6 --- x11-packages/wxwidgets/build.sh | 10 +++---- x11-packages/wxwidgets/configure.patch | 10 +++++++ .../wxwidgets/include-wx-wxcrtbase.h.patch | 11 ++++++++ .../wxwidgets/include-wx-xlocale.h.patch | 27 +++++++++++++++++++ .../wxwidgets/src-common-wxcrt.cpp.patch | 11 ++++++++ 5 files changed, 64 insertions(+), 5 deletions(-) create mode 100644 x11-packages/wxwidgets/configure.patch create mode 100644 x11-packages/wxwidgets/include-wx-wxcrtbase.h.patch create mode 100644 x11-packages/wxwidgets/include-wx-xlocale.h.patch create mode 100644 x11-packages/wxwidgets/src-common-wxcrt.cpp.patch diff --git a/x11-packages/wxwidgets/build.sh b/x11-packages/wxwidgets/build.sh index 626c62535..752996408 100644 --- a/x11-packages/wxwidgets/build.sh +++ b/x11-packages/wxwidgets/build.sh @@ -3,16 +3,16 @@ TERMUX_PKG_DESCRIPTION="A free and open source cross-platform C++ framework for TERMUX_PKG_LICENSE="custom" TERMUX_PKG_LICENSE_FILE="docs/gpl.txt, docs/lgpl.txt, docs/licence.txt, docs/licendoc.txt, docs/preamble.txt" TERMUX_PKG_MAINTAINER="@termux" -TERMUX_PKG_VERSION=3.1.5 -TERMUX_PKG_REVISION=2 +TERMUX_PKG_VERSION=3.1.6 TERMUX_PKG_SRCURL=https://github.com/wxWidgets/wxWidgets/releases/download/v${TERMUX_PKG_VERSION}/wxWidgets-${TERMUX_PKG_VERSION}.tar.bz2 -TERMUX_PKG_SHA256=d7b3666de33aa5c10ea41bb9405c40326e1aeb74ee725bb88f90f1d50270a224 +TERMUX_PKG_SHA256=4980e86c6494adcd527a41fc0a4e436777ba41d1893717d7b7176c59c2061c25 TERMUX_PKG_DEPENDS="glu, gtk3, libcurl, libexpat, libiconv, libjpeg-turbo, liblzma, libnotify, libpng, libsecret, libsm, libtiff, mesa, sdl2" TERMUX_PKG_EXTRA_CONFIGURE_ARGS=" ---disable-intl --disable-option-checking ---disable-xlocale +--disable-mediactrl +--disable-webview --with-sdl +ac_cv_header_langinfo_h=no wx_cv_func_snprintf_pos_params=yes " diff --git a/x11-packages/wxwidgets/configure.patch b/x11-packages/wxwidgets/configure.patch new file mode 100644 index 000000000..1aafeb150 --- /dev/null +++ b/x11-packages/wxwidgets/configure.patch @@ -0,0 +1,10 @@ +--- a/configure ++++ b/configure +@@ -39646,7 +39646,6 @@ + locale_t t; + strtod_l(NULL, NULL, t); + strtol_l(NULL, NULL, 0, t); +- strtoul_l(NULL, NULL, 0, t); + + ; + return 0; diff --git a/x11-packages/wxwidgets/include-wx-wxcrtbase.h.patch b/x11-packages/wxwidgets/include-wx-wxcrtbase.h.patch new file mode 100644 index 000000000..9cb19813a --- /dev/null +++ b/x11-packages/wxwidgets/include-wx-wxcrtbase.h.patch @@ -0,0 +1,11 @@ +--- a/include/wx/wxcrtbase.h ++++ b/include/wx/wxcrtbase.h +@@ -158,7 +158,7 @@ + #define wxCRT_StrtolA strtol + #define wxCRT_StrtoulA strtoul + +-#ifdef __ANDROID__ // these functions are broken on android ++#if 0 // defined __ANDROID__ // these functions are broken on android + + extern double android_wcstod(const wchar_t *nptr, wchar_t **endptr); + extern long android_wcstol(const wchar_t *nptr, wchar_t **endptr, int base); diff --git a/x11-packages/wxwidgets/include-wx-xlocale.h.patch b/x11-packages/wxwidgets/include-wx-xlocale.h.patch new file mode 100644 index 000000000..63efeb701 --- /dev/null +++ b/x11-packages/wxwidgets/include-wx-xlocale.h.patch @@ -0,0 +1,27 @@ +--- a/include/wx/xlocale.h ++++ b/include/wx/xlocale.h +@@ -239,6 +239,10 @@ + // MSVC++8 does not have _strto[u]ll_l functions; + // thus we take the minimal set of functions provided in both environments: + ++ #if defined __ANDROID__ && __ANDROID_API__ < 26 ++ #define strtoul_l(nptr,endptr,base,loc) strtoul(nptr,endptr,base) ++ #endif ++ + #define wxCRT_Strtod_lA wxXLOCALE_IDENT(strtod_l) + #define wxCRT_Strtol_lA wxXLOCALE_IDENT(strtol_l) + #define wxCRT_Strtoul_lA wxXLOCALE_IDENT(strtoul_l) +@@ -297,6 +301,13 @@ + + // stdlib functions for numeric <-> string conversion + // (see notes above about missing functions) ++ ++ #if defined __ANDROID__ && __ANDROID_API__ < 26 ++ #define wcstod_l(nptr,endptr,loc) wcstod(nptr,endptr) ++ #define wcstol_l(nptr,endptr,base,loc) wcstol(nptr,endptr,base) ++ #define wcstoul_l(nptr,endptr,base,loc) wcstoul(nptr,endptr,base) ++ #endif ++ + #define wxCRT_Strtod_lW wxXLOCALE_IDENT(wcstod_l) + #define wxCRT_Strtol_lW wxXLOCALE_IDENT(wcstol_l) + #define wxCRT_Strtoul_lW wxXLOCALE_IDENT(wcstoul_l) diff --git a/x11-packages/wxwidgets/src-common-wxcrt.cpp.patch b/x11-packages/wxwidgets/src-common-wxcrt.cpp.patch new file mode 100644 index 000000000..7d5593be0 --- /dev/null +++ b/x11-packages/wxwidgets/src-common-wxcrt.cpp.patch @@ -0,0 +1,11 @@ +--- a/src/common/wxcrt.cpp ++++ b/src/common/wxcrt.cpp +@@ -1244,7 +1244,7 @@ + // On android, most wchar_t functions are broken, so instead we must + // convert a byte at a time + +-#ifdef __ANDROID__ ++#if 0 // defined __ANDROID__ + + #define ANDROID_WCSTO_START \ + int len = wcslen(nptr) + 1; \