1

Topic: gtypist

Hello guys big_smile!
I am trying to compile GNU Typist(don't suggest tux typing pls), and I need ncursesw libs for it.
My question is, where can I get it? We don't have it in repos.
thanks in advance smile

2

Re: gtypist

Hello! smile
Should be within ncurses.

Human being in favor with clear principles and so also for freedom in soft- and hardware!

Certainly anyone who has the power to make you believe absurdities has the power to make you commit injustices: For a life of every being full with peace and kindness, including diversity and freedom. Capitalism is destroying our minds, the planet itself and the universe in the end!

3

Re: gtypist

Um... I'm sorry for being lamer, but how to "install them in convenient place"?
Like, when I run ./configure it says "Error:  both library and header files for ncursesw library
is required to build this package.  See INSTALL file for further information.
" in the end

4

Re: gtypist

No problem: When looking at the AUR-package you should need the patchfile. Linking it here: https://aur.archlinux.org/cgit/aur.git/ … ?h=gtypist

Or the snippet here:

diff -wbBur gtypist-2.9.4/configure.ac gtypist-2.9.4.my/configure.ac
--- gtypist-2.9.4/configure.ac    2014-02-02 15:38:40.000000000 +0400
+++ gtypist-2.9.4.my/configure.ac    2014-02-03 13:08:53.085983684 +0400
@@ -44,20 +44,20 @@
 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;
 fi
 AC_SEARCH_LIBS(cbreak, tinfo, [],
-  [AC_MSG_ERROR([Can't find cbreak() in -lncursesw or -ltinfo])])
+  [AC_MSG_ERROR([Can't find cbreak() in -lncurses or -ltinfo])])
 
 
 # iconv
diff -wbBur gtypist-2.9.4/src/cursmenu.c gtypist-2.9.4.my/src/cursmenu.c
--- gtypist-2.9.4/src/cursmenu.c    2013-08-18 18:36:14.000000000 +0400
+++ gtypist-2.9.4.my/src/cursmenu.c    2014-02-03 13:09:04.669316878 +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.4/src/error.c gtypist-2.9.4.my/src/error.c
--- gtypist-2.9.4/src/error.c    2013-08-18 18:36:14.000000000 +0400
+++ gtypist-2.9.4.my/src/error.c    2014-02-03 13:09:04.669316878 +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.4/src/gtypist.c gtypist-2.9.4.my/src/gtypist.c
--- gtypist-2.9.4/src/gtypist.c    2013-08-18 18:36:14.000000000 +0400
+++ gtypist-2.9.4.my/src/gtypist.c    2014-02-03 13:09:04.669316878 +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.4/src/script.c gtypist-2.9.4.my/src/script.c
--- gtypist-2.9.4/src/script.c    2013-08-18 18:36:14.000000000 +0400
+++ gtypist-2.9.4.my/src/script.c    2014-02-03 13:09:04.669316878 +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.4/src/utf8.c gtypist-2.9.4.my/src/utf8.c
--- gtypist-2.9.4/src/utf8.c    2013-08-18 18:36:14.000000000 +0400
+++ gtypist-2.9.4.my/src/utf8.c    2014-02-03 13:09:04.669316878 +0400
@@ -23,7 +23,7 @@
 #ifdef HAVE_PDCURSES
 #include <curses.h>
 #else
-#include <ncursesw/ncurses.h>
+#include <ncurses.h>
 #endif
 
 #include <stdlib.h>
Human being in favor with clear principles and so also for freedom in soft- and hardware!

Certainly anyone who has the power to make you believe absurdities has the power to make you commit injustices: For a life of every being full with peace and kindness, including diversity and freedom. Capitalism is destroying our minds, the planet itself and the universe in the end!

5

Re: gtypist

Okay, have recreated the package following the packaging-guidelines. Here is the PKGBUILD:

# Maintainer (Arch): Stefan Tatschner <stefan@rumpelsepp.org>
# Contributor (Arch): LinRs <20455421+LinRs AT users.noreply.github.com>
# Contributor (Arch): Pierre Neidhardt <ambrevar@gmail.com>
# Contributor (Arch): Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor (Arch): Ben Mazer <blm@groknil.org>
# Contributor (Arch): Mike Douglas <code_monkey@gooeylinux.org>
# Contributor: Tobias Dausend <throgh@hyperbola.info>

pkgname=gtypist
pkgver=2.9.5
_debver=$pkgver
_debrel=3
pkgrel=1
pkgdesc="Free, libre and simple ncurses touch typing tutor"
arch=('i686' 'x86_64')
url='http://www.gnu.org/software/gtypist/gtypist.html'
license=('GPL-3')
depends=('ncurses' 'perl')
makedepends=('quilt')
source=("https://ftp.gnu.org/gnu/gtypist/${pkgname}-$pkgver.tar.gz"
        "https://deb.debian.org/debian/pool/main/g/gtypist/gtypist_${_debver}-${_debrel}.debian.tar.xz"
    "fix-ncurses.patch")
sha512sums=('ea8db72e83a41340a4435e2802134a852fb61eb00f10267733455491fc9ce3356f61887146de21ec589a77ea1169ad5b75a0eba1708566b7327f4801bd6dcb52'
            'ae995eb314deffdac7f175ee7c13001be31a1e2f2eb93ad3368c11212755c8eb87bc5c6e9c6d91a4360370173fe5b814a4147cf5b1a13fd1f98ba41e2f128306'
            '0c2dcebb2a45dc23ec795bf9bbd4841bbaa69662dc6897a6f73989548e4a626e261780a593b5f938df9b3b1451edcf96daac8b693274675ca27e3d18bf18764e')

prepare() {
  cd "$srcdir"/$pkgname-$pkgver

  if [[ ${pkgver%.*} = ${_debver%.*} ]]; then
    # Debian patches
    export QUILT_PATCHES=debian/patches
    export QUILT_REFRESH_ARGS='-p ab --no-timestamps --no-index'
    export QUILT_DIFF_ARGS='--no-timestamps'

    mv "$srcdir"/debian .

    quilt push -av
  fi

  patch -p1 <"$srcdir"/fix-ncurses.patch
  autoreconf
}

build() {
  cd "$srcdir"/$pkgname-$pkgver
  ./configure --prefix=/usr
  make
}

package() {
  cd "$srcdir"/$pkgname-$pkgver
  make prefix="$pkgdir"/usr install
  install -Dm644 COPYING -t "${pkgdir}/usr/share/licenses/$pkgname"
}

And here is the renamed patchfile:

diff -wbBur gtypist-2.9.4/configure.ac gtypist-2.9.4.my/configure.ac
--- gtypist-2.9.4/configure.ac    2014-02-02 15:38:40.000000000 +0400
+++ gtypist-2.9.4.my/configure.ac    2014-02-03 13:08:53.085983684 +0400
@@ -44,20 +44,20 @@
 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;
 fi
 AC_SEARCH_LIBS(cbreak, tinfo, [],
-  [AC_MSG_ERROR([Can't find cbreak() in -lncursesw or -ltinfo])])
+  [AC_MSG_ERROR([Can't find cbreak() in -lncurses or -ltinfo])])
 
 
 # iconv
diff -wbBur gtypist-2.9.4/src/cursmenu.c gtypist-2.9.4.my/src/cursmenu.c
--- gtypist-2.9.4/src/cursmenu.c    2013-08-18 18:36:14.000000000 +0400
+++ gtypist-2.9.4.my/src/cursmenu.c    2014-02-03 13:09:04.669316878 +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.4/src/error.c gtypist-2.9.4.my/src/error.c
--- gtypist-2.9.4/src/error.c    2013-08-18 18:36:14.000000000 +0400
+++ gtypist-2.9.4.my/src/error.c    2014-02-03 13:09:04.669316878 +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.4/src/gtypist.c gtypist-2.9.4.my/src/gtypist.c
--- gtypist-2.9.4/src/gtypist.c    2013-08-18 18:36:14.000000000 +0400
+++ gtypist-2.9.4.my/src/gtypist.c    2014-02-03 13:09:04.669316878 +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.4/src/script.c gtypist-2.9.4.my/src/script.c
--- gtypist-2.9.4/src/script.c    2013-08-18 18:36:14.000000000 +0400
+++ gtypist-2.9.4.my/src/script.c    2014-02-03 13:09:04.669316878 +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.4/src/utf8.c gtypist-2.9.4.my/src/utf8.c
--- gtypist-2.9.4/src/utf8.c    2013-08-18 18:36:14.000000000 +0400
+++ gtypist-2.9.4.my/src/utf8.c    2014-02-03 13:09:04.669316878 +0400
@@ -23,7 +23,7 @@
 #ifdef HAVE_PDCURSES
 #include <curses.h>
 #else
-#include <ncursesw/ncurses.h>
+#include <ncurses.h>
 #endif
 
 #include <stdlib.h>

Will find its way now in the repositories. Hope that helps!

Human being in favor with clear principles and so also for freedom in soft- and hardware!

Certainly anyone who has the power to make you believe absurdities has the power to make you commit injustices: For a life of every being full with peace and kindness, including diversity and freedom. Capitalism is destroying our minds, the planet itself and the universe in the end!

6

Re: gtypist

throgh wrote:

No problem: When looking at the AUR-package you should need the patchfile. Linking it here: https://aur.archlinux.org/cgit/aur.git/ … ?h=gtypist

I am not really getting it... What's the connection of AUR here?
Uh okay, I shoud have clarify that I'm not very good at compiling.
Gonna lurk more.
Thank u again, I think ur advices will help me <3

7

Re: gtypist

No problem at all: To clarify, I was in search why ncurses was not recognized correctly and had a look over towards the AUR just to get a concrete image if there are some corrections needed. And yes, they are: The patch helps here. But nevertheless: You can just use the PKGBUILD and patchfile, put both in one folder (patchfile has to be named with fix-ncurses.patch. Afterwards open your terminal and just go for the command makepkg -s. smile Afterwards you should have even a final package to be ready installed with:

doas pacman -U [PKGNAME]

EDIT: A bit more explanation as the package-name follows the same naming-scheme, always. So the package is called gtypist, the version is 2.9.5, the release-version of the package internal is 1. Depending on your architecture used:

doas pacman -U gtypist-2.9.5-1-i686.pkg.tar.lz (for 32bit)
doas pacman -U gtypist-2.9.5-1-x86_64.pkg.tar.lz (for 64bit)

Human being in favor with clear principles and so also for freedom in soft- and hardware!

Certainly anyone who has the power to make you believe absurdities has the power to make you commit injustices: For a life of every being full with peace and kindness, including diversity and freedom. Capitalism is destroying our minds, the planet itself and the universe in the end!

8

Re: gtypist

Hi

throgh wrote:

fix-ncurses.patch

is that right?
this file fails the validity check. Should I run makepkg with --skipchecksums? Will that be safe?

9

Re: gtypist

Please remember that there could be some empty line missing at the end of the file, so you have for sure a different checksum now when creating a new file with the content. This is not bad at all, but you just need to recreate the hashsum again with:

sha512sum fix-ncurses.patch

Than copy the hashsum and replace it within the PKGBUILD: You can just see as both arrays are on count. To be exact:

sha512sums=('ea8db72e83a41340a4435e2802134a852fb61eb00f10267733455491fc9ce3356f61887146de21ec589a77ea1169ad5b75a0eba1708566b7327f4801bd6dcb52'
            'ae995eb314deffdac7f175ee7c13001be31a1e2f2eb93ad3368c11212755c8eb87bc5c6e9c6d91a4360370173fe5b814a4147cf5b1a13fd1f98ba41e2f128306'
            '') 

The last line within that array: There you insert the new hashsum.

Human being in favor with clear principles and so also for freedom in soft- and hardware!

Certainly anyone who has the power to make you believe absurdities has the power to make you commit injustices: For a life of every being full with peace and kindness, including diversity and freedom. Capitalism is destroying our minds, the planet itself and the universe in the end!

10

Re: gtypist

Houston, we have a problem... again... sad

Now at patch debian/patches/fix_manual_page_issues.patch
patching file configure.ac
patching file src/cursmenu.c
patching file src/error.c
patching file src/gtypist.c
Hunk #1 succeeded at 32 (offset 1 line).
patching file src/script.c
patch: **** malformed patch at line 72:  #include <curses.h>

==> ERROR: A failure occurred in prepare().
    Aborting...

11

Re: gtypist

You know, before this is going endless within copy-paste-problems (also on my side when some text is not correctly taken further): I'll do a commit later with a rechecked (within librechroot) package. So you will be able to compile it without problems. smile

I link you the commit than. I have discovered also a fix to be done for another package: So no further problem at all. big_smile
And NO that is not your fault: Those problems can happen for sure on this level here. Better to take a full commit.

Human being in favor with clear principles and so also for freedom in soft- and hardware!

Certainly anyone who has the power to make you believe absurdities has the power to make you commit injustices: For a life of every being full with peace and kindness, including diversity and freedom. Capitalism is destroying our minds, the planet itself and the universe in the end!

12

Re: gtypist

Oh, ok! Thanks again

13

Re: gtypist

Done, here you are: https://git.hyperbola.info:50100/~team/ … 17b881c08b

Plain files:

https://git.hyperbola.info:50100/~team/ … 17b881c08b
https://git.hyperbola.info:50100/~team/ … 17b881c08b

Human being in favor with clear principles and so also for freedom in soft- and hardware!

Certainly anyone who has the power to make you believe absurdities has the power to make you commit injustices: For a life of every being full with peace and kindness, including diversity and freedom. Capitalism is destroying our minds, the planet itself and the universe in the end!