summaryrefslogtreecommitdiff
path: root/community/gtypist
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2013-08-13 01:33:19 -0700
committerroot <root@rshg054.dnsready.net>2013-08-13 01:33:19 -0700
commit7a65a910b77ad191d69881098c47f9b0c852d92e (patch)
tree9564e611af1442f8952a8cbddb3b0ad25ed71aab /community/gtypist
parent60da6abff6c9577a783d72865f11de7a585e912e (diff)
Tue Aug 13 01:31:08 PDT 2013
Diffstat (limited to 'community/gtypist')
-rw-r--r--community/gtypist/PKGBUILD33
-rw-r--r--community/gtypist/gtypist.install18
-rw-r--r--community/gtypist/ncurses.patch83
3 files changed, 134 insertions, 0 deletions
diff --git a/community/gtypist/PKGBUILD b/community/gtypist/PKGBUILD
new file mode 100644
index 000000000..34bd4c7b5
--- /dev/null
+++ b/community/gtypist/PKGBUILD
@@ -0,0 +1,33 @@
+# $Id: PKGBUILD 92635 2013-06-10 09:42:13Z spupykin $
+# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
+# Maintainer: Ben Mazer <blm@groknil.org>
+# Contributor: Mike Douglas <code_monkey@gooeylinux.org>
+
+pkgname=gtypist
+pkgver=2.9.3
+pkgrel=1
+pkgdesc="universal typing tutor"
+arch=('i686' 'x86_64')
+url="http://www.gnu.org/software/gtypist/gtypist.html"
+license=("GPL")
+depends=('ncurses' 'perl')
+makedepends=('emacs')
+install=gtypist.install
+source=(ftp://ftp.gnu.org/gnu/gtypist/$pkgname-$pkgver.tar.gz
+ ncurses.patch)
+md5sums=('e26c29be0adf345604a802be81712bee'
+ 'e37a2e8fe90c6c0c684c1a12d016ee03')
+
+build() {
+ cd $srcdir/$pkgname-$pkgver
+ patch -p1 <$srcdir/ncurses.patch
+ autoreconf
+ ./configure --prefix=/usr
+ make
+}
+
+package() {
+ cd $srcdir/$pkgname-$pkgver
+ make prefix=$pkgdir/usr install
+ rm -f $pkgdir/usr/share/info/dir
+}
diff --git a/community/gtypist/gtypist.install b/community/gtypist/gtypist.install
new file mode 100644
index 000000000..7fd230fc4
--- /dev/null
+++ b/community/gtypist/gtypist.install
@@ -0,0 +1,18 @@
+infodir=/usr/share/info
+filelist=(gtypist.info)
+
+post_install() {
+ for file in ${filelist[@]}; do
+ install-info $infodir/$file $infodir/dir 2> /dev/null
+ done
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+pre_remove() {
+ for file in ${filelist[@]}; do
+ install-info --delete $infodir/$file $infodir/dir 2> /dev/null
+ done
+}
diff --git a/community/gtypist/ncurses.patch b/community/gtypist/ncurses.patch
new file mode 100644
index 000000000..9fa484ffd
--- /dev/null
+++ b/community/gtypist/ncurses.patch
@@ -0,0 +1,83 @@
+diff -wbBur gtypist-2.9.3/configure.ac gtypist-2.9.3.q/configure.ac
+--- gtypist-2.9.3/configure.ac 2013-06-05 22:50:00.000000000 +0400
++++ gtypist-2.9.3.q/configure.ac 2013-06-10 13:32:54.284038071 +0400
+@@ -44,14 +44,14 @@
+ AC_FUNC_STRTOD
+ AC_CHECK_FUNCS([__argz_count __argz_next __argz_stringify dcgettext getcwd getwd mempcpy memset munmap nl_langinfo setlocale stpcpy strcasecmp strchr strcspn strdup strstr strtoul])
+
+-# check for libncursesw
++# check for libncurses
+
+-AC_CHECK_HEADER(ncursesw/ncurses.h, HAVE_NCURSESW_H=1)
+-AC_CHECK_LIB(ncursesw, add_wch, HAVE_LIBNCURSESW=1)
++AC_CHECK_HEADER(ncurses.h, HAVE_NCURSESW_H=1)
++AC_CHECK_LIB(ncurses, add_wch, HAVE_LIBNCURSESW=1)
+ if test -n "$HAVE_NCURSESW_H" -a -n "$HAVE_LIBNCURSESW"; then
+- LIBS="-lncursesw $LIBS"
++ LIBS="-lncurses $LIBS"
+ else
+- echo -e "Error: both library and header files for the ncursesw library\n"\
++ echo -e "Error: both library and header files for the ncurses library\n"\
+ "are required to build this package. See INSTALL file for"\
+ "further information. On Debian/Ubuntu you need to install libncursesw5-dev."
+ exit 1;
+diff -wbBur gtypist-2.9.3/src/cursmenu.c gtypist-2.9.3.q/src/cursmenu.c
+--- gtypist-2.9.3/src/cursmenu.c 2013-06-05 22:50:00.000000000 +0400
++++ gtypist-2.9.3.q/src/cursmenu.c 2013-06-10 13:33:16.610704480 +0400
+@@ -24,7 +24,7 @@
+ #ifdef HAVE_PDCURSES
+ #include <curses.h>
+ #else
+-#include <ncursesw/ncurses.h>
++#include <ncurses.h>
+ #endif
+
+ #include "error.h"
+diff -wbBur gtypist-2.9.3/src/error.c gtypist-2.9.3.q/src/error.c
+--- gtypist-2.9.3/src/error.c 2013-06-05 22:50:00.000000000 +0400
++++ gtypist-2.9.3.q/src/error.c 2013-06-10 13:33:26.124037704 +0400
+@@ -25,7 +25,7 @@
+ #ifdef HAVE_PDCURSES
+ #include <curses.h>
+ #else
+-#include <ncursesw/ncurses.h>
++#include <ncurses.h>
+ #endif
+
+ #include <stdlib.h>
+diff -wbBur gtypist-2.9.3/src/gtypist.c gtypist-2.9.3.q/src/gtypist.c
+--- gtypist-2.9.3/src/gtypist.c 2013-06-05 22:50:00.000000000 +0400
++++ gtypist-2.9.3.q/src/gtypist.c 2013-06-10 13:33:18.844037788 +0400
+@@ -31,7 +31,7 @@
+ #ifdef HAVE_PDCURSES
+ #include <curses.h>
+ #else
+-#include <ncursesw/ncurses.h>
++#include <ncurses.h>
+ #endif
+
+ #include <time.h>
+diff -wbBur gtypist-2.9.3/src/script.c gtypist-2.9.3.q/src/script.c
+--- gtypist-2.9.3/src/script.c 2013-06-05 22:50:00.000000000 +0400
++++ gtypist-2.9.3.q/src/script.c 2013-06-10 13:33:21.067371095 +0400
+@@ -24,7 +24,7 @@
+ #ifdef HAVE_PDCURSES
+ #include <curses.h>
+ #else
+-#include <ncursesw/ncurses.h>
++#include <ncurses.h>
+ #endif
+
+ #include "error.h"
+diff -wbBur gtypist-2.9.3/src/utf8.c gtypist-2.9.3.q/src/utf8.c
+--- gtypist-2.9.3/src/utf8.c 2013-06-05 22:50:00.000000000 +0400
++++ gtypist-2.9.3.q/src/utf8.c 2013-06-10 13:33:23.604037733 +0400
+@@ -23,7 +23,7 @@
+ #ifdef HAVE_PDCURSES
+ #include <curses.h>
+ #else
+-#include <ncursesw/ncurses.h>
++#include <ncurses.h>
+ #endif
+
+ #include <stdlib.h>