diff options
Diffstat (limited to 'sci-electronics/kicad/files')
8 files changed, 57 insertions, 213 deletions
diff --git a/sci-electronics/kicad/files/kicad-5.1.5-help.patch b/sci-electronics/kicad/files/kicad-5.1.5-help.patch deleted file mode 100644 index 1b37e3013c1e..000000000000 --- a/sci-electronics/kicad/files/kicad-5.1.5-help.patch +++ /dev/null @@ -1,117 +0,0 @@ -diff -Naur kicad-5.1.5-orig/CMakeLists.txt kicad-5.1.5/CMakeLists.txt ---- kicad-5.1.5-orig/CMakeLists.txt 2019-11-14 09:09:45.000000000 -0800 -+++ kicad-5.1.5/CMakeLists.txt 2019-12-15 03:41:57.574995996 -0800 -@@ -442,6 +442,10 @@ - set( KIFACE_PREFIX "_" ) - #message( STATUS "KIFACE_SUFFIX:${KIFACE_SUFFIX} KIFACE_PREFIX:${KIFACE_PREFIX}" ) - -+# KICAD_HELP is the location of the help files accessed from the UI -+# (usually provided via kicad-doc package) -+set ( KICAD_HELP share/doc/kicad -+ CACHE PATH "Alternative location of KiCad help files.") - - #================================================ - # Locations for install targets. -diff -Naur kicad-5.1.5-orig/CMakeModules/config.h.cmake kicad-5.1.5/CMakeModules/config.h.cmake ---- kicad-5.1.5-orig/CMakeModules/config.h.cmake 2019-11-14 09:09:45.000000000 -0800 -+++ kicad-5.1.5/CMakeModules/config.h.cmake 2019-12-15 03:42:00.368013375 -0800 -@@ -59,6 +59,10 @@ - /// The install prefix defined during CMake configuration or fall back to CMAKE_INSTALL_PREFIX. - #define DEFAULT_INSTALL_PATH "@DEFAULT_INSTALL_PATH@" - -+/// KiCad help files path can be different on some systems allow adding alternative, -+/// search path for them. Defaults to CMAKE_INSTALL_PREFIX/share/doc/kicad -+#define KICAD_HELP "@KICAD_HELP@" -+ - /// The wxPython version found during configuration. - #if defined( KICAD_SCRIPTING_WXPYTHON ) - #define WXPYTHON_VERSION "@WXPYTHON_VERSION@" -diff -Naur kicad-5.1.5-orig/common/searchhelpfilefullpath.cpp kicad-5.1.5/common/searchhelpfilefullpath.cpp ---- kicad-5.1.5-orig/common/searchhelpfilefullpath.cpp 2019-11-14 09:09:45.000000000 -0800 -+++ kicad-5.1.5/common/searchhelpfilefullpath.cpp 2019-12-15 03:42:03.168030796 -0800 -@@ -25,7 +25,7 @@ - - #include <pgm_base.h> - #include <common.h> --#include <config.h> // to define DEFAULT_INSTALL_PATH -+#include <config.h> // to define DEFAULT_INSTALL_PATH and KICAD_HELP - #include <macros.h> - #include <trace_helpers.h> - -@@ -69,6 +69,10 @@ - wxArrayString subdirs; - wxArrayString altsubdirs; - SEARCH_STACK ss = aSStack; -+#if ! defined(__WXMAC__) // && defined(__linux__) -+ SEARCH_STACK altss; -+ wxArrayString moresubdirs; -+#endif - - // It might already be in aSStack, but why depend on other code - // far away when it's so easy to add it again (to our copy) as the first place to look. -@@ -76,6 +80,7 @@ - // This is CMAKE_INSTALL_PREFIX unless DEFAULT_INSTALL_PATH was defined during - // build configuration: - ss.AddPaths( wxT( DEFAULT_INSTALL_PATH ), 0 ); -+ altss.AddPaths( wxT( KICAD_HELP ), 0 ); - - #if defined(__WXMAC__) - ss.AddPaths( GetOSXKicadMachineDataDir() ); -@@ -104,16 +109,17 @@ - - // Based on kicad-doc.bzr/CMakeLists.txt, line 20, the help files are - // installed into "<CMAKE_INSTALL_PREFIX>/share/doc/kicad/help" for linux. -- // This is ${KICAD_HELP} var in that CMakeLists.txt file. - // Below we account for an international subdirectory. - subdirs.Add( "share" ); - subdirs.Add( "doc" ); - subdirs.Add( "kicad" ); - subdirs.Add( "help" ); - -+ // For custom help path installations via ${KICAD_HELP} -+ moresubdirs.Add( "help" ); -+ - // Based on kicad-doc.bzr/CMakeLists.txt, line 35, the help files are - // installed into "<CMAKE_INSTALL_PREFIX>/doc/help" for Windows. -- // This is ${KICAD_HELP} var in that CMakeLists.txt file. - // Below we account for an international subdirectory. - altsubdirs.Add( "doc" ); - altsubdirs.Add( "help" ); -@@ -159,6 +165,9 @@ - { - subdirs.Add( locale_name_dirs[ii] ); - altsubdirs.Add( locale_name_dirs[ii] ); -+#if ! defined(__WXMAC__) // && defined(__linux__) -+ moresubdirs.Add( locale_name_dirs[ii] ); -+#endif - - fn = FindFileInSearchPaths( ss, aBaseName + wxT( ".html" ), &altsubdirs ); - -@@ -188,8 +197,27 @@ - if( !fn.IsEmpty() ) - break; - -+#if ! defined(__WXMAC__) // && defined(__linux__) -+ fn = FindFileInSearchPaths( altss, aBaseName + wxT( ".html" ), &moresubdirs ); -+ -+ if( !fn.IsEmpty() ) -+ { -+ // Prepend URI protocol since we will open in a browser -+ fn = wxT( "file://" ) + fn; -+ break; -+ } -+ -+ fn = FindFileInSearchPaths( altss, aBaseName + wxT( ".pdf" ), &moresubdirs ); -+ -+ if( !fn.IsEmpty() ) -+ break; -+#endif -+ - subdirs.RemoveAt( subdirs.GetCount() - 1 ); - altsubdirs.RemoveAt( altsubdirs.GetCount() - 1 ); -+#if ! defined(__WXMAC__) // && defined(__linux__) -+ moresubdirs.RemoveAt( altsubdirs.GetCount() - 1 ); -+#endif - } - - return fn; diff --git a/sci-electronics/kicad/files/kicad-5.1.5-ldflags.patch b/sci-electronics/kicad/files/kicad-5.1.5-ldflags.patch deleted file mode 100644 index 1495037b1b72..000000000000 --- a/sci-electronics/kicad/files/kicad-5.1.5-ldflags.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff -Naur kicad-5.1.5-orig/CMakeLists.txt kicad-5.1.5/CMakeLists.txt ---- kicad-5.1.5-orig/CMakeLists.txt 2019-11-14 09:09:45.000000000 -0800 -+++ kicad-5.1.5/CMakeLists.txt 2019-11-19 02:08:32.309282631 -0800 -@@ -355,10 +355,10 @@ - - elseif( NOT APPLE ) - # Thou shalt not link vaporware and tell us it's a valid DSO (apple ld doesn't support it) -- set( CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined" ) -- set( CMAKE_MODULE_LINKER_FLAGS "-Wl,--no-undefined" ) -+ set( CMAKE_SHARED_LINKER_FLAGS "$ENV{LDFLAGS} -Wl,--no-undefined" ) -+ set( CMAKE_MODULE_LINKER_FLAGS "$ENV{LDFLAGS} -Wl,--no-undefined" ) - -- set( CMAKE_EXE_LINKER_FLAGS_RELEASE "-s" ) -+ set( CMAKE_EXE_LINKER_FLAGS_RELEASE "$ENV{LDFLAGS} -s" ) - - # Defeat ELF's ability to use the GOT to replace locally implemented functions - # with ones from another module. diff --git a/sci-electronics/kicad/files/kicad-5.1.5-strict-aliasing.patch b/sci-electronics/kicad/files/kicad-5.1.5-strict-aliasing.patch deleted file mode 100644 index b01a6b7d79f6..000000000000 --- a/sci-electronics/kicad/files/kicad-5.1.5-strict-aliasing.patch +++ /dev/null @@ -1,25 +0,0 @@ -diff --git a/eeschema/dialogs/dialog_spice_model.cpp b/eeschema/dialogs/dialog_spice_model.cpp -index b265e2363..eb1187d86 100644 ---- a/eeschema/dialogs/dialog_spice_model.cpp -+++ b/eeschema/dialogs/dialog_spice_model.cpp -@@ -34,6 +34,7 @@ - #include <wx/wupdlock.h> - - #include <cctype> -+#include <cstring> - - // Helper function to shorten conditions - static bool empty( const wxTextCtrl* aCtrl ) -@@ -804,9 +804,11 @@ bool DIALOG_SPICE_MODEL::addPwlValue( const wxString& aTime, const wxString& aVa - float timeF; - m_pwlTime->GetValue().ToDouble( &timeD ); - timeF = timeD; -+ long data; -+ std::memcpy( &data, &timeF, sizeof( timeF ) ); - - // Store the time value, so the entries can be sorted -- m_pwlValList->SetItemData( idx, *reinterpret_cast<long*>( &timeF ) ); -+ m_pwlValList->SetItemData( idx, data ); - - // Sort items by timestamp - m_pwlValList->SortItems( comparePwlValues, -1 ); diff --git a/sci-electronics/kicad/files/kicad-5.1.6-metainfo.patch b/sci-electronics/kicad/files/kicad-5.1.6-metainfo.patch deleted file mode 100644 index 675ff749de8d..000000000000 --- a/sci-electronics/kicad/files/kicad-5.1.6-metainfo.patch +++ /dev/null @@ -1,30 +0,0 @@ -diff -Naur kicad-5.1.6-orig/CMakeLists.txt kicad-5.1.6/CMakeLists.txt ---- kicad-5.1.6-orig/CMakeLists.txt 2020-05-11 11:27:08.000000000 -0700 -+++ kicad-5.1.6/CMakeLists.txt 2020-05-25 20:45:57.199559075 -0700 -@@ -929,7 +929,7 @@ - set( UNIX_MIME_FILES ${UNIX_MIME_DIR}/mime ) - set( UNIX_ICON_FILES ${UNIX_MIME_DIR}/icons ) - set( UNIX_APPLICATIONS_FILES ${UNIX_MIME_DIR}/applications ) -- set( UNIX_APPDATA_FILES ${PROJECT_BINARY_DIR}/resources/linux/appdata ) -+ set( UNIX_APPDATA_FILES ${PROJECT_BINARY_DIR}/resources/linux/metainfo ) - - # Install Mime directory - install( DIRECTORY ${UNIX_ICON_FILES} -diff -Naur kicad-5.1.6-orig/CMakeModules/WritePlatformMetadata_linux.cmake kicad-5.1.6/CMakeModules/WritePlatformMetadata_linux.cmake ---- kicad-5.1.6-orig/CMakeModules/WritePlatformMetadata_linux.cmake 2020-05-11 11:27:08.000000000 -0700 -+++ kicad-5.1.6/CMakeModules/WritePlatformMetadata_linux.cmake 2020-05-25 20:54:51.927438936 -0700 -@@ -36,11 +36,11 @@ - string( TIMESTAMP KICAD_CONFIG_TIMESTAMP "%Y-%m-%d" ) - - # Configure the KiCad appdata file --configure_file( ${PROJECT_SOURCE_DIR}/resources/linux/appdata/kicad.appdata.xml.in -- ${PROJECT_BINARY_DIR}/resources/linux/appdata/kicad.appdata.xml -+configure_file( ${PROJECT_SOURCE_DIR}/resources/linux/metainfo/kicad.appdata.xml.in -+ ${PROJECT_BINARY_DIR}/resources/linux/metainfo/kicad.appdata.xml - @ONLY ) - - # Ensure the file was configured successfully --if( NOT EXISTS ${PROJECT_BINARY_DIR}/resources/linux/appdata/kicad.appdata.xml ) -+if( NOT EXISTS ${PROJECT_BINARY_DIR}/resources/linux/metainfo/kicad.appdata.xml ) - message( FATAL_ERROR "Configuration failed to write file kicad.appdata.xml." ) - endif() diff --git a/sci-electronics/kicad/files/kicad-6.0.6-unitialized-variable-fix.patch b/sci-electronics/kicad/files/kicad-6.0.6-unitialized-variable-fix.patch deleted file mode 100644 index cce508c1e888..000000000000 --- a/sci-electronics/kicad/files/kicad-6.0.6-unitialized-variable-fix.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Naur kicad-6.0.6/common/tool/tool_manager.cpp kicad-6.0.6-new/common/tool/tool_manager.cpp ---- kicad-6.0.6/common/tool/tool_manager.cpp 2022-06-17 18:11:16.000000000 -0700 -+++ kicad-6.0.6-new/common/tool/tool_manager.cpp 2022-06-20 00:17:13.548239632 -0700 -@@ -902,7 +902,7 @@ - m_menuOwner = -1; - - // Restore cursor settings -- for( auto cursorSetting : m_cursorSettings ) -+ for( auto const& cursorSetting : m_cursorSettings ) - { - auto it = m_toolIdIndex.find( cursorSetting.first ); - wxASSERT( it != m_toolIdIndex.end() ); diff --git a/sci-electronics/kicad/files/kicad-7.0.0-werror.patch b/sci-electronics/kicad/files/kicad-7.0.0-werror.patch new file mode 100644 index 000000000000..b5fa3b1ae15d --- /dev/null +++ b/sci-electronics/kicad/files/kicad-7.0.0-werror.patch @@ -0,0 +1,21 @@ +From 04fc6081bd3d6575d00589f71150ab796778a9c9 Mon Sep 17 00:00:00 2001 +From: Matthew Smith <matthew@gentoo.org> +Date: Mon, 20 Feb 2023 17:53:50 +0000 +Subject: [PATCH] build: Remove Werror flag from clipper2 + +Bug: https://bugs.gentoo.org/895014 + +--- a/thirdparty/clipper2/CMakeLists.txt ++++ b/thirdparty/clipper2/CMakeLists.txt +@@ -27,7 +27,7 @@ target_compile_definitions(clipper2 PUBLIC USINGZ) + if (MSVC) + target_compile_options(clipper2 PRIVATE /W4 /WX) + else() +- target_compile_options(clipper2 PRIVATE -Wall -Wextra -Wpedantic -Werror) ++ target_compile_options(clipper2 PRIVATE -Wall -Wextra -Wpedantic) + target_link_libraries(clipper2 PUBLIC -lm) + endif() + +-- +2.39.2 + diff --git a/sci-electronics/kicad/files/kicad-8.0.1-libgit2.patch b/sci-electronics/kicad/files/kicad-8.0.1-libgit2.patch new file mode 100644 index 000000000000..d2523993e6fe --- /dev/null +++ b/sci-electronics/kicad/files/kicad-8.0.1-libgit2.patch @@ -0,0 +1,36 @@ +From: Huang Rui <vowstar@gmail.com> +Date: Fri, 22 Mar 2024 18:18:40 +0800 +Subject: [PATCH] libgit2-1.8.0 compatibility: adjusted parent pointer type + +- Adjusted parent pointer type in git_commit_create call for compatibility + with libgit2 1.8.0 and above. +- Included preprocessor checks to maintain support for versions older than + 1.8.0. +- Ensures consistent function behavior across different libgit2 versions. + +Fixes https://gitlab.com/kicad/code/kicad/-/issues/17536 +Signed-off-by: Huang Rui <vowstar@gmail.com> +--- + kicad/project_tree_pane.cpp | 7 +++++++ + 1 file changed, 7 insertions(+) + +--- a/kicad/project_tree_pane.cpp ++++ b/kicad/project_tree_pane.cpp +@@ -2233,7 +2233,14 @@ void PROJECT_TREE_PANE::onGitCommit( wxCommandEvent& aEvent ) + } + + git_oid oid; ++ // Check if the libgit2 library version is 1.8.0 or higher ++#if ( LIBGIT2_VER_MAJOR > 1 ) || ( LIBGIT2_VER_MAJOR == 1 && LIBGIT2_VER_MINOR >= 8 ) ++ // For libgit2 version 1.8.0 and above ++ git_commit* const parents[1] = { parent }; ++#else ++ // For libgit2 versions older than 1.8.0 + const git_commit* parents[1] = { parent }; ++#endif + + if( git_commit_create( &oid, repo, "HEAD", author, author, nullptr, commit_msg.mb_str(), tree, + 1, parents ) != 0 ) +-- +2.44.0 + diff --git a/sci-electronics/kicad/files/kicad-scripts-install-fix.patch b/sci-electronics/kicad/files/kicad-scripts-install-fix.patch deleted file mode 100644 index d52a05d3bcf5..000000000000 --- a/sci-electronics/kicad/files/kicad-scripts-install-fix.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Naur kicad-6.0.2-orig/CMakeLists.txt kicad-6.0.2/CMakeLists.txt ---- kicad-6.0.2-orig/CMakeLists.txt 2022-02-10 16:29:07.000000000 -0800 -+++ kicad-6.0.2/CMakeLists.txt 2022-02-13 20:09:37.244713966 -0800 -@@ -950,7 +950,7 @@ - ### - if( UNIX AND NOT APPLE ) - install( DIRECTORY scripts -- DESTINATION ${KICAD_DOCS} -+ DESTINATION ${KICAD_BIN}/scripts - COMPONENT resources - PATTERN "*.bat" EXCLUDE - ) |