Gentoo Archives: gentoo-commits

From: Ian Delaney <idella4@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-electronics/kicad/
Date: Tue, 15 Dec 2015 04:45:50
Message-Id: 1450046681.46e74c9a4bc76f8bff83c10aea59f8eab25236b6.idella4@gentoo
1 commit: 46e74c9a4bc76f8bff83c10aea59f8eab25236b6
2 Author: Zoltan Puskas <zoltan <AT> sinustrom <DOT> info>
3 AuthorDate: Sun Dec 13 22:43:48 2015 +0000
4 Commit: Ian Delaney <idella4 <AT> gentoo <DOT> org>
5 CommitDate: Sun Dec 13 22:44:41 2015 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=46e74c9a
7
8 sci-electronics/kicad: Bump to new stable release 4.0.1
9
10 Gentoo-Bug: #568088
11
12 sci-electronics/kicad/Manifest | 3 +
13 sci-electronics/kicad/kicad-4.0.1.ebuild | 185 +++++++++++++++++++++++++++++++
14 2 files changed, 188 insertions(+)
15
16 diff --git a/sci-electronics/kicad/Manifest b/sci-electronics/kicad/Manifest
17 index 6f175d7..4fb1699 100644
18 --- a/sci-electronics/kicad/Manifest
19 +++ b/sci-electronics/kicad/Manifest
20 @@ -7,3 +7,6 @@ DIST kicad-4.0.0_rc1-i18n.tar.gz 1959024 SHA256 5fbd037e4a76a83ed6be7554ab1add98
21 DIST kicad-4.0.0_rc1-library.tar.gz 87967616 SHA256 09a9e184e19b6072efdc00fabb65e3c0d498858c17f5fa5ce8d255b21eab3db4 SHA512 f611015a8760d3c9cf26fd99a043d69fa75d398fb287af7e6fe7cfbd70d3ff1aa67abcedeffa00fef60434e3944ac6b59fa4ac9ea50097d910fbabcb6f288165 WHIRLPOOL 83585bbc772da122139dfa643c4045bfef207ea8dbc4a83a5458be6227ff976fe9c48cea2388f9ec0b20e7c697579701b75231b852161b33a9c51ddef480c6f4
22 DIST kicad-4.0.0_rc2-i18n.tar.gz 2230967 SHA256 1c0db5a10f81855b4270aff3add5914aebda86c6d492d64968a853bb71ba0126 SHA512 2877a5045183bf81544912a843ad4493c4ede998c71087d56ec68f0cb618427b9589fcdbf26ed0412eceec4dee5fa7ea7cf278f211f5e1eea39620283dd8a747 WHIRLPOOL d37d058a1de14668144d734a4079043dff39a593d24039c806da890d34df6064d33e308f21fee815b39ee7e6fca41afa810f76b859e0bd4ec17783bfb8ee81d2
23 DIST kicad-4.0.0_rc2-library.tar.gz 105100251 SHA256 bed03fd9beacb509c4087c17e69c4d148d7ad991405677b523906c1b1f04caa5 SHA512 f5bc5fb1c7cb5f0f5a83b105a190add944c9c8eaecbaae278edb372badc173dba856ea450e77f7d680ee174f3392ebbf8b6b2b80fea9e0efc0228e05655496ba WHIRLPOOL 43f8358be85e3af5e6ea28ab81f208aa32b85fa5e7f692a92579094f1731bdb5c59db31107dc56d9c407658022dfc2cd446c625ca54f020d3908a5422ca290d5
24 +DIST kicad-4.0.1-i18n.tar.gz 2273300 SHA256 646f2f394046543be9fd57b2b5fc01f1869b4879958fc13a29f60b3502b7ca30 SHA512 56c87f94bb8c3a1f92dee6a5d88fe0a7d6778110cf1fbd019e7481fa89d0d3df447eb90d49f7621dd7006a4e23ce16f752eeba368057d4d970e280c77e22cc25 WHIRLPOOL 3a592d6c59da763dd554ebf85f9d627da58fb6ca38c435712742e0e58ab60bb59ec6c6b5757e651c7c1656ea23153237d236d680a3f3276ef1e1d4b29b24f413
25 +DIST kicad-4.0.1-library.tar.gz 105054096 SHA256 4d1ec105a422a0130be02f4d712d5c22ab223a7963f2b98e75b6847254269e46 SHA512 88b9d31230ac85e4b4341b0b2194d6fc622c03d62e80c65d82d999e02324d902ce90881fd5592bde9e8c2695370cb0c35e8e4473f640d1a25eddf453637b6b6f WHIRLPOOL 50cce4a0147982f8693009833831a3876c987ea24be938ed51a39d823935d424fbe7940b6f7565c42a318b4e71c24c31f8b0fcbfd5e63db247856312a775001b
26 +DIST kicad-4.0.1.tar.xz 10837804 SHA256 73a9f8713ba93ce34e5f9c26e9667f33a22f4e33192fa6bd15d3fc0edea54bde SHA512 da9d5ba7f6a323d80621304e368c9783febedf7c545f31a6ca69bddc8573e7c7aa127c774cc29e173eae947debd444b5a04b0483800d6c0d1303e32a714e3d26 WHIRLPOOL 0985d7b38df1224787b0509407f34043d71f4eac847486bf4633cacb9c3bc32df9590c0516e3189e4b0f5ba17fde93ead467e200e95ecb763f7054cc1baac107
27
28 diff --git a/sci-electronics/kicad/kicad-4.0.1.ebuild b/sci-electronics/kicad/kicad-4.0.1.ebuild
29 new file mode 100644
30 index 0000000..7ee1b62
31 --- /dev/null
32 +++ b/sci-electronics/kicad/kicad-4.0.1.ebuild
33 @@ -0,0 +1,185 @@
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 templates 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 + -DKICAD_REPO_NAME="stable"
158 + -DKICAD_BUILD_VERSION="${PV}"
159 + -DwxUSE_UNICODE=ON
160 + -DKICAD_SKIP_BOOST=ON
161 + $(cmake-utils_use github BUILD_GITHUB_PLUGIN)
162 + $(cmake-utils_use python KICAD_SCRIPTING)
163 + $(cmake-utils_use python KICAD_SCRIPTING_MODULES)
164 + $(cmake-utils_use python KICAD_SCRIPTING_WXPYTHON)
165 + $(cmake-utils_use webkit KICAD_USE_WEBKIT)
166 + $(usex i18n "-DKICAD_I18N_UNIX_STRICT_PATH=1" "")
167 + )
168 + if use debug; then
169 + append-cxxflags "-DDEBUG"
170 + append-cflags "-DDEBUG"
171 + fi
172 + cmake-utils_src_configure
173 +}
174 +
175 +src_compile() {
176 + cmake-utils_src_compile
177 + if use doc; then
178 + doxygen Doxyfile || die "doxygen failed"
179 + fi
180 +}
181 +
182 +src_install() {
183 + cmake-utils_src_install
184 + use python && python_optimize
185 + if use doc ; then
186 + dodoc uncrustify.cfg
187 + cd Documentation || die "cd failed"
188 + dodoc -r GUI_Translation_HOWTO.pdf guidelines/UIpolicies.txt doxygen/.
189 + fi
190 +}
191 +
192 +pkg_preinst() {
193 + gnome2_icon_savelist
194 +}
195 +
196 +pkg_postinst() {
197 + fdo-mime_desktop_database_update
198 + fdo-mime_mime_database_update
199 + gnome2_icon_cache_update
200 +
201 + if use minimal ; then
202 + ewarn "If the schematic and/or board editors complain about missing libraries when you"
203 + ewarn "open old projects, you will have to take one or more of the following actions :"
204 + ewarn "- Install the missing libraries manually."
205 + ewarn "- Remove the libraries from the 'Libs and Dir' preferences."
206 + ewarn "- Fix the libraries' locations in the 'Libs and Dir' preferences."
207 + ewarn "- Emerge ${PN} without the 'minimal' USE flag."
208 + fi
209 + elog ""
210 + elog "You may want to emerge media-gfx/wings if you want to create 3D models of components."
211 + elog "For help and extended documentation emerge app-doc/kicad-doc."
212 +}
213 +
214 +pkg_postrm() {
215 + fdo-mime_desktop_database_update
216 + fdo-mime_mime_database_update
217 + gnome2_icon_cache_update
218 +}