diff --git a/gcolor2-0.4-ftbfs.patch b/gcolor2-0.4-ftbfs.patch new file mode 100644 index 0000000..6b1b9d4 --- /dev/null +++ b/gcolor2-0.4-ftbfs.patch @@ -0,0 +1,25 @@ +From d39950e9b5fb44d677fc2a570b6f1b286a837e72 Mon Sep 17 00:00:00 2001 +From: hannes +Date: Wed, 15 Feb 2012 20:54:14 +0000 +Subject: [PATCH] fix build failure + +--- + configure | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/configure b/configure +index 6fd981a..842ad23 100755 +--- a/configure ++++ b/configure +@@ -6155,7 +6155,7 @@ echo "${ECHO_T}no" >&6 + exit 1 + fi + gentoo_lt_version="1.5.18" +-gentoo_ltmain_version=`grep '^[:space:]*VERSION=' $ltmain | sed -e 's|^[:space:]*VERSION=||'` ++gentoo_ltmain_version=`grep '^[[:space:]]*VERSION=' $ltmain | sed -e 's|^[[:space:]]*VERSION=||'` + if test "$gentoo_lt_version" != "$gentoo_ltmain_version"; then + echo "$as_me:$LINENO: result: no" >&5 + echo "${ECHO_T}no" >&6 +-- +1.7.7.6 + diff --git a/gcolor2-0.4-missing-includes.patch b/gcolor2-0.4-missing-includes.patch new file mode 100644 index 0000000..a70e2ee --- /dev/null +++ b/gcolor2-0.4-missing-includes.patch @@ -0,0 +1,52 @@ +Nur in gcolor2-0.4/po: potfiles. +diff -dur gcolor2-0.4.orig/src/callbacks.c gcolor2-0.4/src/callbacks.c +--- gcolor2-0.4.orig/src/callbacks.c 2005-07-12 20:06:12.000000000 +0200 ++++ gcolor2-0.4/src/callbacks.c 2009-10-03 13:56:41.000000000 +0200 +@@ -9,6 +9,8 @@ + #include "interface.h" + #include "support.h" + ++#include ++#include + + GtkWidget *savedialog; + gchar *colorname; +diff -dur gcolor2-0.4.orig/src/main.c gcolor2-0.4/src/main.c +--- gcolor2-0.4.orig/src/main.c 2005-07-11 16:55:49.000000000 +0200 ++++ gcolor2-0.4/src/main.c 2009-10-03 13:59:32.000000000 +0200 +@@ -8,6 +8,9 @@ + #include "interface.h" + #include "support.h" + #include "callbacks.h" ++#include ++#include ++#include + + GtkListStore *liststore; + GdkWindow *gdkwin; +@@ -48,8 +51,6 @@ + + void add_list_color (gchar *spec, gchar *name, gchar *type, gboolean is_new_color) + { +- GdkPixmap *pixmap; +- GdkBitmap *mask; + GdkPixbuf *buf; + GtkTreeIter iter; + +@@ -103,7 +104,7 @@ + gchar *name; + gchar buffer[512]; + gchar spec[8]; +- gint r, g, b, lr, lg, lb; ++ gint r, g, b, lr=0, lg=0, lb=0; + + fp = fopen (filename, "r"); + if (!fp) +@@ -140,7 +141,6 @@ + GtkTreeViewColumn *column; + GtkWidget *treeview; + GtkTreeSelection *select; +- gchar *buf; + + #ifdef ENABLE_NLS + bindtextdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR); diff --git a/gcolor2-0.4.tar.bz2 b/gcolor2-0.4.tar.bz2 new file mode 100644 index 0000000..01f9508 Binary files /dev/null and b/gcolor2-0.4.tar.bz2 differ diff --git a/gcolor2.desktop b/gcolor2.desktop new file mode 100644 index 0000000..494ec8f --- /dev/null +++ b/gcolor2.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Name=GColor2 +GenericName=Color Selector +Comment=Choose Colors +Exec=gcolor2 +Icon=/usr/share/pixmaps/gcolor2/icon.png +Terminal=false +Type=Application +Categories=Graphics;GTK; + diff --git a/gcolor2.spec b/gcolor2.spec new file mode 100644 index 0000000..c6107eb --- /dev/null +++ b/gcolor2.spec @@ -0,0 +1,55 @@ +Name: gcolor2 +Version: 0.4 +Release: 17%{?dist} +Summary: A simple color selector for GTK+2 + +License: GPLv2 +URL: http://gcolor2.sourceforge.net/ +Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.bz2 +Source1: %{name}.desktop +# Patch extracted from +# http://patch-tracker.debian.org/patch/nondebian/dl/gcolor2/0.4-2.1 +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 + +BuildRequires: gcc +BuildRequires: gtk2-devel perl(XML::Parser) desktop-file-utils + +%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 +# make sure path to icon is correct +sed -i 's!/usr/share!%{_datadir}!' %{SOURCE1} + + +%build +%configure +make %{?_smp_mflags} + + +%install +rm -rf %{buildroot} +make install DESTDIR=%{buildroot} INSTALL="install -p" +desktop-file-install \ + --dir=%{buildroot}%{_datadir}/applications \ + %{SOURCE1} + + + +%files +%doc AUTHORS ChangeLog COPYING +%{_bindir}/%{name} +%{_datadir}/pixmaps/%{name}/ +%{_datadir}/applications/%{name}.desktop + +%changelog +* Thu Jan 31 2019 iSoft - 0.4-17 +- Rebuilt by iSoft for iSoft +