Accepting request 942464 from home:StefanBruens:branches:electronics:staging
- Update to version 6.0.0 See https://www.kicad.org/blog/2021/12/KiCad-6.0.0-Release/ for details. - Drop no longer necessary kicad-suse-help-path.patch - Add 0001-Use-library-target-install-for-python-module-to-fix-.patch - Adjust disk constraints (now 11G) OBS-URL: https://build.opensuse.org/request/show/942464 OBS-URL: https://build.opensuse.org/package/show/electronics/kicad?expand=0&rev=84
This commit is contained in:
parent
f89df19419
commit
0ee6c26f63
@ -0,0 +1,42 @@
|
|||||||
|
From 6baf90fcbce310036feb88ab021c740c5c079c96 Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bruens@rwth-aachen.de>
|
||||||
|
Date: Sat, 11 Dec 2021 21:56:31 +0100
|
||||||
|
Subject: [PATCH] Use library target install for python module to fix RUNPATH
|
||||||
|
|
||||||
|
When the native python module is copied into the install tree, no special
|
||||||
|
handling for libraries/modules is triggered. This omits the RUNPATH
|
||||||
|
adjustments normally done by CMake during installation of binaries, which
|
||||||
|
is problematic for a number of reasons:
|
||||||
|
- library lookup can fail when dependencies require non-default RUNPATHs
|
||||||
|
- reproducible builds can fail when the buildroot contains semi-random
|
||||||
|
path components
|
||||||
|
|
||||||
|
Install the library target a second time, which is explicitly allowed
|
||||||
|
by CMake. As RENAME is not supported for `install(TARGETS)`, adjust the
|
||||||
|
name manually.
|
||||||
|
---
|
||||||
|
pcbnew/CMakeLists.txt | 8 +++++++-
|
||||||
|
1 file changed, 7 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/pcbnew/CMakeLists.txt b/pcbnew/CMakeLists.txt
|
||||||
|
index 0ae24f0bd5..85b3cd471e 100644
|
||||||
|
--- a/pcbnew/CMakeLists.txt
|
||||||
|
+++ b/pcbnew/CMakeLists.txt
|
||||||
|
@@ -817,7 +817,13 @@ elseif( APPLE )
|
||||||
|
add_dependencies( ScriptingModulesPcbnewSoCopy ScriptingPythonDirectoryCreation )
|
||||||
|
set( PYMOD_EXT "so" )
|
||||||
|
else() # only linux remains among supported platforms
|
||||||
|
- install( FILES ${CMAKE_CURRENT_BINARY_DIR}/_pcbnew.kiface DESTINATION ${PYTHON_DEST} COMPONENT binary RENAME "_pcbnew.so" )
|
||||||
|
+ install( TARGETS pcbnew_kiface DESTINATION ${PYTHON_DEST} COMPONENT binary )
|
||||||
|
+ cmake_policy(SET CMP0087 NEW)
|
||||||
|
+ install( CODE
|
||||||
|
+ "file( RENAME
|
||||||
|
+ \$ENV{DESTDIR}${PYTHON_DEST}/\$<TARGET_FILE_NAME:pcbnew_kiface>
|
||||||
|
+ \$ENV{DESTDIR}${PYTHON_DEST}/_pcbnew.so
|
||||||
|
+ )" )
|
||||||
|
set( PYMOD_EXT "so" )
|
||||||
|
endif()
|
||||||
|
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
@ -2,7 +2,7 @@
|
|||||||
<constraints>
|
<constraints>
|
||||||
<hardware>
|
<hardware>
|
||||||
<disk>
|
<disk>
|
||||||
<size unit="G">9</size>
|
<size unit="G">11</size>
|
||||||
</disk>
|
</disk>
|
||||||
<memory>
|
<memory>
|
||||||
<size unit="G">8</size>
|
<size unit="G">8</size>
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:af2a485911566097ca61efa394da6779d3bdf9b7dcbe27f56f4d9fc8b105d78b
|
|
||||||
size 18581842
|
|
3
kicad-6.0.0.tar.bz2
Normal file
3
kicad-6.0.0.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:9738daf54bb536d8264f58340c53fbe3df74eeef45d2b20fc3e6fd8786d76dec
|
||||||
|
size 33925942
|
@ -1,12 +0,0 @@
|
|||||||
Index: common/searchhelpfilefullpath.cpp
|
|
||||||
===================================================================
|
|
||||||
--- common/searchhelpfilefullpath.cpp.orig
|
|
||||||
+++ common/searchhelpfilefullpath.cpp
|
|
||||||
@@ -107,6 +107,7 @@ wxString SearchHelpFileFullPath( const S
|
|
||||||
// Below we account for an international subdirectory.
|
|
||||||
subdirs.Add( "share" );
|
|
||||||
subdirs.Add( "doc" );
|
|
||||||
+ subdirs.Add( "packages" );
|
|
||||||
subdirs.Add( "kicad" );
|
|
||||||
subdirs.Add( "help" );
|
|
||||||
|
|
@ -1,3 +1,12 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Sat Dec 25 16:56:09 UTC 2021 - Stefan Brüns <stefan.bruens@rwth-aachen.de>
|
||||||
|
|
||||||
|
- Update to version 6.0.0
|
||||||
|
See https://www.kicad.org/blog/2021/12/KiCad-6.0.0-Release/ for details.
|
||||||
|
- Drop no longer necessary kicad-suse-help-path.patch
|
||||||
|
- Add 0001-Use-library-target-install-for-python-module-to-fix-.patch
|
||||||
|
- Adjust disk constraints (now 11G)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Nov 18 03:32:50 UTC 2021 - Stefan Brüns <stefan.bruens@rwth-aachen.de>
|
Thu Nov 18 03:32:50 UTC 2021 - Stefan Brüns <stefan.bruens@rwth-aachen.de>
|
||||||
|
|
||||||
|
110
kicad.spec
110
kicad.spec
@ -16,59 +16,42 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
%if %{suse_version} >= 1550
|
# According to upstream, kicad 6.x.y can be used with the footprint and
|
||||||
%bcond_without python3
|
# symbol libraries from version 6.0.0
|
||||||
%else
|
%define compatversion 6.0.0
|
||||||
%bcond_with python3
|
|
||||||
%endif
|
|
||||||
|
|
||||||
# According to upstream, kicad 5.x.y can be used with the footprint and
|
|
||||||
# symbol libraries from version 5.0.0
|
|
||||||
%define compatversion 5.0.0
|
|
||||||
Name: kicad
|
Name: kicad
|
||||||
Version: 5.1.12
|
Version: 6.0.0
|
||||||
|
%define file_version 6.0.0
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: EDA software suite for the creation of schematics and PCB
|
Summary: EDA software suite for the creation of schematics and PCB
|
||||||
License: AGPL-3.0-or-later AND GPL-3.0-or-later
|
License: AGPL-3.0-or-later AND GPL-3.0-or-later
|
||||||
Group: Productivity/Scientific/Electronics
|
Group: Productivity/Scientific/Electronics
|
||||||
URL: https://www.kicad.org
|
URL: https://www.kicad.org
|
||||||
Source: https://gitlab.com/kicad/code/kicad/-/archive/%{version}/kicad-%{version}.tar.bz2
|
Source: https://gitlab.com/kicad/code/kicad/-/archive/%{file_version}/kicad-%{file_version}.tar.bz2
|
||||||
# PATCH-FIX-OPENSUSE davejplater@gmail.com -kicad-suse-help-path.patch - kicad looks in /usr/share/doc/kicad for help files and doesn't find them.
|
Patch0: 0001-Use-library-target-install-for-python-module-to-fix-.patch
|
||||||
# this patch adds packges/ befor kicad and enables help to function.
|
|
||||||
Patch3: kicad-suse-help-path.patch
|
|
||||||
|
|
||||||
BuildRequires: cmake
|
BuildRequires: cmake >= 3.14
|
||||||
BuildRequires: doxygen
|
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
BuildRequires: glm-devel
|
BuildRequires: gettext
|
||||||
|
BuildRequires: glm-devel >= 0.9.8
|
||||||
BuildRequires: libboost_filesystem-devel
|
BuildRequires: libboost_filesystem-devel
|
||||||
BuildRequires: libboost_system-devel
|
BuildRequires: libboost_system-devel
|
||||||
BuildRequires: libboost_test-devel
|
BuildRequires: libboost_test-devel
|
||||||
BuildRequires: libngspice-devel
|
BuildRequires: libngspice-devel
|
||||||
BuildRequires: occt-devel
|
BuildRequires: occt-devel
|
||||||
BuildRequires: pkg-config
|
BuildRequires: pkg-config
|
||||||
|
BuildRequires: python3-pybind11-devel
|
||||||
|
BuildRequires: python3-wxPython
|
||||||
BuildRequires: swig >= 3
|
BuildRequires: swig >= 3
|
||||||
BuildRequires: update-desktop-files
|
BuildRequires: update-desktop-files
|
||||||
|
|
||||||
%if %{with python3}
|
|
||||||
BuildRequires: python3-wxPython
|
|
||||||
BuildRequires: wxGTK3-devel >= 3
|
BuildRequires: wxGTK3-devel >= 3
|
||||||
BuildRequires: pkgconfig(python3)
|
|
||||||
Recommends: python3-wxPython
|
|
||||||
%else
|
|
||||||
# Use direct version to avoid problems with wx 3.2
|
|
||||||
BuildRequires: python-wxWidgets-3_0-devel >= 3
|
|
||||||
BuildRequires: wxWidgets-3_0-devel >= 3
|
|
||||||
BuildRequires: pkgconfig(python)
|
|
||||||
Requires: python-wxWidgets-3_0 >= 3
|
|
||||||
%endif
|
|
||||||
|
|
||||||
BuildRequires: pkgconfig(bzip2)
|
BuildRequires: pkgconfig(bzip2)
|
||||||
BuildRequires: pkgconfig(cairo)
|
BuildRequires: pkgconfig(cairo)
|
||||||
BuildRequires: pkgconfig(glew)
|
BuildRequires: pkgconfig(glew)
|
||||||
BuildRequires: pkgconfig(libcurl)
|
BuildRequires: pkgconfig(libcurl)
|
||||||
BuildRequires: pkgconfig(openssl)
|
BuildRequires: pkgconfig(openssl)
|
||||||
|
BuildRequires: pkgconfig(python3) >= 3.6
|
||||||
BuildRequires: pkgconfig(zlib)
|
BuildRequires: pkgconfig(zlib)
|
||||||
# Fix directory owner
|
# Fix directory owner
|
||||||
BuildRequires: hicolor-icon-theme
|
BuildRequires: hicolor-icon-theme
|
||||||
@ -82,14 +65,15 @@ Requires: kicad-symbols = %{compatversion}
|
|||||||
Requires: kicad-footprints = %{compatversion}
|
Requires: kicad-footprints = %{compatversion}
|
||||||
# KiCad functions without these packages
|
# KiCad functions without these packages
|
||||||
Recommends: kicad-packages3D = %{compatversion}
|
Recommends: kicad-packages3D = %{compatversion}
|
||||||
Recommends: kicad-i18n = %{version}
|
|
||||||
Recommends: kicad-templates = %{compatversion}
|
Recommends: kicad-templates = %{compatversion}
|
||||||
|
Recommends: python3-wxPython
|
||||||
Obsoletes: kicad = 20140120
|
Obsoletes: kicad = 20140120
|
||||||
Provides: kicad = %{compatversion}
|
Provides: kicad = %{compatversion}
|
||||||
|
|
||||||
%description
|
%description
|
||||||
KiCad is an open source (GPL) software for the creation of electronic schematic
|
KiCad is an open source (GPL) software for the creation of electronic
|
||||||
diagrams and printed circuit with up to 32 copper layers and additional techinical layers.
|
schematic diagrams and printed circuit with up to 32 copper layers and
|
||||||
|
additional technical layers.
|
||||||
|
|
||||||
KiCad includes a project manager and four main independent software tools:
|
KiCad includes a project manager and four main independent software tools:
|
||||||
- Eeschema: schematic editor.
|
- Eeschema: schematic editor.
|
||||||
@ -97,31 +81,21 @@ KiCad includes a project manager and four main independent software tools:
|
|||||||
- Gerbview: GERBER file viewer (photoplotter documents).
|
- Gerbview: GERBER file viewer (photoplotter documents).
|
||||||
- Cvpcb: footprint selector for components association.
|
- Cvpcb: footprint selector for components association.
|
||||||
|
|
||||||
|
%lang_package
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n kicad-%{version}
|
%autosetup -p1 -n kicad-%{file_version}
|
||||||
%patch3
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
# -DKICAD_PLUGINS:PATH=%%{_libdir}/kicad/plugins \
|
|
||||||
# The above path is for .py scripts and other text files install places these files correctly.
|
|
||||||
# The KICAD_USER_PLUGIN is for binary plugins.
|
|
||||||
%cmake \
|
%cmake \
|
||||||
-DKICAD_VERSION_EXTRA=%{version} \
|
|
||||||
-DKICAD_LIB:PATH=%{_libdir} \
|
|
||||||
-DKICAD_USER_PLUGIN:PATH=%{_libdir}/kicad/plugins \
|
|
||||||
-DKICAD_DOCS:PATH=%{_docdir}/kicad \
|
|
||||||
-DKICAD_DATA:PATH=%{_datadir}/kicad \
|
|
||||||
-DBUILD_GITHUB_PLUGIN=ON \
|
|
||||||
-DKICAD_SCRIPTING=ON \
|
|
||||||
-DKICAD_SCRIPTING_MODULES=ON \
|
|
||||||
-DKICAD_SCRIPTING_WXPYTHON=ON \
|
|
||||||
%if %{with python3}
|
|
||||||
-DKICAD_SCRIPTING_PYTHON3=ON \
|
|
||||||
-DKICAD_SCRIPTING_WXPYTHON_PHOENIX=ON \
|
|
||||||
%endif
|
|
||||||
-DKICAD_USE_OCC:BOOL=ON \
|
|
||||||
-DCMAKE_EXE_LINKER_FLAGS="-Wl,--as-needed -Wl,--no-undefined -Wl,-z,now -pie" \
|
-DCMAKE_EXE_LINKER_FLAGS="-Wl,--as-needed -Wl,--no-undefined -Wl,-z,now -pie" \
|
||||||
-DPYTHON_SITE_PACKAGE_PATH=%{python_sitearch} \
|
-DKICAD_DOCS:PATH=%{_docdir}/kicad \
|
||||||
|
-DPYTHON_SITE_PACKAGE_PATH=%{python3_sitearch} \
|
||||||
|
-DKICAD_BUILD_I18N=ON \
|
||||||
|
-DKICAD_I18N_UNIX_STRICT_PATH:BOOL=ON \
|
||||||
|
-DKICAD_SCRIPTING_WXPYTHON=ON \
|
||||||
|
-DKICAD_USE_OCC:BOOL=ON \
|
||||||
|
-DKICAD_PCM=ON \
|
||||||
-DKICAD_SPICE=ON
|
-DKICAD_SPICE=ON
|
||||||
|
|
||||||
%cmake_build
|
%cmake_build
|
||||||
@ -141,43 +115,49 @@ KiCad includes a project manager and four main independent software tools:
|
|||||||
# Link to library libkicad_3dsg.so.2.0.0 has no use
|
# Link to library libkicad_3dsg.so.2.0.0 has no use
|
||||||
rm -rf %{buildroot}%{_libdir}/libkicad_3dsg.so
|
rm -rf %{buildroot}%{_libdir}/libkicad_3dsg.so
|
||||||
|
|
||||||
|
# https://gitlab.com/kicad/code/kicad/-/issues/9944
|
||||||
|
rm -rf %{buildroot}%{_libdir}/libkicad*.a
|
||||||
|
|
||||||
# Delete packaging/maintenance scripts
|
# Delete packaging/maintenance scripts
|
||||||
rm "%{buildroot}%{_docdir}/kicad/scripts/"{test_kicad_plugin.py,test_plugin.py}
|
rm "%{buildroot}%{_docdir}/kicad/scripts/"{test_kicad_plugin.py,test_plugin.py}
|
||||||
|
|
||||||
# Move remaining standalone scripts to kicad directory
|
# Move remaining standalone scripts to kicad directory
|
||||||
mv %{buildroot}%{_docdir}/kicad/scripts %{buildroot}%{_datadir}/kicad/
|
mv %{buildroot}%{_docdir}/kicad/scripts %{buildroot}%{_datadir}/kicad/
|
||||||
%if %{with python3}
|
|
||||||
sed -i '1s@^#!.*python.*@#!/usr/bin/python3@' %{buildroot}%{_datadir}/kicad/scripts/*.py
|
sed -i '1s@^#!.*python.*@#!/usr/bin/python3@' %{buildroot}%{_datadir}/kicad/scripts/*.py
|
||||||
%else
|
|
||||||
sed -i '1s@^#!.*python.*@#!/usr/bin/python2@' %{buildroot}%{_datadir}/kicad/scripts/*.py
|
|
||||||
%endif
|
|
||||||
chmod +x %{buildroot}%{_datadir}/kicad/scripts/*.py
|
chmod +x %{buildroot}%{_datadir}/kicad/scripts/*.py
|
||||||
|
|
||||||
# Fix executable bits for scripts executed directly from kicad, remove she-bangs
|
# Fix executable bits for scripts executed directly from kicad, remove she-bangs
|
||||||
chmod -x %{buildroot}%{_datadir}/kicad/scripting/*/*.py
|
chmod -x %{buildroot}%{_datadir}/kicad/scripting/*/*.py
|
||||||
sed -i '1s@^#!.*@@' %{buildroot}%{_datadir}/kicad/scripting/*/*.py
|
sed -i '1s@^#!.*@@' %{buildroot}%{_datadir}/kicad/scripting/*/*.py
|
||||||
|
|
||||||
%fdupes -s %{buildroot}%{_datadir}/kicad
|
%fdupes %{buildroot}%{_datadir}/kicad
|
||||||
%fdupes -s %{buildroot}%{_datadir}/icons/hicolor
|
%fdupes %{buildroot}%{_datadir}/icons/hicolor
|
||||||
# the pcbnew kiface and the python module are actually the same file
|
# the pcbnew kiface and the python module are actually the same file
|
||||||
cmp --quiet %{buildroot}%{_bindir}/_pcbnew.kiface %{buildroot}%{python_sitearch}/_pcbnew.so && \
|
cmp %{buildroot}%{_bindir}/_pcbnew.kiface %{buildroot}%{python3_sitearch}/_pcbnew.so && \
|
||||||
ln -sf %{_bindir}/_pcbnew.kiface %{buildroot}%{python_sitearch}/_pcbnew.so
|
ln -sf %{_bindir}/_pcbnew.kiface %{buildroot}%{python3_sitearch}/_pcbnew.so
|
||||||
|
|
||||||
|
%find_lang %{name}
|
||||||
|
|
||||||
|
%check
|
||||||
|
%ctest
|
||||||
|
|
||||||
%post -p /sbin/ldconfig
|
%post -p /sbin/ldconfig
|
||||||
%postun -p /sbin/ldconfig
|
%postun -p /sbin/ldconfig
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%doc README.txt Documentation/changelogs
|
%doc README.md Documentation/changelogs
|
||||||
%license LICENSE.GPLv3 LICENSE.AGPLv3 LICENSE.README
|
%license LICENSE.*
|
||||||
%{_bindir}/*
|
%{_bindir}/*
|
||||||
%{_libdir}/kicad/
|
%{_libdir}/kicad/
|
||||||
%{_datadir}/kicad/
|
%{_datadir}/kicad/
|
||||||
%{python_sitearch}/*
|
%{python3_sitearch}/*
|
||||||
%{_datadir}/appdata/kicad.appdata.xml
|
%{_datadir}/metainfo/org.kicad.kicad.metainfo.xml
|
||||||
%{_datadir}/applications/*.desktop
|
%{_datadir}/applications/*.desktop
|
||||||
%{_datadir}/mime/packages/kicad-*.xml
|
%{_datadir}/mime/packages/kicad-*.xml
|
||||||
%{_datadir}/icons/hicolor/*/mimetypes/application-x-*
|
%{_datadir}/icons/hicolor/*/mimetypes/application-x-*
|
||||||
%{_datadir}/icons/hicolor/*/apps/*.*
|
%{_datadir}/icons/hicolor/*/apps/*.*
|
||||||
%{_libdir}/libkicad_3dsg.so.2.0.0
|
%{_libdir}/libkicad_3dsg.so.2.0.0
|
||||||
|
|
||||||
|
%files lang -f %{name}.lang
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Loading…
Reference in New Issue
Block a user