diff --git a/dev-qt/wxqt/patches/wxqt-3.1.7.patchset b/dev-qt/wxqt/patches/wxqt-3.1.7.patchset new file mode 100644 index 000000000..701029f50 --- /dev/null +++ b/dev-qt/wxqt/patches/wxqt-3.1.7.patchset @@ -0,0 +1,114 @@ +From d733c86fb176daa2c5bec57155fe5bc7f39a50d1 Mon Sep 17 00:00:00 2001 +From: Ulrich Telle +Date: Tue, 21 Jun 2022 10:58:37 +0200 +Subject: Fix wxUILocaleImplUnix::GetLocalizedName() on non-Linux systems + +On non-Linux-like systems the `_NL_*` symbols for retrieving localized +strings from a locale are typically not available, causing compile-time +errors. + +We now check for Linux-like systems, and resort to accessing our own +language database otherwise. + +Closes #22558. + +diff --git a/src/unix/uilocale.cpp b/src/unix/uilocale.cpp +index 3dfb63f..01556f2 100644 +--- a/src/unix/uilocale.cpp ++++ b/src/unix/uilocale.cpp +@@ -78,11 +78,14 @@ private: + // Call nl_langinfo_l() if available, or nl_langinfo() otherwise. + const char* GetLangInfo(nl_item item) const; + ++#ifdef __LINUX__ + // Call GetLangInfo() using either the native or English item depending on + // the form needed. + wxString GetFormOfLangInfo(wxLocaleForm form, + nl_item nlNative, + nl_item nlEnglish) const; ++#endif ++ + #endif // HAVE_LANGINFO_H + + wxLocaleIdent m_locId; +@@ -373,6 +376,7 @@ wxUILocaleImplUnix::GetLangInfo(nl_item item) const + return nl_langinfo(item); + } + ++#ifdef __LINUX__ + wxString + wxUILocaleImplUnix::GetFormOfLangInfo(wxLocaleForm form, + nl_item nlNative, +@@ -397,6 +401,7 @@ wxUILocaleImplUnix::GetFormOfLangInfo(wxLocaleForm form, + + return wxString(GetLangInfo(item), wxCSConv(m_codeset)); + } ++#endif + + #endif // HAVE_LANGINFO_H + +@@ -452,8 +457,8 @@ wxUILocaleImplUnix::GetInfo(wxLocaleInfo index, wxLocaleCategory cat) const + wxString + wxUILocaleImplUnix::GetLocalizedName(wxLocaleName name, wxLocaleForm form) const + { +-#ifdef HAVE_LANGINFO_H + wxString str; ++#if defined(HAVE_LANGINFO_H) && defined(__LINUX__) + switch (name) + { + case wxLOCALE_NAME_LOCALE: +@@ -487,13 +492,45 @@ wxUILocaleImplUnix::GetLocalizedName(wxLocaleName name, wxLocaleForm form) const + default: + wxFAIL_MSG("unknown wxLocaleName"); + } ++#else // !HAVE_LANGINFO_H || !__LINUX__ ++ // If HAVE_LANGINFO_H is not available, or system is not Linux-like, ++ // use our own language database to retrieve the requested information. ++ const wxLanguageInfo* langInfo = wxUILocale::FindLanguageInfo(wxLocaleIdent::FromTag(GetName())); ++ if (langInfo) ++ { ++ wxString langDesc; ++ switch ( form ) ++ { ++ case wxLOCALE_FORM_NATIVE: ++ langDesc = langInfo->Description; ++ break; ++ ++ case wxLOCALE_FORM_ENGLISH: ++ langDesc = langInfo->DescriptionNative; ++ break; ++ default: ++ break; ++ } ++ switch (name) ++ { ++ case wxLOCALE_NAME_LOCALE: ++ str = langDesc; ++ break; ++ ++ case wxLOCALE_NAME_LANGUAGE: ++ str = langDesc.BeforeFirst('(').Trim(); ++ break; ++ ++ case wxLOCALE_NAME_COUNTRY: ++ str = langDesc.AfterFirst('(').BeforeLast(')'); ++ break; ++ ++ default: ++ wxFAIL_MSG("unknown wxLocaleName"); ++ } ++ } ++#endif // HAVE_LANGINFO_H && __LINUX__/!HAVE_LANGINFO_H || !__LINUX__ + return str; +-#else // !HAVE_LANGINFO_H +- // If HAVE_LANGINFO_H is not available, we could use our own language database +- // to retrieve the requested information. +- // For now, just return an empty string. +- return wxString(); +-#endif // HAVE_LANGINFO_H/!HAVE_LANGINFO_H + } + + wxLayoutDirection +-- +2.37.3 + diff --git a/dev-qt/wxqt/wxqt-3.1.5.recipe b/dev-qt/wxqt/wxqt-3.1.7.recipe similarity index 97% rename from dev-qt/wxqt/wxqt-3.1.5.recipe rename to dev-qt/wxqt/wxqt-3.1.7.recipe index a0c807673..c2ead0bce 100644 --- a/dev-qt/wxqt/wxqt-3.1.5.recipe +++ b/dev-qt/wxqt/wxqt-3.1.7.recipe @@ -11,15 +11,16 @@ COPYRIGHT="1998-2021 Julian Smart, Robert Roebling et al" LICENSE="GNU LGPL v2" REVISION="1" SOURCE_URI="https://github.com/wxWidgets/wxWidgets/releases/download/v$portVersion/wxWidgets-$portVersion.tar.bz2" -CHECKSUM_SHA256="d7b3666de33aa5c10ea41bb9405c40326e1aeb74ee725bb88f90f1d50270a224" +CHECKSUM_SHA256="3d666e47d86192f085c84089b850c90db7a73a5d26b684b617298d89dce84f19" SOURCE_DIR="wxWidgets-$portVersion" +PATCHES="wxqt-$portVersion.patchset" ARCHITECTURES="all !x86_gcc2 ?x86" SECONDARY_ARCHITECTURES="x86" libVersion="$portVersion" libVersionCompat="$libVersion compat >= ${libVersion%%.*}" -libSoVersion="5.0.0" +libSoVersion="7.0.0" PROVIDES=" wxqt$secondaryArchSuffix = $portVersion @@ -49,6 +50,7 @@ REQUIRES=" lib:libiconv$secondaryArchSuffix lib:libjpeg$secondaryArchSuffix lib:liblzma$secondaryArchSuffix + lib:libpcre2_32$secondaryArchSuffix lib:libpng16$secondaryArchSuffix lib:libQt5Core$secondaryArchSuffix lib:libQt5Gui$secondaryArchSuffix @@ -92,6 +94,7 @@ REQUIRES_devel=" lib:libexpat$secondaryArchSuffix lib:libiconv$secondaryArchSuffix lib:liblzma$secondaryArchSuffix + lib:libpcre2_32$secondaryArchSuffix lib:libz$secondaryArchSuffix "