1 |
commit: 30b923fb409a4f352186ccf1bbb02ea5c5a161b7 |
2 |
Author: Zoltan Puskas <zoltan <AT> sinustrom <DOT> info> |
3 |
AuthorDate: Mon Mar 7 08:45:21 2016 +0000 |
4 |
Commit: Ian Delaney <idella4 <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Mar 7 09:01:43 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=30b923fb |
7 |
|
8 |
sci-electronics/kicad: Bump to version 4.0.2 |
9 |
|
10 |
Gentoo-Bug: #574692 |
11 |
|
12 |
Package-Manager: portage-2.2.27 |
13 |
|
14 |
sci-electronics/kicad/Manifest | 3 + |
15 |
sci-electronics/kicad/kicad-4.0.2.ebuild | 185 +++++++++++++++++++++++++++++++ |
16 |
2 files changed, 188 insertions(+) |
17 |
|
18 |
diff --git a/sci-electronics/kicad/Manifest b/sci-electronics/kicad/Manifest |
19 |
index 4fb1699..df08c95 100644 |
20 |
--- a/sci-electronics/kicad/Manifest |
21 |
+++ b/sci-electronics/kicad/Manifest |
22 |
@@ -10,3 +10,6 @@ DIST kicad-4.0.0_rc2-library.tar.gz 105100251 SHA256 bed03fd9beacb509c4087c17e69 |
23 |
DIST kicad-4.0.1-i18n.tar.gz 2273300 SHA256 646f2f394046543be9fd57b2b5fc01f1869b4879958fc13a29f60b3502b7ca30 SHA512 56c87f94bb8c3a1f92dee6a5d88fe0a7d6778110cf1fbd019e7481fa89d0d3df447eb90d49f7621dd7006a4e23ce16f752eeba368057d4d970e280c77e22cc25 WHIRLPOOL 3a592d6c59da763dd554ebf85f9d627da58fb6ca38c435712742e0e58ab60bb59ec6c6b5757e651c7c1656ea23153237d236d680a3f3276ef1e1d4b29b24f413 |
24 |
DIST kicad-4.0.1-library.tar.gz 105054096 SHA256 4d1ec105a422a0130be02f4d712d5c22ab223a7963f2b98e75b6847254269e46 SHA512 88b9d31230ac85e4b4341b0b2194d6fc622c03d62e80c65d82d999e02324d902ce90881fd5592bde9e8c2695370cb0c35e8e4473f640d1a25eddf453637b6b6f WHIRLPOOL 50cce4a0147982f8693009833831a3876c987ea24be938ed51a39d823935d424fbe7940b6f7565c42a318b4e71c24c31f8b0fcbfd5e63db247856312a775001b |
25 |
DIST kicad-4.0.1.tar.xz 10837804 SHA256 73a9f8713ba93ce34e5f9c26e9667f33a22f4e33192fa6bd15d3fc0edea54bde SHA512 da9d5ba7f6a323d80621304e368c9783febedf7c545f31a6ca69bddc8573e7c7aa127c774cc29e173eae947debd444b5a04b0483800d6c0d1303e32a714e3d26 WHIRLPOOL 0985d7b38df1224787b0509407f34043d71f4eac847486bf4633cacb9c3bc32df9590c0516e3189e4b0f5ba17fde93ead467e200e95ecb763f7054cc1baac107 |
26 |
+DIST kicad-4.0.2-i18n.tar.gz 2290139 SHA256 05a9a5b1c9a2aa0e0712171c5e71cc3b74c43254a7d5fdd3d3c76e32ff927bea SHA512 2021706d0e96f6a82b57b8f187b703f37c32ee6efb99323ec191de141c2bfc89b590949cdbf2eea6cc618afc84bbac9fae758fdbb088aed3ab06649279bcab21 WHIRLPOOL 0797d587ed4009bc9be6aac0b19f2cd0581e497f074e6cfd33adff6a44b68c215c06c084d8221a57a0f39e228d70e9760bf368770d2bc7bd361be1688a65ab9b |
27 |
+DIST kicad-4.0.2-library.tar.gz 105106185 SHA256 0499da0fa617248a4196e50ff65c0bf78cb456bf1ca4bd6c72d956044b310bef SHA512 14f7136ded81f54fcccbb4555f77b0079d637a08b15b2fd60b729226dbc5adfb5fe7489060ba1d3b949ca1d94d95623df28cceac93ee600165598d9fd78711e7 WHIRLPOOL c5080ad602684ccdb60493745714398027af2ba09b4a2187740b89fcac923941adda80c744a12338d8c6eda07763fdae12428a8c9d06379a637e3e0ee881bef1 |
28 |
+DIST kicad-4.0.2.tar.xz 10841200 SHA256 2eae6986843a29862ab399a30b50454582d22f58ed3f53eb50d0c85e5d488eb9 SHA512 b0817cca7b8d0216507d78c602d332deaf2a68528b129309067b01e254c6600af5513dea7f44570beb4a339bc044ef7966890a91aeda6fd5a95515657cd1628a WHIRLPOOL 7ae9b072addeea8cc3d6daa69b8f19d077604f0ec5d1e5dfed53efe6b0a32f6b12c1156c2f52092a859d9f716cab83d16b17b0e3abbc0c72a2bafacb3be27719 |
29 |
|
30 |
diff --git a/sci-electronics/kicad/kicad-4.0.2.ebuild b/sci-electronics/kicad/kicad-4.0.2.ebuild |
31 |
new file mode 100644 |
32 |
index 0000000..7ee1b62 |
33 |
--- /dev/null |
34 |
+++ b/sci-electronics/kicad/kicad-4.0.2.ebuild |
35 |
@@ -0,0 +1,185 @@ |
36 |
+# Copyright 1999-2015 Gentoo Foundation |
37 |
+# Distributed under the terms of the GNU General Public License v2 |
38 |
+# $Id$ |
39 |
+ |
40 |
+EAPI="5" |
41 |
+PYTHON_COMPAT=( python2_7 ) |
42 |
+ |
43 |
+WX_GTK_VER="3.0" |
44 |
+ |
45 |
+inherit cmake-utils fdo-mime flag-o-matic gnome2-utils python-single-r1 vcs-snapshot wxwidgets versionator |
46 |
+ |
47 |
+DESCRIPTION="Electronic Schematic and PCB design tools." |
48 |
+HOMEPAGE="http://www.kicad-pcb.org" |
49 |
+ |
50 |
+SERIES=$(get_version_component_range 1-2) |
51 |
+ |
52 |
+SRC_URI="https://launchpad.net/${PN}/${SERIES}/${PV}/+download/${P}.tar.xz |
53 |
+ !minimal? ( https://github.com/KiCad/${PN}-library/archive/${PV}.tar.gz -> ${P}-library.tar.gz ) |
54 |
+ i18n? ( https://github.com/KiCad/${PN}-i18n/archive/${PV}.tar.gz -> ${P}-i18n.tar.gz )" |
55 |
+ |
56 |
+LICENSE="GPL-2" |
57 |
+SLOT="0" |
58 |
+KEYWORDS="~amd64 ~x86" |
59 |
+IUSE="debug doc examples github i18n minimal python webkit" |
60 |
+LANGS="bg ca cs de el es fi fr hu it ja ko nl pl pt ru sk sl sv zh_CN" |
61 |
+for lang in ${LANGS} ; do |
62 |
+ IUSE="${IUSE} linguas_${lang}" |
63 |
+done |
64 |
+unset lang |
65 |
+ |
66 |
+REQUIRED_USE=" |
67 |
+ github? ( webkit ) |
68 |
+ python? ( ${PYTHON_REQUIRED_USE} )" |
69 |
+ |
70 |
+CDEPEND="x11-libs/wxGTK:${WX_GTK_VER}[X,opengl,webkit?] |
71 |
+ python? ( |
72 |
+ dev-python/wxpython:${WX_GTK_VER}[opengl,${PYTHON_USEDEP}] |
73 |
+ ${PYTHON_DEPS} |
74 |
+ ) |
75 |
+ >=dev-libs/boost-1.56[context,nls,threads,python?] |
76 |
+ github? ( dev-libs/openssl:0 ) |
77 |
+ media-libs/glew |
78 |
+ media-libs/freeglut |
79 |
+ media-libs/mesa |
80 |
+ sys-libs/zlib |
81 |
+ x11-libs/cairo" |
82 |
+DEPEND="${CDEPEND} |
83 |
+ app-arch/xz-utils |
84 |
+ doc? ( app-doc/doxygen ) |
85 |
+ i18n? ( >=sys-devel/gettext-0.18 ) |
86 |
+ python? ( dev-lang/swig:0 ) |
87 |
+ app-text/dos2unix" |
88 |
+RDEPEND="${CDEPEND} |
89 |
+ sci-electronics/electronics-menu" |
90 |
+ |
91 |
+pkg_setup() { |
92 |
+ python-single-r1_pkg_setup |
93 |
+} |
94 |
+ |
95 |
+src_prepare() { |
96 |
+ # remove all the non unix file endings |
97 |
+ find "${S}" -type f -name "*.desktop" | xargs -n1 dos2unix |
98 |
+ assert "dos2unix failed" |
99 |
+ |
100 |
+ # Handle optional minimal install. |
101 |
+ if use minimal; then |
102 |
+ # remove templates as they are not needed to run binaries |
103 |
+ sed -e '/add_subdirectory( template )/d' -i CMakeLists.txt || die "sed failed" |
104 |
+ else |
105 |
+ # create a link to the parts library in the main project folder |
106 |
+ ln -s "${WORKDIR}/${P}-library" "${S}/${PN}-library" || die "ln failed" |
107 |
+ # add the libraries directory to cmake as a subproject to build |
108 |
+ sed "/add_subdirectory( bitmaps_png )/a add_subdirectory( ${PN}-library )" -i CMakeLists.txt || die "sed failed" |
109 |
+ # remove duplicate uninstall directions for the library module |
110 |
+ sed '/make uninstall/,/# /d' -i ${PN}-library/CMakeLists.txt || die "sed failed" |
111 |
+ fi |
112 |
+ |
113 |
+ # Add internationalization for the GUI |
114 |
+ if use i18n; then |
115 |
+ # create a link to the translations library in the main project folder |
116 |
+ ln -s "${WORKDIR}/${P}-i18n" "${S}/${PN}-i18n" || die "ln failed" |
117 |
+ # Remove unused languages. Project generates only languages specified in the |
118 |
+ # file in LINGUAS in the subproject folder. By default all languages are added |
119 |
+ # so we sed out the unused ones based on the user linguas_* settings. |
120 |
+ local lang |
121 |
+ for lang in ${LANGS}; do |
122 |
+ if ! use linguas_${lang}; then |
123 |
+ sed "/${lang}/d" -i ${PN}-i18n/LINGUAS || die "sed failed" |
124 |
+ fi |
125 |
+ done |
126 |
+ # cmakelists does not respect our build dir variables, so make it point to the right location |
127 |
+ sed "s|\${CMAKE_BINARY_DIR}|${WORKDIR}/${P}_build|g" -i ${PN}-i18n/CMakeLists.txt || die "sed failed" |
128 |
+ # we also make from the master project so the source dir is understood incorretly, replace that too |
129 |
+ sed "s|\${CMAKE_SOURCE_DIR}/\${LANG}|\${CMAKE_SOURCE_DIR}/${PN}-i18n/\${LANG}|g" -i ${PN}-i18n/CMakeLists.txt || die "sed failed" |
130 |
+ # add the translations directory to cmake as a subproject to build |
131 |
+ sed "/add_subdirectory( bitmaps_png )/a add_subdirectory( ${PN}-i18n )" -i CMakeLists.txt || die "sed failed" |
132 |
+ # remove duplicate uninstall directions for the translation module |
133 |
+ sed '/make uninstall/,$d' -i ${PN}-i18n/CMakeLists.txt || die "sed failed" |
134 |
+ fi |
135 |
+ |
136 |
+ # Install examples in the right place if requested |
137 |
+ if use examples; then |
138 |
+ # install demos into the examples folder too |
139 |
+ sed -e 's:${KICAD_DATA}/demos:${KICAD_DOCS}/examples:' -i CMakeLists.txt || die "sed failed" |
140 |
+ else |
141 |
+ # remove additional demos/examples as its not strictly required to run the binaries |
142 |
+ sed -e '/add_subdirectory( demos )/d' -i CMakeLists.txt || die "sed failed" |
143 |
+ fi |
144 |
+ |
145 |
+ # Add important missing doc files |
146 |
+ sed -e 's/INSTALL.txt/AUTHORS.txt CHANGELOG.txt README.txt TODO.txt/' -i CMakeLists.txt || die "sed failed" |
147 |
+} |
148 |
+ |
149 |
+src_configure() { |
150 |
+ need-wxwidgets unicode |
151 |
+ |
152 |
+ local mycmakeargs=( |
153 |
+ -DPYTHON_DEST="$(python_get_sitedir)" |
154 |
+ -DPYTHON_EXECUTABLE="${PYTHON}" |
155 |
+ -DPYTHON_INCLUDE_DIR="$(python_get_includedir)" |
156 |
+ -DPYTHON_LIBRARY="$(python_get_library_path)" |
157 |
+ -DKICAD_DOCS="/usr/share/doc/${PF}" |
158 |
+ -DKICAD_HELP="/usr/share/doc/${PF}/help" |
159 |
+ -DKICAD_REPO_NAME="stable" |
160 |
+ -DKICAD_BUILD_VERSION="${PV}" |
161 |
+ -DwxUSE_UNICODE=ON |
162 |
+ -DKICAD_SKIP_BOOST=ON |
163 |
+ $(cmake-utils_use github BUILD_GITHUB_PLUGIN) |
164 |
+ $(cmake-utils_use python KICAD_SCRIPTING) |
165 |
+ $(cmake-utils_use python KICAD_SCRIPTING_MODULES) |
166 |
+ $(cmake-utils_use python KICAD_SCRIPTING_WXPYTHON) |
167 |
+ $(cmake-utils_use webkit KICAD_USE_WEBKIT) |
168 |
+ $(usex i18n "-DKICAD_I18N_UNIX_STRICT_PATH=1" "") |
169 |
+ ) |
170 |
+ if use debug; then |
171 |
+ append-cxxflags "-DDEBUG" |
172 |
+ append-cflags "-DDEBUG" |
173 |
+ fi |
174 |
+ cmake-utils_src_configure |
175 |
+} |
176 |
+ |
177 |
+src_compile() { |
178 |
+ cmake-utils_src_compile |
179 |
+ if use doc; then |
180 |
+ doxygen Doxyfile || die "doxygen failed" |
181 |
+ fi |
182 |
+} |
183 |
+ |
184 |
+src_install() { |
185 |
+ cmake-utils_src_install |
186 |
+ use python && python_optimize |
187 |
+ if use doc ; then |
188 |
+ dodoc uncrustify.cfg |
189 |
+ cd Documentation || die "cd failed" |
190 |
+ dodoc -r GUI_Translation_HOWTO.pdf guidelines/UIpolicies.txt doxygen/. |
191 |
+ fi |
192 |
+} |
193 |
+ |
194 |
+pkg_preinst() { |
195 |
+ gnome2_icon_savelist |
196 |
+} |
197 |
+ |
198 |
+pkg_postinst() { |
199 |
+ fdo-mime_desktop_database_update |
200 |
+ fdo-mime_mime_database_update |
201 |
+ gnome2_icon_cache_update |
202 |
+ |
203 |
+ if use minimal ; then |
204 |
+ ewarn "If the schematic and/or board editors complain about missing libraries when you" |
205 |
+ ewarn "open old projects, you will have to take one or more of the following actions :" |
206 |
+ ewarn "- Install the missing libraries manually." |
207 |
+ ewarn "- Remove the libraries from the 'Libs and Dir' preferences." |
208 |
+ ewarn "- Fix the libraries' locations in the 'Libs and Dir' preferences." |
209 |
+ ewarn "- Emerge ${PN} without the 'minimal' USE flag." |
210 |
+ fi |
211 |
+ elog "" |
212 |
+ elog "You may want to emerge media-gfx/wings if you want to create 3D models of components." |
213 |
+ elog "For help and extended documentation emerge app-doc/kicad-doc." |
214 |
+} |
215 |
+ |
216 |
+pkg_postrm() { |
217 |
+ fdo-mime_desktop_database_update |
218 |
+ fdo-mime_mime_database_update |
219 |
+ gnome2_icon_cache_update |
220 |
+} |