Gentoo Archives: gentoo-commits

From: Gilles Dartiguelongue <eva@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-gfx/gnome-raw-thumbnailer/files/, media-gfx/gnome-raw-thumbnailer/
Date: Sun, 16 Apr 2017 15:43:12
Message-Id: 1492357366.cbe4c6c3a354718374b20e0017069c62e523457e.eva@gentoo
1 commit: cbe4c6c3a354718374b20e0017069c62e523457e
2 Author: Gilles Dartiguelongue <eva <AT> gentoo <DOT> org>
3 AuthorDate: Sun Apr 16 15:42:15 2017 +0000
4 Commit: Gilles Dartiguelongue <eva <AT> gentoo <DOT> org>
5 CommitDate: Sun Apr 16 15:42:46 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cbe4c6c3
7
8 media-gfx/gnome-raw-thumbnailer: fix build with >=libopenraw-0.1, bug #609970
9
10 Package-Manager: Portage-2.3.5, Repoman-2.3.2
11
12 ...raw-thumbnailer-3.0.0-deprecation-warning.patch | 63 ++++++++++++++++++++++
13 ...gnome-raw-thumbnailer-3.0.0-fix-downscale.patch | 35 ++++++++++++
14 ...nome-raw-thumbnailer-3.0.0-libopenraw-0.1.patch | 25 +++++++++
15 .../gnome-raw-thumbnailer-3.0.0-r1.ebuild | 42 +++++++++++++++
16 4 files changed, 165 insertions(+)
17
18 diff --git a/media-gfx/gnome-raw-thumbnailer/files/gnome-raw-thumbnailer-3.0.0-deprecation-warning.patch b/media-gfx/gnome-raw-thumbnailer/files/gnome-raw-thumbnailer-3.0.0-deprecation-warning.patch
19 new file mode 100644
20 index 00000000000..8fddadb435a
21 --- /dev/null
22 +++ b/media-gfx/gnome-raw-thumbnailer/files/gnome-raw-thumbnailer-3.0.0-deprecation-warning.patch
23 @@ -0,0 +1,63 @@
24 +From e769ad77617a3456f0f4aee9418ef6bdbab40403 Mon Sep 17 00:00:00 2001
25 +From: Anton Keks <anton@×××××××××.com>
26 +Date: Thu, 2 Jan 2014 23:14:55 +0200
27 +Subject: [PATCH 1/8] fix deprecation warnings
28 +
29 +---
30 + src/raw-thumbnailer.c | 11 ++---------
31 + 1 file changed, 2 insertions(+), 9 deletions(-)
32 +
33 +diff --git a/src/raw-thumbnailer.c b/src/raw-thumbnailer.c
34 +index d638102..b32bc49 100644
35 +--- a/src/raw-thumbnailer.c
36 ++++ b/src/raw-thumbnailer.c
37 +@@ -64,7 +64,7 @@ save_pixbuf (GdkPixbuf *pixbuf, const char *path, int size)
38 + }
39 + else {
40 + small = pixbuf;
41 +- gdk_pixbuf_ref (small);
42 ++ g_object_ref (small);
43 + }
44 +
45 + a_width = g_strdup_printf ("%d", width);
46 +@@ -88,14 +88,11 @@ save_pixbuf (GdkPixbuf *pixbuf, const char *path, int size)
47 + g_free(a_height);
48 +
49 + if (small) {
50 +- gdk_pixbuf_unref (small);
51 ++ g_object_unref (small);
52 + }
53 + return;
54 + }
55 +
56 +-
57 +-
58 +-
59 + static const GOptionEntry entries[] = {
60 + { "jpeg", 'j', 0, G_OPTION_ARG_NONE, &jpeg_output, "Output the thumbnail as a JPEG instead of PNG", NULL },
61 + { "size", 's', 0, G_OPTION_ARG_INT, &output_size, "Size of the thumbnail in pixels", NULL },
62 +@@ -107,8 +104,6 @@ static const GOptionEntry entries[] = {
63 + { NULL }
64 + };
65 +
66 +-
67 +-
68 + int main (int argc, char ** argv)
69 + {
70 + const char *output_name;
71 +@@ -121,7 +116,6 @@ int main (int argc, char ** argv)
72 +
73 + context = g_option_context_new ("Thumbnail camera RAW files.");
74 + g_option_context_add_main_entries (context, entries, GETTEXT_PACKAGE);
75 +- g_type_init ();
76 +
77 + if (g_option_context_parse (context, &argc, &argv, &err) == FALSE) {
78 + g_print ("couldn't parse command-line options: %s\n", err->message);
79 +@@ -161,4 +155,3 @@ int main (int argc, char ** argv)
80 + return 0;
81 + }
82 +
83 +-
84 +--
85 +2.12.2
86 +
87
88 diff --git a/media-gfx/gnome-raw-thumbnailer/files/gnome-raw-thumbnailer-3.0.0-fix-downscale.patch b/media-gfx/gnome-raw-thumbnailer/files/gnome-raw-thumbnailer-3.0.0-fix-downscale.patch
89 new file mode 100644
90 index 00000000000..def91cb3fb3
91 --- /dev/null
92 +++ b/media-gfx/gnome-raw-thumbnailer/files/gnome-raw-thumbnailer-3.0.0-fix-downscale.patch
93 @@ -0,0 +1,35 @@
94 +From 5a03b1a9ffece1d38cc0cf91c599975b9f2b028e Mon Sep 17 00:00:00 2001
95 +From: Anton Keks <anton@×××××××××.com>
96 +Date: Thu, 2 Jan 2014 23:44:03 +0200
97 +Subject: [PATCH 1/7] downscale thumbnail if requested size is smaller than it
98 + is, do not hardcode 128
99 +
100 +---
101 + src/raw-thumbnailer.c | 4 ++--
102 + 1 file changed, 2 insertions(+), 2 deletions(-)
103 +
104 +diff --git a/src/raw-thumbnailer.c b/src/raw-thumbnailer.c
105 +index b32bc49..135dbe3 100644
106 +--- a/src/raw-thumbnailer.c
107 ++++ b/src/raw-thumbnailer.c
108 +@@ -47,7 +47,7 @@ save_pixbuf (GdkPixbuf *pixbuf, const char *path, int size)
109 + height = gdk_pixbuf_get_height (pixbuf);
110 + width = gdk_pixbuf_get_width (pixbuf);
111 +
112 +- if (size <= 128) {
113 ++ if (size < height || size < width) {
114 + int d_width, d_height;
115 +
116 + if (width > height) {
117 +@@ -143,7 +143,7 @@ int main (int argc, char ** argv)
118 +
119 + char* inputfname = g_filename_from_uri (uri, NULL, NULL);
120 + g_free(uri);
121 +-
122 ++
123 + pixbuf = or_gdkpixbuf_extract_rotated_thumbnail(inputfname, output_size);
124 + g_free(inputfname);
125 +
126 +--
127 +2.12.2
128 +
129
130 diff --git a/media-gfx/gnome-raw-thumbnailer/files/gnome-raw-thumbnailer-3.0.0-libopenraw-0.1.patch b/media-gfx/gnome-raw-thumbnailer/files/gnome-raw-thumbnailer-3.0.0-libopenraw-0.1.patch
131 new file mode 100644
132 index 00000000000..50e5433809a
133 --- /dev/null
134 +++ b/media-gfx/gnome-raw-thumbnailer/files/gnome-raw-thumbnailer-3.0.0-libopenraw-0.1.patch
135 @@ -0,0 +1,25 @@
136 +From 5cc4ad36b9f25f6973ae48166595d201f215a012 Mon Sep 17 00:00:00 2001
137 +From: Gilles Dartiguelongue <eva@g.o>
138 +Date: Sun, 16 Apr 2017 16:50:00 +0200
139 +Subject: [PATCH] Update pkgconfig name of libopenraw
140 +
141 +---
142 + configure.ac | 2 +-
143 + 1 file changed, 1 insertion(+), 1 deletion(-)
144 +
145 +diff --git a/configure.ac b/configure.ac
146 +index 0f637b5..26dbf5a 100644
147 +--- a/configure.ac
148 ++++ b/configure.ac
149 +@@ -22,7 +22,7 @@ PKG_CHECK_MODULES(GNOME, gdk-pixbuf-2.0 gio-2.0 glib-2.0)
150 + AC_SUBST(GNOME_CFLAGS)
151 + AC_SUBST(GNOME_LIBS)
152 +
153 +-PKG_CHECK_MODULES(OPENRAW, libopenraw-gnome-1.0 >= 0.0.9)
154 ++PKG_CHECK_MODULES(OPENRAW, libopenraw-gnome-0.1 >= 0.1.0)
155 + AC_SUBST(OPENRAW_CFLAGS)
156 + AC_SUBST(OPENRAW_LIBS)
157 +
158 +--
159 +2.12.2
160 +
161
162 diff --git a/media-gfx/gnome-raw-thumbnailer/gnome-raw-thumbnailer-3.0.0-r1.ebuild b/media-gfx/gnome-raw-thumbnailer/gnome-raw-thumbnailer-3.0.0-r1.ebuild
163 new file mode 100644
164 index 00000000000..710d2a6cde4
165 --- /dev/null
166 +++ b/media-gfx/gnome-raw-thumbnailer/gnome-raw-thumbnailer-3.0.0-r1.ebuild
167 @@ -0,0 +1,42 @@
168 +# Copyright 1999-2017 Gentoo Foundation
169 +# Distributed under the terms of the GNU General Public License v2
170 +
171 +EAPI=6
172 +inherit autotools gnome2
173 +
174 +MY_P="${PN/gnome-}-${PV}"
175 +
176 +DESCRIPTION="A lightweight and fast raw image thumbnailer for GNOME"
177 +HOMEPAGE="https://libopenraw.freedesktop.org/wiki/RawThumbnailer"
178 +SRC_URI="https://libopenraw.freedesktop.org/download/${MY_P}.tar.bz2"
179 +
180 +LICENSE="GPL-2"
181 +SLOT="0"
182 +KEYWORDS="~amd64 ~x86"
183 +IUSE=""
184 +
185 +RDEPEND="
186 + >=media-libs/libopenraw-0.1.0[gtk]
187 + >=x11-libs/gdk-pixbuf-2:2
188 + >=dev-libs/glib-2.26:2
189 + !media-gfx/raw-thumbnailer
190 +"
191 +DEPEND="${RDEPEND}
192 + dev-util/intltool
193 + gnome-base/gnome-common
194 + sys-devel/gettext
195 + virtual/pkgconfig
196 +"
197 +
198 +S="${WORKDIR}/${MY_P}"
199 +
200 +PATCHES=(
201 + "${FILESDIR}"/${P}-deprecation-warning.patch
202 + "${FILESDIR}"/${P}-fix-downscale.patch
203 + "${FILESDIR}"/${P}-libopenraw-0.1.patch
204 +)
205 +
206 +src_prepare() {
207 + default
208 + eautoreconf
209 +}