Gentoo Archives: gentoo-commits

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/kde-sunset:master commit in: app-office/kmymoney/
Date: Sat, 30 Jun 2018 09:18:56
Message-Id: 1530350005.b0204149e22a5d3faec75a91d5f77507f7fc67d3.asturm@gentoo
1 commit: b0204149e22a5d3faec75a91d5f77507f7fc67d3
2 Author: Andreas Sturmlechner <andreas.sturmlechner <AT> gmail <DOT> com>
3 AuthorDate: Sat Jun 30 09:13:25 2018 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Sat Jun 30 09:13:25 2018 +0000
6 URL: https://gitweb.gentoo.org/proj/kde-sunset.git/commit/?id=b0204149
7
8 app-office/kmymoney: Import from Gentoo ebuild repository
9
10 Bug: https://bugs.gentoo.org/657814
11
12 app-office/kmymoney/kmymoney-4.8.1.1-r1.ebuild | 159 +++++++++++++++++++++++++
13 app-office/kmymoney/metadata.xml | 13 ++
14 2 files changed, 172 insertions(+)
15
16 diff --git a/app-office/kmymoney/kmymoney-4.8.1.1-r1.ebuild b/app-office/kmymoney/kmymoney-4.8.1.1-r1.ebuild
17 new file mode 100644
18 index 0000000..34a4256
19 --- /dev/null
20 +++ b/app-office/kmymoney/kmymoney-4.8.1.1-r1.ebuild
21 @@ -0,0 +1,159 @@
22 +# Copyright 1999-2018 Gentoo Foundation
23 +# Distributed under the terms of the GNU General Public License v2
24 +
25 +EAPI=6
26 +
27 +inherit cmake-utils flag-o-matic gnome2-utils virtualx xdg-utils
28 +
29 +DESCRIPTION="Personal finance manager by KDE"
30 +HOMEPAGE="https://kmymoney.org/"
31 +SRC_URI="mirror://kde/stable/${PN}/${PV}/src/${P}.tar.xz"
32 +
33 +LICENSE="GPL-2"
34 +SLOT="4"
35 +KEYWORDS="amd64 x86"
36 +IUSE="calendar debug doc +handbook hbci ofx quotes test weboob"
37 +
38 +COMMON_DEPEND="
39 + >=app-crypt/gpgme-1.7.0[cxx]
40 + <app-office/libalkimia-6.0.0
41 + dev-libs/gmp:0=
42 + dev-libs/libgpg-error
43 + dev-qt/qtcore:4[ssl]
44 + dev-qt/qtdbus:4
45 + dev-qt/qtgui:4
46 + dev-qt/qtsql:4
47 + dev-qt/qtsvg:4
48 + kde-frameworks/kdelibs:4
49 + x11-misc/shared-mime-info
50 + calendar? ( dev-libs/libical:= )
51 + hbci? (
52 + >=net-libs/aqbanking-5.5.1
53 + >=sys-libs/gwenhywfar-4.15.3[qt4]
54 + )
55 + ofx? ( >=dev-libs/libofx-0.9.4 )
56 + weboob? ( www-client/weboob )
57 +"
58 +RDEPEND="${COMMON_DEPEND}
59 + kde-frameworks/oxygen-icons:*
60 + handbook? ( kde-frameworks/kdelibs:4[handbook] )
61 + quotes? ( dev-perl/Finance-Quote )
62 +"
63 +DEPEND="${COMMON_DEPEND}
64 + dev-libs/boost
65 + virtual/pkgconfig
66 + doc? ( app-doc/doxygen )
67 + handbook? (
68 + app-text/docbook-xml-dtd:4.2
69 + app-text/docbook-xsl-stylesheets
70 + )
71 + test? ( dev-qt/qttest:4 )
72 +"
73 +
74 +src_prepare() {
75 + cmake-utils_src_prepare
76 +
77 + if [[ -v LINGUAS ]] ; then
78 + pushd po > /dev/null || die
79 + local lang
80 + for lang in *; do
81 + if [[ -e ${lang} ]] && ! has ${lang/.po/} ${LINGUAS} ; then
82 + case ${lang} in
83 + CMakeLists.txt) ;;
84 + *) rm -r ${lang} || die ;;
85 + esac
86 + cmake_comment_add_subdirectory ${lang}
87 + sed -e "/add_subdirectory([[:space:]]*${lang}\/.*[[:space:]]*)/d" \
88 + -i CMakeLists.txt || die
89 + fi
90 + done
91 + popd > /dev/null || die
92 + fi
93 +
94 + if ! use handbook; then
95 + cmake_comment_add_subdirectory doc
96 + else
97 + if [[ -d doc && -v LINGUAS ]] ; then
98 + pushd doc > /dev/null || die
99 + local lang
100 + for lang in *; do
101 + if ! has ${lang} ${LINGUAS} && [[ ${lang} != "en_US" ]]; then
102 + cmake_comment_add_subdirectory ${lang}
103 + fi
104 + done
105 + popd > /dev/null || die
106 + fi
107 + fi
108 +
109 + # don't install as executable
110 + sed -i kmymoney/CMakeLists.txt \
111 + -e "/install.*kmymoney.appdata/ s/PROGRAMS/FILES/" || die
112 +}
113 +
114 +src_configure() {
115 + use debug || append-cppflags -DQT_NO_DEBUG
116 +
117 + local mycmakeargs=(
118 + -DUSE_QT_DESIGNER=OFF
119 + -DENABLE_LIBICAL=$(usex calendar)
120 + -DUSE_DEVELOPER_DOC=$(usex doc)
121 + -DENABLE_KBANKING=$(usex hbci)
122 + -DENABLE_LIBOFX=$(usex ofx)
123 + -DCMAKE_DISABLE_FIND_PACKAGE_KdepimLibs=ON
124 + -DKDE4_BUILD_TESTS=$(usex test)
125 + -DENABLE_WEBOOB=$(usex weboob)
126 + )
127 + cmake-utils_src_configure
128 +}
129 +
130 +src_compile() {
131 + cmake-utils_src_compile
132 + use doc && cmake-utils_src_compile apidoc
133 +}
134 +
135 +src_test() {
136 + local kded4_pid
137 +
138 + _test_runner() {
139 + export $(dbus-launch)
140 + kded4 2>&1 > /dev/null &
141 + kded4_pid=$!
142 +
143 + cmake-utils_src_test
144 + }
145 +
146 + unset DBUS_SESSION_BUS_ADDRESS DBUS_SESSION_BUS_PID
147 +
148 + local myctestargs=( -E "(kmymoney-querytabletest)" ) # requires ktimezoned
149 + virtx _test_runner
150 +
151 + if [[ -n "${kded4_pid}" ]] ; then
152 + kill ${kded4_pid}
153 + fi
154 +
155 + if [[ -n "${DBUS_SESSION_BUS_PID}" ]] ; then
156 + kill ${DBUS_SESSION_BUS_PID}
157 + fi
158 +}
159 +
160 +src_install() {
161 + use doc && HTML_DOCS=( "${BUILD_DIR}/apidocs/html/." )
162 + cmake-utils_src_install
163 +
164 + # We don't want /usr/share/doc/HTML to be compressed,
165 + # because then khelpcenter can't find the docs
166 + [[ -d ${ED%/}/usr/share/doc/HTML ]] &&
167 + docompress -x /usr/share/doc/HTML
168 +}
169 +
170 +pkg_postinst() {
171 + gnome2_icon_cache_update
172 + xdg_desktop_database_update
173 + xdg_mimeinfo_database_update
174 +}
175 +
176 +pkg_postrm() {
177 + gnome2_icon_cache_update
178 + xdg_desktop_database_update
179 + xdg_mimeinfo_database_update
180 +}
181
182 diff --git a/app-office/kmymoney/metadata.xml b/app-office/kmymoney/metadata.xml
183 new file mode 100644
184 index 0000000..894d062
185 --- /dev/null
186 +++ b/app-office/kmymoney/metadata.xml
187 @@ -0,0 +1,13 @@
188 +<?xml version="1.0" encoding="UTF-8"?>
189 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
190 +<pkgmetadata>
191 + <maintainer type="project">
192 + <email>kde@g.o</email>
193 + <name>Gentoo KDE Project</name>
194 + </maintainer>
195 + <use>
196 + <flag name="hbci">Enable HBCI support using <pkg>net-libs/aqbanking</pkg></flag>
197 + <flag name="quotes">Enable Online Stock Quote retrieval</flag>
198 + <flag name="weboob">Enable import of online banking transactions extracted by <pkg>www-client/weboob</pkg></flag>
199 + </use>
200 +</pkgmetadata>