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: Sun, 15 Sep 2019 23:47:29
Message-Id: 1568591177.12faa1f3969c1f632a6f939f46e4377c08c37fab.asturm@gentoo
1 commit: 12faa1f3969c1f632a6f939f46e4377c08c37fab
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Sun Sep 15 23:26:33 2019 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Sun Sep 15 23:46:17 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=12faa1f3
7
8 media-gfx/ufraw: Fix build with gcc-9, EAPI-7 bump
9
10 Thanks to openSUSE for the patch.
11
12 Closes: https://bugs.gentoo.org/685138
13 Package-Manager: Portage-2.3.76, Repoman-2.3.17
14 Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
15
16 media-gfx/ufraw/files/ufraw-0.22-gcc9.patch | 97 +++++++++++++++++++++++++++++
17 media-gfx/ufraw/ufraw-0.22-r3.ebuild | 96 ++++++++++++++++++++++++++++
18 2 files changed, 193 insertions(+)
19
20 diff --git a/media-gfx/ufraw/files/ufraw-0.22-gcc9.patch b/media-gfx/ufraw/files/ufraw-0.22-gcc9.patch
21 new file mode 100644
22 index 00000000000..f2cf1dc88a8
23 --- /dev/null
24 +++ b/media-gfx/ufraw/files/ufraw-0.22-gcc9.patch
25 @@ -0,0 +1,97 @@
26 +From ac8c74699cba65d65f918b3f4cba2de64e039ada Mon Sep 17 00:00:00 2001
27 +From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= <sergio@××××××.com>
28 +Date: Thu, 14 Feb 2019 03:26:02 +0000
29 +Subject: [PATCH] Fix GCC 9 OpenMP issues by drop default(none)
30 +
31 +---
32 + dcraw_api.cc | 4 ++--
33 + dcraw_indi.c | 4 ----
34 + ufraw_ufraw.c | 6 +++---
35 + 3 files changed, 5 insertions(+), 9 deletions(-)
36 +
37 +diff --git a/dcraw_api.cc b/dcraw_api.cc
38 +index c3d2902..6096cb7 100644
39 +--- a/dcraw_api.cc
40 ++++ b/dcraw_api.cc
41 +@@ -686,7 +686,7 @@ extern "C" {
42 + rgbWB[3] = rgbWB[1];
43 + if (dark) {
44 + #ifdef _OPENMP
45 +- #pragma omp parallel for schedule(static) default(none) \
46 ++ #pragma omp parallel for schedule(static) \
47 + shared(h,dark,rgbWB)
48 + #endif
49 + for (int i = 0; i < pixels; i++) {
50 +@@ -699,7 +699,7 @@ extern "C" {
51 + }
52 + } else {
53 + #ifdef _OPENMP
54 +- #pragma omp parallel for schedule(static) default(none) \
55 ++ #pragma omp parallel for schedule(static) \
56 + shared(h,dark,rgbWB)
57 + #endif
58 + for (int i = 0; i < pixels; i++) {
59 +diff --git a/dcraw_indi.c b/dcraw_indi.c
60 +index a291af2..777ce39 100644
61 +--- a/dcraw_indi.c
62 ++++ b/dcraw_indi.c
63 +@@ -137,12 +137,10 @@ void CLASS wavelet_denoise_INDI(ushort(*image)[4], const int black,
64 + #ifdef _OPENMP
65 + #if defined(__sun) && !defined(__GNUC__) /* Fix bug #3205673 - NKBJ */
66 + #pragma omp parallel for \
67 +- default(none) \
68 + shared(nc,image,size,noise) \
69 + private(c,i,hpass,lev,lpass,row,col,thold,fimg,temp)
70 + #else
71 + #pragma omp parallel for \
72 +- default(none) \
73 + shared(nc,image,size) \
74 + private(c,i,hpass,lev,lpass,row,col,thold,fimg,temp)
75 + #endif
76 +@@ -413,7 +411,6 @@ void CLASS vng_interpolate_INDI(ushort(*image)[4], const unsigned filters,
77 + progress(PROGRESS_INTERPOLATE, -height);
78 + #ifdef _OPENMP
79 + #pragma omp parallel \
80 +- default(none) \
81 + shared(image,code,prow,pcol,h) \
82 + private(row,col,g,brow,rowtmp,pix,ip,gval,diff,gmin,gmax,thold,sum,color,num,c,t)
83 + #endif
84 +@@ -496,7 +493,6 @@ void CLASS ppg_interpolate_INDI(ushort(*image)[4], const unsigned filters,
85 +
86 + #ifdef _OPENMP
87 + #pragma omp parallel \
88 +- default(none) \
89 + shared(image,dir,diff) \
90 + private(row,col,i,d,c,pix,guess)
91 + #endif
92 +diff --git a/ufraw_ufraw.c b/ufraw_ufraw.c
93 +index ce9d262..48a0d91 100644
94 +--- a/ufraw_ufraw.c
95 ++++ b/ufraw_ufraw.c
96 +@@ -1043,7 +1043,7 @@ static void ufraw_shave_hotpixels(ufraw_data *uf, dcraw_image_type *img,
97 + delta = rgbMax / (uf->conf->hotpixel + 1.0);
98 + count = 0;
99 + #ifdef _OPENMP
100 +- #pragma omp parallel for schedule(static) default(none) \
101 ++ #pragma omp parallel for schedule(static) \
102 + shared(uf,img,width,height,colors,rgbMax,delta) \
103 + reduction(+:count) \
104 + private(h,p,w,c,t,v,hi,i)
105 +@@ -1365,7 +1365,7 @@ static void ufraw_convert_reverse_wb(ufraw_data *uf, UFRawPhase phase)
106 + mul[i] = (guint64)0x10000 * 0x10000 / uf->developer->rgbWB[i];
107 + size = img->height * img->width;
108 + #ifdef _OPENMP
109 +- #pragma omp parallel for schedule(static) default(none) \
110 ++ #pragma omp parallel for schedule(static) \
111 + shared(uf,phase,img,mul,size) \
112 + private(i,p16,c,px)
113 + #endif
114 +@@ -1390,7 +1390,7 @@ static void ufraw_convert_image_tca(ufraw_data *uf, ufraw_image_data *img,
115 + return;
116 + int y;
117 + #ifdef _OPENMP
118 +- #pragma omp parallel for schedule(static) default(none) \
119 ++ #pragma omp parallel for schedule(static) \
120 + shared(uf,img,outimg,area)
121 + #endif
122 + for (y = area->y; y < area->y + area->height; y++) {
123
124 diff --git a/media-gfx/ufraw/ufraw-0.22-r3.ebuild b/media-gfx/ufraw/ufraw-0.22-r3.ebuild
125 new file mode 100644
126 index 00000000000..b43d97d6022
127 --- /dev/null
128 +++ b/media-gfx/ufraw/ufraw-0.22-r3.ebuild
129 @@ -0,0 +1,96 @@
130 +# Copyright 1999-2019 Gentoo Authors
131 +# Distributed under the terms of the GNU General Public License v2
132 +
133 +EAPI=7
134 +
135 +inherit autotools gnome2-utils toolchain-funcs xdg-utils
136 +
137 +DESCRIPTION="RAW Image format viewer and GIMP plugin"
138 +HOMEPAGE="http://ufraw.sourceforge.net/"
139 +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
140 +
141 +LICENSE="GPL-2"
142 +SLOT="0"
143 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~amd64-linux ~x86-linux ~x64-solaris ~x86-solaris"
144 +IUSE="contrast fits gimp gnome gtk openmp timezone"
145 +
146 +REQUIRED_USE="gimp? ( gtk )"
147 +
148 +BDEPEND="virtual/pkgconfig"
149 +RDEPEND="
150 + dev-libs/glib:2
151 + media-gfx/exiv2:=
152 + media-libs/lcms:2=
153 + >=media-libs/lensfun-0.2.5:=
154 + media-libs/libpng:0=
155 + media-libs/tiff
156 + virtual/jpeg:0=
157 + fits? ( sci-libs/cfitsio:= )
158 + gimp? ( >=media-gfx/gimp-2 )
159 + gnome? ( >=gnome-base/gconf-2 )
160 + gtk? (
161 + >=media-gfx/gtkimageview-1.5
162 + >=x11-libs/gtk+-2.6:2
163 + )
164 +"
165 +DEPEND="${RDEPEND}"
166 +
167 +PATCHES=(
168 + "${FILESDIR}"/${PN}-0.17-cfitsio-automagic.patch
169 + "${FILESDIR}"/${P}-jasper-automagic.patch
170 + "${FILESDIR}"/${P}-crashfix.patch
171 + "${FILESDIR}"/${P}-drop_superfluous_abs.patch
172 + "${FILESDIR}"/${P}-fix-unsigned-char.patch
173 + "${FILESDIR}"/${P}-jpeg9.patch
174 + "${FILESDIR}"/${P}-exiv2-0.27.patch
175 + "${FILESDIR}"/${P}-gcc9.patch
176 +)
177 +
178 +src_prepare() {
179 + default
180 + eautoreconf
181 +}
182 +
183 +src_configure() {
184 + local myeconfargs=(
185 + --disable-jasper
186 + $(use_enable contrast)
187 + $(use_with fits cfitsio)
188 + $(use_with gimp)
189 + $(use_enable gnome mime)
190 + $(use_with gtk)
191 + $(use_enable openmp)
192 + $(use_enable timezone dst-correction)
193 + )
194 + econf "${myeconfargs[@]}"
195 +}
196 +
197 +src_compile() {
198 + emake AR="$(tc-getAR)"
199 +}
200 +
201 +src_install() {
202 + emake DESTDIR="${D}" schemasdir=/etc/gconf/schemas install
203 + einstalldocs
204 +}
205 +
206 +pkg_preinst() {
207 + if use gnome; then
208 + gnome2_gconf_savelist
209 + fi
210 +}
211 +
212 +pkg_postinst() {
213 + if use gnome; then
214 + xdg_mimeinfo_database_update
215 + xdg_desktop_database_update
216 + gnome2_gconf_install
217 + fi
218 +}
219 +
220 +pkg_postrm() {
221 + if use gnome; then
222 + xdg_desktop_database_update
223 + xdg_mimeinfo_database_update
224 + fi
225 +}