app-shells/mpv-bash-completion: remove old
[gentoo.git] / media-sound / flacon / flacon-2.0.1-r1.ebuild
1 # Copyright 1999-2016 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI=6
6
7 # Ignore rudimentary et, uz@Latn, zh_TW translation(s).
8 PLOCALES="cs cs_CZ de es es_MX fr gl hu it ja_JP lt nb pl pl_PL pt_BR pt_PT ro_RO ru sr tr uk zh_CN"
9
10 inherit cmake-utils fdo-mime gnome2-utils l10n virtualx
11
12 DESCRIPTION="Extracts audio tracks from an audio CD image to separate tracks"
13 HOMEPAGE="https://flacon.github.io/"
14 SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
15
16 LICENSE="LGPL-2.1+"
17 SLOT="0"
18 KEYWORDS="amd64 x86"
19 IUSE="aac flac mac mp3 opus qt5 replaygain test tta vorbis wavpack"
20
21 COMMON_DEPEND="
22         app-i18n/uchardet
23         !qt5? (
24                 dev-qt/qtcore:4
25                 dev-qt/qtgui:4
26         )
27         qt5? (
28                 dev-qt/qtcore:5
29                 dev-qt/qtnetwork:5
30                 dev-qt/qtwidgets:5
31         )
32 "
33 RDEPEND="${COMMON_DEPEND}
34         media-sound/shntool[mac?]
35         aac? ( media-libs/faac )
36         flac? ( media-libs/flac )
37         mac? ( media-sound/mac )
38         mp3? ( media-sound/lame )
39         opus? ( media-sound/opus-tools )
40         replaygain? (
41                 mp3? ( media-sound/mp3gain )
42                 vorbis? ( media-sound/vorbisgain )
43         )
44         tta? ( media-sound/ttaenc )
45         vorbis? ( media-sound/vorbis-tools )
46         wavpack? ( media-sound/wavpack )
47 "
48 DEPEND="${COMMON_DEPEND}
49         virtual/pkgconfig
50         qt5? ( dev-qt/linguist-tools:5 )
51         test? (
52                 media-sound/shntool
53                 virtual/ffmpeg
54                 !qt5? ( dev-qt/qttest:4 )
55                 qt5? ( dev-qt/qttest:5 )
56         )
57 "
58
59 src_prepare() {
60         cmake-utils_src_prepare
61
62         # Ignore rudimentary et, uz@Latn, zh_TW translation(s).
63         rm "translations/${PN}_uz@Latn.desktop" || die
64         rm "translations/${PN}"_{et,zh_TW}.ts || die
65
66         remove_locale() {
67                 rm "translations/${PN}_${1}".{ts,desktop} || die
68         }
69
70         l10n_find_plocales_changes 'translations' "${PN}_" '.ts'
71         l10n_for_each_disabled_locale_do remove_locale
72 }
73
74 src_configure() {
75         local mycmakeargs=(
76                 -DUSE_QT4="$(usex !qt5)"
77                 -DUSE_QT5="$(usex qt5)"
78                 -DTEST_DATA_DIR="${S}/tests/data/"
79                 -DBUILD_TESTS="$(usex test 'Yes')"
80         )
81         cmake-utils_src_configure
82 }
83
84 src_test() {
85         virtx "${BUILD_DIR}/tests/${PN}_test"
86 }
87
88 pkg_preinst() {
89         gnome2_icon_savelist
90 }
91
92 pkg_postinst() {
93         fdo-mime_desktop_database_update
94         gnome2_icon_cache_update
95 }
96
97 pkg_postrm() {
98         fdo-mime_desktop_database_update
99         gnome2_icon_cache_update
100 }