summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Wright <gienah@gentoo.org>2012-12-09 23:02:17 +0000
committerMark Wright <gienah@gentoo.org>2012-12-09 23:02:17 +0000
commite85b186e811d068462df5cc2ec128bea5a5d7f86 (patch)
treef7dff675f5736eaf88ed5f116f43743128572db6 /sci-mathematics
parentStable for ppc64, wrt bug #435076 (diff)
downloadgentoo-2-e85b186e811d068462df5cc2ec128bea5a5d7f86.tar.gz
gentoo-2-e85b186e811d068462df5cc2ec128bea5a5d7f86.tar.bz2
gentoo-2-e85b186e811d068462df5cc2ec128bea5a5d7f86.zip
Add twelf, ebuild by me
(Portage version: 2.1.11.34/cvs/Linux x86_64, signed Manifest commit with key 618E971F)
Diffstat (limited to 'sci-mathematics')
-rw-r--r--sci-mathematics/twelf/ChangeLog13
-rw-r--r--sci-mathematics/twelf/files/50twelf-gentoo.el4
-rw-r--r--sci-mathematics/twelf/files/twelf-1.7.1-Makefile.patch43
-rw-r--r--sci-mathematics/twelf/files/twelf-1.7.1-doc-guide-Makefile.patch13
-rw-r--r--sci-mathematics/twelf/files/twelf-1.7.1-doc-guide-twelf-dot-texi.patch14
-rw-r--r--sci-mathematics/twelf/files/twelf-1.7.1-emacs-twelf-init.patch22
-rw-r--r--sci-mathematics/twelf/files/twelf-1.7.1-emacs-twelf.patch11
-rw-r--r--sci-mathematics/twelf/metadata.xml12
-rw-r--r--sci-mathematics/twelf/twelf-1.7.1.ebuild108
9 files changed, 240 insertions, 0 deletions
diff --git a/sci-mathematics/twelf/ChangeLog b/sci-mathematics/twelf/ChangeLog
new file mode 100644
index 000000000000..ee24dd0ce143
--- /dev/null
+++ b/sci-mathematics/twelf/ChangeLog
@@ -0,0 +1,13 @@
+# ChangeLog for sci-mathematics/twelf
+# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/twelf/ChangeLog,v 1.1 2012/12/09 23:02:17 gienah Exp $
+
+*twelf-1.7.1 (09 Dec 2012)
+
+ 09 Dec 2012; Mark Wright <gienah@gentoo.org> +files/50twelf-gentoo.el,
+ +files/twelf-1.7.1-Makefile.patch,
+ +files/twelf-1.7.1-doc-guide-Makefile.patch,
+ +files/twelf-1.7.1-doc-guide-twelf-dot-texi.patch,
+ +files/twelf-1.7.1-emacs-twelf-init.patch,
+ +files/twelf-1.7.1-emacs-twelf.patch, +metadata.xml, +twelf-1.7.1.ebuild:
+ Add twelf, ebuild by me
diff --git a/sci-mathematics/twelf/files/50twelf-gentoo.el b/sci-mathematics/twelf/files/50twelf-gentoo.el
new file mode 100644
index 000000000000..5bda54b2f19a
--- /dev/null
+++ b/sci-mathematics/twelf/files/50twelf-gentoo.el
@@ -0,0 +1,4 @@
+;;; twelf site-lisp configuration
+
+(setq twelf-root "@SITELISP@")
+(add-to-list 'load-path "@SITELISP@")
diff --git a/sci-mathematics/twelf/files/twelf-1.7.1-Makefile.patch b/sci-mathematics/twelf/files/twelf-1.7.1-Makefile.patch
new file mode 100644
index 000000000000..84631f357d9d
--- /dev/null
+++ b/sci-mathematics/twelf/files/twelf-1.7.1-Makefile.patch
@@ -0,0 +1,43 @@
+--- twelf-orig/Makefile 2011-03-03 09:41:47.000000000 +1100
++++ twelf/Makefile 2012-12-10 00:19:52.255787064 +1100
+@@ -17,6 +17,18 @@
+ twelfdir = `pwd`
+ twelfserver = twelf-server
+
++ifdef CFLAGS
++ccopts=$(foreach cf,$(CFLAGS),-cc-opt $(cf))
++else
++ccopts=
++endif
++
++ifdef LDFLAGS
++linkopts=$(foreach lf,$(LDFLAGS),-link-opt $(lf))
++else
++linkopts=
++endif
++
+ # ---------------------------------------------------------------
+ # You should not need to edit beyond this point
+ # ---------------------------------------------------------------
+@@ -53,12 +65,12 @@
+ echo; echo "Error: MLton >= 20041109 required"; echo; \
+ exit 1; \
+ fi; \
+- $(mlton) -output bin/$(twelfserver) build/$${cmfileid}
++ $(mlton) $(ccopts) $(linkopts) -as-opt -Wa,--noexecstack -output bin/$(twelfserver) build/$${cmfileid}
+
+ .PHONY: twelf-server-smlnj
+ twelf-server-smlnj:
+ $(smlnj) < build/twelf-server-smlnj.sml ;
+- bin/.mkexec "$(smlnj)" "$(twelfdir)" twelf-server "$(twelfserver)" ;
++ bin/.mkexec "$(smlnj)" "$(twelfdir)" twelf-server "$(twelfserver)" "$(twelfexecdir)" ;
+
+ .PHONY: twelf-emacs
+ twelf-emacs: ;
+@@ -87,4 +99,4 @@
+ $(mlton) -output bin/twelf-regression TEST/mlton-regression.cm
+
+ check : twelf-regression
+- $(make) -C TEST check
+\ No newline at end of file
++ $(make) -C TEST check
diff --git a/sci-mathematics/twelf/files/twelf-1.7.1-doc-guide-Makefile.patch b/sci-mathematics/twelf/files/twelf-1.7.1-doc-guide-Makefile.patch
new file mode 100644
index 000000000000..092b12b20dc0
--- /dev/null
+++ b/sci-mathematics/twelf/files/twelf-1.7.1-doc-guide-Makefile.patch
@@ -0,0 +1,13 @@
+--- twelf-orig/doc/guide/Makefile 2002-09-24 13:59:23.000000000 +1000
++++ twelf/doc/guide/Makefile 2012-12-10 00:51:02.758835185 +1100
+@@ -38,8 +38,8 @@
+
+ twelf_toc.html : twelf.texi;
+ @echo "---------- Creating HTML: twelf_*.html"
+- $(texi2html) -menu -number -split_chapter twelf.texi;
+- $(texi2html) -check *.html;
++ $(texi2html) -menu -number-sections -split_chapter twelf.texi;
++# $(texi2html) -check *.html;
+
+ twelf.pdf : twelf.texi;
+ @echo "---------- Creating unindexed PDF: twelf.pdf"
diff --git a/sci-mathematics/twelf/files/twelf-1.7.1-doc-guide-twelf-dot-texi.patch b/sci-mathematics/twelf/files/twelf-1.7.1-doc-guide-twelf-dot-texi.patch
new file mode 100644
index 000000000000..877ecd60b710
--- /dev/null
+++ b/sci-mathematics/twelf/files/twelf-1.7.1-doc-guide-twelf-dot-texi.patch
@@ -0,0 +1,14 @@
+--- twelf-orig/doc/guide/twelf.texi 2004-04-01 04:26:38.000000000 +1000
++++ twelf/doc/guide/twelf.texi 2012-12-08 21:14:17.026139996 +1100
+@@ -12,6 +12,11 @@
+ @syncodeindex fn cp
+ @c %**end of header
+
++@dircategory Programming
++@direntry
++* Twelf User Guide: (twelf). The Twelf User's Guide.
++@end direntry
++
+ @titlepage
+ @title Twelf User's Guide
+ @subtitle Version @value{VERSION}
diff --git a/sci-mathematics/twelf/files/twelf-1.7.1-emacs-twelf-init.patch b/sci-mathematics/twelf/files/twelf-1.7.1-emacs-twelf-init.patch
new file mode 100644
index 000000000000..983c3c2290ed
--- /dev/null
+++ b/sci-mathematics/twelf/files/twelf-1.7.1-emacs-twelf-init.patch
@@ -0,0 +1,22 @@
+--- twelf-orig/emacs/twelf-init.el 2002-12-28 16:15:42.000000000 +1100
++++ twelf/emacs/twelf-init.el 2012-12-10 00:45:49.363104690 +1100
+@@ -20,16 +20,13 @@
+ auto-mode-alist)))))
+
+ ;; Default Twelf server program location
+-(setq twelf-server-program
+- (concat twelf-root "bin/twelf-server"))
++(setq twelf-server-program "/usr/bin/twelf-server")
+
+ ;; Default Twelf SML program location
+-(setq twelf-sml-program
+- (concat twelf-root "bin/twelf-sml"))
++(setq twelf-sml-program "/usr/bin/twelf-sml")
+
+ ;; Default documentation location (in info format)
+-(setq twelf-info-file
+- (concat twelf-root "doc/info/twelf.info"))
++(setq twelf-info-file "/usr/share/info/twelf.info")
+
+ ;; Automatically highlight Twelf sources using font-lock
+ (add-hook 'twelf-mode-hook 'twelf-font-fontify-buffer)
diff --git a/sci-mathematics/twelf/files/twelf-1.7.1-emacs-twelf.patch b/sci-mathematics/twelf/files/twelf-1.7.1-emacs-twelf.patch
new file mode 100644
index 000000000000..c6c3a9b1fae1
--- /dev/null
+++ b/sci-mathematics/twelf/files/twelf-1.7.1-emacs-twelf.patch
@@ -0,0 +1,11 @@
+--- twelf-orig/emacs/twelf.el 2008-07-13 06:06:03.000000000 +1000
++++ twelf/emacs/twelf.el 2012-12-10 00:39:05.332036491 +1100
+@@ -1815,7 +1815,7 @@
+ (twelf-server-process (twelf-server-process twelf-server-buffer))
+ (proc-mark (process-mark twelf-server-process))
+ (_ (display-buffer twelf-server-buffer))
+- (twelf-server-window (get-buffer-window twelf-server-buffer)))
++ (twelf-server-window (get-buffer-window twelf-server-buffer t)))
+ (if (not (pos-visible-in-window-p proc-mark twelf-server-window))
+ (progn
+ (push-mark proc-mark)
diff --git a/sci-mathematics/twelf/metadata.xml b/sci-mathematics/twelf/metadata.xml
new file mode 100644
index 000000000000..2313d6531936
--- /dev/null
+++ b/sci-mathematics/twelf/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+ <email>gienah@gentoo.org></email>
+</maintainer>
+<longdescription lang='en'>
+Twelf is an implementation of the logical framework LF. It is used for
+logic programming and for the formalization of programming language
+theory.
+</longdescription>
+</pkgmetadata>
diff --git a/sci-mathematics/twelf/twelf-1.7.1.ebuild b/sci-mathematics/twelf/twelf-1.7.1.ebuild
new file mode 100644
index 000000000000..368adb6d32ab
--- /dev/null
+++ b/sci-mathematics/twelf/twelf-1.7.1.ebuild
@@ -0,0 +1,108 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/twelf/twelf-1.7.1.ebuild,v 1.1 2012/12/09 23:02:17 gienah Exp $
+
+EAPI="5"
+
+inherit base elisp-common multilib
+
+MY_PN="${PN}-src"
+MY_P="${MY_PN}-${PV}"
+
+DESCRIPTION="Twelf is an implementation of the logical framework LF."
+HOMEPAGE="http://twelf.org/"
+SRC_URI="http://twelf.plparty.org/releases/${MY_P}.tar.gz"
+
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+LICENSE="BSD-2"
+IUSE="doc emacs examples"
+# tests reference non-existing directory TEST
+RESTRICT="test"
+
+RDEPEND="dev-lang/mlton
+ doc? (
+ virtual/latex-base
+ )
+ emacs? (
+ virtual/emacs
+ )"
+DEPEND="${RDEPEND}
+ dev-util/omake"
+
+S=${WORKDIR}/${PN}
+
+SITEFILE=50${PN}-gentoo.el
+
+PATCHES=("${FILESDIR}/${PN}-1.7.1-doc-guide-twelf-dot-texi.patch"
+ "${FILESDIR}/${PN}-1.7.1-doc-guide-Makefile.patch"
+ "${FILESDIR}/${PN}-1.7.1-emacs-twelf.patch"
+ "${FILESDIR}/${PN}-1.7.1-emacs-twelf-init.patch"
+ "${FILESDIR}/${PN}-1.7.1-Makefile.patch")
+
+src_prepare() {
+ base_src_prepare
+ sed -e "s@/usr/bin@${ROOT}usr/bin@g" \
+ -e "s@/usr/share@${ROOT}usr/share@" \
+ -i "${S}"/emacs/twelf-init.el \
+ || die "Could not set ROOT in ${S}/emacs/twelf-init.el"
+}
+
+src_compile() {
+ emake mlton CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}"
+ if use emacs ; then
+ pushd "${S}/emacs" || die "Could change directory to emacs"
+ elisp-compile \
+ auc-menu.el \
+ twelf-font.el \
+ twelf-init.el \
+ twelf.el \
+ || die "emacs elisp compile failed"
+ popd
+ fi
+ if use doc; then
+ pushd doc/guide
+ emake all
+ popd
+ fi
+}
+
+ins_example_dir() {
+ dodir "/usr/share/${PN}/examples/${1}"
+ insinto "/usr/share/${PN}/examples/${1}"
+ pushd "${S}/${1}"
+ doins -r *
+ popd
+}
+
+src_install() {
+ if use emacs ; then
+ elisp-install ${PN} emacs/*.{el,elc}
+ cp "${FILESDIR}"/${SITEFILE} "${S}"
+ elisp-site-file-install ${SITEFILE}
+ fi
+ if use examples; then
+ ins_example_dir examples
+ ins_example_dir examples-clp
+ ins_example_dir examples-delphin
+ fi
+ exeinto /usr/bin
+ doexe bin/twelf-server
+ dohtml doc/html/index.html
+ doinfo doc/guide/twelf.info
+ dodoc doc/guide/twelf.dvi doc/guide/twelf.ps doc/guide/twelf.pdf
+ dohtml doc/guide/twelf/*
+}
+
+pkg_postinst() {
+ if use emacs; then
+ elisp-site-regen
+ ewarn "For twelf emacs, add this line to ~/.emacs"
+ ewarn ""
+ ewarn '(load (concat twelf-root "/twelf-init.el"))'
+ fi
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}