summaryrefslogtreecommitdiff
path: root/desktop/cairo-clock
diff options
context:
space:
mode:
authorSébastien Ballet <slacker6896@gmail.com>2018-10-27 00:17:55 +0100
committerDavid Spencer <idlemoor@slackbuilds.org>2018-10-27 00:17:55 +0100
commit9427c6b28d3fa44b7fd5598d9a4ecb790eccb453 (patch)
tree43149955ffe42415f0aa14f1641e2fa6bee6b039 /desktop/cairo-clock
parentb4ca915a374a080eaaa763557286ba38f9a439d8 (diff)
downloadslackbuilds-9427c6b28d3fa44b7fd5598d9a4ecb790eccb453.tar.gz
desktop/cairo-clock: Added (Analog Clock).
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
Diffstat (limited to 'desktop/cairo-clock')
-rw-r--r--desktop/cairo-clock/README10
-rw-r--r--desktop/cairo-clock/cairo-clock.SlackBuild127
-rw-r--r--desktop/cairo-clock/cairo-clock.info10
-rw-r--r--desktop/cairo-clock/doinst.sh5
-rw-r--r--desktop/cairo-clock/patches/cairo-clock-check-refresh-rate-fix.patch13
-rw-r--r--desktop/cairo-clock/patches/cairo-clock-composited.patch19
-rw-r--r--desktop/cairo-clock/patches/cairo-clock-desktop-categories.patch8
-rw-r--r--desktop/cairo-clock/patches/cairo-clock-fix-build-04_624922.patch11
-rw-r--r--desktop/cairo-clock/patches/cairo-clock-fix-man-dir.patch11
-rw-r--r--desktop/cairo-clock/slack-desc19
10 files changed, 233 insertions, 0 deletions
diff --git a/desktop/cairo-clock/README b/desktop/cairo-clock/README
new file mode 100644
index 0000000000..327247a56f
--- /dev/null
+++ b/desktop/cairo-clock/README
@@ -0,0 +1,10 @@
+It is an analog clock displaying the system-time. It leverages
+the new visual features offered by Xorg 7.0 in combination with a
+compositing-manager (xcompmgr, compiz, compton), gtk+ 2.10.0,
+cairo 1.2.0, libglade 2.6.0 and libsrvg 2.14.0 to produce a time
+display with pretty-pixels.
+
+*Attention*, by default cairo-clock runs with a refresh rate at
+30 which might lead to high cpu usage by X process (and compton
+when used). To prevent this it is better to run cairo-clock with
+a refresh rate at 1 (see option --refresh).
diff --git a/desktop/cairo-clock/cairo-clock.SlackBuild b/desktop/cairo-clock/cairo-clock.SlackBuild
new file mode 100644
index 0000000000..e41af4c9aa
--- /dev/null
+++ b/desktop/cairo-clock/cairo-clock.SlackBuild
@@ -0,0 +1,127 @@
+#!/bin/sh
+
+# Slackware build script for cairo-clock
+
+# Copyright 2018 Sébastien Ballet, France
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+PRGNAM=cairo-clock
+VERSION=${VERSION:-0.3.4}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+if [ -z "${ARCH}" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=${TMP}/package-${PRGNAM}
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "${ARCH}" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "${ARCH}" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "${ARCH}" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+set -e
+
+rm -rf ${PKG}
+mkdir -p ${TMP} ${PKG} ${OUTPUT}
+cd ${TMP}
+rm -rf ${PRGNAM}-${VERSION}
+tar xvf ${CWD}/${PRGNAM}_${VERSION}.orig.tar.gz
+cd ${PRGNAM}-${VERSION}
+
+chown -R root:root .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
+ -o -perm 511 \) -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+
+patch -p0<${CWD}/patches/cairo-clock-fix-build-04_624922.patch
+patch -p0<${CWD}/patches/cairo-clock-composited.patch
+patch -p0<${CWD}/patches/cairo-clock-fix-man-dir.patch
+patch -p0<${CWD}/patches/cairo-clock-desktop-categories.patch
+
+# This patch fixes a bug which prevents to set the refresh-rate
+# at the min/max (ie. 1/60) accepted values.
+#
+patch -p0<${CWD}/patches/cairo-clock-check-refresh-rate-fix.patch
+
+CFLAGS="${SLKCFLAGS}" \
+CXXFLAGS="${SLKCFLAGS}" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/${PRGNAM}-${VERSION} \
+ --build=${ARCH}-slackware-linux
+
+make
+make install DESTDIR=${PKG}
+
+find ${PKG} -print0 \
+ | xargs -0 file \
+ | grep -e "executable" -e "shared object" \
+ | grep ELF \
+ | cut -f 1 -d : \
+ | xargs strip --strip-unneeded 2> /dev/null || true
+
+find ${PKG}/usr/man -type f -exec gzip -9 {} \;
+for i in $( find ${PKG}/usr/man -type l ) ; do
+ ln -s $( readlink $i ).gz $i.gz ; rm $i ;
+done
+
+mkdir -p ${PKG}/usr/doc/${PRGNAM}-${VERSION}
+cp -a \
+ AUTHORS \
+ BUGS \
+ COPYING \
+ ChangeLog \
+ INSTALL \
+ NEWS \
+ README \
+ TODO \
+ ${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
+cat ${CWD}/doinst.sh > ${PKG}/install/doinst.sh
+
+cd ${PKG}
+/sbin/makepkg -l y -c n ${OUTPUT}/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.${PKGTYPE:-tgz}
diff --git a/desktop/cairo-clock/cairo-clock.info b/desktop/cairo-clock/cairo-clock.info
new file mode 100644
index 0000000000..d841eb78a1
--- /dev/null
+++ b/desktop/cairo-clock/cairo-clock.info
@@ -0,0 +1,10 @@
+PRGNAM="cairo-clock"
+VERSION="0.3.4"
+HOMEPAGE="https://packages.debian.org/stretch/cairo-clock"
+DOWNLOAD="http://http.debian.net/debian/pool/main/c/cairo-clock/cairo-clock_0.3.4.orig.tar.gz"
+MD5SUM="78e5b3aa3492aa6c182eaacae63a7c03"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES=""
+MAINTAINER="Sébastien Ballet"
+EMAIL="slacker6896@gmail.com"
diff --git a/desktop/cairo-clock/doinst.sh b/desktop/cairo-clock/doinst.sh
new file mode 100644
index 0000000000..301399ba37
--- /dev/null
+++ b/desktop/cairo-clock/doinst.sh
@@ -0,0 +1,5 @@
+
+if [ -x /usr/bin/update-desktop-database ]; then
+ /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
+fi
+
diff --git a/desktop/cairo-clock/patches/cairo-clock-check-refresh-rate-fix.patch b/desktop/cairo-clock/patches/cairo-clock-check-refresh-rate-fix.patch
new file mode 100644
index 0000000000..a23663ab64
--- /dev/null
+++ b/desktop/cairo-clock/patches/cairo-clock-check-refresh-rate-fix.patch
@@ -0,0 +1,13 @@
+--- src/cairo-clock.c.orig 2018-04-07 10:47:48.240014958 +0200
++++ src/cairo-clock.c 2018-04-07 10:48:12.998016063 +0200
+@@ -1423,8 +1423,8 @@
+ g_iDefaultY >= gdk_screen_get_height (gdk_screen_get_default ()))
+ g_iDefaultY = 0;
+
+- if (g_iRefreshRate <= MIN_REFRESH_RATE ||
+- g_iRefreshRate >= MAX_REFRESH_RATE)
++ if (g_iRefreshRate < MIN_REFRESH_RATE ||
++ g_iRefreshRate > MAX_REFRESH_RATE)
+ g_iRefreshRate = 30;
+ }
+ else
diff --git a/desktop/cairo-clock/patches/cairo-clock-composited.patch b/desktop/cairo-clock/patches/cairo-clock-composited.patch
new file mode 100644
index 0000000000..87ebef182a
--- /dev/null
+++ b/desktop/cairo-clock/patches/cairo-clock-composited.patch
@@ -0,0 +1,19 @@
+--- ./src/cairo-clock.c.orig 2007-08-20 06:22:45.000000000 +0200
++++ ./src/cairo-clock.c 2007-10-14 18:53:47.000000000 +0200
+@@ -1455,11 +1455,16 @@
+
+ if (!gdk_screen_is_composited (gtk_widget_get_screen (g_pMainWindow)))
+ {
++ printf( "You are not running under a composited desktop-environment (e.g. compiz).\n" );
++ printf( "cairo-clock cannot work properly without one.\n" );
++ /*
++
+ gtk_window_set_icon_from_file (GTK_WINDOW (g_pErrorDialog),
+ get_icon_filename (),
+ NULL);
+ gtk_dialog_run (GTK_DIALOG (g_pErrorDialog));
+ exit (2);
++ */
+ }
+
+ g_pPopUpMenu = glade_xml_get_widget (pGladeXml,
diff --git a/desktop/cairo-clock/patches/cairo-clock-desktop-categories.patch b/desktop/cairo-clock/patches/cairo-clock-desktop-categories.patch
new file mode 100644
index 0000000000..7737b87c9a
--- /dev/null
+++ b/desktop/cairo-clock/patches/cairo-clock-desktop-categories.patch
@@ -0,0 +1,8 @@
+--- ./desktop/cairo-clock.desktop.orig 2007-08-20 06:22:45.000000000 +0200
++++ ./desktop/cairo-clock.desktop 2007-10-14 08:35:55.000000000 +0200
+@@ -37,4 +37,4 @@
+ Comment[zh_TW]=一個超好用的類比時鐘
+ Exec=cairo-clock
+ Icon=cairo-clock
+-Categories=GNOME;Application;Utility;
++Categories=Utility;Clock;
diff --git a/desktop/cairo-clock/patches/cairo-clock-fix-build-04_624922.patch b/desktop/cairo-clock/patches/cairo-clock-fix-build-04_624922.patch
new file mode 100644
index 0000000000..1743b806fe
--- /dev/null
+++ b/desktop/cairo-clock/patches/cairo-clock-fix-build-04_624922.patch
@@ -0,0 +1,11 @@
+--- ./src/Makefile.in.orig 2008-02-27 11:33:47.000000000 +0000
++++ ./src/Makefile.in 2011-08-21 09:46:30.000000000 +0000
+@@ -226,7 +226,7 @@
+ target_alias = @target_alias@
+ top_builddir = @top_builddir@
+ top_srcdir = @top_srcdir@
+-cairo_clock_LDFLAGS = -Wl, --export-dynamic
++cairo_clock_LDFLAGS = -rdynamic
+ cairo_clock_LDADD = \
+ $(GLIB_LIBS) \
+ $(GTK_LIBS) \
diff --git a/desktop/cairo-clock/patches/cairo-clock-fix-man-dir.patch b/desktop/cairo-clock/patches/cairo-clock-fix-man-dir.patch
new file mode 100644
index 0000000000..75dfc727c5
--- /dev/null
+++ b/desktop/cairo-clock/patches/cairo-clock-fix-man-dir.patch
@@ -0,0 +1,11 @@
+--- man/Makefile.in.orig 2018-02-13 11:54:07.989470517 +0100
++++ man/Makefile.in 2018-02-13 11:56:07.907475868 +0100
+@@ -209,7 +209,7 @@
+ target_alias = @target_alias@
+ top_builddir = @top_builddir@
+ top_srcdir = @top_srcdir@
+-manualdir = $(datadir)/man/man1
++manualdir = $(prefix)/man/man1
+ manual_DATA = cairo-clock.1.gz
+ EXTRA_DIST = $(manual_DATA)
+ all: all-am
diff --git a/desktop/cairo-clock/slack-desc b/desktop/cairo-clock/slack-desc
new file mode 100644
index 0000000000..a528ba1373
--- /dev/null
+++ b/desktop/cairo-clock/slack-desc
@@ -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 ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+cairo-clock: cairo-clock (Analog Clock)
+cairo-clock:
+cairo-clock: It is an analog clock displaying the system-time. It leverages
+cairo-clock: the new visual features offered by Xorg 7.0 in combination with a
+cairo-clock: compositing-manager (xcompmgr, compiz, compton), gtk+ 2.10.0,
+cairo-clock: cairo 1.2.0, libglade 2.6.0 and libsrvg 2.14.0 to produce a time
+cairo-clock: display with pretty-pixels.
+cairo-clock:
+cairo-clock: https://packages.debian.org/stretch/cairo-clock
+cairo-clock:
+cairo-clock: