From 9406991453e403d0b10768710a62d93838f14cdd Mon Sep 17 00:00:00 2001 From: tanyulong2021 Date: Mon, 13 Jun 2022 16:09:17 +0800 Subject: [PATCH] rebuild and solve compile error --- gcolor2-0.4-gcc10.patch | 29 +++++++++++++++++++++++++++++ gcolor2.spec | 27 +++++++++++++++------------ 2 files changed, 44 insertions(+), 12 deletions(-) create mode 100644 gcolor2-0.4-gcc10.patch diff --git a/gcolor2-0.4-gcc10.patch b/gcolor2-0.4-gcc10.patch new file mode 100644 index 0000000..c1c55f3 --- /dev/null +++ b/gcolor2-0.4-gcc10.patch @@ -0,0 +1,29 @@ +diff -ru gcolor2-0.4.orig/src/callbacks.c gcolor2-0.4/src/callbacks.c +--- gcolor2-0.4.orig/src/callbacks.c 2005-07-12 14:06:12.000000000 -0400 ++++ gcolor2-0.4/src/callbacks.c 2020-04-27 10:06:57.988405153 -0400 +@@ -12,6 +12,9 @@ + #include + #include + ++GtkWidget *gcolor2; ++GtkWidget *menu; ++GdkColor colorvalue; + GtkWidget *savedialog; + gchar *colorname; + static GtkWidget *aboutdialog = NULL; +diff -ru gcolor2-0.4.orig/src/callbacks.h gcolor2-0.4/src/callbacks.h +--- gcolor2-0.4.orig/src/callbacks.h 2005-07-11 19:18:59.000000000 -0400 ++++ gcolor2-0.4/src/callbacks.h 2020-04-27 10:05:55.157028236 -0400 +@@ -41,9 +41,9 @@ + "\302\267 Usability / user interface enhancements\n" \ + "\302\267 Code cleanup" + +-GtkWidget *gcolor2; +-GtkWidget *menu; +-GdkColor colorvalue; ++extern GtkWidget *gcolor2; ++extern GtkWidget *menu; ++extern GdkColor colorvalue; + + enum + { diff --git a/gcolor2.spec b/gcolor2.spec index c6107eb..442abc4 100644 --- a/gcolor2.spec +++ b/gcolor2.spec @@ -1,6 +1,6 @@ Name: gcolor2 Version: 0.4 -Release: 17%{?dist} +Release: 18 Summary: A simple color selector for GTK+2 License: GPLv2 @@ -13,33 +13,34 @@ Patch0: %{name}-0.4-missing-includes.patch # https://bugzilla.redhat.com/show_bug.cgi?id=716100 # bugs.debian.org/cgi-bin/bugreport.cgi?bug=634606 Patch1: %{name}-0.4-ftbfs.patch +# fix for default -fno-common in GCC10 +Patch2: %{name}-0.4-gcc10.patch +BuildRequires: desktop-file-utils BuildRequires: gcc -BuildRequires: gtk2-devel perl(XML::Parser) desktop-file-utils +BuildRequires: gtk2-devel +BuildRequires: make +BuildRequires: perl-interpreter +BuildRequires: perl(XML::Parser) %description gcolor2 is a simple color selector that was originally based on gcolor, ported to use GTK+2, and now has a completely new UI. %prep -%setup -q -%patch0 -p1 -b .missing -%patch1 -p1 -b .ftbfs +%autosetup -p1 # make sure path to icon is correct sed -i 's!/usr/share!%{_datadir}!' %{SOURCE1} %build %configure -make %{?_smp_mflags} +%make_build %install -rm -rf %{buildroot} -make install DESTDIR=%{buildroot} INSTALL="install -p" -desktop-file-install \ - --dir=%{buildroot}%{_datadir}/applications \ - %{SOURCE1} +%make_install +desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{SOURCE1} @@ -50,6 +51,8 @@ desktop-file-install \ %{_datadir}/applications/%{name}.desktop %changelog +* Mon Jun 13 2022 tanyulong - 0.4-18 +- rebuild and solve compile error + * Thu Jan 31 2019 iSoft - 0.4-17 - Rebuilt by iSoft for iSoft -