summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Sakalis2021-03-20 12:50:23 +0100
committerChris Sakalis2021-03-20 12:50:23 +0100
commit4b9693a4145772ff68ca221639cb39258e4c516a (patch)
tree965d210a8911e6178bbddfc8a9372e63b6c50073
parent9085503b0f6b29ba7f0ebe178ab3db946bb9c597 (diff)
downloadaur-4b9693a4145772ff68ca221639cb39258e4c516a.tar.gz
Fixed the build with GCC >= 10
-rw-r--r--.SRCINFO3
-rw-r--r--PKGBUILD11
-rw-r--r--build_with_gcc10.patch86
3 files changed, 97 insertions, 3 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 1bbd3ab02100..909292b47746 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -9,8 +9,11 @@ pkgbase = gimp-plugin-wavelet-sharpen
depends = gimp
provides = wavelet-sharpen
source = https://github.com/gimp-plugins-justice/wavelet-sharpen/archive/0e9924850e7a51518cb418a994d976c9dc99b012.zip
+ source = build_with_gcc10.patch
md5sums = cc3485184615ace479b2c74ced1411d5
+ md5sums = a922e26d92443a2ea56356fb799d3ef8
sha256sums = 6eb6450639222ec57ce1dcf6098c5ea3455a7a033106b4c4670c4bf7f20adde8
+ sha256sums = 0ba1e8bda7db782f46be14345eb3dcb579657e6b7b03eaf38dec39d35b42f079
pkgname = gimp-plugin-wavelet-sharpen
diff --git a/PKGBUILD b/PKGBUILD
index 52295daf92d4..8b23796e9055 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -10,13 +10,18 @@ license=('GPL')
groups=()
depends=('gimp')
provides=('wavelet-sharpen')
-source=(https://github.com/gimp-plugins-justice/wavelet-sharpen/archive/${commit}.zip)
-md5sums=('cc3485184615ace479b2c74ced1411d5')
-sha256sums=('6eb6450639222ec57ce1dcf6098c5ea3455a7a033106b4c4670c4bf7f20adde8')
+source=(https://github.com/gimp-plugins-justice/wavelet-sharpen/archive/${commit}.zip build_with_gcc10.patch)
+md5sums=('cc3485184615ace479b2c74ced1411d5'
+ 'a922e26d92443a2ea56356fb799d3ef8')
+sha256sums=('6eb6450639222ec57ce1dcf6098c5ea3455a7a033106b4c4670c4bf7f20adde8'
+ '0ba1e8bda7db782f46be14345eb3dcb579657e6b7b03eaf38dec39d35b42f079')
prepare() {
cd "$srcdir/wavelet-sharpen-$commit"
sed -i "2s/LIBS.*/\0 -lm/g" src/Makefile
+
+ # Needed for building with newer versions of GCC
+ patch -p1 < ../build_with_gcc10.patch
}
build() {
diff --git a/build_with_gcc10.patch b/build_with_gcc10.patch
new file mode 100644
index 000000000000..50949c1990ab
--- /dev/null
+++ b/build_with_gcc10.patch
@@ -0,0 +1,86 @@
+diff -pur a/src/interface.c b/src/interface.c
+--- a/src/interface.c 2012-04-08 11:34:45.000000000 +0200
++++ b/src/interface.c 2021-03-20 12:42:39.420873181 +0100
+@@ -12,6 +12,21 @@
+ #include "plugin.h"
+ #include "interface.h"
+
++/* colour mode frame */
++GtkWidget *lum_toggle;
++
++/* amount/radius frame */
++GtkWidget *amount_label[2], *amount_spin[2];
++GtkWidget *amount_hbox[2], *amount_vbox, *amount_scale[2];
++GtkObject *amount_adj[2];
++
++/* reset buttons */
++GtkWidget *reset_button, *button_hbox;
++
++/* dialog */
++GtkWidget *dialog, *dialog_vbox;
++GtkWidget *preview;
++
+ gboolean
+ user_interface (GimpDrawable * drawable)
+ {
+diff -pur a/src/interface.h b/src/interface.h
+--- a/src/interface.h 2012-04-08 11:34:45.000000000 +0200
++++ b/src/interface.h 2021-03-20 12:42:49.000843869 +0100
+@@ -17,16 +17,16 @@
+ /* declare all widgets global to make things a lot easier */
+
+ /* colour mode frame */
+-GtkWidget *lum_toggle;
++extern GtkWidget *lum_toggle;
+
+ /* amount/radius frame */
+-GtkWidget *amount_label[2], *amount_spin[2];
+-GtkWidget *amount_hbox[2], *amount_vbox, *amount_scale[2];
+-GtkObject *amount_adj[2];
++extern GtkWidget *amount_label[2], *amount_spin[2];
++extern GtkWidget *amount_hbox[2], *amount_vbox, *amount_scale[2];
++extern GtkObject *amount_adj[2];
+
+ /* reset buttons */
+-GtkWidget *reset_button, *button_hbox;
++extern GtkWidget *reset_button, *button_hbox;
+
+ /* dialog */
+-GtkWidget *dialog, *dialog_vbox;
+-GtkWidget *preview;
++extern GtkWidget *dialog, *dialog_vbox;
++extern GtkWidget *preview;
+diff -pur a/src/plugin.c b/src/plugin.c
+--- a/src/plugin.c 2012-04-08 11:34:45.000000000 +0200
++++ b/src/plugin.c 2021-03-20 12:41:15.047800811 +0100
+@@ -11,6 +11,12 @@
+
+ #include "plugin.h"
+
++float *fimg[4];
++float *buffer[3];
++gint channels;
++
++GTimer *timer;
++
+ GimpPlugInInfo PLUG_IN_INFO = { NULL, NULL, query, run };
+
+ MAIN ()
+diff -pur a/src/plugin.h b/src/plugin.h
+--- a/src/plugin.h 2012-04-08 11:34:45.000000000 +0200
++++ b/src/plugin.h 2021-03-20 12:40:44.667896124 +0100
+@@ -67,10 +67,10 @@ typedef struct
+
+ extern wavelet_settings settings;
+
+-float *fimg[4];
+-float *buffer[3];
+-gint channels;
++extern float *fimg[4];
++extern float *buffer[3];
++extern gint channels;
+
+-GTimer *timer;
++extern GTimer *timer;
+
+ #endif /* __PLUGIN_H__ */