diff options
author | 2009-11-27 03:35:35 -0500 | |
---|---|---|
committer | 2009-11-27 03:35:35 -0500 | |
commit | acb58aeee86c787b0305dadd92ff6aec8284e3db (patch) | |
tree | cde194a06ea1164699ae593171e5fe3836523f09 /x11-misc | |
parent | Fix pidgin-botsentry. (diff) | |
download | eatnumber1-acb58aeee86c787b0305dadd92ff6aec8284e3db.tar.gz eatnumber1-acb58aeee86c787b0305dadd92ff6aec8284e3db.tar.bz2 eatnumber1-acb58aeee86c787b0305dadd92ff6aec8284e3db.zip |
Add keynav.
Diffstat (limited to 'x11-misc')
-rw-r--r-- | x11-misc/keynav/Manifest | 4 | ||||
-rw-r--r-- | x11-misc/keynav/files/keynav-20091108_etc-config.patch | 57 | ||||
-rw-r--r-- | x11-misc/keynav/files/keynav-20091108_fix-makefile.patch | 46 | ||||
-rw-r--r-- | x11-misc/keynav/keynav-20091108.ebuild | 35 |
4 files changed, 142 insertions, 0 deletions
diff --git a/x11-misc/keynav/Manifest b/x11-misc/keynav/Manifest new file mode 100644 index 0000000..36fba62 --- /dev/null +++ b/x11-misc/keynav/Manifest @@ -0,0 +1,4 @@ +AUX keynav-20091108_etc-config.patch 1325 RMD160 c16161b407e8a3111fecbd4fe186cc6bc3e9aad3 SHA1 68914140c6fe00ea5258c8cd09f89a1dfd6cb6c3 SHA256 97f49a518367195d9dada6780e3555af80f3fc5231cdab1e7648375da9dde574 +AUX keynav-20091108_fix-makefile.patch 1780 RMD160 030c44a90d7f394e52bd80920928ab00e1224156 SHA1 66b53648079c11d768e14f0f6752dfbde7e82933 SHA256 281686ee09d5a9a25fc1356ee979b621ef2b4fa1b30e925fb366f00443b64541 +DIST keynav-20091108.tar.gz 34953 RMD160 c72cf86a82ad0a8491ff8018805af81857b8aff1 SHA1 812f74158456ca726f5b67c16e2582a0f30c99fc SHA256 553fb6cefe1011fe250b6c869bff4ccb4019e13f692b2f9d28663fcf38349a5c +EBUILD keynav-20091108.ebuild 724 RMD160 786e3b36251c34e0db819872d705102eb72371a8 SHA1 0ee667ce50233cef5aaf577cc163e30419ed1995 SHA256 c014fd5a85c1fae5a7052e51ab12b06721a5cc24a3230b011e13e2134eab925b diff --git a/x11-misc/keynav/files/keynav-20091108_etc-config.patch b/x11-misc/keynav/files/keynav-20091108_etc-config.patch new file mode 100644 index 0000000..c1a2af8 --- /dev/null +++ b/x11-misc/keynav/files/keynav-20091108_etc-config.patch @@ -0,0 +1,57 @@ +--- a/keynav-20091108/keynav.c 2009-11-08 16:03:15.000000000 -0500 ++++ b/keynav-20091108/keynav.c 2009-11-26 10:31:41.813671575 -0500 +@@ -285,22 +285,11 @@ + } + } + +-void parse_config() { +- char *homedir; +- +- keybindings = malloc(keybindings_size * sizeof(struct keybinding)); +- +- defaults(); +- +- homedir = getenv("HOME"); +- +- if (homedir != NULL) { +- char *rcfile = NULL; ++void parse_config_file(const char* file) { + FILE *fp = NULL; + #define LINEBUF_SIZE 512 + char line[LINEBUF_SIZE]; +- asprintf(&rcfile, "%s/.keynavrc", homedir); +- fp = fopen(rcfile, "r"); ++ fp = fopen(file, "r"); + if (fp != NULL) { + /* fopen succeeded */ + while (fgets(line, LINEBUF_SIZE, fp) != NULL) { +@@ -308,11 +297,27 @@ + *(line + strlen(line) - 1) = '\0'; + parse_config_line(line); + } +- free(rcfile); ++ fclose(fp); + return; + } ++} ++ ++void parse_config() { ++ char *homedir; ++ ++ keybindings = malloc(keybindings_size * sizeof(struct keybinding)); ++ ++ defaults(); ++ ++ parse_config_file("/etc/keynavrc"); ++ homedir = getenv("HOME"); ++ ++ if (homedir != NULL) { ++ char *rcfile = NULL; ++ asprintf(&rcfile, "%s/.keynavrc", homedir); ++ parse_config_file(rcfile); ++ free(rcfile); + } +- fprintf(stderr, "No ~/.keynavrc found.\n"); + } + + void defaults() { diff --git a/x11-misc/keynav/files/keynav-20091108_fix-makefile.patch b/x11-misc/keynav/files/keynav-20091108_fix-makefile.patch new file mode 100644 index 0000000..55e9b38 --- /dev/null +++ b/x11-misc/keynav/files/keynav-20091108_fix-makefile.patch @@ -0,0 +1,46 @@ +--- a/keynav-20091108/Makefile 2009-11-08 16:04:23.000000000 -0500 ++++ b/keynav-20091108/Makefile 2009-11-26 11:44:05.336699998 -0500 +@@ -1,5 +1,5 @@ +-CFLAGS=`pkg-config --cflags xcb-shape xinerama x11 xtst 2> /dev/null || echo -I/usr/X11R6/include -I/usr/local/include` +-LDFLAGS=`pkg-config --libs xcb-shape xinerama x11 xtst 2> /dev/null || echo -L/usr/X11R6/lib -L/usr/local/lib -lX11 -lXtst -lXinerama` ++CFLAGS+= $(shell pkg-config --cflags xcb-shape xinerama x11 xtst 2> /dev/null || echo -I/usr/X11R6/include -I/usr/local/include) ++LDFLAGS+= $(shell pkg-config --libs xcb-shape xinerama x11 xtst 2> /dev/null || echo -L/usr/X11R6/lib -L/usr/local/lib -lX11 -lXtst -lXinerama) + + #CFLAGS+=-g + OTHERFILES=README CHANGELIST COPYRIGHT \ +@@ -7,17 +7,19 @@ + + #MICROVERSION?=00 + ++.PHONY: all ++ + all: keynav + + clean: + rm *.o || true; +- make -C xdotool clean || true ++ $(MAKE) -C xdotool clean || true + + keynav: xdo.o keynav.o +- gcc $(LDFLAGS) xdo.o keynav.o -o $@ ++ $(CC) $(CFLAGS) xdo.o keynav.o -o $@ $(LDFLAGS) + + xdo.o: +- make -C xdotool xdo.o ++ $(MAKE) -C xdotool xdo.o + cp xdotool/xdo.o . + + #NAME=keynav-`date +%Y%m%d`.$(MICROVERSION); +--- a/keynav-20091108/xdotool/Makefile 2009-11-08 16:01:30.000000000 -0500 ++++ b/keynav-20091108/xdotool/Makefile 2009-11-26 11:37:19.769691350 -0500 +@@ -13,8 +13,8 @@ + DEFAULT_LIBS=-L/usr/X11R6/lib -L/usr/local/lib -lX11 -lXtst + DEFAULT_INC=-I/usr/X11R6/include -I/usr/local/include + +-LIBS=`pkg-config --libs x11 xtst 2> /dev/null || echo "$(DEFAULT_LIBS)"` +-INC=`pkg-config --cflags x11 xtst 2> /dev/null || echo "$(DEFAULT_INC)"` ++LIBS=$(shell pkg-config --libs x11 xtst 2> /dev/null || echo "$(DEFAULT_LIBS)") ++INC=$(shell pkg-config --cflags x11 xtst 2> /dev/null || echo "$(DEFAULT_INC)") + + CFLAGS+=$(INC) + LDFLAGS+=$(LIBS) diff --git a/x11-misc/keynav/keynav-20091108.ebuild b/x11-misc/keynav/keynav-20091108.ebuild new file mode 100644 index 0000000..af56b5b --- /dev/null +++ b/x11-misc/keynav/keynav-20091108.ebuild @@ -0,0 +1,35 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI="2" +inherit eutils + +DESCRIPTION="Make pointer-driven interfaces easier and faster for users to operate." +HOMEPAGE="http://www.semicomplete.com/projects/keynav/" +SRC_URI="http://semicomplete.googlecode.com/files/${P}.tar.gz" + +LICENSE="" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +RDEPEND=" + x11-proto/xproto" +DEPEND="${RDEPEND} + x11-libs/libX11 + x11-libs/libXinerama + x11-libs/libXext + x11-libs/libXtst" + +src_prepare() { + epatch "${FILESDIR}/${P}_etc-config.patch" + epatch "${FILESDIR}/${P}_fix-makefile.patch" +} + +src_install() { + dodoc README CHANGELIST + dobin keynav + insinto /etc + doins keynavrc +} |