summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2016-10-28 23:03:04 +0200
committerUlrich Müller <ulm@gentoo.org>2016-10-28 23:03:04 +0200
commita1a5953bc856185f940d2c05c69e20269d8408bd (patch)
tree9bc937cab28c3ff8008ecc41ee8d406312a45c02 /dev-lang/c-intercal/c-intercal-30.0.ebuild
parentdev-lang/c-intercal: Specify license more precisely. (diff)
downloadgentoo-a1a5953bc856185f940d2c05c69e20269d8408bd.tar.gz
gentoo-a1a5953bc856185f940d2c05c69e20269d8408bd.tar.bz2
gentoo-a1a5953bc856185f940d2c05c69e20269d8408bd.zip
dev-lang/c-intercal: Version bump.
Package-Manager: portage-2.3.2
Diffstat (limited to 'dev-lang/c-intercal/c-intercal-30.0.ebuild')
-rw-r--r--dev-lang/c-intercal/c-intercal-30.0.ebuild71
1 files changed, 71 insertions, 0 deletions
diff --git a/dev-lang/c-intercal/c-intercal-30.0.ebuild b/dev-lang/c-intercal/c-intercal-30.0.ebuild
new file mode 100644
index 000000000000..87a8beac9a5d
--- /dev/null
+++ b/dev-lang/c-intercal/c-intercal-30.0.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+inherit 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_PN="${PN#c-}"
+MY_PV="$(get_intercal_version)"
+DESCRIPTION="C-INTERCAL - INTERCAL to binary (via C) compiler"
+HOMEPAGE="http://www.catb.org/~esr/intercal/"
+SRC_URI="http://www.catb.org/~esr/intercal/${MY_PN}-${MY_PV}.tar.gz"
+
+LICENSE="GPL-2+ FDL-1.2+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="emacs examples"
+
+DEPEND="emacs? ( virtual/emacs )"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${MY_PN}-${MY_PV}"
+SITEFILE="50${PN}-gentoo.el"
+
+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
+}