blob: 26b30fe86c590b5fe483481cbe3bb5f40e65b5f8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
|
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit autotools dot-a elisp-common
# C-INTERCAL uses minor-major ordering of version components and
# negative version numbers. We map any negative version component M
# to _pre<M+10000>, and any subsequent nonnegative component N to _p<N>.
# For example, upstream version 0.33 is mapped to Gentoo version 33.0
# and 0.-2.0.29 is mapped to 29.0_pre9998_p0.
#get_intercal_version() {
# local j offset=0
# for i in $(ver_rs 1- " "); do
# case ${i} in
# p) offset=0 ;;
# pre) offset=-10000 ;;
# *) j="$((i+offset)).${j}"
# esac
# done
# echo ${j%.}
#}
MY_P="${PN#c-}-$(ver_cut 2).$(ver_cut 1)"
DESCRIPTION="C-INTERCAL - INTERCAL to binary (via C) compiler"
HOMEPAGE="http://www.catb.org/~esr/intercal/
https://gitlab.com/esr/intercal"
SRC_URI="http://www.catb.org/~esr/intercal/${MY_P}.tar.gz"
S="${WORKDIR}/${MY_P}"
LICENSE="GPL-2+ FDL-1.2+"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="emacs examples"
RDEPEND="emacs? ( >=app-editors/emacs-23.1:* )"
BDEPEND="${RDEPEND}
app-alternatives/lex
app-alternatives/yacc"
SITEFILE="50${PN}-gentoo.el"
src_prepare() {
default
eautoreconf #948911
}
src_configure() {
lto-guarantee-fat
econf
}
src_compile() {
emake
if use emacs; then
elisp-compile etc/intercal.el
fi
}
src_install() {
emake DESTDIR="${D}" install
strip-lto-bytecode #958377
if use emacs; then
elisp-install ${PN} etc/intercal.{el,elc}
elisp-site-file-install "${FILESDIR}/${SITEFILE}"
fi
dodoc BUGS NEWS HISTORY README doc/THEORY.txt
use examples && dodoc -r pit
}
pkg_postinst() {
use emacs && elisp-site-regen
}
pkg_postrm() {
use emacs && elisp-site-regen
}
|