Import gcolor2 0.4, from Abel Abraham Camarillo

Gcolor2 is a GTK2 color selector to provide a quick and easy way to
find colors for whatever task is at hand.
ok kili@
This commit is contained in:
landry 2010-10-17 21:38:05 +00:00
parent 08689d4a55
commit 8283548e4d
7 changed files with 110 additions and 0 deletions

33
x11/gcolor2/Makefile Normal file
View File

@ -0,0 +1,33 @@
# $OpenBSD: Makefile,v 1.1.1.1 2010/10/17 21:38:05 landry Exp $
#
COMMENT = color selector in GTK2
DISTNAME = gcolor2-0.4
CATEGORIES = x11
HOMEPAGE = http://gcolor2.sourceforge.net/
MAINTAINER = Abel Abraham Camarillo Ojeda <acamari@verlet.org>
#GPLv2
PERMIT_PACKAGE_CDROM = Yes
PERMIT_PACKAGE_FTP = Yes
PERMIT_DISTFILES_CDROM =Yes
PERMIT_DISTFILES_FTP = Yes
WANTLIB = GL X11 X11-xcb Xau Xcomposite Xcursor Xdamage Xdmcp Xext Xfixes Xi \
Xinerama Xrandr Xrender Xxf86vm atk-1.0 c cairo.>=9 drm expat \
fontconfig freetype gdk-x11-2.0 gdk_pixbuf-2.0 gio-2.0 glib-2.0 \
gmodule-2.0 gobject-2.0 gthread-2.0 gtk-x11-2.0 iconv.>=6 intl.>=5 \
m pango-1.0 pangocairo-1.0 pangoft2-1.0 pcre.>=2 pixman-1 png.>=10 \
pthread pthread-stubs xcb xcb-render xcb-shm z
LIB_DEPENDS = ::x11/gtk+2
MODULES = devel/gettext
MASTER_SITES = ${MASTER_SITE_SOURCEFORGE:=gcolor2/}
USE_X11 = Yes
CONFIGURE_STYLE = gnu
.include <bsd.port.mk>

5
x11/gcolor2/distinfo Normal file
View File

@ -0,0 +1,5 @@
MD5 (gcolor2-0.4.tar.gz) = At6dklrVkhUiaF9ALK7D7A==
RMD160 (gcolor2-0.4.tar.gz) = 0x3V0ZcgqIiL4ml3jSvmcVhJxQY=
SHA1 (gcolor2-0.4.tar.gz) = fPoXOCXUhsVKU1i29B5nnYos1bY=
SHA256 (gcolor2-0.4.tar.gz) = ib1sbSe6WmeexgBX3oSXhVBy9SBRW0kOWYb8NQl3TyM=
SIZE (gcolor2-0.4.tar.gz) = 375217

View File

@ -0,0 +1,30 @@
$OpenBSD: patch-src_callbacks_c,v 1.1.1.1 2010/10/17 21:38:05 landry Exp $
--- src/callbacks.c.orig Sat Oct 16 10:36:18 2010
+++ src/callbacks.c Sun Oct 17 00:27:40 2010
@@ -3,11 +3,17 @@
#endif
#include <gtk/gtk.h>
+#include <glib.h>
+#include <glib/gprintf.h>
+
#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
#include "callbacks.h"
#include "interface.h"
#include "support.h"
+#include "main.h"
GtkWidget *savedialog;
@@ -400,7 +406,7 @@ gboolean delete_color (gchar* color_name, gchar* color
g = g_ascii_strtoull (p, &p, 10);
b = g_ascii_strtoull (p, &p, 10);
p += strspn (p, " \t");
- g_sprintf (file_color_value, "#%2X%2X%2X", r, g, b);
+ g_sprintf (file_color_value, "#%02X%02X%02X", r, g, b);
file_color_name = g_strchomp (g_strdup (p));
/* make sure to only remove the first matching color. both value and

View File

@ -0,0 +1,24 @@
$OpenBSD: patch-src_main_c,v 1.1.1.1 2010/10/17 21:38:05 landry Exp $
--- src/main.c.orig Sun Oct 17 00:19:56 2010
+++ src/main.c Sat Oct 16 22:57:50 2010
@@ -3,7 +3,12 @@
#endif
#include <gtk/gtk.h>
+#include <glib.h>
+#include <glib/gprintf.h>
+
#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
#include "interface.h"
#include "support.h"
@@ -14,6 +19,7 @@ GdkWindow *gdkwin;
gchar *user_filename;
gchar *sys_filename;
+#include "main.h"
void set_user_file ()
{

View File

@ -0,0 +1,10 @@
$OpenBSD: patch-src_main_h,v 1.1.1.1 2010/10/17 21:38:05 landry Exp $
--- src/main.h.orig Sun Oct 17 00:19:02 2010
+++ src/main.h Sun Oct 17 00:19:02 2010
@@ -0,0 +1,6 @@
+void set_user_file ();
+gchar* get_user_file ();
+gboolean set_system_file ();
+gchar* get_system_file ();
+void add_list_color (gchar *, gchar *, gchar *, gboolean);
+void add_rgb_file (gchar *, gchar *);

2
x11/gcolor2/pkg/DESCR Normal file
View File

@ -0,0 +1,2 @@
Gcolor2 is a GTK2 color selector to provide a quick and easy way to find colors
for whatever task is at hand.

6
x11/gcolor2/pkg/PLIST Normal file
View File

@ -0,0 +1,6 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2010/10/17 21:38:05 landry Exp $
@bin bin/gcolor2
share/pixmaps/
share/pixmaps/gcolor2/
share/pixmaps/gcolor2/about_icon.png
share/pixmaps/gcolor2/icon.png