diff options
Diffstat (limited to 'sci-electronics/kicad')
-rw-r--r-- | sci-electronics/kicad/Manifest | 3 | ||||
-rw-r--r-- | sci-electronics/kicad/files/kicad-7.0.0-wxwidgets-version.patch | 95 | ||||
-rw-r--r-- | sci-electronics/kicad/kicad-7.0.0-r1.ebuild (renamed from sci-electronics/kicad/kicad-7.0.0.ebuild) | 10 |
3 files changed, 105 insertions, 3 deletions
diff --git a/sci-electronics/kicad/Manifest b/sci-electronics/kicad/Manifest index cff2812e8364..7daf5ba30b6a 100644 --- a/sci-electronics/kicad/Manifest +++ b/sci-electronics/kicad/Manifest @@ -1,9 +1,10 @@ AUX kicad-6.0.6-unitialized-variable-fix.patch 592 BLAKE2B b26757a1e9d4115616a721fdba7527cb72d489ae75976f9967f24cd12735b6f090a71bdb0c7d632d33ada0b3dc77f0d7f9370d02c34d83bd0afebb608621b85d SHA512 2f1e81132e87858f789833bd05fdda2309fc344c1535295c6308e3058bed85edbfd9900a0529e1489eb6f87bb27146a7dec2893a10d311c43b7117c00beba948 AUX kicad-6.0.9-gcc-13.patch 1094 BLAKE2B 6b09be7cfcc6895fd6d744c8755959c501ce7dfab1a4759cd1999d2dd172273f36c4091554743109a1a52c8ea98896ee04795070eda943a24669e73e94319177 SHA512 fd2924c8f8faea50da3defaedd3d4b6f89654d18a108c07e5e38277d70397856e493e33601bc632ceca5a62981501f136bbbba0462a68b421db72d0aa9dd55e2 +AUX kicad-7.0.0-wxwidgets-version.patch 3627 BLAKE2B 7a0382db010a9ec07069c16d1f87c5763fc8372f2c4be35384d8349cb03e4096d09a9020a2fc2155082ea8a44267f83cdc52d32972cff320e7ec038307ac81d0 SHA512 62a48794fcf609d2a844d23e66715afa4eaae31fe227c965cf368dcad47fbd41557527720218cf3bc25822612ce277a67609b057f5e0dc852cdd5de104bf1b10 AUX kicad-scripts-install-fix.patch 442 BLAKE2B 321ca8c5e846023696576daea00aa827ad88a4c3e82d120bd07392892b61d0e63892732f5469b1fe1472eac9584175acbc7aa611171f6fb9285017826156b30c SHA512 5abb158ec7e8a5ef8049797886e26febc018499dd7f5c8defdf9104b59371efa05cbec8e19e8fe22295e8e54c30095d347cccfa4c43db62b6ac4eb07bb8a080e DIST kicad-6.0.9.tar.gz 45166663 BLAKE2B e4d45c589a8e76d7c121ac4ab7adefc5fd44d4ccbff7140196caec56c309f6e83d47a3ea9cf79f59de57c3bda43b3d32a2bea82c5850c2a7a58a6e1db27a06a7 SHA512 49e6bd3c9f6e0c9839c4fac18dc12dc7ef16183f6fbe8091992e2223c7fb085b3119d46797c0b0cf86fd2813e3c4def9eb1f2adbff1bf072a363f1a501da9354 DIST kicad-7.0.0.tar.bz2 42583715 BLAKE2B 24fefe73bce6254bb47fdf21e8a82b7752e3f58cb3ea61220f0cf008c6570a4378f15bad54b81cc9257ec223bdb6128ccfd33f356e738b112c7b0e9481257255 SHA512 cb6f4cf6eee9a583d3a622bf8e48e5b604b047df0d742081cff1e5e387cf97cc1cd3f03fb58a17b44c47085634b95eea642bd1a6805e80807dbe0473c8d19d96 EBUILD kicad-6.0.9.ebuild 4413 BLAKE2B 2662255dad5503f8ec38f76b748ed0427a831520873de5fa7add55c3e58a21bf84eddb6a7b8d57ff3fefd11279cb648d05f75545706542e39e27671be0e44c15 SHA512 716655029680428508e69c67b3edf8904c8a915ea595c91afda1054a51f0d8cbfa173d9b71384ab5518060bc54e51e5fa3f5427adf79b51ecfb63d0cb6c8a0df -EBUILD kicad-7.0.0.ebuild 4182 BLAKE2B 68b66b2bd5be9dd790bf79c4ac43885d17dc7b9c8c29062700c249f65b77ba05c6b467d8d44d7812335180e91c1435797e5d17f043505e79340b9dbfd0d6d829 SHA512 7e85b31556b2a83b8f6642bbb78169f5494aeff2f316083aa01375d5507443fe1e432585d44728d1087b39c00673ffd273f9ca62b0ef9e720ad48fed5b6400e2 +EBUILD kicad-7.0.0-r1.ebuild 4306 BLAKE2B 7bba230649be00254ff34b25487ccc528c053280c13a97a2b762c9c99f2771e3b8b70fb8945de5b9389f49a6f61ddbb739df353caddadd8c673298fe8442aa57 SHA512 6ad32f5853aedf770a4a37ea2edd0f1403623060e4135d2f6741232932c488f53b6cdd1892d1be5a4fdceaf57afad4f59064a535d4cae604511d2f7d380be6b8 EBUILD kicad-9999.ebuild 4182 BLAKE2B 68b66b2bd5be9dd790bf79c4ac43885d17dc7b9c8c29062700c249f65b77ba05c6b467d8d44d7812335180e91c1435797e5d17f043505e79340b9dbfd0d6d829 SHA512 7e85b31556b2a83b8f6642bbb78169f5494aeff2f316083aa01375d5507443fe1e432585d44728d1087b39c00673ffd273f9ca62b0ef9e720ad48fed5b6400e2 MISC metadata.xml 922 BLAKE2B bfdb3ce1ee74c7b6f2da1a5fbe7835e2114af83b594edabab7b7674000462ee6963acee3bb1f384bed0b4a36b0529aebdab801fe3a482b23e742d9186e7684b2 SHA512 575659f3c5d0fc74469ff14f8abaf58776f1d0ffdd16b85e9f617d3e956d2d0c1c7f70aeebf02aa5c7afadcea0e0a589e6fb16f160b398482524fa7ce592ba4e diff --git a/sci-electronics/kicad/files/kicad-7.0.0-wxwidgets-version.patch b/sci-electronics/kicad/files/kicad-7.0.0-wxwidgets-version.patch new file mode 100644 index 000000000000..9ef12e97b573 --- /dev/null +++ b/sci-electronics/kicad/files/kicad-7.0.0-wxwidgets-version.patch @@ -0,0 +1,95 @@ +From b536580119c59fde78e38d8d6388f2540ecb6cf9 Mon Sep 17 00:00:00 2001 +From: Ian McInerney <ian.s.mcinerney@ieee.org> +Date: Mon, 13 Feb 2023 21:24:26 +0000 +Subject: [PATCH] Support subrelease field in wxWidgets cmake detection + +Sometimes wxWidgets increments the subrelease to a non-zero value, and +since wxPython will report a subrelease, we must ensure we can get the +subrelease from the wx library properly, otherwise configure will fail +thinking the library isn't the same version as that used by wxPython. + +Fixes: https://gitlab.com/kicad/code/kicad/-/issues/13887 +--- a/cmake/FindwxWidgets.cmake ++++ b/cmake/FindwxWidgets.cmake +@@ -926,8 +926,17 @@ if(wxWidgets_FOUND) + "\\2" wxWidgets_VERSION_MINOR "${_wx_version_h}" ) + string(REGEX REPLACE "^(.*\n)?#define +wxRELEASE_NUMBER +([0-9]+).*" + "\\2" wxWidgets_VERSION_PATCH "${_wx_version_h}" ) +- set(wxWidgets_VERSION_STRING +- "${wxWidgets_VERSION_MAJOR}.${wxWidgets_VERSION_MINOR}.${wxWidgets_VERSION_PATCH}" ) ++ string(REGEX REPLACE "^(.*\n)?#define +wxSUBRELEASE_NUMBER +([0-9]+).*" ++ "\\2" wxWidgets_VERSION_SUBRELEASE "${_wx_version_h}" ) ++ ++ if( ${wxWidgets_VERSION_SUBRELEASE} GREATER 0 ) ++ set(wxWidgets_VERSION_STRING ++ "${wxWidgets_VERSION_MAJOR}.${wxWidgets_VERSION_MINOR}.${wxWidgets_VERSION_PATCH}.${wxWidgets_VERSION_SUBRELEASE}" ) ++ else() ++ set(wxWidgets_VERSION_STRING ++ "${wxWidgets_VERSION_MAJOR}.${wxWidgets_VERSION_MINOR}.${wxWidgets_VERSION_PATCH}" ) ++ endif() ++ + DBG_MSG("wxWidgets_VERSION_STRING: ${wxWidgets_VERSION_STRING}") + endif() + +-- +From 1e8cc6855d6a8fc1f9dfc933224c3a10fb759f9c Mon Sep 17 00:00:00 2001 +From: Ian McInerney <ian.s.mcinerney@ieee.org> +Date: Tue, 14 Feb 2023 00:18:56 +0000 +Subject: [PATCH] Relax wxPython version mismatch check to major.minor + +The previous version check failed when the version was even slightly +different, including on the revision field. Theoretically the ABI of the +wx minor versions in use should be the same, so this might work. On the +other hand, with wxPython it could break as well. YOLO. +--- a/scripting/python_scripting.cpp ++++ b/scripting/python_scripting.cpp +@@ -50,6 +50,7 @@ + #include <kiplatform/environment.h> + + #include <wx/app.h> ++#include <wx/regex.h> + #include <wx/utils.h> + + #include <config.h> +@@ -128,7 +129,39 @@ except: + wxVI.GetMajor(), wxVI.GetMinor(), wxVI.GetMicro() ); + version = version.Mid( idx + 10 ); + +- if( wxVersion.Cmp( version ) != 0 ) ++ int wxPy_major = 0; ++ int wxPy_minor = 0; ++ int wxPy_micro = 0; ++ int wxPy_rev = 0; ++ ++ // Compile a regex to extract the wxPython version ++ wxRegEx re( "([0-9]+)\\.([0-9]+)\\.?([0-9]+)?\\.?([0-9]+)?" ); ++ wxASSERT( re.IsValid() ); ++ ++ if( re.Matches( version ) ) ++ { ++ wxString v = re.GetMatch( version, 1 ); ++ ++ if( !v.IsEmpty() ) ++ v.ToInt( &wxPy_major ); ++ ++ v = re.GetMatch( version, 2 ); ++ ++ if( !v.IsEmpty() ) ++ v.ToInt( &wxPy_minor ); ++ ++ v = re.GetMatch( version, 3 ); ++ ++ if( !v.IsEmpty() ) ++ v.ToInt( &wxPy_micro ); ++ ++ v = re.GetMatch( version, 4 ); ++ ++ if( !v.IsEmpty() ) ++ v.ToInt( &wxPy_rev ); ++ } ++ ++ if( ( wxVI.GetMajor() != wxPy_major ) || ( wxVI.GetMinor() != wxPy_minor ) ) + { + wxString msg = wxT( "The wxPython library was compiled against wxWidgets %s but KiCad is " + "using %s. Python plugins will not be available." ); +-- diff --git a/sci-electronics/kicad/kicad-7.0.0.ebuild b/sci-electronics/kicad/kicad-7.0.0-r1.ebuild index 96825330a19f..5371ccfee521 100644 --- a/sci-electronics/kicad/kicad-7.0.0.ebuild +++ b/sci-electronics/kicad/kicad-7.0.0-r1.ebuild @@ -4,7 +4,7 @@ EAPI=8 PYTHON_COMPAT=( python3_{9..10} ) -WX_GTK_VER="3.0-gtk3" +WX_GTK_VER="3.2-gtk3" inherit check-reqs cmake optfeature python-single-r1 toolchain-funcs wxwidgets xdg-utils @@ -50,7 +50,7 @@ COMMON_DEPEND=" sys-libs/zlib $(python_gen_cond_dep ' dev-libs/boost:=[context,nls,python,${PYTHON_USEDEP}] - dev-python/wxpython:4.0[${PYTHON_USEDEP}] + ~dev-python/wxpython-4.2.0:*[${PYTHON_USEDEP}] ') ${PYTHON_DEPS} ngspice? ( @@ -74,6 +74,11 @@ fi CHECKREQS_DISK_BUILD="900M" +PATCHES=( + # https://bugs.gentoo.org/895188 + "${FILESDIR}"/${PN}-7.0.0-wxwidgets-version.patch +) + pkg_setup() { [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp @@ -97,6 +102,7 @@ src_configure() { -DKICAD_DOCS="${EPREFIX}/usr/share/doc/${PN}-doc-${PV}" -DKICAD_SCRIPTING_WXPYTHON=ON + -DKICAD_USE_EGL=ON -DKICAD_BUILD_I18N="$(usex nls)" -DKICAD_I18N_UNIX_STRICT_PATH="$(usex nls)" |