1 |
commit: c6026227fac31d9e27f25ded7ba2de607eca2e0c |
2 |
Author: Matthew Smith <matthew <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Nov 6 08:36:08 2022 +0000 |
4 |
Commit: Matthew Smith <matthew <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Nov 6 08:52:26 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c6026227 |
7 |
|
8 |
sci-electronics/kicad: add 6.0.9 |
9 |
|
10 |
Closes: https://bugs.gentoo.org/879955 |
11 |
Signed-off-by: Matthew Smith <matthew <AT> gentoo.org> |
12 |
|
13 |
sci-electronics/kicad/Manifest | 1 + |
14 |
sci-electronics/kicad/kicad-6.0.9.ebuild | 174 +++++++++++++++++++++++++++++++ |
15 |
2 files changed, 175 insertions(+) |
16 |
|
17 |
diff --git a/sci-electronics/kicad/Manifest b/sci-electronics/kicad/Manifest |
18 |
index ff220aed0c62..8baa25441e65 100644 |
19 |
--- a/sci-electronics/kicad/Manifest |
20 |
+++ b/sci-electronics/kicad/Manifest |
21 |
@@ -2,3 +2,4 @@ DIST kicad-5.1.12.tar.bz2 18581842 BLAKE2B f04369fecded6fb07376efa209ddf5fcc693e |
22 |
DIST kicad-6.0.6.tar.gz 45086249 BLAKE2B fbf1f11cbf4838186e1ecb42127f7b182d3cd13b4af147211c85244d361cbf83387f5d102efdc80a63cfff36e343e6c4e07fef7f95dac4c6666844c5bc9d0ec2 SHA512 c472a6b81e3065e0499cad8467527d3531dc4d5861f50079ecb2ae6fccaf2c4d24fbeae8e9fe0cdde5ef548458fcef9615d6539426abe391a629dd539406065a |
23 |
DIST kicad-6.0.7.tar.gz 45143677 BLAKE2B 4ab9132be84cb6c6c566a826e5966f4fe64922dcd66f78c558126b37a276e075af80440da35071c864457298f6f964ba15511d0038424f473c3fb079d5f042e6 SHA512 0466650d166becbde23f1202e8bbe73ac7c743b5baad9608252fe4e960f0d15aad363664b69d840ef4568bf6d1c042b94252afce8657594a5f8193c979613e0e |
24 |
DIST kicad-6.0.8.tar.gz 45155261 BLAKE2B fda898c4a4e435b9f61bc706a29814a14ee3882e26043355bb14d4e99a334602d83453d6164a4589a106104ce1a5e4cd7b774ce89fb3b0f40cf140aee16d8e73 SHA512 8ecba5481e1876075976316f94af44116098cf652dba263b5d4a5c1eeb3628ba4814a3698c8cacf40c8c7b4c118e47db3d9db198ccfd30f532576343a7a62791 |
25 |
+DIST kicad-6.0.9.tar.gz 45166663 BLAKE2B e4d45c589a8e76d7c121ac4ab7adefc5fd44d4ccbff7140196caec56c309f6e83d47a3ea9cf79f59de57c3bda43b3d32a2bea82c5850c2a7a58a6e1db27a06a7 SHA512 49e6bd3c9f6e0c9839c4fac18dc12dc7ef16183f6fbe8091992e2223c7fb085b3119d46797c0b0cf86fd2813e3c4def9eb1f2adbff1bf072a363f1a501da9354 |
26 |
|
27 |
diff --git a/sci-electronics/kicad/kicad-6.0.9.ebuild b/sci-electronics/kicad/kicad-6.0.9.ebuild |
28 |
new file mode 100644 |
29 |
index 000000000000..7471c53d9dbd |
30 |
--- /dev/null |
31 |
+++ b/sci-electronics/kicad/kicad-6.0.9.ebuild |
32 |
@@ -0,0 +1,174 @@ |
33 |
+# Copyright 1999-2022 Gentoo Authors |
34 |
+# Distributed under the terms of the GNU General Public License v2 |
35 |
+ |
36 |
+EAPI=8 |
37 |
+ |
38 |
+PYTHON_COMPAT=( python3_{8..10} ) |
39 |
+WX_GTK_VER="3.0-gtk3" |
40 |
+ |
41 |
+inherit check-reqs cmake optfeature python-single-r1 toolchain-funcs wxwidgets xdg-utils |
42 |
+ |
43 |
+DESCRIPTION="Electronic Schematic and PCB design tools" |
44 |
+HOMEPAGE="https://www.kicad.org" |
45 |
+ |
46 |
+if [[ ${PV} == 9999 ]]; then |
47 |
+ EGIT_REPO_URI="https://gitlab.com/kicad/code/kicad.git" |
48 |
+ inherit git-r3 |
49 |
+else |
50 |
+ MY_PV="${PV/_rc/-rc}" |
51 |
+ MY_P="${PN}-${MY_PV}" |
52 |
+ SRC_URI="https://gitlab.com/kicad/code/${PN}/-/archive/${MY_PV}/${MY_P}.tar.gz -> ${P}.tar.gz" |
53 |
+ S="${WORKDIR}/${PN}-${MY_PV}" |
54 |
+ |
55 |
+ if [[ ${PV} != *_rc* ]] ; then |
56 |
+ KEYWORDS="~amd64 ~arm64 ~riscv ~x86" |
57 |
+ fi |
58 |
+fi |
59 |
+ |
60 |
+# BSD for bundled pybind |
61 |
+LICENSE="GPL-2+ GPL-3+ Boost-1.0 BSD" |
62 |
+SLOT="0" |
63 |
+IUSE="doc examples ngspice nls openmp +occ +pcm" |
64 |
+ |
65 |
+REQUIRED_USE="${PYTHON_REQUIRED_USE}" |
66 |
+ |
67 |
+# Contains bundled pybind but it's patched for wx |
68 |
+# See https://gitlab.com/kicad/code/kicad/-/commit/74e4370a9b146b21883d6a2d1df46c7a10bd0424 |
69 |
+# Depend on opencascade:0 to get unslotted variant (so we know path to it), bug #833301 |
70 |
+COMMON_DEPEND=" |
71 |
+ !sci-electronics/kicad-i18n |
72 |
+ dev-libs/boost:=[context,nls] |
73 |
+ media-libs/freeglut |
74 |
+ media-libs/glew:0= |
75 |
+ >=media-libs/glm-0.9.9.1 |
76 |
+ media-libs/mesa[X(+)] |
77 |
+ >=x11-libs/cairo-1.8.8:= |
78 |
+ >=x11-libs/pixman-0.30 |
79 |
+ x11-libs/wxGTK:${WX_GTK_VER}[X,opengl] |
80 |
+ $(python_gen_cond_dep ' |
81 |
+ dev-libs/boost:=[context,nls,python,${PYTHON_USEDEP}] |
82 |
+ dev-python/wxpython:4.0[${PYTHON_USEDEP}] |
83 |
+ ') |
84 |
+ ${PYTHON_DEPS} |
85 |
+ ngspice? ( |
86 |
+ >sci-electronics/ngspice-27[shared] |
87 |
+ ) |
88 |
+ nls? ( |
89 |
+ sys-devel/gettext |
90 |
+ ) |
91 |
+ occ? ( |
92 |
+ >=sci-libs/opencascade-7.3.0:0= |
93 |
+ ) |
94 |
+" |
95 |
+DEPEND="${COMMON_DEPEND}" |
96 |
+RDEPEND="${COMMON_DEPEND} |
97 |
+ sci-electronics/electronics-menu |
98 |
+" |
99 |
+BDEPEND=">=dev-lang/swig-3.0 |
100 |
+ doc? ( app-doc/doxygen )" |
101 |
+ |
102 |
+if [[ ${PV} == 9999 ]] ; then |
103 |
+ # x11-misc-util/macros only required on live ebuilds |
104 |
+ BDEPEND+=" >=x11-misc/util-macros-1.18" |
105 |
+fi |
106 |
+ |
107 |
+CHECKREQS_DISK_BUILD="900M" |
108 |
+ |
109 |
+PATCHES=( |
110 |
+ "${FILESDIR}/${PN}-scripts-install-fix.patch" |
111 |
+ "${FILESDIR}/${PN}-6.0.6-unitialized-variable-fix.patch" |
112 |
+) |
113 |
+ |
114 |
+pkg_setup() { |
115 |
+ [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp |
116 |
+ |
117 |
+ python-single-r1_pkg_setup |
118 |
+ setup-wxwidgets |
119 |
+ check-reqs_pkg_setup |
120 |
+} |
121 |
+ |
122 |
+src_unpack() { |
123 |
+ if [[ ${PV} == 9999 ]]; then |
124 |
+ git-r3_src_unpack |
125 |
+ else |
126 |
+ default_src_unpack |
127 |
+ fi |
128 |
+} |
129 |
+ |
130 |
+src_configure() { |
131 |
+ xdg_environment_reset |
132 |
+ |
133 |
+ local mycmakeargs=( |
134 |
+ -DKICAD_DOCS="${EPREFIX}/usr/share/doc/${PN}-doc-${PV}" |
135 |
+ |
136 |
+ -DKICAD_SCRIPTING_WXPYTHON=ON |
137 |
+ |
138 |
+ # Merged from separate -i18n package, bug #830274 |
139 |
+ -DKICAD_BUILD_I18N="$(usex nls)" |
140 |
+ -DKICAD_I18N_UNIX_STRICT_PATH="$(usex nls)" |
141 |
+ |
142 |
+ -DPYTHON_DEST="$(python_get_sitedir)" |
143 |
+ -DPYTHON_EXECUTABLE="${PYTHON}" |
144 |
+ -DPYTHON_INCLUDE_DIR="$(python_get_includedir)" |
145 |
+ -DPYTHON_LIBRARY="$(python_get_library_path)" |
146 |
+ |
147 |
+ -DKICAD_SPICE="$(usex ngspice)" |
148 |
+ -DKICAD_PCM="$(usex pcm)" |
149 |
+ |
150 |
+ -DKICAD_USE_OCC="$(usex occ)" |
151 |
+ -DKICAD_INSTALL_DEMOS="$(usex examples)" |
152 |
+ -DCMAKE_SKIP_RPATH="ON" |
153 |
+ ) |
154 |
+ |
155 |
+ use occ && mycmakeargs+=( |
156 |
+ -DOCC_INCLUDE_DIR="${CASROOT}"/include/opencascade |
157 |
+ -DOCC_LIBRARY_DIR="${CASROOT}"/$(get_libdir)/opencascade |
158 |
+ ) |
159 |
+ |
160 |
+ cmake_src_configure |
161 |
+} |
162 |
+ |
163 |
+src_compile() { |
164 |
+ cmake_src_compile |
165 |
+ if use doc; then |
166 |
+ cmake_src_compile doxygen-docs |
167 |
+ fi |
168 |
+} |
169 |
+ |
170 |
+src_test() { |
171 |
+ # Test cannot find library in Portage's sandbox. Let's create a link so test can run. |
172 |
+ ln -s "${BUILD_DIR}/eeschema/_eeschema.kiface" "${BUILD_DIR}/qa/eeschema/_eeschema.kiface" || die |
173 |
+ |
174 |
+ # LD_LIBRARY_PATH is there to help it pick up the just-built libraries |
175 |
+ LD_LIBRARY_PATH="${BUILD_DIR}/3d-viewer/3d_cache/sg:${LD_LIBRARY_PATH}" cmake_src_test |
176 |
+} |
177 |
+ |
178 |
+src_install() { |
179 |
+ cmake_src_install |
180 |
+ python_optimize |
181 |
+ |
182 |
+ if use doc ; then |
183 |
+ dodoc uncrustify.cfg |
184 |
+ cd Documentation || die |
185 |
+ dodoc -r *.txt kicad_doxygen_logo.png notes_about_pcbnew_new_file_format.odt doxygen/. |
186 |
+ fi |
187 |
+} |
188 |
+ |
189 |
+pkg_postinst() { |
190 |
+ optfeature "Component symbols library" sci-electronics/kicad-symbols |
191 |
+ optfeature "Component footprints library" sci-electronics/kicad-footprints |
192 |
+ optfeature "3D models of components " sci-electronics/kicad-packages3d |
193 |
+ optfeature "Project templates" sci-electronics/kicad-templates |
194 |
+ optfeature "Extended documentation" app-doc/kicad-doc |
195 |
+ optfeature "Creating 3D models of components" media-gfx/wings |
196 |
+ |
197 |
+ xdg_desktop_database_update |
198 |
+ xdg_mimeinfo_database_update |
199 |
+ xdg_icon_cache_update |
200 |
+} |
201 |
+ |
202 |
+pkg_postrm() { |
203 |
+ xdg_desktop_database_update |
204 |
+ xdg_mimeinfo_database_update |
205 |
+ xdg_icon_cache_update |
206 |
+} |