diff --git a/cad/kicad/Makefile b/cad/kicad/Makefile index 4e38ee2f251d..929c9f0106c3 100644 --- a/cad/kicad/Makefile +++ b/cad/kicad/Makefile @@ -1,83 +1,84 @@ PORTNAME= kicad DISTVERSION= 10.0.1 +PORTREVISION= 1 PORTEPOCH= 2 CATEGORIES= cad MAINTAINER= cmt@FreeBSD.org COMMENT= Schematic and PCB editing software WWW= https://kicad.org/ LICENSE= GPLv2 BUILD_DEPENDS= ${LOCALBASE}/include/glm/glm.hpp:math/glm \ swig:devel/swig LIB_DEPENDS= libboost_locale.so:devel/boost-libs \ libabsl_log_internal_check_op.so:devel/abseil \ libgit2.so:devel/libgit2 \ libprotobuf.so:devel/protobuf \ libnng.so:net/nng \ libharfbuzz.so:print/harfbuzz \ libngspice.so:cad/ngspice_rework@shlib \ libTKernel.so:cad/opencascade \ libpixman-1.so:x11/pixman \ libzstd.so:archivers/zstd \ libcurl.so:ftp/curl \ libwayland-client.so:graphics/wayland \ libfreetype.so:print/freetype2 \ libsecret-1.so:security/libsecret \ libfontconfig.so:x11-fonts/fontconfig \ libspnav.so:misc/libspnav \ libpoppler-glib.so:graphics/poppler-glib \ libodbc.so:databases/unixODBC USES= cmake:noninja compiler:c++20-lang desktop-file-utils \ gnome pkgconfig python shared-mime-info shebangfix \ tar:bz2 xorg SHEBANG_FILES= pcbnew/python/plugins/touch_slider_wizard.py USE_XORG= ice x11 xext USE_GL= egl gl glu glut opengl USE_WX= 3.2 WX_COMPS= python:lib wx USE_GNOME= atk cairo gdkpixbuf gtk30 pango USE_GITLAB= yes GL_ACCOUNT= kicad/code GL_PROJECT= kicad CXXFLAGS+= -I${WRKSRC}/include -I${LOCALBASE}/include CXXFLAGS_powerpc= -O0 CMAKE_ARGS= -DwxWidgets_CONFIG_EXECUTABLE=${WX_CONFIG} \ -DwxWidgets_USE_UNICODE=ON \ -DwxWidgets_wxrc_EXECUTABLE=${WXRC_CMD} \ -DKICAD_SPICE_QA=ON \ -DKICAD_USE_SENTRY=OFF \ -DKICAD_SIGNAL_INTEGRITY=ON \ -DKICAD_BUILD_QA_TESTS=ON \ -DKICAD_SCRIPTING_WXPYTHON=ON \ -DKICAD_UPDATE_CHECK=OFF \ -DKICAD_USE_EGL=ON \ -DKICAD_WAYLAND=ON \ -DKICAD_INSTALL_DEMOS=ON \ -DNANODBC_ENABLE_BOOST=ON \ -DOCC_INCLUDE_DIR=${LOCALBASE}/include/OpenCASCADE CMAKE_ENV+= DODBC_PATH=${LOCALBASE} USE_LDCONFIG= yes # SOVERSION helps testing rc packages PLIST_SUB= DESKTOPDIR=${DESKTOPDIR:S|^${PREFIX}/||} \ SOVERSION=${PORTVERSION:C/.r[0-9.]*//} OPTIONS_DEFINE= NLS OPTIONS_SUB= yes NLS_USES= gettext NLS_CMAKE_BOOL= KICAD_BUILD_I18N CONFLICTS_INSTALL= kicad-devel # bin/_cvpcb.kiface pre-configure: ${REINPLACE_CMD} -e 's|/usr/local/bin/xdg-open|${LOCALBASE}/bin/xdg-open|' \ ${WRKSRC}/common/pgm_base.cpp .include diff --git a/cad/kicad/files/patch-pcbnew_edit__track__width.cpp b/cad/kicad/files/patch-pcbnew_edit__track__width.cpp new file mode 100644 index 000000000000..2c0e30dab98a --- /dev/null +++ b/cad/kicad/files/patch-pcbnew_edit__track__width.cpp @@ -0,0 +1,50 @@ +commit e466dffadc797958fbebb18e553fdec0f51e2b28 +Author: Seth Hillbrand +Date: Sun Apr 26 15:42:16 2026 -0700 + + Try to fix crash opening Pre-defined Sizes + + Potential cause is that Gtk events are still on the stack after we + destroy the wxChoice + + Wrap the two ShowBoardSetupDialog calls in CallAfter so the dropdown + event finishes unwinding before the toolbar is rebuilt. + + Fixes https://gitlab.com/kicad/code/kicad/-/issues/23708 + +diff --git pcbnew/edit_track_width.cpp pcbnew/edit_track_width.cpp +index 0f123e8771..07dd200232 100644 +--- pcbnew/edit_track_width.cpp ++++ pcbnew/edit_track_width.cpp +@@ -162,7 +162,16 @@ void PCB_EDIT_FRAME::Tracks_and_Vias_Size_Event( wxCommandEvent& event ) + else if( ii == int( m_SelTrackWidthBox->GetCount() - 1 ) ) + { + m_SelTrackWidthBox->SetSelection( GetDesignSettings().GetTrackWidthIndex() ); +- ShowBoardSetupDialog( _( "Pre-defined Sizes" ) ); ++ ++ // Best-guess fix for issue #23708 (crash on dialog OK reported on ++ // Flatpak/FreeBSD, not reproduced locally). Suspected cause is that ++ // ReCreateAuxiliaryToolbar(), run on dialog OK, destroys this very ++ // wxChoice while its EVT_CHOICE handler is still on the GTK signal ++ // stack. Defer the dialog so the handler unwinds first. ++ CallAfter( [this]() ++ { ++ ShowBoardSetupDialog( _( "Pre-defined Sizes" ) ); ++ } ); + } + else + { +@@ -186,7 +195,12 @@ void PCB_EDIT_FRAME::Tracks_and_Vias_Size_Event( wxCommandEvent& event ) + else if( ii == int( m_SelViaSizeBox->GetCount() - 1 ) ) + { + m_SelViaSizeBox->SetSelection( GetDesignSettings().GetViaSizeIndex() ); +- ShowBoardSetupDialog( _( "Pre-defined Sizes" ) ); ++ ++ // See the matching comment in the track-width case above. ++ CallAfter( [this]() ++ { ++ ShowBoardSetupDialog( _( "Pre-defined Sizes" ) ); ++ } ); + } + else + {