From a0ce545d52f231499bf9f3644493113d8af58ec9 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Thu, 9 May 2024 00:01:03 +0100 Subject: gentoo auto-resync : 09:05:2024 - 00:01:03 --- x11-libs/wxGTK/Manifest | 2 + .../wxGTK/files/wxGTK-3.0.5.1-excise-autoptr.patch | 322 +++++++++++++++++++++ x11-libs/wxGTK/wxGTK-3.0.5.1-r2.ebuild | 188 ++++++++++++ 3 files changed, 512 insertions(+) create mode 100644 x11-libs/wxGTK/files/wxGTK-3.0.5.1-excise-autoptr.patch create mode 100644 x11-libs/wxGTK/wxGTK-3.0.5.1-r2.ebuild (limited to 'x11-libs/wxGTK') diff --git a/x11-libs/wxGTK/Manifest b/x11-libs/wxGTK/Manifest index 187cc94904ef..3e11f31a1b22 100644 --- a/x11-libs/wxGTK/Manifest +++ b/x11-libs/wxGTK/Manifest @@ -1,6 +1,7 @@ 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 @@ -19,5 +20,6 @@ DIST wxWidgets-3.2.2.1-docs-html.tar.bz2 18109775 BLAKE2B bb5dad886c2ba64feb9ec3 DIST wxWidgets-3.2.2.1.tar.bz2 27339515 BLAKE2B e761e768dbb32bf76dbabf27aa9feb634760aa214c2d8f85f9b4284700d01390617c275a855fa3ae28481a38233f3a71f8560e5a8a360d7b72ace2603c551327 SHA512 289d61ea2abd75a329aafcbd347ab84b136f31fca01dd902593f661691ecd30a4416286ff501c4257baa6765cf356ade3087eb8609af9a44599cfdc20e2f03a6 EBUILD wxGTK-3.0.4-r5.ebuild 3855 BLAKE2B a5767a56c2ce7ffaa0c992edb38d13af09c6c13c68f7365d4ed9403614d9dfface7570559286081aa8cca8ab1fb5a05835c5d1b9031a7e57c87eedce3868e311 SHA512 12a803bee87b1341e5948672b8d501b4199fbcf36f4392458ad527e06f8b61e83d3fce029299666b8614f9ced6a099070ffdce028e3e12f11efcc8083ca8ea09 EBUILD wxGTK-3.0.5.1-r1.ebuild 5652 BLAKE2B af627de9327d718ac25c163fee1acc37cde2038bcac5404923388095c8ef266a8b200ba611fa75f13e75dde6492d820f16659a88ad921ae26d1118960e73077a SHA512 9e5daee2d0f0646a653c6319e4327eb6f13c4e45c91259ab5ba119a1e9914aec97dd5b9e5050dc0dc85081825d60c0201e6aea3f620a9d20c1772d6399dac51a +EBUILD wxGTK-3.0.5.1-r2.ebuild 5717 BLAKE2B 128f0cbb13c6c614c9a8c429b63684bb071f77b91b294ab1bf633447d999c6c91b68f3a159c9e306a917e447a77bd4dc43640df8bd7b27b1fd16d873d2b1c7f4 SHA512 a835963df5be7019be620fc389c5c7b001a484b387ed385798b957caafa08e570e55056d5e119a9b007a8d01041e5c1eade639f7251b67ebf315cce73dc6cb6a EBUILD wxGTK-3.2.2.1-r3.ebuild 7778 BLAKE2B 56582d7235c516fb948290ea02554f109462e097ca4c428d6bd6f274e6aed62079f83e30906e4fa5334dfb5daacaae2f3cb8661252a82231b79cdc835442924f SHA512 4531ae289f92e9b34a06373cd6fef4b12785dbf31e0955f1e736aa6f5f23bccb138bd152a21c3067885ac7ff9ca1e8c8a761aa8cbff59ee0ea8efacff311be8f MISC metadata.xml 756 BLAKE2B 336ffb3375ee9092de02d0808d0a44f7f5bcbc6e4a845c12b6466af0b91f3397c2b335e5433917361a060db43d6cb836cde0f87be2059214f314fa6726199e2d SHA512 190b72992c64b43b46e28ca2f730e1897a5f740ba211b859c816b4892256284feb579fbce06cb1939b774ae989dc68754f5a57f6375cfca50d7770d0c2ed47ed diff --git a/x11-libs/wxGTK/files/wxGTK-3.0.5.1-excise-autoptr.patch b/x11-libs/wxGTK/files/wxGTK-3.0.5.1-excise-autoptr.patch new file mode 100644 index 000000000000..e03f64632f2b --- /dev/null +++ b/x11-libs/wxGTK/files/wxGTK-3.0.5.1-excise-autoptr.patch @@ -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 + + using std::string; +-using std::auto_ptr; + + + // Check whether member templates can be used +@@ -559,7 +558,7 @@ TestEntry& ArchiveTestCase::Add(const char *name, + template + void ArchiveTestCase::CreateArchive(wxOutputStream& out) + { +- auto_ptr arc(m_factory->NewStream(out)); ++ wxScopedPtr arc(m_factory->NewStream(out)); + TestEntries::iterator it; + + OnCreateArchive(*arc); +@@ -587,7 +586,7 @@ void ArchiveTestCase::CreateArchive(wxOutputStream& out) + + if ((choices & 2) || testEntry.IsText()) { + // try PutNextEntry(EntryT *pEntry) +- auto_ptr entry(m_factory->NewEntry()); ++ wxScopedPtr entry(m_factory->NewEntry()); + entry->SetName(name, wxPATH_UNIX); + if (setIsDir) + entry->SetIsDir(); +@@ -701,8 +700,8 @@ template + void ArchiveTestCase::ModifyArchive(wxInputStream& in, + wxOutputStream& out) + { +- auto_ptr arcIn(m_factory->NewStream(in)); +- auto_ptr arcOut(m_factory->NewStream(out)); ++ wxScopedPtr arcIn(m_factory->NewStream(in)); ++ wxScopedPtr arcOut(m_factory->NewStream(out)); + EntryT *pEntry; + + const wxString deleteName = wxT("bin/bin1000"); +@@ -714,7 +713,7 @@ void ArchiveTestCase::ModifyArchive(wxInputStream& in, + arcOut->CopyArchiveMetaData(*arcIn); + + while ((pEntry = arcIn->GetNextEntry()) != NULL) { +- auto_ptr entry(pEntry); ++ wxScopedPtr entry(pEntry); + OnSetNotifier(*entry); + wxString name = entry->GetName(wxPATH_UNIX); + +@@ -759,7 +758,7 @@ void ArchiveTestCase::ModifyArchive(wxInputStream& in, + + // try adding a new entry + TestEntry& testEntry = Add(newName.mb_str(), newData); +- auto_ptr newentry(m_factory->NewEntry()); ++ wxScopedPtr newentry(m_factory->NewEntry()); + newentry->SetName(newName); + newentry->SetDateTime(testEntry.GetDateTime()); + newentry->SetSize(testEntry.GetLength()); +@@ -782,7 +781,7 @@ void ArchiveTestCase::ExtractArchive(wxInputStream& in) + typedef std::list Entries; + typedef typename Entries::iterator EntryIter; + +- auto_ptr arc(m_factory->NewStream(in)); ++ wxScopedPtr arc(m_factory->NewStream(in)); + int expectedTotal = m_testEntries.size(); + EntryPtr entry; + Entries entries; +@@ -991,7 +990,7 @@ void ArchiveTestCase::TestIterator(wxInputStream& in) + typedef std::list ArchiveCatalog; + typedef typename ArchiveCatalog::iterator CatalogIter; + +- auto_ptr arc(m_factory->NewStream(in)); ++ wxScopedPtr arc(m_factory->NewStream(in)); + size_t count = 0; + + #ifdef WXARC_MEMBER_TEMPLATES +@@ -1003,7 +1002,7 @@ void ArchiveTestCase::TestIterator(wxInputStream& in) + #endif + + for (CatalogIter it = cat.begin(); it != cat.end(); ++it) { +- auto_ptr entry(*it); ++ wxScopedPtr entry(*it); + count += m_testEntries.count(entry->GetName(wxPATH_UNIX)); + } + +@@ -1020,7 +1019,7 @@ void ArchiveTestCase::TestPairIterator(wxInputStream& in) + typedef std::map ArchiveCatalog; + typedef typename ArchiveCatalog::iterator CatalogIter; + +- auto_ptr arc(m_factory->NewStream(in)); ++ wxScopedPtr arc(m_factory->NewStream(in)); + size_t count = 0; + + #ifdef WXARC_MEMBER_TEMPLATES +@@ -1032,7 +1031,7 @@ void ArchiveTestCase::TestPairIterator(wxInputStream& in) + #endif + + for (CatalogIter it = cat.begin(); it != cat.end(); ++it) { +- auto_ptr entry(it->second); ++ wxScopedPtr entry(it->second); + count += m_testEntries.count(entry->GetName(wxPATH_UNIX)); + } + +@@ -1049,7 +1048,7 @@ void ArchiveTestCase::TestSmartIterator(wxInputStream& in) + typedef typename ArchiveCatalog::iterator CatalogIter; + typedef wxArchiveIterator > Iter; + +- auto_ptr arc(m_factory->NewStream(in)); ++ wxScopedPtr arc(m_factory->NewStream(in)); + + #ifdef WXARC_MEMBER_TEMPLATES + ArchiveCatalog cat((Iter)*arc, Iter()); +@@ -1080,7 +1079,7 @@ void ArchiveTestCase::TestSmartPairIterator(wxInputStream& in) + typedef wxArchiveIterator > > PairIter; + +- auto_ptr arc(m_factory->NewStream(in)); ++ wxScopedPtr arc(m_factory->NewStream(in)); + + #ifdef WXARC_MEMBER_TEMPLATES + ArchiveCatalog cat((PairIter)*arc, PairIter()); +@@ -1108,8 +1107,8 @@ void ArchiveTestCase::ReadSimultaneous(TestInputStream& in) + + // create two archive input streams + TestInputStream in2(in); +- auto_ptr arc(m_factory->NewStream(in)); +- auto_ptr arc2(m_factory->NewStream(in2)); ++ wxScopedPtr arc(m_factory->NewStream(in)); ++ wxScopedPtr 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 m_factory; // factory to make classes ++ wxScopedPtr 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 arc(m_factory->NewStream(out)); ++ wxScopedPtr 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 arc(m_factory->NewStream(in)); +- auto_ptr entry(arc->GetNextEntry()); ++ wxScopedPtr arc(m_factory->NewStream(in)); ++ wxScopedPtr 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 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 TestEntries; + TestEntries m_testEntries; // test data +- std::auto_ptr m_factory; // factory to make classes ++ wxScopedPtr 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 entry(zip.GetNextEntry()); ++ wxScopedPtr 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 + +-typedef std::auto_ptr wxSockAddressPtr; +-typedef std::auto_ptr wxSocketClientPtr; ++typedef wxScopedPtr wxSockAddressPtr; ++typedef wxScopedPtr 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 in(url.GetInputStream()); ++ const wxScopedPtr 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 out(MakeOutStream(tmpfile.m_name)); ++ wxScopedPtr 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 in(MakeInStream(tmpfile.m_name)); ++ wxScopedPtr 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 in(new wxFileInputStream(name)); ++ wxScopedPtr 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 in(new wxFFileInputStream(name)); ++ wxScopedPtr 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(lParam); + int lengthFound = istrlen(ft->lpstrText); +- std::auto_ptr pcf(CaseFolderForEncoding()); ++ wxScopedPtr pcf(CaseFolderForEncoding()); + int pos = pdoc->FindText(ft->chrg.cpMin, ft->chrg.cpMax, ft->lpstrText, + (wParam & SCFIND_MATCHCASE) != 0, + (wParam & SCFIND_WHOLEWORD) != 0, diff --git a/x11-libs/wxGTK/wxGTK-3.0.5.1-r2.ebuild b/x11-libs/wxGTK/wxGTK-3.0.5.1-r2.ebuild new file mode 100644 index 000000000000..832b85ae5e18 --- /dev/null +++ b/x11-libs/wxGTK/wxGTK-3.0.5.1-r2.ebuild @@ -0,0 +1,188 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit multilib-minimal flag-o-matic + +WXSUBVERSION=${PV}-gtk3 # 3.0.5.1-gtk3 +WXVERSION=${WXSUBVERSION%.*} # 3.0.5 +WXRELEASE=${WXVERSION%.*}-gtk3 # 3.0-gtk3 +WXRELEASE_NODOT=${WXRELEASE//./} # 30-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 + https://dev.gentoo.org/~leio/distfiles/wxGTK-${WXVERSION}_p20210214.tar.xz + doc? ( https://github.com/wxWidgets/wxWidgets/releases/download/v${WXVERSION}/wxWidgets-${WXVERSION}-docs-html.tar.bz2 )" +S="${WORKDIR}/wxWidgets-${PV}" + +LICENSE="wxWinLL-3 GPL-2 doc? ( wxWinFDL-3 )" +SLOT="${WXRELEASE}" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux" +IUSE="+X doc debug gstreamer libnotify opengl pch sdl test tiff webkit" +REQUIRED_USE="test? ( tiff ) tiff? ( X )" +RESTRICT="!test? ( test )" + +RDEPEND=" + >=app-eselect/eselect-wxwidgets-20131230 + dev-libs/expat[${MULTILIB_USEDEP}] + sdl? ( media-libs/libsdl2[${MULTILIB_USEDEP}] ) + 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[${MULTILIB_USEDEP}] + x11-libs/gdk-pixbuf[${MULTILIB_USEDEP}] + x11-libs/libSM[${MULTILIB_USEDEP}] + x11-libs/libX11[${MULTILIB_USEDEP}] + x11-libs/libXxf86vm[${MULTILIB_USEDEP}] + x11-libs/pango[${MULTILIB_USEDEP}] + gstreamer? ( + media-libs/gstreamer:1.0[${MULTILIB_USEDEP}] + media-libs/gst-plugins-base:1.0[${MULTILIB_USEDEP}] + ) + libnotify? ( x11-libs/libnotify[${MULTILIB_USEDEP}] ) + opengl? ( virtual/opengl[${MULTILIB_USEDEP}] ) + tiff? ( media-libs/tiff:=[${MULTILIB_USEDEP}] ) + webkit? ( net-libs/webkit-gtk:4 ) + )" +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" + +PATCHES=( + "${WORKDIR}"/wxGTK-3.0.5_p20210214/ + "${FILESDIR}"/wxGTK-${SLOT}-translation-domain.patch + "${FILESDIR}"/wxGTK-ignore-c++-abi.patch #676878 + "${FILESDIR}"/${PN}-configure-tests.patch + "${FILESDIR}"/${PN}-3.0.5.1-configure-modern-c.patch + "${FILESDIR}"/${PN}-3.0.5.1-excise-autoptr.patch + +) + +src_prepare() { + default + + # 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):" \ + -e "s:wxstd.mo:wxstd${WXRELEASE_NODOT}.mo:" \ + -e "s:wxmsw.mo:wxmsw${WXRELEASE_NODOT}.mo:" \ + Makefile.in tests/Makefile.in || die + + sed -i \ + -e "s:\(WX_RELEASE = \).*:\1${WXRELEASE}:"\ + utils/wxrc/Makefile.in || 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() { + # Workaround for bug #915154 + append-ldflags $(test-flags-CCLD -Wl,--undefined-version) + + # X independent options + local myeconfargs=( + --with-zlib=sys + --with-expat=sys + --enable-compat28 + $(use_with sdl) + + # 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) + ) + + # 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 + --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 test tests) + ) + + # wxBase options + ! use X && myeconfargs+=( --disable-gui ) + + ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" +} + +multilib_src_test() { + emake -C tests + (cd tests && ./test) || 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-${WXVERSION}-docs-html/. ) + einstalldocs + + # Stray windows locale file, bug #650118 + rm -f "${ED}"/usr/share/locale/it/LC_MESSAGES/wxmsw30-gtk3.mo || die + + # Unversioned links + rm "${ED}"/usr/bin/wx-config || die + use X && { 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/wx30gtk3}" || 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 +} -- cgit v1.2.3