From: @hostfj
Reviewed-by: @xzyangha
Signed-off-by:
This commit is contained in:
openeuler-ci-bot 2020-11-24 11:12:26 +08:00 committed by Gitee
commit fe2a2097ed
5 changed files with 142 additions and 0 deletions

25
gcolor2-0.4-ftbfs.patch Normal file
View File

@ -0,0 +1,25 @@
From d39950e9b5fb44d677fc2a570b6f1b286a837e72 Mon Sep 17 00:00:00 2001
From: hannes <hannes@fedoraproject.org>
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

View File

@ -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 <string.h>
+#include <glib/gprintf.h>
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 <stdlib.h>
+#include <string.h>
+#include <glib/gprintf.h>
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);

BIN
gcolor2-0.4.tar.bz2 Normal file

Binary file not shown.

10
gcolor2.desktop Normal file
View File

@ -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;

55
gcolor2.spec Normal file
View File

@ -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 <isoft@isoft-linux.com> - 0.4-17
- Rebuilt by iSoft for iSoft