1 |
commit: 194e0780737c7ff4f147a9c4d9f44971cc2306f5 |
2 |
Author: Zoltan Puskas <zoltan <AT> sinustrom <DOT> info> |
3 |
AuthorDate: Sat Nov 3 05:44:01 2018 +0000 |
4 |
Commit: Amy Liffey <amynka <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Jan 2 16:49:33 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=194e0780 |
7 |
|
8 |
sci-electronics/kicad: Bump to 5.0.1 version |
9 |
|
10 |
Bug: https://bugs.gentoo.org/669366 |
11 |
Signed-off-by: Zoltan Puskas <zoltan <AT> sinustrom.info> |
12 |
Signed-off-by: Amy Liffey <amynka <AT> gentoo.org> |
13 |
Package-Manager: Portage-2.3.51, Repoman-2.3.11 |
14 |
|
15 |
sci-electronics/kicad/Manifest | 1 + |
16 |
sci-electronics/kicad/files/kicad-help-path.patch | 117 ++++++++++++++++++++ |
17 |
sci-electronics/kicad/kicad-5.0.1.ebuild | 128 ++++++++++++++++++++++ |
18 |
3 files changed, 246 insertions(+) |
19 |
|
20 |
diff --git a/sci-electronics/kicad/Manifest b/sci-electronics/kicad/Manifest |
21 |
index 80f7881b37e..f6f2ec87504 100644 |
22 |
--- a/sci-electronics/kicad/Manifest |
23 |
+++ b/sci-electronics/kicad/Manifest |
24 |
@@ -1,5 +1,6 @@ |
25 |
DIST kicad-4.0.7-i18n.tar.gz 2578242 BLAKE2B 610f580d9584cf9ef96686c3d7b7081d4c3a0d2c670482eaa2ef32720a7e71630670845a6050bae8e51df7ac41e30f73d3d11be65ea477ad9efd9fbb5176e2df SHA512 4880705fd7e95c939b7f5e2b7730fd37c426be10596f4cfa80d7df102d9e67232621900395d45f4e735986054f74fb215ae2002a2818faae32b1c75e3cb7e10a |
26 |
DIST kicad-4.0.7.tar.xz 10678656 BLAKE2B 54be9a3f5ae6378ac05cb327c28b1a358d895e736a116e1bf5151f021973b9510eab4671a67f222c3be2ef67929954b9576c5c28ef2b6a14708f8c019729969b SHA512 7b2acd9efadf5d48565f71bd0df2474ecc8fc04145953c13ac27363d48dbe6b0de091e311713635f603aed89ce0759a1d623abb37a139e2c87184ca4e717145b |
27 |
DIST kicad-5.0.0.tar.xz 14284708 BLAKE2B 9f4414c4476aca8f2da1d7171b53f56d5ea216f11fc025695a228f93ec05e2f271cbab8429ed39445602a3a0707a31d44cce83eae0ad651167c471f52f3867cd SHA512 79d4d34e8eaa5b6e4c7baac39a76f86af89adbaf3f9181b8cd846ed3a8db1b4c6dd7a36efefda3394d33ef828917909ad3bd8bb22435af9c6f671efbff125b42 |
28 |
+DIST kicad-5.0.1.tar.xz 14241544 BLAKE2B 47b6f8f4443e547dc1251e609b53fc998006c6a9302442a232767c6db79bcd94340afba694d99b6dfad5cf457a524d3dbce7a5971a9dcd13424ccb2b6f8f1de7 SHA512 36f591fe82c2c2da21581ec9425cf3c179839b20ea9db9e2d406220406e9daef6052d29202b4f0fe4fdab73434009626f66ce803e81e7a7dae4df9ea93ed896d |
29 |
DIST kicad-footprints-4.0.7.tar.gz 4758012 BLAKE2B ca7ddcad3d1ca658d0d5b7c0a4a0e9a3906619bdbf14195b3bd14c528c01b6e9c1f185036ad495fc88a33a53040ae4d338230d8b2bbb598a69a1c07ddfec3cce SHA512 9ba08f528d4b3fa6f165a20333ad2e0f6bc4165b51da77bdb080ad2c8cc12c029927ddb2f6aa669b4dac5fac52b8bdbec803d1b7b3fc639e9481bb866b8e3d6f |
30 |
DIST kicad-library-4.0.7.tar.gz 475804416 BLAKE2B 0d6df1df7a72258e896552551996ff13e985976e03b6aafbe900dcc04c9b8eb6e5c1abc242ae5020c1bd20b51e9cc1e60f520b478954edcb6368db7f9ee46df0 SHA512 c5365e18e806102aace785895259deca708a61e0ce37262f5ee2482a8a1f86bc9ce1d37e0fb63cb0661bd5c71064ac36ca2260c9c02ed9790744eedd0a5b5360 |
31 |
|
32 |
diff --git a/sci-electronics/kicad/files/kicad-help-path.patch b/sci-electronics/kicad/files/kicad-help-path.patch |
33 |
new file mode 100644 |
34 |
index 00000000000..0fb43c3550c |
35 |
--- /dev/null |
36 |
+++ b/sci-electronics/kicad/files/kicad-help-path.patch |
37 |
@@ -0,0 +1,117 @@ |
38 |
+diff -Naur kicad-5.0.1-orig/CMakeLists.txt kicad-5.0.1/CMakeLists.txt |
39 |
+--- kicad-5.0.1-orig/CMakeLists.txt 2018-10-08 14:14:38.000000000 -0700 |
40 |
++++ kicad-5.0.1/CMakeLists.txt 2018-12-25 00:04:50.423849671 -0800 |
41 |
+@@ -418,6 +418,10 @@ |
42 |
+ set( KIFACE_PREFIX "_" ) |
43 |
+ #message( STATUS "KIFACE_SUFFIX:${KIFACE_SUFFIX} KIFACE_PREFIX:${KIFACE_PREFIX}" ) |
44 |
+ |
45 |
++# KICAD_HELP is the location of the help files accessed from the UI |
46 |
++# (usually provided via kicad-doc package) |
47 |
++set ( KICAD_HELP share/doc/kicad |
48 |
++ CACHE PATH "Alternative location of KiCad help files.") |
49 |
+ |
50 |
+ #================================================ |
51 |
+ # Locations for install targets. |
52 |
+diff -Naur kicad-5.0.1-orig/CMakeModules/config.h.cmake kicad-5.0.1/CMakeModules/config.h.cmake |
53 |
+--- kicad-5.0.1-orig/CMakeModules/config.h.cmake 2018-10-08 14:14:38.000000000 -0700 |
54 |
++++ kicad-5.0.1/CMakeModules/config.h.cmake 2018-12-25 00:04:39.215828924 -0800 |
55 |
+@@ -59,6 +59,10 @@ |
56 |
+ /// The install prefix defined during CMake configuration or fall back to CMAKE_INSTALL_PREFIX. |
57 |
+ #define DEFAULT_INSTALL_PATH "@DEFAULT_INSTALL_PATH@" |
58 |
+ |
59 |
++/// KiCad help files path can be different on some systems allow adding alternative, |
60 |
++/// search path for them. Defaults to CMAKE_INSTALL_PREFIX/share/doc/kicad |
61 |
++#define KICAD_HELP "@KICAD_HELP@" |
62 |
++ |
63 |
+ /// The wxPython version found during configuration. |
64 |
+ #if defined( KICAD_SCRIPTING_WXPYTHON ) |
65 |
+ #define WXPYTHON_VERSION "@WXPYTHON_VERSION@" |
66 |
+diff -Naur kicad-5.0.1-orig/common/searchhelpfilefullpath.cpp kicad-5.0.1/common/searchhelpfilefullpath.cpp |
67 |
+--- kicad-5.0.1-orig/common/searchhelpfilefullpath.cpp 2018-10-08 14:14:38.000000000 -0700 |
68 |
++++ kicad-5.0.1/common/searchhelpfilefullpath.cpp 2018-12-25 00:04:05.576771741 -0800 |
69 |
+@@ -25,7 +25,7 @@ |
70 |
+ |
71 |
+ #include <pgm_base.h> |
72 |
+ #include <common.h> |
73 |
+-#include <config.h> // to define DEFAULT_INSTALL_PATH |
74 |
++#include <config.h> // to define DEFAULT_INSTALL_PATH and KICAD_HELP |
75 |
+ #include <macros.h> |
76 |
+ |
77 |
+ |
78 |
+@@ -68,6 +68,10 @@ |
79 |
+ wxArrayString subdirs; |
80 |
+ wxArrayString altsubdirs; |
81 |
+ SEARCH_STACK ss = aSStack; |
82 |
++#if ! defined(__WXMAC__) // && defined(__linux__) |
83 |
++ SEARCH_STACK altss; |
84 |
++ wxArrayString moresubdirs; |
85 |
++#endif |
86 |
+ |
87 |
+ // It might already be in aSStack, but why depend on other code |
88 |
+ // far away when it's so easy to add it again (to our copy) as the first place to look. |
89 |
+@@ -75,6 +79,7 @@ |
90 |
+ // This is CMAKE_INSTALL_PREFIX unless DEFAULT_INSTALL_PATH was defined during |
91 |
+ // build configuration: |
92 |
+ ss.AddPaths( wxT( DEFAULT_INSTALL_PATH ), 0 ); |
93 |
++ altss.AddPaths( wxT( KICAD_HELP ), 0 ); |
94 |
+ |
95 |
+ #if defined(__WXMAC__) |
96 |
+ ss.AddPaths( GetOSXKicadMachineDataDir() ); |
97 |
+@@ -103,16 +108,17 @@ |
98 |
+ |
99 |
+ // Based on kicad-doc.bzr/CMakeLists.txt, line 20, the help files are |
100 |
+ // installed into "<CMAKE_INSTALL_PREFIX>/share/doc/kicad/help" for linux. |
101 |
+- // This is ${KICAD_HELP} var in that CMakeLists.txt file. |
102 |
+ // Below we account for an international subdirectory. |
103 |
+ subdirs.Add( wxT( "share" ) ); |
104 |
+ subdirs.Add( wxT( "doc" ) ); |
105 |
+ subdirs.Add( wxT( "kicad" ) ); |
106 |
+ subdirs.Add( wxT( "help" ) ); |
107 |
+ |
108 |
++ // For custom help path installations via ${KICAD_HELP} |
109 |
++ moresubdirs.Add( wxT( "help" ) ); |
110 |
++ |
111 |
+ // Based on kicad-doc.bzr/CMakeLists.txt, line 35, the help files are |
112 |
+ // installed into "<CMAKE_INSTALL_PREFIX>/doc/help" for Windows. |
113 |
+- // This is ${KICAD_HELP} var in that CMakeLists.txt file. |
114 |
+ // Below we account for an international subdirectory. |
115 |
+ altsubdirs.Add( wxT( "doc" ) ); |
116 |
+ altsubdirs.Add( wxT( "help" ) ); |
117 |
+@@ -158,6 +164,9 @@ |
118 |
+ { |
119 |
+ subdirs.Add( locale_name_dirs[ii] ); |
120 |
+ altsubdirs.Add( locale_name_dirs[ii] ); |
121 |
++#if ! defined(__WXMAC__) // && defined(__linux__) |
122 |
++ moresubdirs.Add( locale_name_dirs[ii] ); |
123 |
++#endif |
124 |
+ |
125 |
+ fn = FindFileInSearchPaths( ss, aBaseName + wxT( ".html" ), &altsubdirs ); |
126 |
+ |
127 |
+@@ -187,8 +196,27 @@ |
128 |
+ if( !fn.IsEmpty() ) |
129 |
+ break; |
130 |
+ |
131 |
++#if ! defined(__WXMAC__) // && defined(__linux__) |
132 |
++ fn = FindFileInSearchPaths( altss, aBaseName + wxT( ".html" ), &moresubdirs ); |
133 |
++ |
134 |
++ if( !fn.IsEmpty() ) |
135 |
++ { |
136 |
++ // Prepend URI protocol since we will open in a browser |
137 |
++ fn = wxT( "file://" ) + fn; |
138 |
++ break; |
139 |
++ } |
140 |
++ |
141 |
++ fn = FindFileInSearchPaths( altss, aBaseName + wxT( ".pdf" ), &moresubdirs ); |
142 |
++ |
143 |
++ if( !fn.IsEmpty() ) |
144 |
++ break; |
145 |
++#endif |
146 |
++ |
147 |
+ subdirs.RemoveAt( subdirs.GetCount() - 1 ); |
148 |
+ altsubdirs.RemoveAt( altsubdirs.GetCount() - 1 ); |
149 |
++#if ! defined(__WXMAC__) // && defined(__linux__) |
150 |
++ moresubdirs.RemoveAt( altsubdirs.GetCount() - 1 ); |
151 |
++#endif |
152 |
+ } |
153 |
+ |
154 |
+ return fn; |
155 |
|
156 |
diff --git a/sci-electronics/kicad/kicad-5.0.1.ebuild b/sci-electronics/kicad/kicad-5.0.1.ebuild |
157 |
new file mode 100644 |
158 |
index 00000000000..598f92dad72 |
159 |
--- /dev/null |
160 |
+++ b/sci-electronics/kicad/kicad-5.0.1.ebuild |
161 |
@@ -0,0 +1,128 @@ |
162 |
+# Copyright 1999-2018 Gentoo Authors |
163 |
+# Distributed under the terms of the GNU General Public License v2 |
164 |
+ |
165 |
+EAPI=6 |
166 |
+PYTHON_COMPAT=( python2_7 ) |
167 |
+ |
168 |
+WX_GTK_VER="3.0" |
169 |
+ |
170 |
+inherit check-reqs cmake-utils eapi7-ver eutils gnome2-utils python-single-r1 toolchain-funcs wxwidgets xdg-utils |
171 |
+ |
172 |
+DESCRIPTION="Electronic Schematic and PCB design tools" |
173 |
+HOMEPAGE="http://www.kicad-pcb.org" |
174 |
+SRC_URI="https://launchpad.net/${PN}/$(ver_cut 1-2)/${PV}/+download/${P}.tar.xz" |
175 |
+ |
176 |
+LICENSE="GPL-2+ GPL-3+ Boost-1.0" |
177 |
+SLOT="0" |
178 |
+KEYWORDS="~amd64 ~arm64 ~x86" |
179 |
+IUSE="doc examples github +ngspice occ +oce openmp +python" |
180 |
+ |
181 |
+REQUIRED_USE=" |
182 |
+ python? ( ${PYTHON_REQUIRED_USE} ) |
183 |
+ ?? ( occ oce ) |
184 |
+" |
185 |
+ |
186 |
+COMMON_DEPEND=">=x11-libs/wxGTK-3.0.2:${WX_GTK_VER}[X,opengl] |
187 |
+ python? ( |
188 |
+ dev-python/wxpython:${WX_GTK_VER}[opengl,${PYTHON_USEDEP}] |
189 |
+ ${PYTHON_DEPS} |
190 |
+ ) |
191 |
+ >=dev-libs/boost-1.61[context,nls,threads,python?,${PYTHON_USEDEP}] |
192 |
+ github? ( net-misc/curl:=[ssl] ) |
193 |
+ media-libs/glew:0= |
194 |
+ <=media-libs/glm-0.9.9.2 |
195 |
+ media-libs/freeglut |
196 |
+ media-libs/mesa |
197 |
+ ngspice? ( |
198 |
+ sci-electronics/ngspice[shared] |
199 |
+ ) |
200 |
+ occ? ( >=sci-libs/opencascade-6.8.0:= ) |
201 |
+ oce? ( sci-libs/oce ) |
202 |
+ >=x11-libs/cairo-1.8.8:= |
203 |
+ >=x11-libs/pixman-0.30" |
204 |
+DEPEND="${COMMON_DEPEND} |
205 |
+ doc? ( app-doc/doxygen ) |
206 |
+ python? ( >=dev-lang/swig-3.0:0 )" |
207 |
+RDEPEND="${COMMON_DEPEND} |
208 |
+ sci-electronics/electronics-menu |
209 |
+" |
210 |
+CHECKREQS_DISK_BUILD="800M" |
211 |
+ |
212 |
+PATCHES=( |
213 |
+ "${FILESDIR}"/"${PN}-5.0.0-curl.patch" |
214 |
+ "${FILESDIR}"/"${PN}-help-path.patch" |
215 |
+) |
216 |
+ |
217 |
+pkg_setup() { |
218 |
+ use python && python-single-r1_pkg_setup |
219 |
+ use openmp && tc-check-openmp |
220 |
+ setup-wxwidgets |
221 |
+ check-reqs_pkg_setup |
222 |
+} |
223 |
+ |
224 |
+src_configure() { |
225 |
+ xdg_environment_reset |
226 |
+ |
227 |
+ local mycmakeargs=( |
228 |
+ -DKICAD_DOCS="/usr/share/doc/${P}" |
229 |
+ -DKICAD_HELP="/usr/share/doc/${PN}-doc-${PV}" |
230 |
+ -DBUILD_GITHUB_PLUGIN="$(usex github)" |
231 |
+ -DKICAD_SCRIPTING="$(usex python)" |
232 |
+ -DKICAD_SCRIPTING_MODULES="$(usex python)" |
233 |
+ -DKICAD_SCRIPTING_WXPYTHON="$(usex python)" |
234 |
+ -DKICAD_SCRIPTING_ACTION_MENU="$(usex python)" |
235 |
+ -DKICAD_SPICE="$(usex ngspice)" |
236 |
+ -DKICAD_USE_OCC="$(usex occ)" |
237 |
+ -DKICAD_USE_OCE="$(usex oce)" |
238 |
+ -DKICAD_INSTALL_DEMOS="$(usex examples)" |
239 |
+ ) |
240 |
+ use python && mycmakeargs+=( |
241 |
+ -DPYTHON_DEST="$(python_get_sitedir)" |
242 |
+ -DPYTHON_EXECUTABLE="${PYTHON}" |
243 |
+ -DPYTHON_INCLUDE_DIR="$(python_get_includedir)" |
244 |
+ -DPYTHON_LIBRARY="$(python_get_library_path)" |
245 |
+ ) |
246 |
+ use occ && mycmakeargs+=( |
247 |
+ -DOCC_INCLUDE_DIR="${CASROOT}"/include/opencascade |
248 |
+ -DOCC_LIBRARY_DIR="${CASROOT}"/lib |
249 |
+ ) |
250 |
+ |
251 |
+ cmake-utils_src_configure |
252 |
+} |
253 |
+ |
254 |
+src_compile() { |
255 |
+ cmake-utils_src_compile |
256 |
+ if use doc; then |
257 |
+ cmake-utils_src_compile dev-docs doxygen-docs |
258 |
+ fi |
259 |
+} |
260 |
+ |
261 |
+src_install() { |
262 |
+ cmake-utils_src_install |
263 |
+ use python && python_optimize |
264 |
+ if use doc ; then |
265 |
+ dodoc uncrustify.cfg |
266 |
+ cd Documentation || die |
267 |
+ dodoc -r *.txt kicad_doxygen_logo.png notes_about_pcbnew_new_file_format.odt doxygen/. development/doxygen/. |
268 |
+ fi |
269 |
+} |
270 |
+ |
271 |
+pkg_postinst() { |
272 |
+ optfeature "Component symbols library" sci-electronics/kicad-symbols |
273 |
+ optfeature "Component footprints library" sci-electronics/kicad-footprints |
274 |
+ optfeature "3D models of components " sci-electronics/kicad-packages3d |
275 |
+ optfeature "Project templates" sci-electronics/kicad-templates |
276 |
+ optfeature "Different languages for GUI" sci-electronics/kicad-i18n |
277 |
+ optfeature "Extended documentation" app-doc/kicad-doc |
278 |
+ optfeature "Creating 3D models of components" media-gfx/wings |
279 |
+ |
280 |
+ xdg_desktop_database_update |
281 |
+ xdg_mimeinfo_database_update |
282 |
+ gnome2_icon_cache_update |
283 |
+} |
284 |
+ |
285 |
+pkg_postrm() { |
286 |
+ xdg_desktop_database_update |
287 |
+ xdg_mimeinfo_database_update |
288 |
+ gnome2_icon_cache_update |
289 |
+} |