Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/graphics/gimp-ufraw gimp-ufraw: Recover from patches t...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/6bb2f4c77014
branches:  trunk
changeset: 433255:6bb2f4c77014
user:      gdt <gdt%pkgsrc.org@localhost>
date:      Mon Jun 01 00:14:21 2020 +0000

description:
gimp-ufraw: Recover from patches that broke NetBSD 8

Replace patches that broke NetBSD 8 (added without MAINTAINER
consultation, and for which queries went unanswered), replacing them
with something that seems likely to work in multiple situations.

The basic issue is that OPENMP is unstable, and it does not seem to be
possible to write non-ifdefed code that compiles cleanly on old and
new versions:
  https://gcc.gnu.org/gcc-9/porting_to.html#ompdatasharing

diffstat:

 graphics/gimp-ufraw/Makefile                    |   4 ++-
 graphics/gimp-ufraw/distinfo                    |   8 ++--
 graphics/gimp-ufraw/patches/patch-dcraw.cc      |   4 ++-
 graphics/gimp-ufraw/patches/patch-dcraw__api.cc |  27 +++++++++++--------
 graphics/gimp-ufraw/patches/patch-dcraw__indi.c |  34 ++++++++++++------------
 5 files changed, 42 insertions(+), 35 deletions(-)

diffs (140 lines):

diff -r d15b0991760c -r 6bb2f4c77014 graphics/gimp-ufraw/Makefile
--- a/graphics/gimp-ufraw/Makefile      Sun May 31 23:48:00 2020 +0000
+++ b/graphics/gimp-ufraw/Makefile      Mon Jun 01 00:14:21 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.118 2020/03/20 11:57:48 nia Exp $
+# $NetBSD: Makefile,v 1.119 2020/06/01 00:14:21 gdt Exp $
 
 # Note that upstream has replaced tarballs without changing the
 # version number (e.g., 0.19.2 had two different tarballs).
@@ -10,6 +10,8 @@
 CATEGORIES=            graphics
 MASTER_SITES=          ${MASTER_SITE_SOURCEFORGE:=ufraw/}
 
+# There have been issues with unstable OPENMP APIs.  Therefore,
+# updates must be tested on NetBSD 8 with gcc.
 MAINTAINER=            gdt%NetBSD.org@localhost
 HOMEPAGE=              http://ufraw.sourceforge.net/
 COMMENT=               GIMP plug-in for raw digicam import
diff -r d15b0991760c -r 6bb2f4c77014 graphics/gimp-ufraw/distinfo
--- a/graphics/gimp-ufraw/distinfo      Sun May 31 23:48:00 2020 +0000
+++ b/graphics/gimp-ufraw/distinfo      Mon Jun 01 00:14:21 2020 +0000
@@ -1,10 +1,10 @@
-$NetBSD: distinfo,v 1.36 2020/04/20 00:38:36 joerg Exp $
+$NetBSD: distinfo,v 1.37 2020/06/01 00:14:21 gdt Exp $
 
 SHA1 (ufraw-0.22.tar.gz) = 7fc33b66f4d6ecc277e1a5589c8e5db24568949c
 RMD160 (ufraw-0.22.tar.gz) = 2588acde88dda8c30310b967e7185862072c124c
 SHA512 (ufraw-0.22.tar.gz) = a42eff5052c18afec90245cf97ceeade78e3f288186cf697ac4abf2e8290d4081db8ac4de3ae47b3774f30a6cb4cbda392099e6fd2125fe751abb40d9b065ad2
 Size (ufraw-0.22.tar.gz) = 1103554 bytes
-SHA1 (patch-dcraw.cc) = d68c75bb0438df6bd16ecde2d2718b573018fa28
-SHA1 (patch-dcraw__api.cc) = 70cd527ddc226bcac16638e3a631acf42c72dbbf
-SHA1 (patch-dcraw__indi.c) = c070b8a8fc7d47b3e3ed3817098c5f9bb2c1d62a
+SHA1 (patch-dcraw.cc) = 1d379ffa2624ce24b8f7e523d0dcfe7a313ec9c7
+SHA1 (patch-dcraw__api.cc) = 96220c6cca793684122839310883c5d5754916f4
+SHA1 (patch-dcraw__indi.c) = 48415d0d0e00f6652cb745e4f7a86ce71ed82739
 SHA1 (patch-ufraw__exiv2.cc) = c6f3c6bd9ec8cdc3dee1801f9b1972bbe827cd8d
diff -r d15b0991760c -r 6bb2f4c77014 graphics/gimp-ufraw/patches/patch-dcraw.cc
--- a/graphics/gimp-ufraw/patches/patch-dcraw.cc        Sun May 31 23:48:00 2020 +0000
+++ b/graphics/gimp-ufraw/patches/patch-dcraw.cc        Mon Jun 01 00:14:21 2020 +0000
@@ -1,4 +1,6 @@
-$NetBSD: patch-dcraw.cc,v 1.1 2020/04/20 00:38:36 joerg Exp $
+$NetBSD: patch-dcraw.cc,v 1.2 2020/06/01 00:14:21 gdt Exp $
+
+\todo Explain this patch.
 
 --- dcraw.cc.orig      2020-04-19 19:55:05.713900482 +0000
 +++ dcraw.cc
diff -r d15b0991760c -r 6bb2f4c77014 graphics/gimp-ufraw/patches/patch-dcraw__api.cc
--- a/graphics/gimp-ufraw/patches/patch-dcraw__api.cc   Sun May 31 23:48:00 2020 +0000
+++ b/graphics/gimp-ufraw/patches/patch-dcraw__api.cc   Mon Jun 01 00:14:21 2020 +0000
@@ -1,22 +1,25 @@
-$NetBSD: patch-dcraw__api.cc,v 1.1 2020/04/20 00:38:36 joerg Exp $
+$NetBSD: patch-dcraw__api.cc,v 1.2 2020/06/01 00:14:21 gdt Exp $
+
+Drop default(none), because the OPENMP specification is unstable;
+some versions prohibit declaring constants as shared and some require it.
 
---- dcraw_api.cc.orig  2020-04-19 19:59:33.951610818 +0000
+--- dcraw_api.cc.orig  2015-06-16 03:58:38.000000000 +0000
 +++ dcraw_api.cc
-@@ -687,7 +687,7 @@ extern "C" {
+@@ -686,7 +686,7 @@ extern "C" {
+             rgbWB[3] = rgbWB[1];
          if (dark) {
  #ifdef _OPENMP
-             #pragma omp parallel for schedule(static) default(none) \
--            shared(h,dark,rgbWB)
-+            shared(h,dark,rgbWB,pixels,black)
+-            #pragma omp parallel for schedule(static) default(none) \
++            #pragma omp parallel for schedule(static) \
+             shared(h,dark,rgbWB)
  #endif
              for (int i = 0; i < pixels; i++) {
-                 int cc;
-@@ -700,7 +700,7 @@ extern "C" {
+@@ -699,7 +699,7 @@ extern "C" {
+             }
          } else {
  #ifdef _OPENMP
-             #pragma omp parallel for schedule(static) default(none) \
--            shared(h,dark,rgbWB)
-+            shared(h,dark,rgbWB,pixels,black)
+-            #pragma omp parallel for schedule(static) default(none) \
++            #pragma omp parallel for schedule(static) \
+             shared(h,dark,rgbWB)
  #endif
              for (int i = 0; i < pixels; i++) {
-                 int cc;
diff -r d15b0991760c -r 6bb2f4c77014 graphics/gimp-ufraw/patches/patch-dcraw__indi.c
--- a/graphics/gimp-ufraw/patches/patch-dcraw__indi.c   Sun May 31 23:48:00 2020 +0000
+++ b/graphics/gimp-ufraw/patches/patch-dcraw__indi.c   Mon Jun 01 00:14:21 2020 +0000
@@ -1,31 +1,31 @@
-$NetBSD: patch-dcraw__indi.c,v 1.1 2020/04/20 00:38:36 joerg Exp $
+$NetBSD: patch-dcraw__indi.c,v 1.2 2020/06/01 00:14:21 gdt Exp $
+
+Drop default(none), because the OPENMP specification is unstable;
+some versions prohibit declaring constants as shared and some require it.
 
---- dcraw_indi.c.orig  2020-04-19 19:58:30.067650344 +0000
+--- dcraw_indi.c.orig  2015-06-16 03:58:38.000000000 +0000
 +++ dcraw_indi.c
-@@ -143,7 +143,7 @@ void CLASS wavelet_denoise_INDI(ushort(*
+@@ -142,7 +142,6 @@ void CLASS wavelet_denoise_INDI(ushort(*
+     private(c,i,hpass,lev,lpass,row,col,thold,fimg,temp)
  #else
      #pragma omp parallel for                          \
-     default(none)                                     \
--    shared(nc,image,size)                             \
-+    shared(nc,image,size,iwidth,iheight,threshold,noise) \
+-    default(none)                                     \
+     shared(nc,image,size)                             \
      private(c,i,hpass,lev,lpass,row,col,thold,fimg,temp)
  #endif
- #endif
-@@ -414,7 +414,7 @@ void CLASS vng_interpolate_INDI(ushort(*
+@@ -413,7 +412,6 @@ void CLASS vng_interpolate_INDI(ushort(*
+     progress(PROGRESS_INTERPOLATE, -height);
  #ifdef _OPENMP
      #pragma omp parallel                              \
-     default(none)                                     \
--    shared(image,code,prow,pcol,h)                    \
-+    shared(image,code,prow,pcol,h,colors,width,filters,height)                \
+-    default(none)                                     \
+     shared(image,code,prow,pcol,h)                    \
      private(row,col,g,brow,rowtmp,pix,ip,gval,diff,gmin,gmax,thold,sum,color,num,c,t)
  #endif
-     {
-@@ -497,7 +497,7 @@ void CLASS ppg_interpolate_INDI(ushort(*
+@@ -496,7 +494,6 @@ void CLASS ppg_interpolate_INDI(ushort(*
+ 
  #ifdef _OPENMP
      #pragma omp parallel                              \
-     default(none)                                     \
--    shared(image,dir,diff)                            \
-+    shared(image,dir,diff,height,width,filters)               \
+-    default(none)                                     \
+     shared(image,dir,diff)                            \
      private(row,col,i,d,c,pix,guess)
  #endif
-     {



Home | Main Index | Thread Index | Old Index