libraries/gtkhotkey: Added (hotkey handling for Gtk+ applications).

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
Edinaldo P. Silva 2015-09-05 14:10:04 +07:00 committed by Willy Sudiarto Raharjo
parent 05442c5e65
commit 2c12749296
6 changed files with 201 additions and 0 deletions

View file

@ -0,0 +1,26 @@
From 6fdad02e8bcf6876c8a5aa3512960311e8ea9fb7 Mon Sep 17 00:00:00 2001
From: Nobuhiro Iwamatsu <iwamatsu@debian.org>
Date: Tue, 19 Jan 2010 14:14:38 +0900
Subject: [PATCH 1/2] Disable debug mode.
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@debian.org>
---
src/x11/tomboykeybinder.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/x11/tomboykeybinder.c b/src/x11/tomboykeybinder.c
index fe569a7..0edd476 100644
--- a/src/x11/tomboykeybinder.c
+++ b/src/x11/tomboykeybinder.c
@@ -12,7 +12,7 @@
#include "tomboykeybinder.h"
/* Uncomment the next line to print a debug trace. */
-#define DEBUG 1
+/* #define DEBUG 1 */
#ifdef DEBUG
# define TRACE(x) x
--
1.6.6

View file

@ -0,0 +1,12 @@
gtkhotkey (hotkey handling for Gtk+ applications)
GtkHotkey Library - Cross Platform Library For Using Desktop Wide Hotkeys.
The idea of the library is to keep it as simple as possible, while sticking
to an object oriented design, without falling back to C-isms (read: '#ifdefs')
where it would otherwise be tempting.
It can be argued that the code base is too small to be put in a separate library.
However the functionality is very well defined and would probably appear
oddly placed in some bigger helper library for GTk+ apps, where it would likely
live in a hodge podge of unrelated functionality.

View file

@ -0,0 +1,30 @@
Description: Fix build failure with glib 2.32
where including invidual glib headers is no longer allowed.
Author: Michael Biebl <biebl@debian.org>
Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=665548
Index: gtkhotkey-0.2.1/src/gtk-hotkey-error.h
===================================================================
--- gtkhotkey-0.2.1.orig/src/gtk-hotkey-error.h 2009-09-03 22:52:49.000000000 +0200
+++ gtkhotkey-0.2.1/src/gtk-hotkey-error.h 2012-03-25 19:07:05.822268171 +0200
@@ -23,7 +23,7 @@
#ifndef __GTK_HOTKEY_ERROR_H__
#define __GTK_HOTKEY_ERROR_H__
-#include <glib/gquark.h>
+#include <glib.h>
G_BEGIN_DECLS
Index: gtkhotkey-0.2.1/src/x11/tomboykeybinder.h
===================================================================
--- gtkhotkey-0.2.1.orig/src/x11/tomboykeybinder.h 2009-09-03 22:52:49.000000000 +0200
+++ gtkhotkey-0.2.1/src/x11/tomboykeybinder.h 2012-03-25 19:07:05.914268168 +0200
@@ -2,7 +2,7 @@
#ifndef __TOMBOY_KEY_BINDER_H__
#define __TOMBOY_KEY_BINDER_H__
-#include <glib/gtypes.h>
+#include <glib.h>
G_BEGIN_DECLS

View file

@ -0,0 +1,104 @@
#!/bin/sh
#
# Slackware build script for gtkhotkey.
#
# Copyright 2015 Edinaldo P. Silva, Rio de Janeiro, Brazil.
# 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=gtkhotkey
VERSION=${VERSION:-0.2.1}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i486 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i686 -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
rm -rf $TMP/$PRGNAM-$VERSION
cd $TMP
tar xvf $CWD/$PRGNAM-$VERSION.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 -p1 < $CWD/0001-Disable-debug-mode.patch
patch -p1 < $CWD/glib-single-include.patch
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--sysconfdir=/etc \
--localstatedir=/var \
--mandir=/usr/man \
--docdir=/usr/doc/$PRGNAM-$VERSION \
--enable-static=no \
--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
rm -rf $PKG/usr/doc/$PRGNAM
DOCS="AUTHORS ChangeLog COPYING INSTALL NEWS README"
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a $DOCS $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.${PKGTYPE:-tgz}

View file

@ -0,0 +1,10 @@
PRGNAM="gtkhotkey"
VERSION="0.2.1"
HOMEPAGE="https://launchpad.net/gtkhotkey/"
DOWNLOAD="https://launchpad.net/gtkhotkey/0.2/0.2.1/+download/gtkhotkey-0.2.1.tar.gz"
MD5SUM="bfdc73e68e9adbe0d506d31a25862914"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
MAINTAINER="Edinaldo P. Silva"
EMAIL="edps.mundognu@gmail.com"

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 ':' except on otherwise blank lines.
|-----handy-ruler------------------------------------------------------|
gtkhotkey: gtkhotkey (hotkey handling for Gtk+ applications)
gtkhotkey:
gtkhotkey: gtkhotkey is a platform independent hotkey handling for Gtk+
gtkhotkey: applications.
gtkhotkey:
gtkhotkey: Home page: https://launchpad.net/gtkhotkey/
gtkhotkey:
gtkhotkey:
gtkhotkey:
gtkhotkey:
gtkhotkey: