/
Portfile
60 lines (51 loc) · 2.14 KB
/
Portfile
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
PortSystem 1.0
name tuareg-mode.el
# reverting to version 1.45 because 1.46 was removed from official download website
epoch 1
version 2.0.2
categories lang editors
license GPL-2+
maintainers nomaintainer
description A GNU Emacs/XEmacs major mode for editing Caml and OCaml programs.
long_description\
Tuareg is a Caml mode for GNU Emacs and XEmacs. It handles \
automatic indentation of Objective Caml and Camllight codes. \
Key parts of the code are highlighted using Font-Lock. Support \
to run an interactive Caml toplevel and debugger is provided.
homepage http://tuareg.forge.ocamlcore.org/
platforms any
supported_archs noarch
distname tuareg-${version}
master_sites http://forge.ocamlcore.org/frs/download.php/468/
checksums md5 71f54eb051d9e4ad84e1250c7e5b9534 \
sha1 0361f39c35d759cee66c549f3400390e9019c431 \
rmd160 153a0958bed6e6517db1a30bdd23980f7add37f9
# We want emacs from MacPorts since this will install stuff in emacs'
# site-lisp and we want it to go into ${prefix}'s site-lisp.
depends_lib port:emacs
depends_run port:ocaml
use_configure no
build {
system "cd ${worksrcpath} && \
emacs --batch --eval \
'(progn (setq load-path (cons \".\" load-path)) \
(byte-compile-file \"tuareg.el\") \
(byte-compile-file \"camldebug.el\"))'"
}
destroot {
file mkdir ${destroot}${prefix}/share/emacs/site-lisp
xinstall ${worksrcpath}/tuareg.el ${destroot}${prefix}/share/emacs/site-lisp/
xinstall ${worksrcpath}/tuareg.elc ${destroot}${prefix}/share/emacs/site-lisp/
xinstall ${worksrcpath}/camldebug.el ${destroot}${prefix}/share/emacs/site-lisp/
xinstall ${worksrcpath}/camldebug.elc ${destroot}${prefix}/share/emacs/site-lisp/
xinstall ${worksrcpath}/sym-lock.el ${destroot}${prefix}/share/emacs/site-lisp/
}
post-install {
ui_msg "To use this, put the following into your ~/.emacs:"
ui_msg "(setq auto-mode-alist"
ui_msg " (cons '(\"\\\\.ml\\\\w?\" . tuareg-mode) auto-mode-alist))"
ui_msg "(autoload 'tuareg-mode \"tuareg\" \"Major mode for editing Caml code.\" t)"
ui_msg "(autoload 'camldebug \"cameldeb\" \"Run the Caml debugger.\" t)"
}
livecheck.type regex
livecheck.regex {var last_version = "Tuareg Version (.*)";}