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