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/, media-gfx/ufraw/files/
Date: Sat, 03 Feb 2018 16:43:29
Message-Id: 1517676175.99f327c67cf7ff29d8ef4608f21ad75285a435ad.asturm@gentoo
1 commit: 99f327c67cf7ff29d8ef4608f21ad75285a435ad
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Sat Feb 3 16:42:55 2018 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Sat Feb 3 16:42:55 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=99f327c6
7
8 media-gfx/ufraw: Fix build w/ jpeg-9, migrate to xdg-utils
9
10 Bug: https://bugs.gentoo.org/540872
11 Closes: https://bugs.gentoo.org/520882
12 Package-Manager: Portage-2.3.24, Repoman-2.3.6
13
14 media-gfx/ufraw/files/ufraw-0.22-jpeg9.patch | 32 ++++++++++
15 media-gfx/ufraw/ufraw-0.22-r2.ebuild | 94 ++++++++++++++++++++++++++++
16 2 files changed, 126 insertions(+)
17
18 diff --git a/media-gfx/ufraw/files/ufraw-0.22-jpeg9.patch b/media-gfx/ufraw/files/ufraw-0.22-jpeg9.patch
19 new file mode 100644
20 index 00000000000..dca3834cbe8
21 --- /dev/null
22 +++ b/media-gfx/ufraw/files/ufraw-0.22-jpeg9.patch
23 @@ -0,0 +1,32 @@
24 +Fix build with >=jpeg-9
25 +Thanks-to: Moran Z. <o542018138@×××××.com>
26 +
27 +--- a/dcraw.cc 2014-09-02 07:50:38.000000000 +0300
28 ++++ b/dcraw.cc 2015-02-21 04:54:13.957561352 +0200
29 +@@ -2330,7 +2330,7 @@
30 + #endif
31 + cinfo->src->next_input_byte = jpeg_buffer;
32 + cinfo->src->bytes_in_buffer = nbytes;
33 +- return TRUE;
34 ++ return boolean(TRUE);
35 + }
36 +
37 + void CLASS kodak_jpeg_load_raw()
38 +@@ -2346,7 +2346,7 @@
39 + jpeg_create_decompress (&cinfo);
40 + jpeg_stdio_src (&cinfo, ifp);
41 + cinfo.src->fill_input_buffer = fill_input_buffer;
42 +- jpeg_read_header (&cinfo, TRUE);
43 ++ jpeg_read_header (&cinfo, boolean(TRUE));
44 + jpeg_start_decompress (&cinfo);
45 + if ((cinfo.output_width != width ) ||
46 + (cinfo.output_height*2 != height ) ||
47 +@@ -2419,7 +2419,7 @@
48 + if (tile_length < INT_MAX)
49 + fseek (ifp, get4(), SEEK_SET);
50 + jpeg_stdio_src (&cinfo, ifp);
51 +- jpeg_read_header (&cinfo, TRUE);
52 ++ jpeg_read_header (&cinfo, boolean(TRUE));
53 + jpeg_start_decompress (&cinfo);
54 + buf = (*cinfo.mem->alloc_sarray)
55 + ((j_common_ptr) &cinfo, JPOOL_IMAGE, cinfo.output_width*3, 1);
56
57 diff --git a/media-gfx/ufraw/ufraw-0.22-r2.ebuild b/media-gfx/ufraw/ufraw-0.22-r2.ebuild
58 new file mode 100644
59 index 00000000000..4df5995e535
60 --- /dev/null
61 +++ b/media-gfx/ufraw/ufraw-0.22-r2.ebuild
62 @@ -0,0 +1,94 @@
63 +# Copyright 1999-2018 Gentoo Foundation
64 +# Distributed under the terms of the GNU General Public License v2
65 +
66 +EAPI=6
67 +
68 +inherit autotools gnome2-utils toolchain-funcs xdg-utils
69 +
70 +DESCRIPTION="RAW Image format viewer and GIMP plugin"
71 +HOMEPAGE="http://ufraw.sourceforge.net/"
72 +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
73 +
74 +LICENSE="GPL-2"
75 +SLOT="0"
76 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~amd64-linux ~x86-linux ~x64-solaris ~x86-solaris"
77 +IUSE="contrast fits gimp gnome gtk jpeg2k openmp timezone"
78 +
79 +REQUIRED_USE="gimp? ( gtk )"
80 +
81 +RDEPEND="
82 + dev-libs/glib:2=
83 + >=media-gfx/exiv2-0.11:0=
84 + media-libs/lcms:2=
85 + >=media-libs/lensfun-0.2.5:=
86 + media-libs/libpng:0=
87 + media-libs/tiff:0=
88 + virtual/jpeg:0=
89 + fits? ( sci-libs/cfitsio:0= )
90 + gimp? ( >=media-gfx/gimp-2 )
91 + gnome? ( >=gnome-base/gconf-2 )
92 + gtk? (
93 + >=media-gfx/gtkimageview-1.5
94 + >=x11-libs/gtk+-2.6:2
95 + )
96 + jpeg2k? ( media-libs/jasper:= )
97 +"
98 +DEPEND="${RDEPEND}
99 + virtual/pkgconfig
100 +"
101 +
102 +PATCHES=(
103 + "${FILESDIR}"/${PN}-0.17-cfitsio-automagic.patch
104 + "${FILESDIR}"/${P}-jasper-automagic.patch
105 + "${FILESDIR}"/${P}-crashfix.patch
106 + "${FILESDIR}"/${P}-drop_superfluous_abs.patch
107 + "${FILESDIR}"/${P}-fix-unsigned-char.patch
108 + "${FILESDIR}"/${P}-jpeg9.patch
109 +)
110 +
111 +src_prepare() {
112 + default
113 + eautoreconf
114 +}
115 +
116 +src_configure() {
117 + econf \
118 + $(use_enable contrast) \
119 + $(use_with fits cfitsio) \
120 + $(use_with gimp) \
121 + $(use_enable gnome mime) \
122 + $(use_with gtk) \
123 + $(use_enable jpeg2k jasper) \
124 + $(use_enable openmp) \
125 + $(use_enable timezone dst-correction)
126 +}
127 +
128 +src_compile() {
129 + emake AR="$(tc-getAR)"
130 +}
131 +
132 +src_install() {
133 + emake DESTDIR="${D}" schemasdir=/etc/gconf/schemas install
134 + einstalldocs
135 +}
136 +
137 +pkg_preinst() {
138 + if use gnome; then
139 + gnome2_gconf_savelist
140 + fi
141 +}
142 +
143 +pkg_postinst() {
144 + if use gnome; then
145 + xdg_mimeinfo_database_update
146 + xdg_desktop_database_update
147 + gnome2_gconf_install
148 + fi
149 +}
150 +
151 +pkg_postrm() {
152 + if use gnome; then
153 + xdg_desktop_database_update
154 + xdg_mimeinfo_database_update
155 + fi
156 +}