From abc75ab7f0ea2e9450c4e11dac37956bac26ecf2 Mon Sep 17 00:00:00 2001 From: Pavel Kiselev Date: Sat, 18 Feb 2017 19:19:56 +0300 Subject: [PATCH] New package: fbxkb-0.6 --- srcpkgs/fbxkb/patches/fbxkb.patch | 41 +++++++++++++++++++++++++++++++ srcpkgs/fbxkb/template | 29 ++++++++++++++++++++++ 2 files changed, 70 insertions(+) create mode 100644 srcpkgs/fbxkb/patches/fbxkb.patch create mode 100644 srcpkgs/fbxkb/template diff --git a/srcpkgs/fbxkb/patches/fbxkb.patch b/srcpkgs/fbxkb/patches/fbxkb.patch new file mode 100644 index 00000000000..1f55744a163 --- /dev/null +++ b/srcpkgs/fbxkb/patches/fbxkb.patch @@ -0,0 +1,41 @@ +Found on Arch User Repository, adapted for -p0 + + +--- fbxkb.c 2006-12-18 23:47:52.000000000 +0200 ++++ fbxkb.c 2012-01-15 22:27:30.571427088 +0200 +@@ -378,10 +378,11 @@ read_kbd_description() + g_assert((no >= 0) && (no < ngroups)); + if (group2info[no].sym != NULL) { + ERR("xkb group #%d is already defined\n", no); ++ } else { ++ group2info[no].sym = g_strdup(tok); ++ group2info[no].flag = sym2flag(tok); ++ group2info[no].name = XGetAtomName(dpy, kbd_desc_ptr->names->groups[no]); + } +- group2info[no].sym = g_strdup(tok); +- group2info[no].flag = sym2flag(tok); +- group2info[no].name = XGetAtomName(dpy, kbd_desc_ptr->names->groups[no]); + } + XFree(sym_name); + } +--- Makefile.common 2004-10-16 01:18:59.000000000 +0300 ++++ Makefile.common 2012-01-15 23:20:02.081020564 +0200 + +@@ -16,7 +16,7 @@ endif + endif + + CC = gcc +-LIBS = $(shell pkg-config --libs gtk+-2.0 gdk-pixbuf-2.0 gdk-pixbuf-xlib-2.0) -L/usr/X11R6/lib -lXmu ++LIBS = $(shell pkg-config --libs gtk+-2.0 gdk-pixbuf-2.0 gdk-pixbuf-xlib-2.0) -lX11 -L/usr/X11R6/lib -lXmu + INCS = $(shell pkg-config --cflags gtk+-2.0 gdk-pixbuf-2.0 gdk-pixbuf-xlib-2.0) + CFLAGS = -O2 # overwriten by command line or env. variable + CFLAGS += -Wall # always nice to have +@@ -24,9 +24,6 @@ ifneq (,$(DEVEL)) + CFLAGS := -g -Wall + endif + +-# -DGTK_DISABLE_DEPRECATED does not work yet +-CFLAGS += -g -DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED +- + %.o: %.c + $(CC) $(CFLAGS) $(INCS) -c $< diff --git a/srcpkgs/fbxkb/template b/srcpkgs/fbxkb/template new file mode 100644 index 00000000000..28b4a3d8abc --- /dev/null +++ b/srcpkgs/fbxkb/template @@ -0,0 +1,29 @@ +# Template for fbxkb + +pkgname="fbxkb" +version="0.6" +revision=1 +build_style=configure +short_desc="Lightweight X keyboard layout indicator, uses GTK+2" +maintainer="Pavel Kiselev " +hostmakedepends="pkg-config" +makedepends="xorg-server-devel gtk+-devel" +license="MIT" +homepage="http://fbxkb.sourceforge.net/" +distfiles="${SOURCEFORGE_SITE}/${pkgname}/${pkgname}-${version}.tgz" +checksum="fcbaf4ed9a70f58ea1316b19da74e2ca8b3fb0e2de5a73c849317589ce840ef2" + +pre_build() { +# Substitute compiler, +# Substitute CFLAGS (original options are subset of void's options), +# Put LDFLAGS at the end of command (enables PIE) + sed -i Makefile* \ + -e "s;^CC.*=.*$;CC = ${CC};" \ + -e "s;^CFLAGS.*=.*$;CFLAGS = ${CFLAGS};" \ + -e "s;^\(.*\).(LDFLAGS)\(.*\)$;\1\2 ${LDFLAGS};" +} + +do_install() { + make PREFIX="${DESTDIR}/usr" install + vlicense COPYING +}