This commit is contained in:
Mario Fetka
2025-06-06 03:35:14 +02:00
parent b56141d74d
commit 0dba7be35f
91 changed files with 5377 additions and 809 deletions

16
x11-libs/wxGTK/Manifest Normal file
View File

@@ -0,0 +1,16 @@
AUX wxGTK-3.0-gtk3-translation-domain.patch 454 BLAKE2B fd0b6d6a0c1fe7f1dfbd7692d549dfd6f78c85e25f06e2e44630ca9b3c9dda4c12af2df6e4fcc02de73e75524631b858cc21b9f63b8799b0d157a38bd5541fac SHA512 8cdf57558e8d09e3e0613c25ac7701cce0bf78da13060e2b36167b69b8ae4f265607cb5216a33054f6c0c2f21beba8cc7f8297f4de2b2db1ec9f3f5bb8177ff3
AUX wxGTK-3.0.5-collision.patch 6298 BLAKE2B 711d7b94b6a0de4bdda21caa2bfcfd799c0d57a8d1d4a820e6da397768b075f415b8e438502167446b3be6b948420d1c1a31c401bd5e7bb2b549e3a95dcccad8 SHA512 62bbf952eac4a3485a2cfa3e6908b2272cb6f47632f17e60f413ad34b64e331423189a31c4259c8283120b4b1351f915e226f5c749787a5c69737779cc9edb59
AUX wxGTK-3.0.5.1-configure-modern-c.patch 1578 BLAKE2B 3951e12a0ee686785909713002af8eb5e9a2b2937e16310cdae28b95abc7240ba42497484c25c70fc0d4d0af86ef8f9f28adee1f8b92499df1a0938e27faa607 SHA512 6622a60c155b4d47eedf2b1f96fbd5db027646c5f9ca451eb4cc82f163fea5bcfad2ddb1a8f89955cdf873af61112382b6ee181b1ca9e80cad6aa2abebaf7097
AUX wxGTK-3.0.5.1-excise-autoptr.patch 12342 BLAKE2B 3fb76bf9466342a8828cb5276956fffcb28ad941b6c93ae164149544a9b27017b92a604fab489f8d9d02aa565ca5ea598700702452140b50e371b1332ed500dc SHA512 beb0891a1477216b49af17fd7a6145e70e7baff109cc8fa05496aab6b72cfc6ceb97e38670d8471719ecc50afacb6b973ad7013d09cce2c1e1972c975b949d75
AUX wxGTK-3.2.1-configure-tests.patch 478 BLAKE2B 1fdbb7d04c4100b39234c15181e3ea0301bf9c4f17da75fe3e52531cf877e26f1523bd7bc70192d87614f32e74dcd65509454baf97c7d0def088a797f1674c30 SHA512 95847ed7727670884b7d6570907c7a8ab6b9ba2eed81e575e8f21f957b41f630b424ed61e2cbc40c55f13669d5428daa70721bd4ffcbdd7f9f706618325c4d36
AUX wxGTK-3.2.1-gtk3-translation-domain.patch 425 BLAKE2B c517b85a352e010e8002de6e2e282728e1f9ee47d22380072d15e35723e65d0a417c06b23f0c50e8d91036611ee0bfe54ba124c4294ec248de3a5cb64b35a448 SHA512 0e5b01958c848b81008a2296405e4de33da46445553d555deeed215928d90583a4da61de4bdceb1fb3745cce53118b7bc29be73f511f0bdb9c3c6b193f2f6c24
AUX wxGTK-3.2.1-prefer-lib64-in-tests.patch 1016 BLAKE2B b2d7cac45af6a0e5e118c8688db5e5a60e144dc5e82f4653f4dfea53fa969c3af0ca2c4ce1d6d430bc8e6aef45c4d946e8cf65cf6c53222981fcdde005d05e09 SHA512 a5c7c81af28d637a31c93d2296e1c1b5456038c0703c3d32f136188435ab3e7f4766805dcb73dac0d976eac7cb6e4c86923cca023543b29b735d5ea87ccb2b1b
AUX wxGTK-3.2.1-wayland-control.patch 6150 BLAKE2B 4aef8ab0fb4e2352afba139cc539f77b1c0825ee7c4a33c0f2fc41bcbadd943a90c55dced954f362f73995d2232d54b1815725a0c5d03325c64d0a00d92191aa SHA512 995eeb0409293247756eddde8bf8fcee87ded284bb0f9faac27ae511483e0131e4802bdb9d93063097273e83b55b08328dd0380639fcb265352991cf3d34fc1d
AUX wxGTK-3.2.2.1-backport-pr24197.patch 3030 BLAKE2B b005f114f03f4791fc3a94ab0ffd807dfa20fc7ccb36af58336010b3c3d5de262f53615cd99369e7d013c741f4b070417568e1671144287c2e8ed3c6f9a68880 SHA512 d358517a34a5040ee51055e4d67807e24e344f5ad0a8809939fd1cc708a7a409e564cb88fbffd95c6b8ef901fb00ed65423e745038675948d8c93052f222acaa
AUX wxGTK-3.2.2.1-dont-break-flags.patch 1373 BLAKE2B 2ae7524b2f80cc562dc6a62a823e1e0d904213de4c11346995d7014490843ad6f7111c5b39b5d147a39beaf07b627b8f13378bfdc1ea129a24230054ccf8aad4 SHA512 3cb557dc51b7694a9e935b14d4c4ab430a75c3de091f697d3291e04b78cd0b3b6a8c7fc3c4afc32a2692d32f43cf4bb52655a4230ac1b38cd101f903f136f2e4
AUX wxGTK-3.2.5-dont-break-flags.patch 565 BLAKE2B 87d05449f43c455089389aee4750480596f521f4ef97c54b3bb3825b8383625432b97dc10229ec214ad5ebca89802902455600def5be29d55128089dc99ea934 SHA512 7f551bc56a72db2a34058bf4880521b171727a9ab93acbf518ec88a54dd68952d914ea6fb1e848bb6fc158f1ad2225388d35c6cb8daafc79c55d06691273b3e4
AUX wxGTK-configure-tests.patch 560 BLAKE2B 86a735c58abc8690cd943ff58a39140a636c56dcde08f47d27dbdcf99790216ebe0f4524f2f7cd67e35748c32adaee377c4e8a4b606975115c666cbc453b5173 SHA512 f02b708e5de66a4a7dce9f1adef1ebd1461ef68acee502b54d514a0ce4e5fe998eaad9a9ec7b1bec9aa4d8803a4042111ea4cddafe8e2f68d3d122faf90465df
AUX wxGTK-ignore-c++-abi.patch 1657 BLAKE2B 5d865c83174f2540b798a2930f8d5ae8336f031214691fe7d5cd8c283faf9511fff260735d9dcd293e6377be0e96a6521e84ceae4560f2fef8fc7e7ed5642cd6 SHA512 649551eeacc9915f249ece1c3ed79959f0f0129e54373bfbe84ea5fbf2b8e0ba7778d6a22ac6f165e5d4e85a3ea4320274296b1b2a8e623acb11300fe44478f8
DIST wxWidgets-3.2.8-docs-html.tar.bz2 18209484 BLAKE2B 4e57589d4460bfc74c5ac1c1e9ea665e12ae2f1ffb73e9e6d634fa7bd959e76b29ce7cceb5daa7de7fb72885804d3b6d0729145a5b0380e1d5beca2154831ca9 SHA512 c9101bd4f925931f18b29f54c1b715cf988d638ed95c81e99b5aac5a6953c57cd019b84242f2b5cb95fc43278658ee9d872d1d57c97cd2e8e29cd6200cce56a3
DIST wxWidgets-3.2.8.tar.bz2 27675086 BLAKE2B 54855e401831b6e9510fe3ee6c8909e492151a6ed5c2801a3322adce971379e7aad8f00ad8c6e41f4adf31d3f2c3cb812eeb0cdaef42f87aee11fca005b36a11 SHA512 3ac5c8f689c771ea27fedcfc4c4416c936f279f8dbf87476a9d8e454d9ecd8c4ed7f9072d7c1e33273128dbfc3fea22954c466ba538bbe5868745d14e882df63
EBUILD wxGTK-3.2.8.ebuild 8370 BLAKE2B e54de34d81bd6bafb4f9d4c0b0ef904a72e7e8ccc408c8563f3b355cfc1accb0317d25a4c804c41efceb2d46bb04dbcd35462b709dd6b933c33f4401444c6284 SHA512 f34ec40549cff097859e8175dca1f4c0121b3525d11193c8ea794e4b66a007a0b9e4569726f096076cc5a7d1701697fc0c50f8f9fc0ba4a5dc8018a594830c74

View File

@@ -0,0 +1,13 @@
Modify AddStdCatalog to use the versioned wxstd30-gtk3.mo.
--- a/src/common/translation.cpp
+++ b/src/common/translation.cpp
@@ -1458,7 +1458,7 @@ wxArrayString wxTranslations::GetAvailableTranslations(const wxString& domain) c
bool wxTranslations::AddStdCatalog()
{
- if ( !AddCatalog(wxS("wxstd")) )
+ if ( !AddCatalog(wxS("wxstd30-gtk3")) )
return false;
// there may be a catalog with toolkit specific overrides, it is not

View File

@@ -0,0 +1,75 @@
Prevent file collisions between multiple installed SLOTs.
- Don't install wxwin.m4. It is installed with app-eselect/eselect-wxwidgets.
- Version the bakefile preset filenames. Unversioned symlinks to these files
are handled by eselect.
- Version wx-config and wxrc. The unversioned forms are wrapper scripts
installed with eselect-wxwidgets.
- Version wxstd.mo and modify AddStdCatalog to use it.
--- a/Makefile.in
+++ b/Makefile.in
@@ -15213,10 +15213,10 @@ COND_wxUSE_REGEX_builtin___LIB_REGEX_p = \
all: $(__wxregex___depname) $(__wxzlib___depname) $(__wxpng___depname) $(__wxjpeg___depname) $(__wxtiff___depname) $(__wxexpat___depname) $(__wxscintilla___depname) $(__monodll___depname) $(__monolib___depname) $(__basedll___depname) $(__baselib___depname) $(__netdll___depname) $(__netlib___depname) $(__coredll___depname) $(__corelib___depname) $(__advdll___depname) $(__advlib___depname) $(__mediadll___depname) $(__medialib___depname) $(__htmldll___depname) $(__htmllib___depname) $(__webviewdll___depname) $(__webviewlib___depname) $(__qadll___depname) $(__qalib___depname) $(__xmldll___depname) $(__xmllib___depname) $(__xrcdll___depname) $(__xrclib___depname) $(__auidll___depname) $(__auilib___depname) $(__ribbondll___depname) $(__ribbonlib___depname) $(__propgriddll___depname) $(__propgridlib___depname) $(__richtextdll___depname) $(__richtextlib___depname) $(__stcdll___depname) $(__stclib___depname) $(__gldll___depname) $(__gllib___depname) $(__sound_sdl___depname) $(__webkit2_ext___depname) $(__wxrc___depname) $(__cocoa_res___depname)
install: $(__install_wxregex___depname) $(__install_wxzlib___depname) $(__install_wxpng___depname) $(__install_wxjpeg___depname) $(__install_wxtiff___depname) $(__install_wxexpat___depname) $(__install_wxscintilla___depname) $(__install_monodll___depname) $(__install_monolib___depname) $(__install_basedll___depname) $(__install_baselib___depname) $(__install_netdll___depname) $(__install_netlib___depname) $(__install_coredll___depname) $(__install_corelib___depname) $(__install_advdll___depname) $(__install_advlib___depname) $(__install_mediadll___depname) $(__install_medialib___depname) $(__install_htmldll___depname) $(__install_htmllib___depname) $(__install_webviewdll___depname) $(__install_webviewlib___depname) $(__install_qadll___depname) $(__install_qalib___depname) $(__install_xmldll___depname) $(__install_xmllib___depname) $(__install_xrcdll___depname) $(__install_xrclib___depname) $(__install_auidll___depname) $(__install_auilib___depname) $(__install_ribbondll___depname) $(__install_ribbonlib___depname) $(__install_propgriddll___depname) $(__install_propgridlib___depname) $(__install_richtextdll___depname) $(__install_richtextlib___depname) $(__install_stcdll___depname) $(__install_stclib___depname) $(__install_gldll___depname) $(__install_gllib___depname) $(__install_sound_sdl___depname) $(__install_webkit2_ext___depname) $(__install_wxrc___depname) install-wxconfig locale_install locale_msw_install $(__cocoa_res_install___depname)
- $(INSTALL_DIR) $(DESTDIR)$(datadir)/aclocal
- (cd $(srcdir) ; $(INSTALL_DATA) wxwin.m4 $(DESTDIR)$(datadir)/aclocal)
$(INSTALL_DIR) $(DESTDIR)$(datadir)/bakefile/presets
- (cd $(srcdir)/build/bakefiles/wxpresets/presets ; $(INSTALL_DATA) wx.bkl wx_unix.bkl wx_win32.bkl wx_xrc.bkl wx_presets.py $(DESTDIR)$(datadir)/bakefile/presets)
+ (cd $(srcdir)/build/bakefiles/wxpresets/presets ; \
+ for i in wx.bkl wx_unix.bkl wx_win32.bkl wx_xrc.bkl wx_presets.py ; do \
+ $(INSTALL_DATA) $$i $(DESTDIR)$(datadir)/bakefile/presets/wx$(WX_RELEASE_NODOT)$${i##wx} ; done)
$(DYLIB_RPATH_INSTALL)
$(INSTALL_DIR) $(DESTDIR)$(libdir)/wx/include/$(TOOLCHAIN_FULLNAME)/wx
for f in setup.h $(RCDEFS_H); do \
@@ -16101,7 +16101,7 @@ install-wxconfig:
$(INSTALL_DIR) $(DESTDIR)$(bindir)
$(INSTALL_DIR) $(DESTDIR)$(libdir)/wx/config
$(INSTALL_SCRIPT) lib/wx/config/$(TOOLCHAIN_FULLNAME) $(DESTDIR)$(libdir)/wx/config
- (cd $(DESTDIR)$(bindir) && rm -f wx-config && $(LN_S) $(libdir)/wx/config/$(TOOLCHAIN_FULLNAME) wx-config || cp -p $(DESTDIR)$(libdir)/wx/config/$(TOOLCHAIN_FULLNAME) wx-config)
+ (cd $(DESTDIR)$(bindir) && rm -f wx-config-$(WX_RELEASE) && $(LN_S) $(libdir)/wx/config/$(TOOLCHAIN_FULLNAME) wx-config-$(WX_RELEASE) || cp -p $(DESTDIR)$(libdir)/wx/config/$(TOOLCHAIN_FULLNAME) wx-config-$(WX_RELEASE))
locale_install:
$(INSTALL_DIR) $(DESTDIR)$(datadir)/locale
@@ -16109,7 +16109,7 @@ locale_install:
$(INSTALL_DIR) $(DESTDIR)$(datadir)/locale/$$l ; \
$(INSTALL_DIR) $(DESTDIR)$(datadir)/locale/$$l/LC_MESSAGES ; \
if test -f $(srcdir)/locale/$$l.mo ; then \
- $(INSTALL_DATA) $(srcdir)/locale/$$l.mo $(DESTDIR)$(datadir)/locale/$$l/LC_MESSAGES/wxstd.mo ; \
+ $(INSTALL_DATA) $(srcdir)/locale/$$l.mo $(DESTDIR)$(datadir)/locale/$$l/LC_MESSAGES/wxstd$(WX_RELEASE_NODOT).mo ; \
fi ; \
done
--- a/build/bakefiles/wx.bkl
+++ b/build/bakefiles/wx.bkl
@@ -137,7 +137,7 @@
<using module="gettext"/>
<gettext-catalogs id="locale">
<srcdir>$(SRCDIR)/locale</srcdir>
- <catalog-name>wxstd</catalog-name>
+ <catalog-name>wxstd$(WX_RELEASE_NODOT)</catalog-name>
<linguas>
ca cs da de el es fi fr hu id it ja nl pl ru sl sv tr uk
zh zh_CN zh_TW
--- a/src/common/translation.cpp
+++ b/src/common/translation.cpp
@@ -1458,7 +1458,7 @@ wxArrayString wxTranslations::GetAvailableTranslations(const wxString& domain) c
bool wxTranslations::AddStdCatalog()
{
- if ( !AddCatalog(wxS("wxstd")) )
+ if ( !AddCatalog(wxS("wxstd" wxSTRINGIZE(wxMAJOR_VERSION) wxSTRINGIZE(wxMINOR_VERSION))) )
return false;
// there may be a catalog with toolkit specific overrides, it is not
--- a/utils/wxrc/Makefile.in
+++ b/utils/wxrc/Makefile.in
@@ -125,7 +125,6 @@ distclean: clean
@COND_USE_XRC_1@ rm -f $(DESTDIR)$(bindir)/wxrc$(EXEEXT) $(DESTDIR)$(bindir)/wxrc-$(WX_RELEASE)
@COND_USE_XRC_1@ $(INSTALL_PROGRAM) wxrc$(EXEEXT) $(DESTDIR)$(bindir)
@COND_USE_XRC_1@ mv -f $(DESTDIR)$(bindir)/wxrc$(EXEEXT) $(DESTDIR)$(bindir)/wxrc-$(WX_RELEASE)
-@COND_USE_XRC_1@ (cd $(DESTDIR)$(bindir) && $(LN_S) wxrc-$(WX_RELEASE) wxrc$(EXEEXT))
@COND_USE_XRC_1@uninstall_wxrc:
@COND_USE_XRC_1@ rm -f $(DESTDIR)$(bindir)/wxrc$(EXEEXT)

View File

@@ -0,0 +1,54 @@
https://github.com/wxWidgets/wxWidgets/commit/da4b42688a6cd5444eefb91bf40183d88203ffca
https://bugs.gentoo.org/874441
--- a/configure
+++ b/configure
@@ -19586,6 +19586,7 @@ else
/* end confdefs.h. */
#include <stdio.h>
+ #include <stdlib.h>
int main()
{
@@ -22300,6 +22301,7 @@ else
#include <zlib.h>
#include <stdio.h>
+ #include <stdlib.h>
int main()
{
@@ -22422,6 +22424,7 @@ else
#include <png.h>
#include <stdio.h>
+ #include <stdlib.h>
int main()
{
--- a/configure.in
+++ b/configure.in
@@ -1482,6 +1482,7 @@ case "${host}" in
dnl Check the gcc version macro.
[
#include <stdio.h>
+ #include <stdlib.h>
int main()
{
@@ -2439,6 +2440,7 @@ if test "$wxUSE_ZLIB" != "no" ; then
[
#include <zlib.h>
#include <stdio.h>
+ #include <stdlib.h>
int main()
{
@@ -2507,6 +2509,7 @@ if test "$wxUSE_LIBPNG" != "no" ; then
[
#include <png.h>
#include <stdio.h>
+ #include <stdlib.h>
int main()
{

View File

@@ -0,0 +1,322 @@
Direct replacement of auto_ptr, equivalent to parts of upstream commits:
https://github.com/wxWidgets/wxWidgets/commit/b8c9cd35288a5c94f88ea83bf8c9ee644f99ece1
https://github.com/wxWidgets/wxWidgets/commit/11a5728b327d5f16ef284d737f6329d38ae4d4b1
made by diffing new-er upstream version with fixes included and current file
diff --git a/tests/archive/archivetest.cpp b/tests/archive/archivetest.cpp
index fa122d1..845ee0b 100644
--- a/tests/archive/archivetest.cpp
+++ b/tests/archive/archivetest.cpp
@@ -32,7 +32,6 @@
#include <sys/stat.h>
using std::string;
-using std::auto_ptr;
// Check whether member templates can be used
@@ -559,7 +558,7 @@ TestEntry& ArchiveTestCase<ClassFactoryT>::Add(const char *name,
template <class ClassFactoryT>
void ArchiveTestCase<ClassFactoryT>::CreateArchive(wxOutputStream& out)
{
- auto_ptr<OutputStreamT> arc(m_factory->NewStream(out));
+ wxScopedPtr<OutputStreamT> arc(m_factory->NewStream(out));
TestEntries::iterator it;
OnCreateArchive(*arc);
@@ -587,7 +586,7 @@ void ArchiveTestCase<ClassFactoryT>::CreateArchive(wxOutputStream& out)
if ((choices & 2) || testEntry.IsText()) {
// try PutNextEntry(EntryT *pEntry)
- auto_ptr<EntryT> entry(m_factory->NewEntry());
+ wxScopedPtr<EntryT> entry(m_factory->NewEntry());
entry->SetName(name, wxPATH_UNIX);
if (setIsDir)
entry->SetIsDir();
@@ -701,8 +700,8 @@ template <class ClassFactoryT>
void ArchiveTestCase<ClassFactoryT>::ModifyArchive(wxInputStream& in,
wxOutputStream& out)
{
- auto_ptr<InputStreamT> arcIn(m_factory->NewStream(in));
- auto_ptr<OutputStreamT> arcOut(m_factory->NewStream(out));
+ wxScopedPtr<InputStreamT> arcIn(m_factory->NewStream(in));
+ wxScopedPtr<OutputStreamT> arcOut(m_factory->NewStream(out));
EntryT *pEntry;
const wxString deleteName = wxT("bin/bin1000");
@@ -714,7 +713,7 @@ void ArchiveTestCase<ClassFactoryT>::ModifyArchive(wxInputStream& in,
arcOut->CopyArchiveMetaData(*arcIn);
while ((pEntry = arcIn->GetNextEntry()) != NULL) {
- auto_ptr<EntryT> entry(pEntry);
+ wxScopedPtr<EntryT> entry(pEntry);
OnSetNotifier(*entry);
wxString name = entry->GetName(wxPATH_UNIX);
@@ -759,7 +758,7 @@ void ArchiveTestCase<ClassFactoryT>::ModifyArchive(wxInputStream& in,
// try adding a new entry
TestEntry& testEntry = Add(newName.mb_str(), newData);
- auto_ptr<EntryT> newentry(m_factory->NewEntry());
+ wxScopedPtr<EntryT> newentry(m_factory->NewEntry());
newentry->SetName(newName);
newentry->SetDateTime(testEntry.GetDateTime());
newentry->SetSize(testEntry.GetLength());
@@ -782,7 +781,7 @@ void ArchiveTestCase<ClassFactoryT>::ExtractArchive(wxInputStream& in)
typedef std::list<EntryPtr> Entries;
typedef typename Entries::iterator EntryIter;
- auto_ptr<InputStreamT> arc(m_factory->NewStream(in));
+ wxScopedPtr<InputStreamT> arc(m_factory->NewStream(in));
int expectedTotal = m_testEntries.size();
EntryPtr entry;
Entries entries;
@@ -991,7 +990,7 @@ void ArchiveTestCase<ClassFactoryT>::TestIterator(wxInputStream& in)
typedef std::list<EntryT*> ArchiveCatalog;
typedef typename ArchiveCatalog::iterator CatalogIter;
- auto_ptr<InputStreamT> arc(m_factory->NewStream(in));
+ wxScopedPtr<InputStreamT> arc(m_factory->NewStream(in));
size_t count = 0;
#ifdef WXARC_MEMBER_TEMPLATES
@@ -1003,7 +1002,7 @@ void ArchiveTestCase<ClassFactoryT>::TestIterator(wxInputStream& in)
#endif
for (CatalogIter it = cat.begin(); it != cat.end(); ++it) {
- auto_ptr<EntryT> entry(*it);
+ wxScopedPtr<EntryT> entry(*it);
count += m_testEntries.count(entry->GetName(wxPATH_UNIX));
}
@@ -1020,7 +1019,7 @@ void ArchiveTestCase<ClassFactoryT>::TestPairIterator(wxInputStream& in)
typedef std::map<wxString, EntryT*> ArchiveCatalog;
typedef typename ArchiveCatalog::iterator CatalogIter;
- auto_ptr<InputStreamT> arc(m_factory->NewStream(in));
+ wxScopedPtr<InputStreamT> arc(m_factory->NewStream(in));
size_t count = 0;
#ifdef WXARC_MEMBER_TEMPLATES
@@ -1032,7 +1031,7 @@ void ArchiveTestCase<ClassFactoryT>::TestPairIterator(wxInputStream& in)
#endif
for (CatalogIter it = cat.begin(); it != cat.end(); ++it) {
- auto_ptr<EntryT> entry(it->second);
+ wxScopedPtr<EntryT> entry(it->second);
count += m_testEntries.count(entry->GetName(wxPATH_UNIX));
}
@@ -1049,7 +1048,7 @@ void ArchiveTestCase<ClassFactoryT>::TestSmartIterator(wxInputStream& in)
typedef typename ArchiveCatalog::iterator CatalogIter;
typedef wxArchiveIterator<InputStreamT, Ptr<EntryT> > Iter;
- auto_ptr<InputStreamT> arc(m_factory->NewStream(in));
+ wxScopedPtr<InputStreamT> arc(m_factory->NewStream(in));
#ifdef WXARC_MEMBER_TEMPLATES
ArchiveCatalog cat((Iter)*arc, Iter());
@@ -1080,7 +1079,7 @@ void ArchiveTestCase<ClassFactoryT>::TestSmartPairIterator(wxInputStream& in)
typedef wxArchiveIterator<InputStreamT,
std::pair<wxString, Ptr<EntryT> > > PairIter;
- auto_ptr<InputStreamT> arc(m_factory->NewStream(in));
+ wxScopedPtr<InputStreamT> arc(m_factory->NewStream(in));
#ifdef WXARC_MEMBER_TEMPLATES
ArchiveCatalog cat((PairIter)*arc, PairIter());
@@ -1108,8 +1107,8 @@ void ArchiveTestCase<ClassFactoryT>::ReadSimultaneous(TestInputStream& in)
// create two archive input streams
TestInputStream in2(in);
- auto_ptr<InputStreamT> arc(m_factory->NewStream(in));
- auto_ptr<InputStreamT> arc2(m_factory->NewStream(in2));
+ wxScopedPtr<InputStreamT> arc(m_factory->NewStream(in));
+ wxScopedPtr<InputStreamT> arc2(m_factory->NewStream(in2));
// load the catalog
#ifdef WXARC_MEMBER_TEMPLATES
@@ -1201,7 +1200,7 @@ protected:
void CreateArchive(wxOutputStream& out);
void ExtractArchive(wxInputStream& in);
- auto_ptr<wxArchiveClassFactory> m_factory; // factory to make classes
+ wxScopedPtr<wxArchiveClassFactory> m_factory; // factory to make classes
int m_options; // test options
};
@@ -1241,7 +1240,7 @@ void CorruptionTestCase::runTest()
void CorruptionTestCase::CreateArchive(wxOutputStream& out)
{
- auto_ptr<wxArchiveOutputStream> arc(m_factory->NewStream(out));
+ wxScopedPtr<wxArchiveOutputStream> arc(m_factory->NewStream(out));
arc->PutNextDirEntry(wxT("dir"));
arc->PutNextEntry(wxT("file"));
@@ -1250,8 +1249,8 @@ void CorruptionTestCase::CreateArchive(wxOutputStream& out)
void CorruptionTestCase::ExtractArchive(wxInputStream& in)
{
- auto_ptr<wxArchiveInputStream> arc(m_factory->NewStream(in));
- auto_ptr<wxArchiveEntry> entry(arc->GetNextEntry());
+ wxScopedPtr<wxArchiveInputStream> arc(m_factory->NewStream(in));
+ wxScopedPtr<wxArchiveEntry> entry(arc->GetNextEntry());
while (entry.get() != NULL) {
char buf[1024];
@@ -1259,7 +1258,6 @@ void CorruptionTestCase::ExtractArchive(wxInputStream& in)
while (arc->IsOk())
arc->Read(buf, sizeof(buf));
- auto_ptr<wxArchiveEntry> next(arc->GetNextEntry());
- entry = next;
+ entry.reset(arc->GetNextEntry());
}
}
diff --git a/tests/archive/archivetest.h b/tests/archive/archivetest.h
index 7a1a306..37a083c 100644
--- a/tests/archive/archivetest.h
+++ b/tests/archive/archivetest.h
@@ -13,7 +13,7 @@
#include "wx/archive.h"
#include "wx/wfstream.h"
-
+#include "wx/scopedptr.h"
///////////////////////////////////////////////////////////////////////////////
// Bit flags for options for the tests
@@ -213,7 +213,7 @@ protected:
typedef std::map<wxString, TestEntry*> TestEntries;
TestEntries m_testEntries; // test data
- std::auto_ptr<ClassFactoryT> m_factory; // factory to make classes
+ wxScopedPtr<ClassFactoryT> m_factory; // factory to make classes
int m_options; // test options
wxDateTime m_timeStamp; // timestamp to give test entries
int m_id; // select between the possibilites
diff --git a/tests/archive/ziptest.cpp b/tests/archive/ziptest.cpp
index 3e9cff3..dc3fef5 100644
--- a/tests/archive/ziptest.cpp
+++ b/tests/archive/ziptest.cpp
@@ -22,7 +22,6 @@
#include "wx/zipstrm.h"
using std::string;
-using std::auto_ptr;
///////////////////////////////////////////////////////////////////////////////
@@ -186,7 +185,7 @@ void ZipPipeTestCase::runTest()
TestInputStream in(out, m_id % ((m_options & PipeIn) ? 4 : 3));
wxZipInputStream zip(in);
- auto_ptr<wxZipEntry> entry(zip.GetNextEntry());
+ wxScopedPtr<wxZipEntry> entry(zip.GetNextEntry());
CPPUNIT_ASSERT(entry.get() != NULL);
if ((m_options & PipeIn) == 0)
diff --git a/tests/net/socket.cpp b/tests/net/socket.cpp
index acd91ae..7e27fc4 100644
--- a/tests/net/socket.cpp
+++ b/tests/net/socket.cpp
@@ -28,10 +28,11 @@
#include "wx/url.h"
#include "wx/sstream.h"
#include "wx/evtloop.h"
+#include "wx/scopedptr.h"
#include <memory>
-typedef std::auto_ptr<wxSockAddress> wxSockAddressPtr;
-typedef std::auto_ptr<wxSocketClient> wxSocketClientPtr;
+typedef wxScopedPtr<wxSockAddress> wxSockAddressPtr;
+typedef wxScopedPtr<wxSocketClient> wxSocketClientPtr;
static wxString gs_serverHost(wxGetenv("WX_TEST_SERVER"));
@@ -257,7 +258,7 @@ void SocketTestCase::UrlTest()
wxURL url("http://" + gs_serverHost);
- const std::auto_ptr<wxInputStream> in(url.GetInputStream());
+ const wxScopedPtr<wxInputStream> in(url.GetInputStream());
CPPUNIT_ASSERT( in.get() );
wxStringOutputStream out;
diff --git a/tests/streams/largefile.cpp b/tests/streams/largefile.cpp
index 9c6c481..59fca24 100644
--- a/tests/streams/largefile.cpp
+++ b/tests/streams/largefile.cpp
@@ -33,6 +33,7 @@
#include "wx/filename.h"
#include "wx/wfstream.h"
+#include "wx/scopedptr.h"
#ifdef __WINDOWS__
#include "wx/msw/wrapwin.h"
@@ -51,7 +52,6 @@
#define fileno _fileno
#endif
-using std::auto_ptr;
///////////////////////////////////////////////////////////////////////////////
@@ -120,7 +120,7 @@ void LargeFileTest::runTest()
// write a large file
{
- auto_ptr<wxOutputStream> out(MakeOutStream(tmpfile.m_name));
+ wxScopedPtr<wxOutputStream> out(MakeOutStream(tmpfile.m_name));
// write 'A's at [ 0x7fffffbf, 0x7fffffff [
pos = 0x7fffffff - size;
@@ -154,7 +154,7 @@ void LargeFileTest::runTest()
// read the large file back
{
- auto_ptr<wxInputStream> in(MakeInStream(tmpfile.m_name));
+ wxScopedPtr<wxInputStream> in(MakeInStream(tmpfile.m_name));
char buf[size];
if (haveLFS) {
@@ -218,7 +218,7 @@ protected:
wxInputStream *LargeFileTest_wxFile::MakeInStream(const wxString& name) const
{
- auto_ptr<wxFileInputStream> in(new wxFileInputStream(name));
+ wxScopedPtr<wxFileInputStream> in(new wxFileInputStream(name));
CPPUNIT_ASSERT(in->IsOk());
return in.release();
}
@@ -250,7 +250,7 @@ protected:
wxInputStream *LargeFileTest_wxFFile::MakeInStream(const wxString& name) const
{
- auto_ptr<wxFFileInputStream> in(new wxFFileInputStream(name));
+ wxScopedPtr<wxFFileInputStream> in(new wxFFileInputStream(name));
CPPUNIT_ASSERT(in->IsOk());
return in.release();
}
diff --git a/wxWidgets-3.0.5.1/src/stc/scintilla/src/Editor.cxx.old b/wxWidgets-3.0.5.1/src/stc/scintilla/src/Editor.cxx
index 2081df2..a8c8572 100644
--- a/src/stc/scintilla/src/Editor.cxx
+++ b/src/stc/scintilla/src/Editor.cxx
@@ -41,6 +41,7 @@
#include "Selection.h"
#include "PositionCache.h"
#include "Editor.h"
+#include "wx/scopedptr.h"
#ifdef SCI_NAMESPACE
using namespace Scintilla;
@@ -5706,7 +5707,7 @@ long Editor::FindText(
Sci_TextToFind *ft = reinterpret_cast<Sci_TextToFind *>(lParam);
int lengthFound = istrlen(ft->lpstrText);
- std::auto_ptr<CaseFolder> pcf(CaseFolderForEncoding());
+ wxScopedPtr<CaseFolder> pcf(CaseFolderForEncoding());
int pos = pdoc->FindText(ft->chrg.cpMin, ft->chrg.cpMax, ft->lpstrText,
(wParam & SCFIND_MATCHCASE) != 0,
(wParam & SCFIND_WHOLEWORD) != 0,

View File

@@ -0,0 +1,19 @@
diff --git a/configure b/configure
index d2acb7d..69ae083 100755
--- a/configure
+++ b/configure
@@ -45622,6 +45622,14 @@ $as_echo "yes" >&6; }
fi
fi
+# explicit override to enable or disable tests
+if test "${enable_tests+set}" = set; then
+ SUBDIRS="$SUBDIRS tests"
+fi
+if test "${disable_tests+set}" = set; then
+ SUBDIRS="${SUBDIRS% tests}"
+fi
+
for subdir in $SUBDIRS; do
if test -d ${srcdir}/${subdir} ; then
if test "$wxUSE_GUI" = "yes"; then

View File

@@ -0,0 +1,12 @@
Modify AddStdCatalog to use the versioned wxstd32-gtk3.mo.
--- a/src/common/translation.cpp
+++ b/src/common/translation.cpp
@@ -1409,7 +1409,7 @@ bool wxTranslations::AddStdCatalog()
if ( AddCatalog("wxstd-" wxSTRINGIZE(wxMAJOR_VERSION) "." wxSTRINGIZE(wxMINOR_VERSION)) )
return true;
- if ( AddCatalog(wxS("wxstd")) )
+ if ( AddCatalog(wxS("wxstd32-gtk3")) )
return true;
return false;

View File

@@ -0,0 +1,33 @@
From eafc2ad88b9164a8ef6bd2f6d79e8d7da90246e8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Arsen=20Arsenovi=C4=87?= <arsen@aarsen.me>
Date: Mon, 19 Dec 2022 12:30:09 +0100
Subject: [PATCH] tests: Prefer /lib64 to /lib in DynamicLibrary test
---
Upstream has been notified about this test failure, however, I'd prefer a
different fix in place of this one, so I haven't sent a patch in yet.
https://github.com/wxWidgets/wxWidgets/commit/512b8033feef6ba99c4dfdf6ada42a56d7425d6d
tests/misc/dynamiclib.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tests/misc/dynamiclib.cpp b/tests/misc/dynamiclib.cpp
index 020eb5b..ee41f1d 100644
--- a/tests/misc/dynamiclib.cpp
+++ b/tests/misc/dynamiclib.cpp
@@ -37,9 +37,10 @@ TEST_CASE("DynamicLibrary::Load", "[dynlib]")
#else // other Unix
static const char* const candidateDirs[] =
{
+ "/lib64",
+ "/usr/lib64",
"/lib/x86_64-linux-gnu",
"/lib",
- "/lib64",
"/usr/lib",
};
--
2.39.0

View File

@@ -0,0 +1,185 @@
From d886c4cada68ed5bfdca72de846182be63f2619e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Arsen=20Arsenovi=C4=87?= <arsen@aarsen.me>
Date: Mon, 19 Dec 2022 11:30:58 +0100
Subject: [PATCH] configure.in: Allow disabling Wayland support
---
This patch is not forwarded upstream since, AFAIK, the autoconf+bakefile build
system is currently in the process of being replaced.
This patch enables us to explicitly disable GDK wayland platform detection via
an enable flag. It doesn't implement failed detection logic since that
shouldn't happen in the scenario Portage is in. This patch also runs includes
patches for the configure script itself, because the configuration was
generated by a seemingly patched Autoconf 2.69.
configure | 53 +++++++++++++++++++++++++++++++++++++++++++---------
configure.in | 37 ++++++++++++++++++++----------------
2 files changed, 65 insertions(+), 25 deletions(-)
diff --git a/configure b/configure
index 54eb7a7..b6d5e52 100755
--- a/configure
+++ b/configure
@@ -1218,6 +1218,7 @@ enable_textfile
enable_timer
enable_variant
enable_zipstream
+enable_wayland
enable_url
enable_protocol
enable_protocol_http
@@ -2190,6 +2191,7 @@ Optional Features:
--enable-timer use wxTimer class
--enable-variant use wxVariant class
--enable-zipstream use wxZip streams
+ --enable-wayland allow using Wayland EGL backend
--enable-url use wxURL class
--enable-protocol use wxProtocol class
--enable-protocol-http HTTP support in wxProtocol
@@ -8228,6 +8230,35 @@ fi
eval "$wx_cv_use_zipstream"
+ enablestring=
+ defaultval=$wxUSE_ALL_FEATURES
+ if test -z "$defaultval"; then
+ if test x"$enablestring" = xdisable; then
+ defaultval=yes
+ else
+ defaultval=no
+ fi
+ fi
+
+ # Check whether --enable-wayland was given.
+if test "${enable_wayland+set}" = set; then :
+ enableval=$enable_wayland;
+ if test "$enableval" = yes; then
+ wx_cv_use_wayland='wxUSE_WAYLAND=yes'
+ else
+ wx_cv_use_wayland='wxUSE_WAYLAND=no'
+ fi
+
+else
+
+ wx_cv_use_wayland='wxUSE_WAYLAND=${'DEFAULT_wxUSE_WAYLAND":-$defaultval}"
+
+fi
+
+
+ eval "$wx_cv_use_wayland"
+
+
enablestring=
defaultval=$wxUSE_ALL_FEATURES
@@ -29335,26 +29366,27 @@ done
TOOLKIT=GTK
GUIDIST=GTK_DIST
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GDK Wayland backend" >&5
+ if test x"$wxUSE_WAYLAND" = xyes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GDK Wayland backend" >&5
$as_echo_n "checking for GDK Wayland backend... " >&6; }
if ${wx_cv_gdk_wayland+:} false; then :
$as_echo_n "(cached) " >&6
else
- save_CFLAGS=$CFLAGS
- CFLAGS="$CFLAGS $TOOLKIT_INCLUDE"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ save_CFLAGS=$CFLAGS
+ CFLAGS="$CFLAGS $TOOLKIT_INCLUDE"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
- #include <gdk/gdk.h>
+ #include <gdk/gdk.h>
int
main ()
{
- #ifndef GDK_WINDOWING_WAYLAND
- Not GDK Windowing Wayland
- #endif
+ #ifndef GDK_WINDOWING_WAYLAND
+ Not GDK Windowing Wayland
+ #endif
;
return 0;
@@ -29367,11 +29399,14 @@ else
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- CFLAGS=$save_CFLAGS
+ CFLAGS=$save_CFLAGS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $wx_cv_gdk_wayland" >&5
$as_echo "$wx_cv_gdk_wayland" >&6; }
+ else
+ wx_cv_gdk_wayland=no
+ fi
if test "$wxUSE_GPE" = "yes"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gpewidget library" >&5
diff --git a/configure.in b/configure.in
index c76c528..430cdff 100644
--- a/configure.in
+++ b/configure.in
@@ -779,6 +779,7 @@ WX_ARG_FEATURE(textfile, [ --enable-textfile use wxTextFile class],
WX_ARG_FEATURE(timer, [ --enable-timer use wxTimer class], wxUSE_TIMER)
WX_ARG_FEATURE(variant, [ --enable-variant use wxVariant class], wxUSE_VARIANT)
WX_ARG_FEATURE(zipstream, [ --enable-zipstream use wxZip streams], wxUSE_ZIPSTREAM)
+WX_ARG_FEATURE(wayland, [ --enable-wayland allow using Wayland EGL backend], wxUSE_WAYLAND)
dnl URL-related classes
WX_ARG_FEATURE(url, [ --enable-url use wxURL class], wxUSE_URL)
@@ -3292,22 +3293,26 @@ libraries returned by 'pkg-config gtk+-2.0 --libs' or 'gtk-config
TOOLKIT=GTK
GUIDIST=GTK_DIST
- AC_CACHE_CHECK([for GDK Wayland backend], wx_cv_gdk_wayland, [
- save_CFLAGS=$CFLAGS
- CFLAGS="$CFLAGS $TOOLKIT_INCLUDE"
- AC_TRY_COMPILE([
- #include <gdk/gdk.h>
- ],
- [
- #ifndef GDK_WINDOWING_WAYLAND
- Not GDK Windowing Wayland
- #endif
- ],
- wx_cv_gdk_wayland=yes,
- wx_cv_gdk_wayland=no
- )
- CFLAGS=$save_CFLAGS
- ])
+ if test x"$wxUSE_WAYLAND" = xyes; then
+ AC_CACHE_CHECK([for GDK Wayland backend], wx_cv_gdk_wayland, [
+ save_CFLAGS=$CFLAGS
+ CFLAGS="$CFLAGS $TOOLKIT_INCLUDE"
+ AC_TRY_COMPILE([
+ #include <gdk/gdk.h>
+ ],
+ [
+ #ifndef GDK_WINDOWING_WAYLAND
+ Not GDK Windowing Wayland
+ #endif
+ ],
+ wx_cv_gdk_wayland=yes,
+ wx_cv_gdk_wayland=no
+ )
+ CFLAGS=$save_CFLAGS
+ ])
+ else
+ wx_cv_gdk_wayland=no
+ fi
dnl test for external libxpm if we're configured to use it
if test "$wxUSE_GPE" = "yes"; then
--
2.39.0

View File

@@ -0,0 +1,88 @@
https://bugs.gentoo.org/916884
https://github.com/wxWidgets/wxWidgets/pull/24197
From 891bfff867b7dc92ed6330ea46ee2dcfa5424ee0 Mon Sep 17 00:00:00 2001
From: Cliff Zhao <qzhao@suse.com>
Date: Thu, 4 Jan 2024 08:01:00 +0100
Subject: [PATCH] Fix testsuite failures on s390x
``/sys/power/state`` does not exist on s390x platforms and certain
types of containers, so check that the file exist before running the
test case.
Output from ``make check`` was:
./textfile/textfiletest.cpp:351
...............................................................................
./textfile/textfiletest.cpp:354: FAILED:
CHECK( f.Open("/sys/power/state") )
with expansion:
false
./textfile/textfiletest.cpp:355: FAILED:
REQUIRE( f.GetLineCount() == 1 )
with expansion:
0 == 1
---
tests/file/filetest.cpp | 2 ++
tests/filename/filenametest.cpp | 2 ++
tests/textfile/textfiletest.cpp | 2 ++
3 files changed, 6 insertions(+)
diff --git a/tests/file/filetest.cpp b/tests/file/filetest.cpp
index 8902eb4d6684..fc3c90569480 100644
--- a/tests/file/filetest.cpp
+++ b/tests/file/filetest.cpp
@@ -153,6 +153,7 @@ TEST_CASE("wxFile::Special", "[file][linux][special-file]")
CHECK( fileProc.ReadAll(&s) );
CHECK( !s.empty() );
+ if ( wxFile::Exists("/sys/power/state") ) {
// All files in /sys have the size of one kernel page, even if they don't
// have that much data in them.
const long pageSize = sysconf(_SC_PAGESIZE);
@@ -163,6 +164,7 @@ TEST_CASE("wxFile::Special", "[file][linux][special-file]")
CHECK( fileSys.ReadAll(&s) );
CHECK( !s.empty() );
CHECK( s.length() < pageSize );
+ }
}
#endif // __LINUX__
diff --git a/tests/filename/filenametest.cpp b/tests/filename/filenametest.cpp
index 84356b39f719..ce2ec2af2760 100644
--- a/tests/filename/filenametest.cpp
+++ b/tests/filename/filenametest.cpp
@@ -1040,9 +1040,11 @@ TEST_CASE("wxFileName::GetSizeSpecial", "[filename][linux][special-file]")
INFO( "size of /proc/kcore=" << size );
CHECK( size > 0 );
+ if ( wxFile::Exists("/sys/power/state") ) {
// All files in /sys are one page in size, irrespectively of the size of
// their actual contents.
CHECK( wxFileName::GetSize("/sys/power/state") == sysconf(_SC_PAGESIZE) );
+ }
}
#endif // __LINUX__
diff --git a/tests/textfile/textfiletest.cpp b/tests/textfile/textfiletest.cpp
index f744ffc3271b..73467be8f85f 100644
--- a/tests/textfile/textfiletest.cpp
+++ b/tests/textfile/textfiletest.cpp
@@ -348,6 +348,7 @@ TEST_CASE("wxTextFile::Special", "[textfile][linux][special-file]")
CHECK( f.GetLineCount() > 1 );
}
+ if ( wxFile::Exists("/sys/power/state") ) {
SECTION("/sys")
{
wxTextFile f;
@@ -356,6 +357,7 @@ TEST_CASE("wxTextFile::Special", "[textfile][linux][special-file]")
INFO( "/sys/power/state contains \"" << f[0] << "\"" );
CHECK( (f[0].find("mem") != wxString::npos || f[0].find("disk") != wxString::npos) );
}
+ }
}
#endif // __LINUX__

View File

@@ -0,0 +1,48 @@
From f092f50b794b487e552e930b11d165a736fc8edb Mon Sep 17 00:00:00 2001
From: Arsen Arsenović <arsen@gentoo.org>
Date: Sun, 2 Apr 2023 13:25:11 +0200
Subject: [PATCH] configure: Remove flag deduplication logic
Parsing compiler flags is a complex task that this function screws up.
Bug: https://bugs.gentoo.org/903668
---
configure | 5 ++---
configure.in | 5 ++---
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/configure b/configure
index a476a3c..a9b815b 100755
--- a/configure
+++ b/configure
@@ -45550,9 +45550,8 @@ esac
dedup_flags()
{
- printf "%s " "$@" |
- awk 'BEGIN { RS=" "; ORS=" " }
- { if ($0=="-arch" || $0=="-framework" || !seen[$0]++) print }'
+ # Gentoo: Don't hack out flags, parsing them is complex.
+ printf '%s ' "$@"
}
WX_CPPFLAGS=`dedup_flags "$CPPFLAGS"`
diff --git a/configure.in b/configure.in
index a4c4178..9cf9c30 100644
--- a/configure.in
+++ b/configure.in
@@ -8570,9 +8570,8 @@ dnl flags which are explicitly allowed to occur multiple times, as all their
dnl occurrences must be preserved).
dedup_flags()
{
- printf "%s " "$@" |
- awk 'BEGIN { RS=" "; ORS=" " }
- { if ($0=="-arch" || $0=="-framework" || !seen[[$0]]++) print }'
+ # Gentoo: Don't hack out flags, parsing them is complex.
+ printf '%s ' "$@"
}
WX_CPPFLAGS=`dedup_flags "$CPPFLAGS"`
--
2.40.0

View File

@@ -0,0 +1,18 @@
--- wxWidgets-3.2.5/configure.orig 2024-07-20 05:18:49.509254253 +0000
+++ wxWidgets-3.2.5/configure 2024-07-20 05:20:47.575983942 +0000
@@ -45700,13 +45700,8 @@
dedup_flags()
{
- printf "%s " "$@" |
- awk 'BEGIN { RS=" "; ORS=" " }
- {
- if ($0=="") next
- if ($0=="-arch" || $0=="-framework") { x=$0; next }
- if (x!="") x=x " " $0; else x=$0; if (!seen[x]++) print x; x=""
- }'
+ # Gentoo: Don't hack out flags, parsing them is complex.
+ printf '%s ' "$@"
}
WX_CPPFLAGS=`dedup_flags "$CPPFLAGS"`

View File

@@ -0,0 +1,28 @@
diff --git a/configure b/configure
index 0f3c4c9..92c84f3 100755
--- a/configure
+++ b/configure
@@ -1368,6 +1368,7 @@ enable_dependency_tracking
enable_precomp_headers
with_cppunit_prefix
with_cppunit_exec_prefix
+enable_tests
'
ac_precious_vars='build_alias
host_alias
@@ -40955,8 +40956,13 @@ fi
fi
-
-
+# explicit override to enable or disable tests
+if test "${enable_tests+set}" = set; then
+ SUBDIRS="$SUBDIRS tests"
+fi
+if test "${disable_tests+set}" = set; then
+ SUBDIRS="${SUBDIRS% tests}"
+fi
for subdir in $SUBDIRS; do

View File

@@ -0,0 +1,39 @@
Description: Suppress error about mismatching C++ ABI version
In practice, the differences between recent ABI versions don't seem to be
incompatible since they apparently only affect obscure corner cases. So
suppress this error so we don't have to rebuild the entire wx world in one
go.
Author: Olly Betts <olly@survex.com>
Forwarded: no
Last-Update: 2017-07-26
From: https://salsa.debian.org/freewx-team/wx/blob/wx3.0-debian/debian/patches/warn-for-compiler-abi-mismatch.patch
--- a/src/common/appbase.cpp
+++ b/src/common/appbase.cpp
@@ -762,6 +762,26 @@
msg.Printf(wxT("Mismatch between the program and library build versions detected.\nThe library used %s,\nand %s used %s."),
lib.c_str(), progName.c_str(), prog.c_str());
+ int l_off = lib.Find("compiler with C++ ABI ");
+ int p_off = prog.Find("compiler with C++ ABI ");
+ if (l_off != wxNOT_FOUND && p_off != wxNOT_FOUND) {
+ int space;
+ space = lib.find(',', l_off + 22);
+ lib.erase(l_off, space - l_off);
+ space = prog.find(',', p_off + 22);
+ prog.erase(p_off, space - p_off);
+ if (lib == prog) {
+ // The only difference is the ABI version, which apparently only
+ // affect obscure cases. We used to warn here, so at least
+ // there was an indication of what's up if there is a problem
+ // due to ABI incompatibilities, but wxLogWarning() can result
+ // in a pop up dialog with some applications, which is just too
+ // intrusive, so just quietly ignore instead.
+ //wxLogWarning(msg.c_str());
+ return false;
+ }
+ }
+
wxLogFatalError(msg.c_str());
// normally wxLogFatalError doesn't return

View File

@@ -0,0 +1,264 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit multilib-minimal flag-o-matic toolchain-funcs
WXSUBVERSION="${PV}-gtk3" # 3.2.6-gtk3
WXVERSION="$(ver_cut 1-3)" # 3.2.6
# Make sure that this matches the number of components in ${PV}
WXRELEASE="$(ver_cut 1-2)-gtk3" # 3.2-gtk3
WXRELEASE_NODOT=${WXRELEASE//./} # 32-gtk3
DESCRIPTION="GTK version of wxWidgets, a cross-platform C++ GUI toolkit"
HOMEPAGE="https://wxwidgets.org/"
SRC_URI="
https://github.com/wxWidgets/wxWidgets/releases/download/v${PV}/wxWidgets-${PV}.tar.bz2
doc? ( https://github.com/wxWidgets/wxWidgets/releases/download/v${PV}/wxWidgets-${PV}-docs-html.tar.bz2 )"
S="${WORKDIR}/wxWidgets-${PV}"
LICENSE="wxWinLL-3 GPL-2 doc? ( wxWinFDL-3 )"
SLOT="${WXRELEASE}"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux"
IUSE="+X curl doc debug keyring gstreamer libnotify +lzma opengl pch sdl +spell test tiff wayland webkit X"
REQUIRED_USE="test? ( tiff ) tiff? ( X ) spell? ( X ) keyring? ( X )"
RESTRICT="!test? ( test )"
RDEPEND="
>=app-eselect/eselect-wxwidgets-20131230
dev-libs/expat[${MULTILIB_USEDEP}]
dev-libs/libpcre2[pcre16,pcre32,unicode]
sdl? ( media-libs/libsdl2[${MULTILIB_USEDEP}] )
curl? ( net-misc/curl )
lzma? ( app-arch/xz-utils )
X? (
>=dev-libs/glib-2.22:2[${MULTILIB_USEDEP}]
media-libs/libjpeg-turbo:=[${MULTILIB_USEDEP}]
media-libs/libpng:0=[${MULTILIB_USEDEP}]
sys-libs/zlib[${MULTILIB_USEDEP}]
x11-libs/cairo[${MULTILIB_USEDEP}]
>=x11-libs/gtk+-3.24.41-r1:3[wayland?,X?,${MULTILIB_USEDEP}]
x11-libs/gdk-pixbuf:2[${MULTILIB_USEDEP}]
x11-libs/libSM[${MULTILIB_USEDEP}]
x11-libs/libX11[${MULTILIB_USEDEP}]
x11-libs/libXtst
x11-libs/libXxf86vm[${MULTILIB_USEDEP}]
media-libs/fontconfig
x11-libs/pango[${MULTILIB_USEDEP}]
keyring? ( app-crypt/libsecret )
gstreamer? (
media-libs/gstreamer:1.0[${MULTILIB_USEDEP}]
media-libs/gst-plugins-base:1.0[${MULTILIB_USEDEP}]
media-libs/gst-plugins-bad:1.0[${MULTILIB_USEDEP}]
)
libnotify? ( x11-libs/libnotify[${MULTILIB_USEDEP}] )
opengl? (
virtual/opengl[${MULTILIB_USEDEP}]
wayland? ( dev-libs/wayland )
)
spell? ( app-text/gspell:= )
tiff? ( media-libs/tiff:=[${MULTILIB_USEDEP}] )
webkit? ( net-libs/webkit-gtk:4.1= )
)"
DEPEND="${RDEPEND}
opengl? ( virtual/glu[${MULTILIB_USEDEP}] )
X? ( x11-base/xorg-proto )"
BDEPEND="
test? ( >=dev-util/cppunit-1.8.0 )
>=app-eselect/eselect-wxwidgets-20131230
virtual/pkgconfig"
# Note about the gst-plugin-base dep: The build system queries for it,
# but doesn't link it for some reason? Either way - probably best to
# depend on it anyway.
# Note about the wayland dep: Appears to be only required for the OpenGL
# canvas, and it seems impossible to disable the X dependency, unless
# I'm missing something. This is an automagic header dep, though.
PATCHES=(
"${FILESDIR}/${PN}-3.2.1-configure-tests.patch"
"${FILESDIR}/${PN}-3.2.1-wayland-control.patch"
"${FILESDIR}/${PN}-3.2.1-prefer-lib64-in-tests.patch"
"${FILESDIR}/${PN}-3.2.5-dont-break-flags.patch"
)
src_prepare() {
default
# find . -iname Makefile.in -not -path ./samples'/*' \
# | xargs grep -l WX_RELEASE
local versioned_makefiles=(
./tests/benchmarks/Makefile.in
./tests/Makefile.in
./utils/emulator/src/Makefile.in
./utils/execmon/Makefile.in
./utils/wxrc/Makefile.in
./utils/helpview/src/Makefile.in
./utils/hhp2cached/Makefile.in
./utils/screenshotgen/src/Makefile.in
./utils/ifacecheck/src/Makefile.in
./Makefile.in
./demos/life/Makefile.in
./demos/bombs/Makefile.in
./demos/fractal/Makefile.in
./demos/forty/Makefile.in
./demos/poem/Makefile.in
)
# Versionating
sed -i \
-e "s:\(WX_RELEASE = \).*:\1${WXRELEASE}:"\
-e "s:\(WX_RELEASE_NODOT = \).*:\1${WXRELEASE_NODOT}:"\
-e "s:\(WX_VERSION = \).*:\1${WXVERSION}:"\
-e "s:aclocal):aclocal/wxwin${WXRELEASE_NODOT}.m4):" \
"${versioned_makefiles[@]}" || die
sed -i \
-e "s:\(WX_VERSION=\).*:\1${WXVERSION}:" \
-e "s:\(WX_RELEASE=\).*:\1${WXRELEASE}:" \
-e "s:\(WX_SUBVERSION=\).*:\1${WXSUBVERSION}:" \
-e '/WX_VERSION_TAG=/ s:${WX_RELEASE}:3.0:' \
configure || die
}
multilib_src_configure() {
# defang automagic dependencies, bug #927952
use wayland || append-cflags -DGENTOO_GTK_HIDE_WAYLAND
use X || append-cflags -DGENTOO_GTK_HIDE_X11
# bug #952961
tc-is-lto && filter-flags -fno-semantic-interposition
# Workaround for bug #915154
append-ldflags $(test-flags-CCLD -Wl,--undefined-version)
# X independent options
local myeconfargs=(
--with-zlib=sys
--with-expat=sys
--enable-compat30
--enable-xrc
$(use_with sdl)
$(use_with lzma liblzma)
# Currently defaults to curl, could change. Watch the VDB!
$(use_enable curl webrequest)
# PCHes are unstable and are disabled in-tree where possible
# See bug #504204
# Commits 8c4774042b7fdfb08e525d8af4b7912f26a2fdce, fb809aeadee57ffa24591e60cfb41aecd4823090
$(use_enable pch precomp-headers)
# Don't hard-code libdir's prefix for wx-config
--libdir='${prefix}'/$(get_libdir)
# Try to escape https://bugs.gentoo.org/955902
--disable-symver
)
# By default, we now build with the GLX GLCanvas because some software like
# PrusaSlicer does not yet support EGL:
#
# https://github.com/prusa3d/PrusaSlicer/issues/9774 .
#
# A solution for this is being developed upstream:
#
# https://github.com/wxWidgets/wxWidgets/issues/22325 .
#
# Any software that needs to use OpenGL under Wayland can be patched like
# this to run under xwayland:
#
# https://github.com/visualboyadvance-m/visualboyadvance-m/commit/aca206a721265366728222d025fec30ee500de82 .
#
# Check that the macro wxUSE_GLCANVAS_EGL is set to 1.
#
myeconfargs+=( "--disable-glcanvasegl" )
# debug in >=2.9
# there is no longer separate debug libraries (gtk2ud)
# wxDEBUG_LEVEL=1 is the default and we will leave it enabled
# wxDEBUG_LEVEL=2 enables assertions that have expensive runtime costs.
# apps can disable these features by building w/ -NDEBUG or wxDEBUG_LEVEL_0.
# http://docs.wxwidgets.org/3.0/overview_debugging.html
# https://groups.google.com/group/wx-dev/browse_thread/thread/c3c7e78d63d7777f/05dee25410052d9c
use debug && myeconfargs+=( --enable-debug=max )
# wxGTK options
# --enable-graphics_ctx - needed for webkit, editra
# --without-gnomevfs - bug #203389
use X && myeconfargs+=(
--enable-graphics_ctx
--with-gtkprint
--enable-gui
--with-gtk=3
--with-libpng=sys
--with-libjpeg=sys
# Choosing to enable this unconditionally seems fair, pcre2 is
# almost certain to be installed.
--with-regex=sys
--without-gnomevfs
$(use_enable gstreamer mediactrl)
$(multilib_native_use_enable webkit webview)
$(use_with libnotify)
$(use_with opengl)
$(use_with tiff libtiff sys)
$(use_enable keyring secretstore)
$(use_enable spell spellcheck)
$(use_enable test tests)
$(use_enable wayland)
)
# wxBase options
! use X && myeconfargs+=( --disable-gui )
# wxWidgets installs a configuration file with a reference to EGREP.
# Autoconf discovers these programs via full paths, which is
# unnecessary and fails if a build happened on a merged-usr system
# but is being used on a split-usr system. Bug #927920.
export ac_cv_path_SED="sed"
export ac_cv_path_EGREP="grep -E"
export ac_cv_path_EGREP_TRADITIONAL="grep -E"
export ac_cv_path_FGREP="grep -F"
export ac_cv_path_GREP="grep"
export ac_cv_path_lt_DD="dd"
ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
}
multilib_src_test() {
emake -C tests
(cd tests && ./test '~[.]~[net]') || die
}
multilib_src_install_all() {
cd docs || die
dodoc changes.txt readme.txt
newdoc base/readme.txt base_readme.txt
newdoc gtk/readme.txt gtk_readme.txt
use doc && HTML_DOCS=( "${WORKDIR}"/wxWidgets-${PV}-docs-html/. )
einstalldocs
# Unversioned links
rm "${ED}"/usr/bin/wx-config || die
rm "${ED}"/usr/bin/wxrc || die
# version bakefile presets
pushd "${ED}"/usr/share/bakefile/presets >/dev/null || die
local f
for f in wx*; do
mv "${f}" "${f/wx/wx32gtk3}" || die
done
popd >/dev/null || die
}
pkg_postinst() {
has_version -b app-eselect/eselect-wxwidgets \
&& eselect wxwidgets update
}
pkg_postrm() {
has_version -b app-eselect/eselect-wxwidgets \
&& eselect wxwidgets update
}