summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2019-08-16 11:50:35 +0200
committerUlrich Müller <ulm@gentoo.org>2019-08-16 11:51:10 +0200
commite67879f27d1923d82394822b26149d142d0248f0 (patch)
tree1c67a263d1fd5d1eeda739155c1cd045b4e0db66 /dev-lang/c-intercal/c-intercal-31.0.ebuild
parentmedia-video/plasma-mediacenter: EAPI-7 bump (diff)
downloadgentoo-e67879f27d1923d82394822b26149d142d0248f0.tar.gz
gentoo-e67879f27d1923d82394822b26149d142d0248f0.tar.bz2
gentoo-e67879f27d1923d82394822b26149d142d0248f0.zip
dev-lang/c-intercal: Bump to version 0.31.
Package-Manager: Portage-2.3.71, Repoman-2.3.17 Signed-off-by: Ulrich Müller <ulm@gentoo.org>
Diffstat (limited to 'dev-lang/c-intercal/c-intercal-31.0.ebuild')
-rw-r--r--dev-lang/c-intercal/c-intercal-31.0.ebuild78
1 files changed, 78 insertions, 0 deletions
diff --git a/dev-lang/c-intercal/c-intercal-31.0.ebuild b/dev-lang/c-intercal/c-intercal-31.0.ebuild
new file mode 100644
index 000000000000..53c680992b5b
--- /dev/null
+++ b/dev-lang/c-intercal/c-intercal-31.0.ebuild
@@ -0,0 +1,78 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools elisp-common
+
+# C-INTERCAL uses minor-major ordering of version components and
+# negative version numbers. We map version components -1, -2, ...
+# to 65535, 65534, ..., and subtract one from the next component.
+# For example, upstream version 0.28 is mapped to Gentoo version 28.0
+# and 0.-2.0.29 is mapped to 28.65535.65534.0.
+#get_intercal_version() {
+# local i=.${1:-${PV}} j k c=0
+# while [[ ${i} ]]; do
+# (( k = ${i##*.} + c ))
+# (( (c = (k >= 32768)) && (k -= 65536) ))
+# i=${i%.*}
+# j=${j}.${k}
+# 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"
+
+LICENSE="GPL-2+ FDL-1.2+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="emacs examples"
+
+RDEPEND="emacs? ( virtual/emacs )"
+BDEPEND="${RDEPEND}
+ sys-devel/flex
+ virtual/yacc"
+
+S="${WORKDIR}/${MY_P}"
+SITEFILE="50${PN}-gentoo.el"
+
+src_prepare() {
+ eapply "${FILESDIR}"/${P}-version.patch
+ eapply_user
+ eautoreconf
+}
+
+src_compile() {
+ emake
+
+ if use emacs; then
+ elisp-compile etc/intercal.el
+ fi
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ dodoc BUGS NEWS HISTORY README doc/THEORY.txt
+
+ if use emacs; then
+ elisp-install ${PN} etc/intercal.{el,elc}
+ elisp-site-file-install "${FILESDIR}/${SITEFILE}"
+ fi
+
+ if use examples; then
+ insinto /usr/share/doc/${PF}
+ doins -r pit
+ fi
+}
+
+pkg_postinst() {
+ use emacs && elisp-site-regen
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}