Accepting request 685412 from electronics
- Update to minor release 5.1.0 This version contains critical bugfixes and minor improvements. See http://kicad-pcb.org/blog/2019/03/KiCad-5.1.0-Release/ for details. - Remove obsolete kicad-library-repos-install.patch - Remove upstream 0001-Use-absolute-path-CMAKE_INSTALL_FULL_LIBDIR-for-3d-v.patch OBS-URL: https://build.opensuse.org/request/show/685412 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/kicad?expand=0&rev=30
This commit is contained in:
commit
6d5fc76ed9
@ -1,54 +0,0 @@
|
||||
From 3f1f474f8ceab75acda7c1d0a36cc9c33c6124b3 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bruens@rwth-aachen.de>
|
||||
Date: Tue, 9 Oct 2018 17:35:55 +0200
|
||||
Subject: [PATCH] Use absolute path CMAKE_INSTALL_FULL_LIBDIR for 3d viewer
|
||||
PLUGINDIR
|
||||
|
||||
Currently, the plugindir in the plugin manager is constructed as
|
||||
{CMAKE_INSTALL_PREFIX}/bin/../{CMAKE_INSTALL_LIBDIR}/kicad/..., while
|
||||
CMakes install uses {CMAKE_INSTALL_LIBDIR}/kicad/...
|
||||
|
||||
In case CMAKE_INSTALL_LIBDIR is a relative path "install" prefixes it
|
||||
with CMAKE_INSTALL_PREFIX and both paths happen to match, otherwise
|
||||
the constructed path ends up as e.g. "/usr/bin/../usr/lib/kicad/...".
|
||||
|
||||
For these cases where an absolute path is wanted CMake provides the
|
||||
CMAKE_INSTALL_FULL_<dir> variants which works the same as
|
||||
CMAKE_INSTALL_<dir> when used as DIRECTORY for install.
|
||||
---
|
||||
3d-viewer/3d_cache/3d_plugin_manager.cpp | 10 +++-------
|
||||
3d-viewer/3d_plugin_dir.h.in | 2 +-
|
||||
2 files changed, 4 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/3d-viewer/3d_cache/3d_plugin_manager.cpp b/3d-viewer/3d_cache/3d_plugin_manager.cpp
|
||||
index 52f2cef..fc561e7 100644
|
||||
--- a/3d-viewer/3d_cache/3d_plugin_manager.cpp
|
||||
+++ b/3d-viewer/3d_cache/3d_plugin_manager.cpp
|
||||
@@ -149,14 +149,10 @@ void S3D_PLUGIN_MANAGER::loadPlugins( void )
|
||||
#endif
|
||||
|
||||
#ifndef _WIN32
|
||||
- // multiarch friendly determination of the plugin directory: the executable dir
|
||||
- // is first determined via wxStandardPaths::Get().GetExecutablePath() and then
|
||||
- // the CMAKE_INSTALL_LIBDIR path is appended relative to the executable dir.
|
||||
+ // PLUGINDIR = CMAKE_INSTALL_FULL_LIBDIR path is the absolute path
|
||||
+ // corresponding to the install path used for constructing KICAD_USER_PLUGIN
|
||||
|
||||
- fn.Assign( wxStandardPaths::Get().GetExecutablePath() );
|
||||
- fn.RemoveLastDir();
|
||||
- wxString tfname = fn.GetPathWithSep();
|
||||
- tfname.Append( wxString::FromUTF8Unchecked( PLUGINDIR ) );
|
||||
+ wxString tfname = wxString::FromUTF8Unchecked( PLUGINDIR );
|
||||
fn.Assign( tfname, "");
|
||||
fn.AppendDir( "kicad" );
|
||||
#else
|
||||
diff --git a/3d-viewer/3d_plugin_dir.h.in b/3d-viewer/3d_plugin_dir.h.in
|
||||
index 6cf6de2..fb923ec 100644
|
||||
--- a/3d-viewer/3d_plugin_dir.h.in
|
||||
+++ b/3d-viewer/3d_plugin_dir.h.in
|
||||
@@ -1 +1 @@
|
||||
-#define PLUGINDIR "@CMAKE_INSTALL_LIBDIR@"
|
||||
+#define PLUGINDIR "@CMAKE_INSTALL_FULL_LIBDIR@"
|
||||
--
|
||||
2.19.0
|
||||
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:2f3406e72eb6757789c18bd9204d0c6ddae64b025f4c6fec28037410722ec080
|
||||
size 14257576
|
3
kicad-5.1.0.tar.xz
Normal file
3
kicad-5.1.0.tar.xz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:7a9e018ee7372f144d9eb2b78bc1e7b5dfa92f6e293f4c1cff75781e8e9a0cbd
|
||||
size 14191708
|
@ -1,113 +0,0 @@
|
||||
Index: kicad-4.0.0/scripts/library-repos-install.sh
|
||||
===================================================================
|
||||
--- kicad-4.0.0.orig/scripts/library-repos-install.sh
|
||||
+++ kicad-4.0.0/scripts/library-repos-install.sh
|
||||
@@ -24,7 +24,8 @@
|
||||
|
||||
|
||||
# Set where the library repos will go, use a full path
|
||||
-WORKING_TREES=${WORKING_TREES:-~/kicad_sources}
|
||||
+WORKING_TREES=~/.local/share/kicad
|
||||
+KICAD_CONFIG_COMMON=~/.config/kicad/kicad_common
|
||||
|
||||
|
||||
usage()
|
||||
@@ -32,50 +33,35 @@ usage()
|
||||
echo ""
|
||||
echo " usage:"
|
||||
echo ""
|
||||
- echo "./library-sources-install.sh <cmd>"
|
||||
+ echo "kicad-library-install.sh <cmd>"
|
||||
echo " where <cmd> is one of:"
|
||||
- echo " --install-prerequisites (install command tools needed here, run once first.)"
|
||||
echo " --install-or-update (from github, the library sources.)"
|
||||
+ echo " --download-all-libraries (download library sources from GitHub.)"
|
||||
echo " --remove-all-libraries (remove all *.pretty from $WORKING_TREES/library-repos/. )"
|
||||
echo " --remove-orphaned-libraries (remove local libraries which have been deleted or renamed at github.)"
|
||||
echo " --list-libraries (show the full list of github libraries.)"
|
||||
echo " --create-bat-file (cat a windows batch file, redirect to capture to disk.)"
|
||||
echo ""
|
||||
- echo "examples (with --install-prerequisites once first):"
|
||||
- echo ' $ ./library-sources-install.sh --install-prerequisites'
|
||||
- echo ' $ ./library-sources-install.sh --install-or-update'
|
||||
+ echo "Default library directory is $WORKING_TREES/library-repos/"
|
||||
}
|
||||
|
||||
|
||||
-install_prerequisites()
|
||||
-{
|
||||
- # Find a package manager, PM
|
||||
- PM=$( command -v yum || command -v apt-get )
|
||||
-
|
||||
- # assume all these Debian, Mint, Ubuntu systems have same prerequisites
|
||||
- if [ "$(expr match "$PM" '.*\(apt-get\)')" == "apt-get" ]; then
|
||||
- #echo "debian compatible system"
|
||||
- sudo apt-get install \
|
||||
- git \
|
||||
- curl \
|
||||
- sed
|
||||
-
|
||||
- # assume all yum systems have same prerequisites
|
||||
- elif [ "$(expr match "$PM" '.*\(yum\)')" == "yum" ]; then
|
||||
- #echo "red hat compatible system"
|
||||
- # Note: if you find this list not to be accurate, please submit a patch:
|
||||
- sudo yum install \
|
||||
- git \
|
||||
- curl \
|
||||
- sed
|
||||
+add_libraries_config()
|
||||
+{
|
||||
+ # Add libraries to config file
|
||||
+ if [ ! -d "$KICAD_CONFIG_COMMON" ]; then
|
||||
+ echo "[EnvironmentVariables]" > $KICAD_CONFIG_COMMON
|
||||
+ echo "KIGITHUB=$WORKING_TREES/library-repos/" >> $KICAD_CONFIG_COMMON
|
||||
+ echo "KISYSMOD=$WORKING_TREES/library-repos/kicad-library/modules/" >> $KICAD_CONFIG_COMMON
|
||||
+ echo "KISYS3DMOD=$WORKING_TREES/library-repos/kicad-library/modules/packages3d/" >> $KICAD_CONFIG_COMMON
|
||||
+ echo "KICAD_PTEMPLATES=$WORKING_TREES/library-repos/kicad-library/template/" >> $KICAD_CONFIG_COMMON
|
||||
else
|
||||
- echo
|
||||
- echo "Incompatible System. Neither 'yum' nor 'apt-get' found. Not possible to"
|
||||
- echo "continue. Please make sure to install git, curl, and sed before using this"
|
||||
- echo "script."
|
||||
- echo
|
||||
- exit 1
|
||||
+ sed -i 's|^KIGITHUB.*|KIGITHUB='$WORKING_TREES'/library-repos/|' $KICAD_CONFIG_COMMON
|
||||
+ sed -i 's|^KISYSMOD.*|KISYSMOD='$WORKING_TREES'/library-repos/kicad-library/modules/|' $KICAD_CONFIG_COMMON
|
||||
+ sed -i 's|^KISYS3DMOD.*|KISYS3DMOD='$WORKING_TREES'/library-repos/kicad-library/modules/packages3d/|' $KICAD_CONFIG_COMMON
|
||||
+ sed -i 's|^KICAD_PTEMPLATES.*|KICAD_PTEMPLATES='$WORKING_TREES'/library-repos/kicad-library/template/|' $KICAD_CONFIG_COMMON
|
||||
fi
|
||||
+ cp $WORKING_TREES/library-repos/kicad-library/template/fp-lib-table.for-pretty ~/.config/kicad/fp-lib-table
|
||||
}
|
||||
|
||||
|
||||
@@ -138,9 +124,7 @@ detect_pretty_repos()
|
||||
checkout_or_update_libraries()
|
||||
{
|
||||
if [ ! -d "$WORKING_TREES" ]; then
|
||||
- sudo mkdir -p "$WORKING_TREES"
|
||||
- echo " mark $WORKING_TREES as owned by me"
|
||||
- sudo chown -R `whoami` "$WORKING_TREES"
|
||||
+ mkdir -p "$WORKING_TREES"
|
||||
fi
|
||||
cd $WORKING_TREES
|
||||
|
||||
@@ -217,6 +201,7 @@ remove_orphaned_libraries()
|
||||
|
||||
if [ $# -eq 1 -a "$1" == "--install-or-update" ]; then
|
||||
checkout_or_update_libraries
|
||||
+ add_libraries_config
|
||||
exit
|
||||
fi
|
||||
|
||||
@@ -233,11 +218,6 @@ if [ $# -eq 1 -a "$1" == "--remove-all-l
|
||||
fi
|
||||
|
||||
|
||||
-if [ $# -eq 1 -a "$1" == "--install-prerequisites" ]; then
|
||||
- install_prerequisites
|
||||
- exit
|
||||
-fi
|
||||
-
|
||||
if [ $# -eq 1 -a "$1" == "--list-libraries" ]; then
|
||||
|
||||
# use github API to get repos into PRETTY_REPOS var
|
@ -4,9 +4,9 @@ Index: common/searchhelpfilefullpath.cpp
|
||||
+++ common/searchhelpfilefullpath.cpp
|
||||
@@ -107,6 +107,7 @@ wxString SearchHelpFileFullPath( const S
|
||||
// Below we account for an international subdirectory.
|
||||
subdirs.Add( wxT( "share" ) );
|
||||
subdirs.Add( wxT( "doc" ) );
|
||||
+ subdirs.Add( wxT( "packages" ) );
|
||||
subdirs.Add( wxT( "kicad" ) );
|
||||
subdirs.Add( wxT( "help" ) );
|
||||
subdirs.Add( "share" );
|
||||
subdirs.Add( "doc" );
|
||||
+ subdirs.Add( "packages" );
|
||||
subdirs.Add( "kicad" );
|
||||
subdirs.Add( "help" );
|
||||
|
||||
|
@ -2,14 +2,6 @@ Index: common/kiface_i.cpp
|
||||
===================================================================
|
||||
--- common/kiface_i.cpp.orig 2018-07-13 21:53:52.000000000 +0200
|
||||
+++ common/kiface_i.cpp 2018-07-20 16:03:55.529317649 +0200
|
||||
@@ -54,6 +54,7 @@ static void setSearchPaths( SEARCH_STACK
|
||||
|
||||
fn.AppendDir( wxT( "library" ) );
|
||||
aDst->AddPaths( fn.GetPath() );
|
||||
+
|
||||
|
||||
fn.AppendDir( wxT( "doc" ) );
|
||||
aDst->AddPaths( fn.GetPath() );
|
||||
@@ -61,6 +62,13 @@ static void setSearchPaths( SEARCH_STACK
|
||||
fn.RemoveLastDir();
|
||||
fn.RemoveLastDir(); // "../../" up twice, removing library/doc/
|
||||
|
@ -1,3 +1,12 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Mar 11 16:35:16 UTC 2019 - Stefan Brüns <stefan.bruens@rwth-aachen.de>
|
||||
|
||||
- Update to minor release 5.1.0
|
||||
This version contains critical bugfixes and minor improvements.
|
||||
See http://kicad-pcb.org/blog/2019/03/KiCad-5.1.0-Release/ for details.
|
||||
- Remove obsolete kicad-library-repos-install.patch
|
||||
- Remove upstream 0001-Use-absolute-path-CMAKE_INSTALL_FULL_LIBDIR-for-3d-v.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Feb 19 15:02:02 UTC 2019 - Stefan Brüns <stefan.bruens@rwth-aachen.de>
|
||||
|
||||
|
35
kicad.spec
35
kicad.spec
@ -16,11 +16,11 @@
|
||||
#
|
||||
|
||||
|
||||
# According to upstream, kicad 5.0.x can be used with the footprint and
|
||||
# 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
|
||||
Version: 5.0.2
|
||||
Version: 5.1.0
|
||||
Release: 0
|
||||
Summary: EDA software suite for the creation of schematics and PCB
|
||||
License: GPL-3.0-or-later AND AGPL-3.0-or-later
|
||||
@ -29,15 +29,12 @@ Url: http://kicad-pcb.org
|
||||
Source: https://launchpad.net/kicad/5.0/%{version}/+download/kicad-%{version}.tar.xz
|
||||
# PATCH-FEATURE-OPENSUSE kicad-user-library.patch -- add user library path
|
||||
Patch1: kicad-user-library.patch
|
||||
# PATCH-FEATURE-OPENSUSE kicad-library-repos-install.patch
|
||||
Patch2: kicad-library-repos-install.patch
|
||||
# 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.
|
||||
# this patch adds packges/ befor kicad and enables help to function.
|
||||
Patch3: kicad-suse-help-path.patch
|
||||
# PATCH-FIX-UPSTREAM 0001-Use-absolute-path-CMAKE_INSTALL_FULL_LIBDIR-for-3d-v.patch
|
||||
Patch4: 0001-Use-absolute-path-CMAKE_INSTALL_FULL_LIBDIR-for-3d-v.patch
|
||||
|
||||
%if 0%{?suse_version} >= 1500
|
||||
BuildRequires: libboost_filesystem-devel
|
||||
BuildRequires: libboost_system-devel
|
||||
BuildRequires: libboost_test-devel
|
||||
%else
|
||||
@ -78,7 +75,6 @@ Requires: %{name}-symbols = %{compatversion}
|
||||
# You cannot create a pcb layout without footprints
|
||||
Requires: %{name}-footprints = %{compatversion}
|
||||
# Kicad functions without these packages
|
||||
Recommends: %{name}-library-install = %{version}
|
||||
Recommends: %{name}-packages3D = %{compatversion}
|
||||
Recommends: %{name}-templates = %{compatversion}
|
||||
Obsoletes: kicad = 20140120
|
||||
@ -96,26 +92,10 @@ KiCad includes a project manager and four main independent software tools:
|
||||
- Gerbview: GERBER file viewer (photoplotter documents).
|
||||
- Cvpcb: footprint selector for components association.
|
||||
|
||||
%package library-install
|
||||
Summary: Script for KiCad libraries downloading
|
||||
Group: Productivity/Scientific/Electronics
|
||||
Requires: %{name} = %{version}
|
||||
Requires: curl
|
||||
Requires: git-core
|
||||
Requires: sed
|
||||
|
||||
%description library-install
|
||||
Kicad is an open source (GPL) software for the creation of electronic schematic
|
||||
diagrams and printed circuit with up to 32 copper layers and additional techinical layers.
|
||||
|
||||
This package contains script for KiCad libraries downloading.
|
||||
|
||||
%prep
|
||||
%setup -q -n kicad-%{version}
|
||||
%patch1 -p0
|
||||
%patch2 -p1
|
||||
%patch3
|
||||
%patch4 -p1
|
||||
|
||||
%build
|
||||
# -DKICAD_PLUGINS:PATH=%%{_libdir}/kicad/plugins \
|
||||
@ -150,10 +130,8 @@ make %{?_smp_mflags}
|
||||
# Link to library libkicad_3dsg.so.2.0.0 has no use
|
||||
rm -rf %{buildroot}%{_libdir}/libkicad_3dsg.so
|
||||
|
||||
install -D scripts/library-repos-install.sh %{buildroot}%{_bindir}/kicad-library-install.sh
|
||||
|
||||
# Delete packaging/maintenance scripts
|
||||
for f in get_libngspice_so.sh library-repos-install.sh mk_macos_icons.py mk_mime_icons.py test_kicad_plugin.py test_plugin.py ; do
|
||||
for f in test_kicad_plugin.py test_plugin.py ; do
|
||||
rm "%{buildroot}%{_docdir}/kicad/scripts/$f"
|
||||
done
|
||||
# Move remaining standalone scripts to kicad directory
|
||||
@ -190,7 +168,6 @@ cmp --quiet %{buildroot}%{_bindir}/_pcbnew.kiface %{buildroot}%{python_sitearch}
|
||||
%endif
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%doc README.txt Documentation/changelogs
|
||||
%license LICENSE.GPLv3 LICENSE.AGPLv3 LICENSE.README
|
||||
%{_bindir}/*
|
||||
@ -205,8 +182,4 @@ cmp --quiet %{buildroot}%{_bindir}/_pcbnew.kiface %{buildroot}%{python_sitearch}
|
||||
%{_datadir}/icons/hicolor/*/apps/*.*
|
||||
%{_libdir}/libkicad_3dsg.so.2.0.0
|
||||
|
||||
%files library-install
|
||||
%defattr(-,root,root)
|
||||
%{_bindir}/kicad-library-install.sh
|
||||
|
||||
%changelog
|
||||
|
Loading…
Reference in New Issue
Block a user