misc/gcolor2: Added to 12.0 repository

This commit is contained in:
slakmagik 2010-05-11 20:01:07 +02:00 committed by David Somero
parent c709334874
commit eeede0876f
5 changed files with 114 additions and 0 deletions

8
misc/gcolor2/README Normal file
View File

@ -0,0 +1,8 @@
gcolor2 is a simple color selector that was originally based on gcolor, ported
to use GTK+2, and now has a completely new UI.
It is also completely desktop-independent, requiring only GTK2.
It includes the usual color wheel method, input box method, color-picker
method, and can store colors, coming with the contents of rgb.txt already
stored.

View File

@ -0,0 +1,56 @@
#!/bin/sh
# Slackware build script for gcolor2
# Written by slakmagik <jsun@freeshell.org>
# Released under the WTFPL
PRGNAM=gcolor2
VERSION=0.4
ARCH=${ARCH:-i486}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
fi
set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
cd $PRGNAM-$VERSION
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
-exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 \
-o -perm 400 \) -exec chmod 644 {} \;
# gcolor2 prefills the saved colors with the contents of rgb.txt - which it
# can't find without this patch.
patch -p1 < $CWD/rgb.patch
CFLAGS="$SLKCFLAGS" CXXFLAGS="$SLKCFLAGS" ./configure --prefix=/usr
make
make DESTDIR=$PKG install-strip
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
# the NEWS and README files are empty, so this doesn't include them
cp -a [ACI]* $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz

View File

@ -0,0 +1,8 @@
PRGNAM="gcolor2"
VERSION="0.4"
HOMEPAGE="http://gcolor2.sourceforge.net/"
DOWNLOAD="http://downloads.sourceforge.net/gcolor2/gcolor2-0.4.tar.bz2"
MD5SUM="223a126b8a87234d1552be4be4140789"
MAINTAINER="slakmagik"
EMAIL="jsun@freeshell.org"
APPROVED="David Somero"

23
misc/gcolor2/rgb.patch Normal file
View File

@ -0,0 +1,23 @@
diff -Naur 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 2008-03-11 03:59:49.000000000 -0400
@@ -12,6 +12,7 @@
#define SYSTEM_FILE_2 "/usr/lib/X11/rgb.txt"
#define SYSTEM_FILE_3 "/etc/X11/rgb.txt"
#define SYSTEM_FILE_4 "/usr/openwin/lib/X11/rgb.txt"
+#define SYSTEM_FILE_5 "/usr/share/X11/rgb.txt"
/* about dialog text */
#define ABOUT_CREDITS_TEXT "Developer:\n" \
diff -Naur gcolor2-0.4.orig/src/main.c gcolor2-0.4/src/main.c
--- gcolor2-0.4.orig/src/main.c 2005-07-11 10:55:49.000000000 -0400
+++ gcolor2-0.4/src/main.c 2008-03-11 04:00:12.000000000 -0400
@@ -36,6 +36,8 @@
sys_filename = SYSTEM_FILE_3;
else if (g_file_test (SYSTEM_FILE_4, G_FILE_TEST_EXISTS))
sys_filename = SYSTEM_FILE_4;
+ else if (g_file_test (SYSTEM_FILE_5, G_FILE_TEST_EXISTS))
+ sys_filename = SYSTEM_FILE_5;
else
return FALSE;
return TRUE;

19
misc/gcolor2/slack-desc Normal file
View File

@ -0,0 +1,19 @@
# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description. Line
# up the first '|' above the ':' following the base package name, and the '|'
# on the right side marks the last column you can put a character in. You must
# make exactly 11 lines for the formatting to be correct. It's also
# customary to leave one space after the ':'.
|-----handy-ruler------------------------------------------------------|
gcolor2: gcolor2 (GTK2 color selector)
gcolor2:
gcolor2: gcolor2 is a simple color selector that was originally based on
gcolor2: gcolor, ported to use GTK+2, and now has a completely new UI.
gcolor2:
gcolor2: Homepage: http://gcolor2.sourceforge.net/
gcolor2:
gcolor2:
gcolor2:
gcolor2:
gcolor2: