Accepting request 1065843 from electronics

OBS-URL: https://build.opensuse.org/request/show/1065843
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/kicad?expand=0&rev=52
This commit is contained in:
Dominique Leuenberger 2023-02-15 12:40:22 +00:00 committed by Git OBS Bridge
commit 4a901e6415
6 changed files with 42 additions and 68 deletions

View File

@ -1,42 +0,0 @@
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

View File

@ -2,10 +2,13 @@
<constraints>
<hardware>
<disk>
<size unit="G">11</size>
<size unit="G">12</size>
</disk>
<memory>
<size unit="G">8</size>
</memory>
<memoryperjob>
<size unit="M">1300</size>
</memoryperjob>
</hardware>
</constraints>

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f2b7ad72942c7e154bebb06d4e6d9fd7ea765f679edafb25b059b387860fbe5d
size 34083016

3
kicad-7.0.0.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f0e188c67a1044c6cc884b66b25717326d93ec896194c0963c2fb79b35943d72
size 42583715

View File

@ -1,3 +1,12 @@
-------------------------------------------------------------------
Tue Feb 14 18:34:09 UTC 2023 - Stefan Brüns <stefan.bruens@rwth-aachen.de>
- update to 7.0.0:
See https://www.kicad.org/blog/2023/02/KiCad-7.0.0-Release/ for details.
- Drop obsolete
0001-Use-library-target-install-for-python-module-to-fix-.patch
- Adjust memory _constraints, add memoryperjob
-------------------------------------------------------------------
Thu Jan 26 03:34:50 UTC 2023 - Stefan Brüns <stefan.bruens@rwth-aachen.de>

View File

@ -16,23 +16,28 @@
#
# According to upstream, kicad 6.x.y can be used with the footprint and
# symbol libraries from version 6.0.0
%define compatversion 6.0.0
# According to upstream, kicad 7.x.y can be used with the footprint and
# symbol libraries from version 7.0.0
%define compatversion 7.0.0
Name: kicad
Version: 6.0.11
%define file_version 6.0.11
Version: 7.0.0
%define file_version 7.0.0
Release: 0
Summary: EDA software suite for the creation of schematics and PCB
License: AGPL-3.0-or-later AND GPL-3.0-or-later
Group: Productivity/Scientific/Electronics
URL: https://www.kicad.org
Source: https://gitlab.com/kicad/code/kicad/-/archive/%{file_version}/kicad-%{file_version}.tar.bz2
Patch0: 0001-Use-library-target-install-for-python-module-to-fix-.patch
BuildRequires: cmake >= 3.14
BuildRequires: cmake >= 3.16
BuildRequires: fdupes
BuildRequires: gcc-c++
# Requires charconv from C++17
%if 0%{?suse_version} >= 1550
BuildRequires: gcc-c++ >= 8
%else
BuildRequires: gcc11-PIE
BuildRequires: gcc11-c++ >= 8
%endif
BuildRequires: gettext
BuildRequires: glm-devel >= 0.9.8
BuildRequires: libboost_filesystem-devel-impl
@ -50,6 +55,7 @@ BuildRequires: pkgconfig(bzip2)
BuildRequires: pkgconfig(cairo)
BuildRequires: pkgconfig(glew)
BuildRequires: pkgconfig(libcurl)
BuildRequires: pkgconfig(odbc)
BuildRequires: pkgconfig(openssl)
BuildRequires: pkgconfig(python3) >= 3.6
BuildRequires: pkgconfig(zlib)
@ -69,6 +75,8 @@ Recommends: kicad-templates = %{compatversion}
Recommends: python3-wxPython
Obsoletes: kicad = 20140120
Provides: kicad = %{compatversion}
# Test suite fails, 32 bit archs no longer supported
ExcludeArch: %{arm}
%description
KiCad is an open source (GPL) software for the creation of electronic
@ -116,8 +124,16 @@ Provides translations for the "%{name}" package.
%prep
%autosetup -p1 -n kicad-%{file_version}
%if 0%{?suse_version} < 1550
sed -i -e '/cmake_minimum_required/ s/3.21/3.16/' CMakeLists.txt
sed -i -e '/SWIG/ s/4.0/3.0/' CMakeLists.txt
sed -i -e '/SWIG_OPTS/ { s/ -O/ -py3/ ; s/ -fastdispatch//}' pcbnew/CMakeLists.txt
%endif
%build
%if 0%{?suse_version} < 1550
export CXX=g++-11 CC=gcc-11
%endif
%cmake \
-DCMAKE_SKIP_RPATH:BOOL=OFF \
-DCMAKE_SKIP_INSTALL_RPATH:BOOL=ON \
@ -151,23 +167,11 @@ 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
rm "%{buildroot}%{_docdir}/kicad/scripts/"{test_kicad_plugin.py,test_plugin.py}
# Move remaining standalone scripts to kicad directory
mv %{buildroot}%{_docdir}/kicad/scripts %{buildroot}%{_datadir}/kicad/
sed -i '1s@^#!.*python.*@#!/usr/bin/python3@' %{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
chmod -x %{buildroot}%{_datadir}/kicad/scripting/*/*.py
sed -i '1s@^#!.*@@' %{buildroot}%{_datadir}/kicad/scripting/*/*.py
%fdupes %{buildroot}%{_datadir}/kicad
%fdupes %{buildroot}%{_datadir}/icons/hicolor
# the pcbnew kiface and the python module are actually the same file
cmp %{buildroot}%{_bindir}/_pcbnew.kiface %{buildroot}%{python3_sitearch}/_pcbnew.so && \
ln -sf %{_bindir}/_pcbnew.kiface %{buildroot}%{python3_sitearch}/_pcbnew.so
%find_lang %{name}
@ -183,7 +187,7 @@ cmp %{buildroot}%{_bindir}/_pcbnew.kiface %{buildroot}%{python3_sitearch}/_pcbne
%postun -p /sbin/ldconfig
%files
%doc README.md Documentation/changelogs
%doc README.md
%license LICENSE.*
%{_bindir}/*
%{_libdir}/kicad/