[packages/cinepaint] - updated patches to build with gcc 10+

qboosh qboosh at pld-linux.org
Thu Aug 31 20:54:36 CEST 2023


commit 85f030abdd29f30a783818fff804d500c3fcc219
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Thu Aug 31 20:40:16 2023 +0200

    - updated patches to build with gcc 10+

 cinepaint-configure.patch |  29 ++++++++++
 cinepaint-extern.patch    |  40 +++++++++++++
 cinepaint-link.patch      |  13 +++++
 cinepaint-no-common.patch | 139 ++++++++++++++++++++++++++++++++++++++++++++++
 cinepaint-oyranos.patch   |  48 ++++++++++++++++
 cinepaint.spec            |   6 ++
 6 files changed, 275 insertions(+)
---
diff --git a/cinepaint.spec b/cinepaint.spec
index 37e2c1a..cd75a7d 100644
--- a/cinepaint.spec
+++ b/cinepaint.spec
@@ -22,6 +22,8 @@ Patch6:		%{name}-oyranos.patch
 Patch7:		%{name}-format.patch
 Patch8:		%{name}-include.patch
 Patch9:		%{name}-python.patch
+Patch10:	%{name}-extern.patch
+Patch11:	%{name}-no-common.patch
 URL:		http://cinepaint.org/
 BuildRequires:	OpenEXR-devel >= 1.0.0
 BuildRequires:	autoconf
@@ -145,10 +147,14 @@ Wtyczka do drukowania dla CinePainta.
 %patch7 -p1
 %patch8 -p1
 %patch9 -p1
+%patch10 -p1
+%patch11 -p1
 
 # dead symlinks
 %{__rm} config.guess config.sub py-compile
 
+%{__sed} -i -e '1s,/usr/bin/env python,%{__python},' plug-ins/pygimp/plug-ins/*.py
+
 %build
 %{__libtoolize}
 %{__aclocal} -I aclocal
diff --git a/cinepaint-configure.patch b/cinepaint-configure.patch
index 7726395..35faf66 100644
--- a/cinepaint-configure.patch
+++ b/cinepaint-configure.patch
@@ -1,5 +1,34 @@
 --- cinepaint/configure.in.orig	2013-03-22 22:35:07.518234103 +0100
 +++ cinepaint/configure.in	2013-03-22 22:56:46.378179589 +0100
+@@ -124,12 +124,13 @@ fi)
+ 
+   AC_DEFUN([AC_CINEPAINT_CHECK],
+   [
+-    AC_LANG(C)
++    AC_LANG_PUSH(C)
+ 	AM_PATH_GTK(1.2.8,,
+         [AC_MSG_WARN(Test for GTK failed. See the file 'INSTALL' for help.);
+          ERROR=1])
+         X_LIBS="$GTK_LIBS $LDFLAGS"
+         X_CFLAGS="$GTK_CFLAGS $CPPFLAGS"
++    AC_LANG_POP(C)
+   ])
+ 
+ if test -n "$use_gtk2"; then
+@@ -312,11 +313,12 @@ fi
+       else
+         dnl second Test for OpenEXR
+         AC_MSG_CHECKING(for openexr support)
+-        AC_LANG(C++)
++        AC_LANG_PUSH(C++)
+         AC_CHECK_HEADER(OpenEXR/half.h,,[AC_MSG_WARN([
+ *** OpenEXR dev header half.h not found
+ *** install OpenEXR and development packages or
+ *** download from http://www.openexr.org ]);ERROR=1])
++	AC_LANG_POP(C++)
+         OPENEXR_INCLUDES="-I/usr/include/OpenEXR -I/opt/local/include/OpenEXR -I${prefix}/include/OpenEXR"
+       fi
+     else
 @@ -514,7 +514,7 @@
      fi
      if test "x$FLTK_CONFIG" != "xno"; then
diff --git a/cinepaint-extern.patch b/cinepaint-extern.patch
new file mode 100644
index 0000000..6b99016
--- /dev/null
+++ b/cinepaint-extern.patch
@@ -0,0 +1,40 @@
+--- cinepaint/plug-ins/bracketing_to_hdr/br_core/path_utils.cpp.orig	2007-01-20 04:55:15.000000000 +0100
++++ cinepaint/plug-ins/bracketing_to_hdr/br_core/path_utils.cpp	2023-08-30 19:29:33.460385486 +0200
+@@ -30,10 +30,8 @@
+ #include "br_macros.hpp"        // BR_WARNING()
+ 
+ #ifndef NO_CINEPAINT
+-extern "C" {
+ #  include "lib/plugin_main.h"  // plugin's argv
+ #  include <glib.h>             // G_DIR_SEPARATOR
+-}
+ #else
+    char*  argv[] = {""};        // Notbehelf
+ #  define G_DIR_SEPARATOR   '/'
+--- cinepaint/plug-ins/bracketing_to_hdr/br_core/i18n.hpp.orig	2006-12-19 23:12:24.000000000 +0100
++++ cinepaint/plug-ins/bracketing_to_hdr/br_core/i18n.hpp	2023-08-30 19:50:14.360329620 +0200
+@@ -49,9 +49,7 @@
+ #else
+ 
+ //  I am not shure whether the `extern "C"' is needed here for C++ progs
+-extern "C" {
+ #  include "../../../libgimp/stdplugins-intl.h"
+-}
+ 
+ #endif  // NO_CINEPAINT
+ 
+--- cinepaint/plug-ins/collect/collect.cpp.orig	2023-08-30 19:56:03.005107516 +0200
++++ cinepaint/plug-ins/collect/collect.cpp	2023-08-30 20:08:58.767571517 +0200
+@@ -41,12 +41,10 @@
+ #define PLUG_IN_AUTHOR        "Kai-Uwe Behrmann <ku.b at gmx.de>"
+ #define PLUG_IN_COPYRIGHT     "Copyright 2004-2006 Kai-Uwe Behrmann"
+ 
+-extern "C" {
+ #include "lib/plugin_main.h"
+ #include "lib/wire/libtile.h"
+ #include "plugin_pdb.h"
+ #include "libgimp/stdplugins-intl.h"
+-}
+ 
+ // Declare some local functions:
+ 
diff --git a/cinepaint-link.patch b/cinepaint-link.patch
index c8daeb6..87cf28e 100644
--- a/cinepaint-link.patch
+++ b/cinepaint-link.patch
@@ -10,3 +10,16 @@
  
  libcinepaint_la_SOURCES = \
  	chain.xpm \
+--- cinepaint/plug-ins/icc_examin/icc_examin/makefile.in.orig	2011-11-28 17:18:10.000000000 +0100
++++ cinepaint/plug-ins/icc_examin/icc_examin/makefile.in	2023-08-30 20:56:44.878711127 +0200
+@@ -34,8 +34,8 @@ CFLAGS_ = $(CFLAGS) $(DEBUG) $(ALL_INCL)
+ CXXFLAGS_ = $(CXXFLAGS) $(DEBUG) $(ALL_INCL)
+ 
+ top_builddir = ../../..
+-OPENEXR_LIBS = -pthread -lIlmImf -lz -lImath -lHalf -lIex -lIlmThread
+-CINEPAINT_HALF_LIBS = $(top_builddir)/libhalf/.libs/cinepaint_half.o
++OPENEXR_LIBS = -pthread -lz
++CINEPAINT_HALF_LIBS = -L$(top_builddir)/libhalf/.libs -lcinepaintHalf
+ 
+ 
+ 
diff --git a/cinepaint-no-common.patch b/cinepaint-no-common.patch
new file mode 100644
index 0000000..76cb9db
--- /dev/null
+++ b/cinepaint-no-common.patch
@@ -0,0 +1,139 @@
+--- cinepaint/plug-ins/hdr/fromrad.h.orig	2008-05-22 06:20:12.000000000 +0200
++++ cinepaint/plug-ins/hdr/fromrad.h	2023-08-30 20:25:19.605591194 +0200
+@@ -184,7 +184,6 @@ struct check {
+  * Read and write image resolutions.
+  */
+ 
+-char  resolu_buf[RESOLU_BUFLEN];	/* resolution line buffer */
+ 
+ //----------------------------------------------
+ 
+--- cinepaint/plug-ins/hdr/fromrad.c.orig	2005-04-05 09:38:17.000000000 +0200
++++ cinepaint/plug-ins/hdr/fromrad.c	2023-08-30 20:25:19.708923968 +0200
+@@ -24,6 +24,7 @@
+ 
+ int expadj = 0;
+ char  FMTSTR[] = "FORMAT=";
++char  resolu_buf[RESOLU_BUFLEN];	/* resolution line buffer */
+ 
+ 
+ #if 0
+--- cinepaint/plug-ins/iol/iol.h.orig	2006-12-23 08:14:10.000000000 +0100
++++ cinepaint/plug-ins/iol/iol.h	2023-08-30 21:02:38.336796280 +0200
+@@ -50,24 +50,24 @@ typedef struct {
+ 	char *name;
+ } s_table_t;
+ 
+-code_t *code;
+-float stack[512], vars[NUM_SYMBOLS];
+-int pc;					/* the program counter */
++extern code_t *code;
++extern float stack[512], vars[NUM_SYMBOLS];
++extern int pc;					/* the program counter */
+ 
+-s_table_t s_table[NUM_SYMBOLS];
++extern s_table_t s_table[NUM_SYMBOLS];
+ 
+-int lineno;
+-char *iol_input, *iol_input_ptr;
+-unsigned int iol_input_lim;
+-int input_size;
++extern int lineno;
++extern char *iol_input, *iol_input_ptr;
++extern unsigned int iol_input_lim;
++extern int input_size;
+ 
+-iol_vals ivals;
+-iol_color in_color,out_color;
++extern iol_vals ivals;
++extern iol_color in_color,out_color;
+ 
+-int dialog_status;
+-int do_out;
++extern int dialog_status;
++extern int do_out;
+ 
+-int xsize, ysize, xpos, ypos;
++extern int xsize, ysize, xpos, ypos;
+ 
+ /* in main.c */
+ int iol_process(void);
+--- cinepaint/plug-ins/iol/fg.h.orig	2006-09-25 19:03:37.000000000 +0200
++++ cinepaint/plug-ins/iol/fg.h	2023-08-30 21:20:14.604407321 +0200
+@@ -25,16 +25,16 @@
+ #include <libgimp/gimp.h>
+ #include <libgimp/gimpui.h>
+ 
+-GDrawable *drawable;
+-GPrecisionType precision;
+-gint num_channels;
+-gint32 drawable_ID;
+-GRunModeType run_mode;
++extern GDrawable *drawable;
++extern GPrecisionType precision;
++extern gint num_channels;
++extern gint32 drawable_ID;
++extern GRunModeType run_mode;
+ 
+-guchar *src_row, *dest_row;
+-guint8 *srcu8, *destu8;
+-guint16 *srcu16, *destu16;
+-guint16 *srcf16, *destf16;
+-gfloat *srcf32, *destf32;
++extern guchar *src_row, *dest_row;
++extern guint8 *srcu8, *destu8;
++extern guint16 *srcu16, *destu16;
++extern guint16 *srcf16, *destf16;
++extern gfloat *srcf32, *destf32;
+ 
+ #endif /* _FG_H_ */
+--- cinepaint/plug-ins/iol/main.c.orig	2006-10-05 22:30:42.000000000 +0200
++++ cinepaint/plug-ins/iol/main.c	2023-08-30 21:20:48.824221936 +0200
+@@ -72,6 +72,37 @@
+ 	if(u > 1.0) u = 1.0; \
+ 	if(u < 0.0) u = 0.0
+ 
++code_t *code;
++float stack[512], vars[NUM_SYMBOLS];
++int pc;					/* the program counter */
++
++s_table_t s_table[NUM_SYMBOLS];
++
++int lineno;
++char *iol_input, *iol_input_ptr;
++unsigned int iol_input_lim;
++int input_size;
++
++iol_vals ivals;
++iol_color in_color,out_color;
++
++int dialog_status;
++int do_out;
++
++int xsize, ysize, xpos, ypos;
++
++GDrawable *drawable;
++GPrecisionType precision;
++gint num_channels;
++gint32 drawable_ID;
++GRunModeType run_mode;
++
++guchar *src_row, *dest_row;
++guint8 *srcu8, *destu8;
++guint16 *srcu16, *destu16;
++guint16 *srcf16, *destf16;
++gfloat *srcf32, *destf32;
++
+ /* Declare local functions.
+  */
+ static void query(void);
+--- cinepaint/app/interface.c.orig	2007-11-09 16:24:27.000000000 +0100
++++ cinepaint/app/interface.c	2023-08-31 19:38:22.829448670 +0200
+@@ -313,7 +313,6 @@ gint num_tools = NUM_TOOLS;//sizeof (too
+  */
+ GtkWidget *tool_widgets[NUM_TOOLS+NUM_TOOLS_NONVIS];
+ GtkWidget *tool_label;
+-GtkTooltips *tool_tips;
+ 
+ /*  The popup shell is a pointer to the gdisplay shell that posted the latest
+  *  popup menu.  When this is null, and a command is invoked, then the
diff --git a/cinepaint-oyranos.patch b/cinepaint-oyranos.patch
index 02e01e4..e905b86 100644
--- a/cinepaint-oyranos.patch
+++ b/cinepaint-oyranos.patch
@@ -105,3 +105,51 @@
  #endif
  #endif
  
+--- cinepaint/plug-ins/icc_examin/icc_examin/icc_oyranos_extern.c.orig	2008-08-22 20:11:18.000000000 +0200
++++ cinepaint/plug-ins/icc_examin/icc_examin/icc_oyranos_extern.c	2023-08-30 20:46:24.305406394 +0200
+@@ -219,10 +219,12 @@ oyStringCopy_       ( const char    * te
+     }
+   return text_copy;
+ }
+-# else
++# elif OYRANOS_VERSION < 906
+ char*
+ oyStringCopy_       ( const char    * text,
+                      oyAllocFunc_t   allocateFunc );
++#else
++#define oyStringCopy_ oyStringCopy
+ # endif
+ 
+ /** @brief manage complex oyNamedColour_s_ inside Oyranos
+--- cinepaint/app/cms.c.orig	2023-08-30 21:26:19.255765168 +0200
++++ cinepaint/app/cms.c	2023-08-30 22:15:12.389875016 +0200
+@@ -946,7 +946,15 @@ cms_read_standard_profile_dirs(icColorSp
+       oyProfile_s * temp_prof = 0;
+       oyProfiles_s * iccs = 0;
+ 
++#if OYRANOS_VERSION > 905
++      {
++      uint32_t icc_profile_flags =oyICCProfileSelectionFlagsFromOptions(
++        OY_CMM_STD, "//" OY_TYPE_STD "/icc_color", NULL, 0 );
++      iccs = oyProfiles_ForStd( type, icc_profile_flags, 0, 0 );
++      }
++#else
+       iccs = oyProfiles_ForStd( type, 0, 0 );
++#endif
+ 
+       size = oyProfiles_Count( iccs );
+       for( i = 0; i < size; ++i)
+--- cinepaint/app/main.c.orig	2023-08-30 22:17:15.649207263 +0200
++++ cinepaint/app/main.c	2023-08-31 06:21:44.881244644 +0200
+@@ -55,8 +55,10 @@ extern int _fmode;
+ 
+ #ifdef HAVE_OY
+ #include <oyranos/oyranos.h>
+-#include <oyranos/oyranos_config.h>
+ #include <oyranos/oyranos_version.h>
++#if OYRANOS_VERSION < 906
++#include <oyranos/oyranos_config.h>
++#endif
+ char *oyranos_temp_path = NULL;
+ void *myAlloc(size_t n) { return calloc(sizeof(char), n); }
+ #endif
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/cinepaint.git/commitdiff/85f030abdd29f30a783818fff804d500c3fcc219



More information about the pld-cvs-commit mailing list