1 |
commit: b55cb776040e4da2b40dba4431257a3952da7f8b |
2 |
Author: Amy Winston <amynka <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Nov 1 20:08:39 2015 +0000 |
4 |
Commit: Amy Winston <amynka <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Nov 1 20:08:39 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b55cb776 |
7 |
|
8 |
sci-electronics/kicad: qa notice fixed bug #560768. By zpuskas |
9 |
|
10 |
Package-Manager: portage-2.2.20.1 |
11 |
|
12 |
sci-electronics/kicad/kicad-4.0.0_rc1.ebuild | 34 ++++++++++++++++------------ |
13 |
1 file changed, 20 insertions(+), 14 deletions(-) |
14 |
|
15 |
diff --git a/sci-electronics/kicad/kicad-4.0.0_rc1.ebuild b/sci-electronics/kicad/kicad-4.0.0_rc1.ebuild |
16 |
index 257c293..7750cbd 100644 |
17 |
--- a/sci-electronics/kicad/kicad-4.0.0_rc1.ebuild |
18 |
+++ b/sci-electronics/kicad/kicad-4.0.0_rc1.ebuild |
19 |
@@ -7,7 +7,7 @@ PYTHON_COMPAT=( python2_7 ) |
20 |
|
21 |
WX_GTK_VER="3.0" |
22 |
|
23 |
-inherit cmake-utils fdo-mime flag-o-matic gnome2-utils python-single-r1 python-utils-r1 vcs-snapshot wxwidgets versionator |
24 |
+inherit cmake-utils fdo-mime flag-o-matic gnome2-utils python-single-r1 vcs-snapshot wxwidgets versionator |
25 |
|
26 |
DESCRIPTION="Electronic Schematic and PCB design tools." |
27 |
HOMEPAGE="http://www.kicad-pcb.org" |
28 |
@@ -53,7 +53,8 @@ DEPEND="${CDEPEND} |
29 |
app-arch/xz-utils |
30 |
doc? ( app-doc/doxygen ) |
31 |
i18n? ( >=sys-devel/gettext-0.18 ) |
32 |
- python? ( dev-lang/swig:0 )" |
33 |
+ python? ( dev-lang/swig:0 ) |
34 |
+ app-text/dos2unix" |
35 |
RDEPEND="${CDEPEND} |
36 |
sci-electronics/electronics-menu" |
37 |
|
38 |
@@ -64,10 +65,8 @@ pkg_setup() { |
39 |
} |
40 |
|
41 |
src_prepare() { |
42 |
- if use python; then |
43 |
- # dev-python/wxpython doesn't support python3 |
44 |
- sed '/set(_PYTHON3_VERSIONS 3.3 3.2 3.1 3.0)/d' -i CMakeModules/FindPythonLibs.cmake || die "sed failed" |
45 |
- fi |
46 |
+ # remove all the non unix file endings |
47 |
+ find "${S}" -type f -name "*.desktop" | xargs -n1 dos2unix || die "dos2unix failed" |
48 |
|
49 |
# Handle optional minimal install. |
50 |
if use minimal; then |
51 |
@@ -78,7 +77,7 @@ src_prepare() { |
52 |
ln -s "${WORKDIR}/${P}-library" "${S}/${PN}-library" || die "ln failed" |
53 |
# add the libraries directory to cmake as a subproject to build |
54 |
sed "/add_subdirectory( bitmaps_png )/a add_subdirectory( ${PN}-library )" -i CMakeLists.txt || die "sed failed" |
55 |
- # add the libraries directory subproject also to uninstallation procedures |
56 |
+ # remove duplicate uninstall directions for the library module |
57 |
sed '/make uninstall/,/# /d' -i ${PN}-library/CMakeLists.txt || die "sed failed" |
58 |
fi |
59 |
|
60 |
@@ -89,7 +88,7 @@ src_prepare() { |
61 |
# Remove unused languages. Project generates only languages specified in the |
62 |
# file in LINGUAS in the subproject folder. By default all languages are added |
63 |
# so we sed out the unused ones based on the user linguas_* settings. |
64 |
- local lang="" |
65 |
+ local lang |
66 |
for lang in ${LANGS}; do |
67 |
if ! use linguas_${lang}; then |
68 |
sed "/${lang}/d" -i ${PN}-i18n/LINGUAS || die "sed failed" |
69 |
@@ -101,14 +100,16 @@ src_prepare() { |
70 |
sed "s|\${CMAKE_SOURCE_DIR}/\${LANG}|\${CMAKE_SOURCE_DIR}/${PN}-i18n/\${LANG}|g" -i ${PN}-i18n/CMakeLists.txt || die "sed failed" |
71 |
# add the translations directory to cmake as a subproject to build |
72 |
sed "/add_subdirectory( bitmaps_png )/a add_subdirectory( ${PN}-i18n )" -i CMakeLists.txt || die "sed failed" |
73 |
- # add the translations directory subproject also to uninstallation procedures |
74 |
+ # remove duplicate uninstall directions for the translation module |
75 |
sed '/make uninstall/,$d' -i ${PN}-i18n/CMakeLists.txt || die "sed failed" |
76 |
fi |
77 |
|
78 |
# Install examples in the right place if requested |
79 |
if use examples; then |
80 |
+ # install demos into the examples folder too |
81 |
sed -e 's:${KICAD_DATA}/demos:${KICAD_DOCS}/examples:' -i CMakeLists.txt || die "sed failed" |
82 |
else |
83 |
+ # remove additional demos/examples as its not strictly required to run the binaries |
84 |
sed -e '/add_subdirectory( demos )/d' -i CMakeLists.txt || die "sed failed" |
85 |
fi |
86 |
|
87 |
@@ -120,6 +121,10 @@ src_configure() { |
88 |
need-wxwidgets unicode |
89 |
|
90 |
local mycmakeargs=( |
91 |
+ -DPYTHON_DEST="$(python_get_sitedir)" |
92 |
+ -DPYTHON_EXECUTABLE="${PYTHON}" |
93 |
+ -DPYTHON_INCLUDE_DIR="$(python_get_includedir)" |
94 |
+ -DPYTHON_LIBRARY="$(python_get_library_path)" |
95 |
-DKICAD_DOCS="/usr/share/doc/${PF}" |
96 |
-DKICAD_HELP="/usr/share/doc/${PF}/help" |
97 |
-DwxUSE_UNICODE=ON |
98 |
@@ -132,7 +137,8 @@ src_configure() { |
99 |
$(usex i18n "-DKICAD_I18N_UNIX_STRICT_PATH=1" "") |
100 |
) |
101 |
if use debug; then |
102 |
- append-flags "-DDEBUG" |
103 |
+ append-cxxflags "-DDEBUG" |
104 |
+ append-cflags "-DDEBUG" |
105 |
fi |
106 |
cmake-utils_src_configure |
107 |
} |
108 |
@@ -146,12 +152,12 @@ src_compile() { |
109 |
|
110 |
src_install() { |
111 |
cmake-utils_src_install |
112 |
- use python && python_optimize "${D}/usr/$(get_libdir)/${EPYTHON}/site-packages/pcbnew.py" |
113 |
+ use python && python_optimize |
114 |
if use doc ; then |
115 |
insinto /usr/share/doc/${PF} |
116 |
- doins uncrustify.cfg |
117 |
+ dodoc uncrustify.cfg |
118 |
cd Documentation || die "cd failed" |
119 |
- doins -r GUI_Translation_HOWTO.pdf guidelines/UIpolicies.txt doxygen/* |
120 |
+ dodoc -r GUI_Translation_HOWTO.pdf guidelines/UIpolicies.txt doxygen/. |
121 |
fi |
122 |
} |
123 |
|
124 |
@@ -171,8 +177,8 @@ pkg_postinst() { |
125 |
ewarn "- Remove the libraries from the 'Libs and Dir' preferences." |
126 |
ewarn "- Fix the libraries' locations in the 'Libs and Dir' preferences." |
127 |
ewarn "- Emerge ${PN} without the 'minimal' USE flag." |
128 |
- ewarn "" |
129 |
fi |
130 |
+ elog "" |
131 |
elog "You may want to emerge media-gfx/wings if you want to create 3D models of components." |
132 |
} |