This commit is contained in:
Mario Fetka
2024-06-18 10:44:56 +02:00
parent 6a37474503
commit 20ef8b5c88
95 changed files with 4227 additions and 99 deletions

View File

@@ -0,0 +1,9 @@
AUX wxpython-4.2.0-cython-3.patch 621 BLAKE2B 047940edf05ba1556c8e3b7ee5f55dd1c31ebe6fbb249b40a4e0a70a3d8de7425c562e3e65ebba61da10e5f077b54b9e914d09b9b4d715d7164d92059c6c25b5 SHA512 1f99e75cc2a50f2de54312cfd148095f89e9ae1b0d110e750a73887bc66982c569bc2cf3e6f0dff3a717f5bdbe20a883cbc2ae381589de116b6bf3d053b9ab08
AUX wxpython-4.2.0-flags.patch 711 BLAKE2B d05ee176b010199f32ba4325452d7eddb60b78e80e2d80421223c061f33f3edf2d84528eac4d50acbf85af532f6fdfd6fb3cda2c8d97525cce5f66a0dd5c6891 SHA512 ac9c04b086af69d1bd7ce7ff6d9b87b8f6cf5c5273ada18089247f1f951f32009d181ff24758c01f1954183dcbf20fb0bce7501346cc615a18b4f43f2831c7bb
AUX wxpython-4.2.0-no-attrdict.patch 363 BLAKE2B 2ab3735103574959e069ecd647dc003ad6362760214a67632c91a7d216a372b4bf13450a7420bb8415bd744cac23a514726bf6feb09302b775a2a4c580094599 SHA512 b410023d186db3b07b3780fad2e1037d5a854f10771a5e1c8cd98da91a36e727931bf75944ff1a56e0730ff78a4ec8c9a3d81dec02efa3fe91191ad0a1639859
AUX wxpython-4.2.0-no-webkit.patch 1285 BLAKE2B 19fdee2293da214b8ae318b2670298b34b745cfefd3938be1f22c810cb1bc4273d628aa34cf427c1023d90739784d8e5c8d381e6084689876bdc336a86a3d0db SHA512 fbe6825f266443b9dec68786e26d6e3842d4dec3b9927420ecaca45a834798c8ef83a95398ea498db386e7d1c659a6a3779a5b62867296cc7244401b06db9586
DIST wxPython-4.2.0.tar.gz 70958238 BLAKE2B 2e8e34c4f5d1992983bfe4e09bb56ee5619b139b9b3b5f05dee48ecdf6971cf9fe1b0fb22aec685904eb44db6f50a4ba132a08aa91930d809040da828efa097e SHA512 9ec937a024efb2916403c84382a66004f0c2bb07471246b7de517778309ce459e929eeb59e261f538d3fa077c950628de62e49a3760fbd03ab9ff2114c6f354f
DIST wxPython-4.2.1.tar.gz 73724359 BLAKE2B d9569ea172c7279e0b2cfcb3cdcd5d1faab5324e2648c9b0f8c8b838fb2355dc6af28c4593e5dd0cfa02573133bf15a58a6ffa9711d854925a9cada0985dc7f8 SHA512 ee9ab8effb3c71de004c3d61ec583b9980c6b75fe9bb04cf2c76025ea70afc206bc3073c44d1c83c7ba604afed9fd38c01b9ef506617ba279a4ac58e3cf34438
EBUILD wxpython-4.2.0.ebuild 3924 BLAKE2B aedc834c6dd6af3ebd3d8bee6ed9a2a70c14578e1bce323766d5d365d83e2605e0c113005582b3ab989b77befcfeed9c97eafcfeb67f8f8f3cbae53391816770 SHA512 0c034372126a258992c52eac33a5680be316020b0b0474eaa1c7eea61e6020e6f0159aeed94da8aa45152860238531b6fc7fdfa6bce1b231dbe95bf3b50dfdb3
EBUILD wxpython-4.2.1.ebuild 3531 BLAKE2B 9cd940fe1b72952e73f3426be744da529880ea8bb09ceb856a21bb88e7439d945fd690976e47ffcea33c7ea17297d8e3b07622d0c563ca1a2d5ced75ace19e6c SHA512 4773f1bbc9ddfa99b07a1f7e8e1e417500fda09034d11113833bfaea8b7f9877ba491985bdeb6d0de3a98ca4aed08e68c957ab9f12023d0831de3c2d1799c698
MISC metadata.xml 491 BLAKE2B ffa0cccf66f484c856fb30249bd0ccc3b0da2f3ee8e3c3a0df1782bc58e4867ff99d9711f1784b44b439f2a8bcf297c1082b49a941823f046c7f2c7977a77629 SHA512 a2f5908a276a8f9c512cb59c8d17873398c91b21977371ab724e669f3b6c032d53510fbcd183a5dc340279fc522289e617b8c313c0d825ca70d0d2a5d74f8cfa

View File

@@ -0,0 +1,19 @@
https://bugs.gentoo.org/911703
https://github.com/wxWidgets/Phoenix/pull/2441
From aeb557d01e7cd37176ebbf0f1ae6d0b53c115378 Mon Sep 17 00:00:00 2001
From: Scott Talbert <swt@techie.net>
Date: Tue, 25 Jul 2023 12:42:32 -0400
Subject: [PATCH] Fix compatibility with Cython 3.0.0
Remove unused import which seems to be removed in Cython 3.
--- a/wx/svg/_nanosvg.pyx
+++ b/wx/svg/_nanosvg.pyx
@@ -42,7 +42,6 @@ for manipulating the SVG shape info in memory.
import sys
-cimport cython.object
from cpython.buffer cimport (
Py_buffer, PyObject_CheckBuffer, PyObject_GetBuffer, PyBUF_SIMPLE,
PyBuffer_Release)

View File

@@ -0,0 +1,16 @@
--- a/buildtools/config.py
+++ b/buildtools/config.py
@@ -236,9 +236,12 @@ class Configuration(object):
for lst in [self.cflags, self.cxxflags]:
lst.append('-O3')
+ self.cflags += os.environ.get('CFLAGS', '').split()
+ self.cxxflags += os.environ.get('CXXFLAGS', '').split()
+
lflags = self.getWxConfigValue('--libs')
self.MONOLITHIC = (lflags.find("_xrc") == -1)
- self.lflags = lflags.split()
+ self.lflags = lflags.split() + os.environ.get('LDFLAGS', '').split()
self.WXBASENAME = self.getWxConfigValue('--basename')
self.WXRELEASE = self.getWxConfigValue('--release')

View File

@@ -0,0 +1,13 @@
As in https://src.fedoraproject.org/rpms/python-wxpython4/raw/rawhide/f/no-attrdict.patch.
--- a/buildtools/config.py
+++ b/buildtools/config.py
@@ -27,8 +27,6 @@ from distutils.dep_util import newer
import distutils.sysconfig
-from attrdict import AttrDict
-
runSilently = False
#----------------------------------------------------------------------

View File

@@ -0,0 +1,27 @@
--- a/wscript
+++ b/wscript
@@ -244,15 +244,6 @@
uselib_store='WXGL', mandatory=True,
msg='Finding libs for WXGL')
- if cfg.checkSetup(wxConfigDir, 'wxUSE_WEBVIEW'):
- wv_libs = '--libs webview,core,net'
- else:
- wv_libs = '--libs core,net'
- conf.check_cfg(path=conf.options.wx_config, package='',
- args='--cxxflags ' + wv_libs + rpath,
- uselib_store='WXWEBVIEW', mandatory=True,
- msg='Finding libs for WXWEBVIEW')
-
conf.check_cfg(path=conf.options.wx_config, package='',
args='--cxxflags --libs xml,core,net' + rpath,
uselib_store='WXXML', mandatory=True,
@@ -600,7 +591,6 @@
makeETGRule(bld, 'etg/_stc.py', '_stc', 'WXSTC')
makeETGRule(bld, 'etg/_html.py', '_html', 'WXHTML')
makeETGRule(bld, 'etg/_glcanvas.py', '_glcanvas', 'WXGL')
- makeETGRule(bld, 'etg/_html2.py', '_html2', 'WXWEBVIEW')
makeETGRule(bld, 'etg/_xml.py', '_xml', 'WXXML')
makeETGRule(bld, 'etg/_xrc.py', '_xrc', 'WXXRC')
makeETGRule(bld, 'etg/_richtext.py', '_richtext', 'WXHTML WXRICHTEXT')

View File

@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>wxwidgets@gentoo.org</email>
<name>Gentoo wxWidgets Project</name>
</maintainer>
<maintainer type="project">
<email>python@gentoo.org</email>
<name>Python</name>
</maintainer>
<upstream>
<remote-id type="github">wxWidgets/Phoenix</remote-id>
<remote-id type="pypi">wxPython</remote-id>
</upstream>
</pkgmetadata>

View File

@@ -0,0 +1,123 @@
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_IN_SOURCE_BUILD="1"
PYTHON_COMPAT=( python3_{10..12} )
PYPI_NO_NORMALIZE=1
PYPI_PN="wxPython"
WX_GTK_VER="3.2-gtk3"
inherit distutils-r1 multiprocessing virtualx wxwidgets pypi
DESCRIPTION="A blending of the wxWindows C++ class library with Python"
HOMEPAGE="https://www.wxpython.org/"
LICENSE="wxWinLL-3"
SLOT="4.0"
KEYWORDS="~alpha amd64 arm arm64 ~loong ppc ppc64 ~riscv ~sparc x86"
IUSE="test webkit"
# Tests broken: #726812, #722716
# Nearly there as of 4.2.0 but still quite flaky (inconsistent set of failures)
RESTRICT="!test? ( test ) test"
# wxPython doesn't seem to be able to optionally disable features. webkit is
# optionally patched out because it's so huge, but other elements are not,
# which makes us have to require all features from wxGTK
RDEPEND="
>=x11-libs/wxGTK-3.0.4-r301:${WX_GTK_VER}=[gstreamer,libnotify,opengl,sdl,tiff,webkit?,X]
media-libs/libpng:=
media-libs/tiff:=
media-libs/libjpeg-turbo:=
"
DEPEND="${RDEPEND}"
BDEPEND="
app-text/doxygen
dev-python/cython[${PYTHON_USEDEP}]
dev-python/setuptools[${PYTHON_USEDEP}]
>=dev-python/sip-6.6.2[${PYTHON_USEDEP}]
dev-python/six[${PYTHON_USEDEP}]
test? (
${VIRTUALX_DEPEND}
dev-python/appdirs[${PYTHON_USEDEP}]
dev-python/numpy[${PYTHON_USEDEP}]
dev-python/pillow[${PYTHON_USEDEP}]
dev-python/pytest[${PYTHON_USEDEP}]
)
"
PATCHES=(
#"${FILESDIR}/${PN}-4.0.6-skip-broken-tests.patch"
"${FILESDIR}/${PN}-4.2.0-no-attrdict.patch"
"${FILESDIR}/${PN}-4.2.0-flags.patch"
"${FILESDIR}/${PN}-4.2.0-cython-3.patch"
)
python_prepare_all() {
if ! use webkit; then
eapply "${FILESDIR}/${PN}-4.2.0-no-webkit.patch"
rm unittests/test_webview.py || die
fi
# Most of these tests disabled below fail because of the virtx/portage
# environment, but some fail for unknown reasons.
rm unittests/test_uiaction.py \
unittests/test_notifmsg.py \
unittests/test_mousemanager.py \
unittests/test_display.py \
unittests/test_pi_import.py \
unittests/test_lib_agw_thumbnailctrl.py \
unittests/test_sound.py || die
distutils-r1_python_prepare_all
}
src_configure() {
setup-wxwidgets
}
python_compile() {
DOXYGEN="$(type -P doxygen)" ${PYTHON} build.py dox etg --nodoc || die
# Refresh the bundled/pregenerated sip files
${PYTHON} build.py sip || die
# Build the bindings
${PYTHON} build.py build_py \
--use_syswx \
--no_magic \
--jobs="$(makeopts_jobs)" \
--verbose \
--release || die
}
python_test() {
EPYTEST_DESELECT=(
# Aborts, needs investigation
unittests/test_utils.py::utils_Tests::test_utilsSomeOtherStuff
# Failures, need investigation
unittests/test_frame.py::frame_Tests::test_frameRestore
unittests/test_fswatcher.py::fswatcher_Tests::test_fswatcher1
unittests/test_intl.py::intl_Tests::test_intlGetString
unittests/test_lib_busy.py::lib_busy_Tests::test_lib_busy5
unittests/test_lib_mixins_inspection.py::wit_TestCase::test_App_OnInit
unittests/test_lib_pubsub_provider.py::lib_pubsub_Except::test1
unittests/test_lib_pubsub_topicmgr.py::lib_pubsub_TopicMgr2_GetOrCreate_DefnProv::test20_UseProvider
unittests/test_windowid.py::IdManagerTest::test_newIdRef03
unittests/test_auibook.py::auibook_Tests::test_auibook02
unittests/test_lib_agw_persist_persistencemanager.py::lib_agw_persist_persistencemanager_Tests::test_persistencemanagerPersistValue
unittests/test_lib_agw_persist_persistencemanager.py::lib_agw_persist_persistencemanager_Tests::test_persistencemanagerRestore
unittests/test_aboutdlg.py::aboutdlg_Tests::test_aboutdlgGeneric
unittests/test_auiframemanager.py::auiframemanager_Tests::test_auiframemanager02
)
# We use pytest-forked as opensuse does to avoid tests corrupting each
# other.
virtx epytest --forked -n "$(makeopts_jobs)" unittests
}
python_install() {
distutils-r1_python_install --skip-build
}

View File

@@ -0,0 +1,126 @@
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_EXT=1
DISTUTILS_IN_SOURCE_BUILD="1"
PYTHON_COMPAT=( python3_{10..12} )
PYPI_NO_NORMALIZE=1
PYPI_PN="wxPython"
WX_GTK_VER="3.2-gtk3"
inherit distutils-r1 multiprocessing virtualx wxwidgets pypi
DESCRIPTION="A blending of the wxWindows C++ class library with Python"
HOMEPAGE="
https://www.wxpython.org/
https://github.com/wxWidgets/Phoenix/
https://pypi.org/project/wxPython/
"
LICENSE="wxWinLL-3"
SLOT="4.0"
KEYWORDS="~alpha amd64 ~arm ~arm64 ~loong ppc ppc64 ~riscv ~sparc ~x86"
IUSE="test webkit"
RESTRICT="!test? ( test )"
# wxPython doesn't seem to be able to optionally disable features. webkit is
# optionally patched out because it's so huge, but other elements are not,
# which makes us have to require all features from wxGTK
DEPEND="
>=x11-libs/wxGTK-3.0.4-r301:${WX_GTK_VER}=[gstreamer,libnotify,opengl,sdl,tiff,webkit?,X]
media-libs/libpng:=
media-libs/tiff:=
media-libs/libjpeg-turbo:=
"
RDEPEND="
${DEPEND}
"
BDEPEND="
app-text/doxygen
dev-python/cython[${PYTHON_USEDEP}]
dev-python/setuptools[${PYTHON_USEDEP}]
>=dev-python/sip-6.6.2[${PYTHON_USEDEP}]
dev-python/six[${PYTHON_USEDEP}]
test? (
${VIRTUALX_DEPEND}
dev-python/appdirs[${PYTHON_USEDEP}]
dev-python/numpy[${PYTHON_USEDEP}]
dev-python/pillow[${PYTHON_USEDEP}]
dev-python/pytest[${PYTHON_USEDEP}]
dev-python/pytest-forked[${PYTHON_USEDEP}]
dev-python/pytest-xdist[${PYTHON_USEDEP}]
)
"
PATCHES=(
"${FILESDIR}/${PN}-4.2.0-flags.patch"
"${FILESDIR}/${PN}-4.2.0-cython-3.patch"
)
python_prepare_all() {
if ! use webkit; then
eapply "${FILESDIR}/${PN}-4.2.0-no-webkit.patch"
fi
distutils-r1_python_prepare_all
}
src_configure() {
setup-wxwidgets
}
python_compile() {
DOXYGEN="$(type -P doxygen)" ${PYTHON} build.py dox etg --nodoc || die
# Refresh the bundled/pregenerated sip files
"${EPYTHON}" build.py sip || die
# Build the bindings
"${EPYTHON}" build.py build_py \
--use_syswx \
--no_magic \
--jobs="$(makeopts_jobs)" \
--verbose \
--release || die
}
python_test() {
local EPYTEST_DESELECT=(
# virtx probably
unittests/test_display.py::display_Tests::test_display
unittests/test_frame.py::frame_Tests::test_frameRestore
unittests/test_mousemanager.py::mousemanager_Tests::test_mousemanager1
unittests/test_uiaction.py::uiaction_KeyboardTests::test_uiactionKeyboardChar
unittests/test_uiaction.py::uiaction_KeyboardTests::test_uiactionKeyboardKeyDownUp
unittests/test_uiaction.py::uiaction_MouseTests
# assertion (TODO)
unittests/test_aboutdlg.py::aboutdlg_Tests::test_aboutdlgGeneric
unittests/test_lib_agw_piectrl.py::lib_agw_piectrl_Tests::test_lib_agw_piectrlCtor
# seems to rely on state from a previous test (sigh)
unittests/test_lib_agw_persist_persistencemanager.py::lib_agw_persist_persistencemanager_Tests::test_persistencemanagerRestore
# requires Spanish localization
unittests/test_intl.py::intl_Tests::test_intlGetString
# TODO
unittests/test_tipwin.py::tipwin_Tests::test_tipwinCtor
unittests/test_lib_pubsub_provider.py::lib_pubsub_Except::test1
unittests/test_windowid.py::IdManagerTest::test_newIdRef03
)
local EPYTEST_IGNORE=()
if ! use webkit; then
EPYTEST_IGNORE+=( unittests/test_webview.py )
fi
# We use pytest-forked as opensuse does to avoid tests corrupting each
# other.
virtx epytest --forked -n "$(makeopts_jobs)" unittests
}
python_install() {
distutils-r1_python_install --skip-build
}