Gentoo Archives: gentoo-commits

From: Virgil Dupras <vdupras@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-electronics/kicad/, sci-electronics/kicad/files/
Date: Thu, 27 Sep 2018 13:38:01
Message-Id: 1538055452.2e9d688fa4b08833f3c130a41d3e1369cfaf4edc.vdupras@gentoo
1 commit: 2e9d688fa4b08833f3c130a41d3e1369cfaf4edc
2 Author: Zoltan Puskas <zoltan <AT> sinustrom <DOT> info>
3 AuthorDate: Sun Sep 23 12:59:45 2018 +0000
4 Commit: Virgil Dupras <vdupras <AT> gentoo <DOT> org>
5 CommitDate: Thu Sep 27 13:37:32 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2e9d688f
7
8 sci-electronics/kicad: Add USE=occ,openmp, fix curl dependency
9
10 Thanks to Fabio Rossi for the authorship of the patch.
11
12 Closes: https://bugs.gentoo.org/665500
13 Package-Manager: Portage-2.3.48, Repoman-2.3.10
14 Signed-off-by: Zoltan Puskas <zoltan <AT> sinustrom.info>
15 Closes: https://github.com/gentoo/gentoo/pull/9955
16 Signed-off-by: Virgil Dupras <vdupras <AT> gentoo.org>
17
18 sci-electronics/kicad/files/kicad-5.0.0-curl.patch | 23 +++++++++++++
19 .../{kicad-5.0.0.ebuild => kicad-5.0.0-r1.ebuild} | 38 ++++++++++++++--------
20 sci-electronics/kicad/metadata.xml | 1 +
21 3 files changed, 49 insertions(+), 13 deletions(-)
22
23 diff --git a/sci-electronics/kicad/files/kicad-5.0.0-curl.patch b/sci-electronics/kicad/files/kicad-5.0.0-curl.patch
24 new file mode 100644
25 index 00000000000..c99071c0a54
26 --- /dev/null
27 +++ b/sci-electronics/kicad/files/kicad-5.0.0-curl.patch
28 @@ -0,0 +1,23 @@
29 +--- a/common/CMakeLists.txt.old 2018-09-13 16:21:29.642915273 +0200
30 ++++ a/common/CMakeLists.txt 2018-09-13 16:23:25.146914833 +0200
31 +@@ -337,14 +337,17 @@
32 + list( APPEND COMMON_SRCS strtok_r.c )
33 + endif()
34 +
35 ++if( BUILD_GITHUB_PLUGIN )
36 ++ list( APPEND COMMON_SRCS
37 ++ kicad_curl/kicad_curl.cpp
38 ++ kicad_curl/kicad_curl_easy.cpp
39 ++ )
40 ++endif()
41 +
42 + set( COMMON_SRCS
43 + ${COMMON_SRCS}
44 + system/libcontext.cpp
45 +
46 +- kicad_curl/kicad_curl.cpp
47 +- kicad_curl/kicad_curl_easy.cpp
48 +-
49 + view/view.cpp
50 + view/view_item.cpp
51 + view/view_group.cpp
52
53 diff --git a/sci-electronics/kicad/kicad-5.0.0.ebuild b/sci-electronics/kicad/kicad-5.0.0-r1.ebuild
54 similarity index 74%
55 rename from sci-electronics/kicad/kicad-5.0.0.ebuild
56 rename to sci-electronics/kicad/kicad-5.0.0-r1.ebuild
57 index db6476d4b96..18cae5de253 100644
58 --- a/sci-electronics/kicad/kicad-5.0.0.ebuild
59 +++ b/sci-electronics/kicad/kicad-5.0.0-r1.ebuild
60 @@ -6,7 +6,7 @@ PYTHON_COMPAT=( python2_7 )
61
62 WX_GTK_VER="3.0"
63
64 -inherit check-reqs cmake-utils eapi7-ver eutils gnome2-utils python-single-r1 wxwidgets xdg
65 +inherit check-reqs cmake-utils eapi7-ver eutils gnome2-utils python-single-r1 toolchain-funcs wxwidgets xdg
66
67 DESCRIPTION="Electronic Schematic and PCB design tools"
68 HOMEPAGE="http://www.kicad-pcb.org"
69 @@ -15,10 +15,11 @@ SRC_URI="https://launchpad.net/${PN}/$(ver_cut 1-2)/${PV}/+download/${P}.tar.xz"
70 LICENSE="GPL-2+ GPL-3+ Boost-1.0"
71 SLOT="0"
72 KEYWORDS="~amd64 ~arm64 ~x86"
73 -IUSE="doc examples github +ngspice +oce +python"
74 +IUSE="doc examples github +ngspice occ +oce openmp +python"
75
76 REQUIRED_USE="
77 python? ( ${PYTHON_REQUIRED_USE} )
78 + ?? ( occ oce )
79 "
80
81 COMMON_DEPEND=">=x11-libs/wxGTK-3.0.2:${WX_GTK_VER}[X,opengl]
82 @@ -27,9 +28,6 @@ COMMON_DEPEND=">=x11-libs/wxGTK-3.0.2:${WX_GTK_VER}[X,opengl]
83 ${PYTHON_DEPS}
84 )
85 >=dev-libs/boost-1.61[context,nls,threads,python?,${PYTHON_USEDEP}]
86 - github? (
87 - net-misc/curl[ssl]
88 - )
89 media-libs/glew:0=
90 media-libs/glm
91 media-libs/freeglut
92 @@ -37,13 +35,14 @@ COMMON_DEPEND=">=x11-libs/wxGTK-3.0.2:${WX_GTK_VER}[X,opengl]
93 ngspice? (
94 sci-electronics/ngspice[shared]
95 )
96 - oce? (
97 - sci-libs/oce
98 - )
99 - x11-libs/cairo"
100 + occ? ( >=sci-libs/opencascade-6.8.0 )
101 + oce? ( sci-libs/oce )
102 + >=x11-libs/cairo-1.8.8
103 + >=x11-libs/pixman-0.30"
104 DEPEND="${COMMON_DEPEND}
105 doc? ( app-doc/doxygen )
106 - python? ( dev-lang/swig:0 )"
107 + github? ( net-misc/curl[ssl] )
108 + python? ( >=dev-lang/swig-3.0:0 )"
109 RDEPEND="${COMMON_DEPEND}
110 sci-electronics/electronics-menu
111 "
112 @@ -51,6 +50,7 @@ CHECKREQS_DISK_BUILD="800M"
113
114 pkg_setup() {
115 use python && python-single-r1_pkg_setup
116 + use openmp && tc-check-openmp
117 setup-wxwidgets
118 check-reqs_pkg_setup
119 }
120 @@ -58,6 +58,14 @@ pkg_setup() {
121 src_prepare() {
122 xdg_src_prepare
123 cmake-utils_src_prepare
124 +
125 + epatch "${FILESDIR}"/${P}-curl.patch
126 +
127 + # fix application categories in desktop files
128 + while IFS="" read -d $'\0' -r f; do
129 + sed -i.bkp '/Categories/s/Development;//' "${f}"
130 + done < <(find "${S}" -type f -name "*.desktop" -print0)
131 +
132 }
133
134 src_configure() {
135 @@ -67,8 +75,9 @@ src_configure() {
136 -DKICAD_SCRIPTING="$(usex python)"
137 -DKICAD_SCRIPTING_MODULES="$(usex python)"
138 -DKICAD_SCRIPTING_WXPYTHON="$(usex python)"
139 + -DKICAD_SCRIPTING_ACTION_MENU="$(usex python)"
140 -DKICAD_SPICE="$(usex ngspice)"
141 - -DKICAD_USE_OCC=OFF
142 + -DKICAD_USE_OCC="$(usex occ)"
143 -DKICAD_USE_OCE="$(usex oce)"
144 -DKICAD_INSTALL_DEMOS="$(usex examples)"
145 )
146 @@ -78,13 +87,16 @@ src_configure() {
147 -DPYTHON_INCLUDE_DIR="$(python_get_includedir)"
148 -DPYTHON_LIBRARY="$(python_get_library_path)"
149 )
150 + use occ && mycmakeargs+=( -DOCC_LIBRARY_DIR="${CASROOT}"/lib )
151 +
152 cmake-utils_src_configure
153 }
154
155 src_compile() {
156 cmake-utils_src_compile
157 if use doc; then
158 - doxygen Doxyfile || die
159 + cmake-utils_src_compile doxygen-docs
160 + cmake-utils_src_compile dev-docs
161 fi
162 }
163
164 @@ -94,7 +106,7 @@ src_install() {
165 if use doc ; then
166 dodoc uncrustify.cfg
167 cd Documentation || die
168 - dodoc -r doxygen/.
169 + dodoc -r *.txt kicad_doxygen_logo.png notes_about_pcbnew_new_file_format.odt doxygen/. development/doxygen/.
170 fi
171 }
172
173
174 diff --git a/sci-electronics/kicad/metadata.xml b/sci-electronics/kicad/metadata.xml
175 index 41cd516dac1..6eff0d23caf 100644
176 --- a/sci-electronics/kicad/metadata.xml
177 +++ b/sci-electronics/kicad/metadata.xml
178 @@ -14,6 +14,7 @@
179 <flag name="i18n">Allow GUI internationalization through l10n_* use flags</flag>
180 <flag name="minimal">Build only binaries without parts library and examples</flag>
181 <flag name="ngspice">Enable circuit simulation</flag>
182 + <flag name="occ">Enable viewing 3D rendering of designs via opencascade</flag>
183 <flag name="oce">Enable viewing 3D rendering of designs via OCE</flag>
184 <flag name="python">Enable python scripting support</flag>
185 </use>