*/*: Clean PYTHON_COMPAT of obsolete impls
[gentoo.git] / media-gfx / birdfont / birdfont-2.18.3.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5 PYTHON_COMPAT=( python{2_7,3_6} )
6 PLOCALES="cs de it nl pt_BR sv"
7
8 inherit python-any-r1 vala l10n toolchain-funcs multiprocessing
9
10 DESCRIPTION="Font editor for the creation of vector graphics and export TTF, EOT & SVG fonts"
11 HOMEPAGE="https://birdfont.org/"
12 SRC_URI="https://birdfont.org/releases/${P}.tar.xz"
13
14 LICENSE="GPL-3"
15 SLOT="0"
16 KEYWORDS="~amd64 ~x86"
17 IUSE="gtk nls"
18
19 RDEPEND="
20         dev-db/sqlite:3
21         dev-libs/libgee:0.8=
22         dev-libs/glib:2
23         media-libs/fontconfig
24         media-libs/freetype:2
25         media-libs/libxmlbird
26         x11-libs/gdk-pixbuf:2
27         gtk? (
28                 net-libs/libsoup:2.4
29                 net-libs/webkit-gtk:4=
30                 x11-libs/cairo
31                 x11-libs/gdk-pixbuf:2
32                 x11-libs/gtk+:3
33                 x11-libs/libnotify
34         )
35 "
36 DEPEND="${RDEPEND}
37         ${PYTHON_DEPS}
38         $(python_gen_any_dep 'dev-python/doit[${PYTHON_USEDEP}]')
39         $(vala_depend)
40         nls? ( sys-devel/gettext )
41 "
42
43 src_prepare() {
44         default
45         vala_src_prepare
46         sed -i \
47                 -e "s:pkg-config:$(tc-getPKG_CONFIG):" \
48                 configure dodo.py || die
49 }
50
51 v() {
52         echo "$@"
53         "$@" || die
54 }
55
56 src_configure() {
57         # The build scripts glob all po files to see what's available.
58         # Delete the files for langs we don't want to support.
59         if use nls ; then
60                 l10n_find_plocales_changes po "" ".po" || die
61                 rm_locale() { rm "po/$1.po" || die ; }
62                 l10n_for_each_disabled_locale_do rm_locale
63         else
64                 rm po/*.po || die
65         fi
66
67         v ./configure \
68                 --prefix "${EPREFIX}/usr" \
69                 --gtk $(usex gtk True False) \
70                 --gee gee-0.8 \
71                 --valac "${VALAC}" \
72                 --cc "$(tc-getCC)" \
73                 --cflags "${CFLAGS} ${CPPFLAGS}" \
74                 --ldflags "${LDFLAGS}"
75 }
76
77 src_compile() {
78         v doit run -n $(makeopts_jobs)
79 }
80
81 src_install() {
82         v ./install.py \
83                 --dest "${D}" \
84                 --nogzip \
85                 --libdir "$(get_libdir)" \
86                 --manpages-directory "/share/man/man1"
87         einstalldocs
88 }