Gentoo Archives: gentoo-commits

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-gfx/ufraw/files/, media-gfx/ufraw/
Date: Tue, 04 Apr 2017 15:42:28
Message-Id: 1491320487.d2edd6edf8547ceb157094dba0fff6d2b08588b2.asturm@gentoo
1 commit: d2edd6edf8547ceb157094dba0fff6d2b08588b2
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Tue Apr 4 15:19:34 2017 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Tue Apr 4 15:41:27 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d2edd6ed
7
8 media-gfx/ufraw: Fix runtime crash
9
10 Gentoo-bug: 608100
11
12 Package-Manager: Portage-2.3.3, Repoman-2.3.1
13
14 media-gfx/ufraw/files/ufraw-0.22-crashfix.patch | 15 +++++
15 media-gfx/ufraw/ufraw-0.22-r1.ebuild | 87 +++++++++++++++++++++++++
16 2 files changed, 102 insertions(+)
17
18 diff --git a/media-gfx/ufraw/files/ufraw-0.22-crashfix.patch b/media-gfx/ufraw/files/ufraw-0.22-crashfix.patch
19 new file mode 100644
20 index 00000000000..76fe83fa8f2
21 --- /dev/null
22 +++ b/media-gfx/ufraw/files/ufraw-0.22-crashfix.patch
23 @@ -0,0 +1,15 @@
24 +--- a/ufraw_ufraw.c 2015-06-16 04:58:38.000000000 +0100
25 ++++ b/ufraw_ufraw.c 2016-12-18 00:55:45.794466747 +0000
26 +@@ -767,8 +767,10 @@ void ufraw_close(ufraw_data *uf)
27 + g_free(uf->displayProfile);
28 + g_free(uf->RawHistogram);
29 + #ifdef HAVE_LENSFUN
30 +- lf_modifier_destroy(uf->TCAmodifier);
31 +- lf_modifier_destroy(uf->modifier);
32 ++ if (uf->TCAmodifier != NULL)
33 ++ lf_modifier_destroy(uf->TCAmodifier);
34 ++ if (uf->modifier != NULL)
35 ++ lf_modifier_destroy(uf->modifier);
36 + #endif
37 + ufobject_delete(uf->conf->ufobject);
38 + g_free(uf->conf);
39
40 diff --git a/media-gfx/ufraw/ufraw-0.22-r1.ebuild b/media-gfx/ufraw/ufraw-0.22-r1.ebuild
41 new file mode 100644
42 index 00000000000..7f16fe8192f
43 --- /dev/null
44 +++ b/media-gfx/ufraw/ufraw-0.22-r1.ebuild
45 @@ -0,0 +1,87 @@
46 +# Copyright 1999-2017 Gentoo Foundation
47 +# Distributed under the terms of the GNU General Public License v2
48 +
49 +EAPI=6
50 +
51 +inherit autotools fdo-mime gnome2-utils toolchain-funcs
52 +
53 +DESCRIPTION="RAW Image format viewer and GIMP plugin"
54 +HOMEPAGE="http://ufraw.sourceforge.net/"
55 +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
56 +
57 +LICENSE="GPL-2"
58 +SLOT="0"
59 +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~amd64-linux ~x86-linux ~x64-solaris ~x86-solaris"
60 +IUSE="contrast fits gimp gnome gtk openmp timezone"
61 +
62 +REQUIRED_USE="gimp? ( gtk )"
63 +
64 +RDEPEND="
65 + dev-libs/glib:2=
66 + >=media-gfx/exiv2-0.11:0=
67 + media-libs/lcms:2=
68 + >=media-libs/lensfun-0.2.5:=
69 + media-libs/libpng:0=
70 + media-libs/tiff:0=
71 + virtual/jpeg:0=
72 + fits? ( sci-libs/cfitsio:0= )
73 + gimp? ( >=media-gfx/gimp-2 )
74 + gnome? ( >=gnome-base/gconf-2 )
75 + gtk? (
76 + >=media-gfx/gtkimageview-1.5
77 + >=x11-libs/gtk+-2.6:2
78 + )
79 +"
80 +DEPEND="${RDEPEND}
81 + virtual/pkgconfig"
82 +
83 +PATCHES=(
84 + "${FILESDIR}"/${PN}-0.17-cfitsio-automagic.patch
85 + "${FILESDIR}"/${P}-crashfix.patch
86 +)
87 +
88 +src_prepare() {
89 + default
90 + eautoreconf
91 +}
92 +
93 +src_configure() {
94 + econf \
95 + $(use_enable contrast) \
96 + $(use_with fits cfitsio) \
97 + $(use_with gimp) \
98 + $(use_enable gnome mime) \
99 + $(use_with gtk) \
100 + $(use_enable openmp) \
101 + $(use_enable timezone dst-correction)
102 +}
103 +
104 +src_compile() {
105 + emake AR="$(tc-getAR)"
106 +}
107 +
108 +src_install() {
109 + emake DESTDIR="${D}" schemasdir=/etc/gconf/schemas install
110 + einstalldocs
111 +}
112 +
113 +pkg_preinst() {
114 + if use gnome; then
115 + gnome2_gconf_savelist
116 + fi
117 +}
118 +
119 +pkg_postinst() {
120 + if use gnome; then
121 + fdo-mime_mime_database_update
122 + fdo-mime_desktop_database_update
123 + gnome2_gconf_install
124 + fi
125 +}
126 +
127 +pkg_postrm() {
128 + if use gnome; then
129 + fdo-mime_desktop_database_update
130 + fdo-mime_mime_database_update
131 + fi
132 +}