You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
78 lines
1.5 KiB
78 lines
1.5 KiB
4 years ago
|
# Copyright 1999-2020 Gentoo Authors
|
||
10 years ago
|
# Distributed under the terms of the GNU General Public License v2
|
||
|
|
||
4 years ago
|
EAPI=7
|
||
|
inherit elisp-common autotools
|
||
10 years ago
|
|
||
|
DESCRIPTION="Universal typing tutor"
|
||
9 years ago
|
HOMEPAGE="https://www.gnu.org/software/gtypist/"
|
||
10 years ago
|
SRC_URI="mirror://gnu/gtypist/${P}.tar.xz
|
||
|
http://colemak.com/pub/learn/colemak.typ"
|
||
|
|
||
|
LICENSE="GPL-2 public-domain"
|
||
|
SLOT="0"
|
||
10 years ago
|
KEYWORDS="amd64 ppc x86 ~amd64-linux"
|
||
10 years ago
|
IUSE="nls emacs xemacs"
|
||
|
|
||
|
DEPEND="
|
||
7 years ago
|
>=sys-libs/ncurses-5.2:0=
|
||
5 years ago
|
emacs? ( >=app-editors/emacs-23.1:* )
|
||
10 years ago
|
xemacs? ( !emacs? ( app-editors/xemacs app-xemacs/fsf-compat ) )
|
||
|
"
|
||
|
RDEPEND="${DEPEND}"
|
||
|
|
||
|
SITEFILE=50${PN}-gentoo.el
|
||
|
|
||
|
src_unpack() {
|
||
|
unpack ${P}.tar.xz
|
||
|
}
|
||
|
|
||
4 years ago
|
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
|
||
|
)
|
||
|
|
||
10 years ago
|
src_prepare() {
|
||
4 years ago
|
default
|
||
|
eautoreconf
|
||
10 years ago
|
}
|
||
|
|
||
|
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
|
||
|
}
|