dev-python/virtualenv: keyworded 20.0.21 for ia64, bug #700918
[gentoo.git] / media-gfx / ufraw / ufraw-0.22-r3.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 inherit autotools gnome2-utils toolchain-funcs xdg-utils
7
8 DESCRIPTION="RAW Image format viewer and GIMP plugin"
9 HOMEPAGE="http://ufraw.sourceforge.net/"
10 SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
11
12 LICENSE="GPL-2"
13 SLOT="0"
14 KEYWORDS="~alpha amd64 arm ~arm64 ~hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86 ~amd64-linux ~x86-linux ~x64-solaris ~x86-solaris"
15 IUSE="contrast fits gimp gnome gtk openmp timezone"
16
17 REQUIRED_USE="gimp? ( gtk )"
18
19 BDEPEND="virtual/pkgconfig"
20 RDEPEND="
21         dev-libs/glib:2
22         media-gfx/exiv2:=
23         media-libs/lcms:2=
24         >=media-libs/lensfun-0.2.5:=
25         media-libs/libpng:0=
26         media-libs/tiff
27         virtual/jpeg:0=
28         fits? ( sci-libs/cfitsio:= )
29         gimp? ( >=media-gfx/gimp-2 )
30         gnome? ( >=gnome-base/gconf-2 )
31         gtk? (
32                 >=media-gfx/gtkimageview-1.5
33                 >=x11-libs/gtk+-2.6:2
34         )
35 "
36 DEPEND="${RDEPEND}"
37
38 PATCHES=(
39         "${FILESDIR}"/${PN}-0.17-cfitsio-automagic.patch
40         "${FILESDIR}"/${P}-jasper-automagic.patch
41         "${FILESDIR}"/${P}-crashfix.patch
42         "${FILESDIR}"/${P}-drop_superfluous_abs.patch
43         "${FILESDIR}"/${P}-fix-unsigned-char.patch
44         "${FILESDIR}"/${P}-jpeg9.patch
45         "${FILESDIR}"/${P}-exiv2-0.27.patch
46         "${FILESDIR}"/${P}-gcc9.patch
47         "${FILESDIR}"/${P}-CVE-2015-8366.patch
48         "${FILESDIR}"/${P}-CVE-2018-19655.patch
49 )
50
51 src_prepare() {
52         default
53         eautoreconf
54 }
55
56 src_configure() {
57         local myeconfargs=(
58                 --disable-jasper
59                 $(use_enable contrast)
60                 $(use_with fits cfitsio)
61                 $(use_with gimp)
62                 $(use_enable gnome mime)
63                 $(use_with gtk)
64                 $(use_enable openmp)
65                 $(use_enable timezone dst-correction)
66         )
67         econf "${myeconfargs[@]}"
68 }
69
70 src_compile() {
71         emake AR="$(tc-getAR)"
72 }
73
74 src_install() {
75         emake DESTDIR="${D}" schemasdir=/etc/gconf/schemas install
76         einstalldocs
77 }
78
79 pkg_preinst() {
80         if use gnome; then
81                 gnome2_gconf_savelist
82         fi
83 }
84
85 pkg_postinst() {
86         if use gnome; then
87                 xdg_mimeinfo_database_update
88                 xdg_desktop_database_update
89                 gnome2_gconf_install
90         fi
91 }
92
93 pkg_postrm() {
94         if use gnome; then
95                 xdg_desktop_database_update
96                 xdg_mimeinfo_database_update
97         fi
98 }