[gentoo-commits] repo/gentoo:master commit in: app-misc/gtypist/, app-misc/gtypist/files/
commit: ec9b9570ea3559318a321c5b3226c23856424b33 Author: Sam James gentoo org> AuthorDate: Mon May 6 05:48:37 2024 + Commit: Sam James gentoo org> CommitDate: Mon May 6 06:04:59 2024 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ec9b9570 app-misc/gtypist: update EAPI 7 -> 8, fix modern C issues There's some fixes upstream but it's diverged a lot from the last release 10 years ago. Closes: https://bugs.gentoo.org/875770 Signed-off-by: Sam James gentoo.org> app-misc/gtypist/files/gtypist-2.9.5-c99.patch | 31 ++ app-misc/gtypist/gtypist-2.9.5-r2.ebuild | 84 ++ 2 files changed, 115 insertions(+) diff --git a/app-misc/gtypist/files/gtypist-2.9.5-c99.patch b/app-misc/gtypist/files/gtypist-2.9.5-c99.patch new file mode 100644 index ..e191c3dd7bb5 --- /dev/null +++ b/app-misc/gtypist/files/gtypist-2.9.5-c99.patch @@ -0,0 +1,31 @@ +--- a/src/cursmenu.c b/src/cursmenu.c +@@ -35,6 +35,8 @@ + #include + + #include "gettext.h" ++#include "utf8.h" ++ + #define _(String) gettext (String) + + extern int isUTF8Locale; +--- a/src/script.h b/src/script.h +@@ -90,6 +90,7 @@ extern void seek_label( FILE *script, char *label, char *ref_line ); + extern int hash_label( char *label ); + extern void do_exit( FILE *script ); + ++void check_script_file_with_current_encoding( FILE *script ); + + extern void bind_F12 (const char *); // Defined in gtypist.c + +--- a/src/utf8.c b/src/utf8.c +@@ -18,6 +18,7 @@ + */ + + #include "config.h" ++#include "error.h" + #include "utf8.h" + + #ifdef HAVE_PDCURSES diff --git a/app-misc/gtypist/gtypist-2.9.5-r2.ebuild b/app-misc/gtypist/gtypist-2.9.5-r2.ebuild new file mode 100644 index ..450f18d97cde --- /dev/null +++ b/app-misc/gtypist/gtypist-2.9.5-r2.ebuild @@ -0,0 +1,84 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit elisp-common autotools + +DESCRIPTION="Universal typing tutor" +HOMEPAGE="https://www.gnu.org/software/gtypist/"; +SRC_URI=" + mirror://gnu/gtypist/${P}.tar.xz + http://colemak.com/pub/learn/colemak.typ +" + +LICENSE="GPL-2 public-domain" +SLOT="0" +KEYWORDS="~amd64 ~arm64 ~ppc ~riscv ~x86 ~amd64-linux" +IUSE="nls emacs xemacs" + +DEPEND=" + >=sys-libs/ncurses-5.2:0= + emacs? ( >=app-editors/emacs-23.1:* ) + xemacs? ( !emacs? ( app-editors/xemacs app-xemacs/fsf-compat ) ) +" +RDEPEND="${DEPEND}" + +SITEFILE=50${PN}-gentoo.el + +src_unpack() { + unpack ${P}.tar.xz +} + +PATCHES=( + "${FILESDIR}"/${PN}-2.8.3-xemacs-compat.patch + + # solution from https://bugs.gentoo.org/698764#c0 + "${FILESDIR}"/${PN}-2.9.5-link-infow.patch + + # Last release was 10 years ago but many commits in git since, + # looks fixed there but not backportable. + "${FILESDIR}"/${PN}-2.9.5-c99.patch +) + +src_prepare() { + default + eautoreconf +} + +src_configure() { + local lispdir="" + if use emacs; then + lispdir="${SITELISP}/${PN}" + einfo "Configuring to build with GNU Emacs support" + elif use xemacs; then + lispdir="${EPREFIX}/usr/lib/xemacs/site-packages/lisp/${PN}" + einfo "Configuring to build with XEmacs support" + fi + + econf \ + $(use_enable nls) \ + EMACS=$(usev emacs || usev xemacs || echo no) \ + --with-lispdir="${lispdir}" +} + +DOCS=( AUTHORS ChangeLog NEWS README THANKS TODO ) + +src_install() { + default + + insinto /usr/share/gtypist + doins "${DISTDIR}"/colemak.typ + + if use emacs; then + elisp-site-file-install "${FILESDIR}/${SITEFILE}" || die + fi +} + +pkg_postinst() { + use emacs && elisp-site-regen +} + +pkg_postrm() { + use emacs && elisp-site-regen +}
[gentoo-commits] repo/gentoo:master commit in: app-misc/gtypist/, app-misc/gtypist/files/
commit: b7994d5cdc2b80af2eb16799c020be54c26bef90 Author: Arjan Adriaanse adriaan se> AuthorDate: Mon May 4 02:38:13 2020 + Commit: Mike Gilbert gentoo org> CommitDate: Tue May 5 03:06:09 2020 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b7994d5c app-misc/gtypist: fix crash and upgrade EAPI Closes: https://bugs.gentoo.org/698764 Signed-off-by: Arjan Adriaanse adriaan.se> Package-Manager: Portage-2.3.89, Repoman-2.3.20 Signed-off-by: Mike Gilbert gentoo.org> Closes: https://github.com/gentoo/gentoo/pull/15639 app-misc/gtypist/files/gtypist-2.9.5-link-infow.patch | 15 +++ .../{gtypist-2.9.5.ebuild => gtypist-2.9.5-r1.ebuild} | 17 + 2 files changed, 28 insertions(+), 4 deletions(-) diff --git a/app-misc/gtypist/files/gtypist-2.9.5-link-infow.patch b/app-misc/gtypist/files/gtypist-2.9.5-link-infow.patch new file mode 100644 index 000..736a031aa41 --- /dev/null +++ b/app-misc/gtypist/files/gtypist-2.9.5-link-infow.patch @@ -0,0 +1,15 @@ +diff --git a/configure.ac b/configure.ac +index 8742d93..e350926 100644 +--- a/configure.ac b/configure.ac +@@ -56,8 +56,8 @@ else +"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_SEARCH_LIBS(cbreak, tinfow, [], ++ [AC_MSG_ERROR([Can't find cbreak() in -lncursesw or -ltinfow])]) + + + # iconv diff --git a/app-misc/gtypist/gtypist-2.9.5.ebuild b/app-misc/gtypist/gtypist-2.9.5-r1.ebuild similarity index 83% rename from app-misc/gtypist/gtypist-2.9.5.ebuild rename to app-misc/gtypist/gtypist-2.9.5-r1.ebuild index 0ecb2e7fd22..dc5ae156662 100644 --- a/app-misc/gtypist/gtypist-2.9.5.ebuild +++ b/app-misc/gtypist/gtypist-2.9.5-r1.ebuild @@ -1,8 +1,8 @@ -# Copyright 1999-2019 Gentoo Authors +# Copyright 1999-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=5 -inherit eutils elisp-common +EAPI=7 +inherit elisp-common autotools DESCRIPTION="Universal typing tutor" HOMEPAGE="https://www.gnu.org/software/gtypist/"; @@ -27,8 +27,17 @@ src_unpack() { unpack ${P}.tar.xz } +PATCHES=( + "${FILESDIR}"/${PN}-2.8.3-xemacs-compat.patch + + # solution from https://bugs.gentoo.org/698764#c0 + "${FILESDIR}"/${PN}-2.9.5-link-infow.patch +) + src_prepare() { - epatch "${FILESDIR}"/${PN}-2.8.3-xemacs-compat.patch + default + + eaclocal && eautomake } src_configure() {