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

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