Ticket #27374: Portfile

File Portfile, 1.9 KB (added by hashar@…, 14 years ago)
Line 
1# $Id: Portfile 71533 2010-09-15 20:26:12Z ryandesign@macports.org $
2
3PortSystem          1.0
4
5name                caml-ounit
6version             1.1.0
7categories          devel ml
8maintainers         landonf openmaintainer
9description         Unit test framework for OCaml
10long_description    OUnit is a unit test framework for OCaml. \
11                    It allows one to easily create unit-tests for OCaml code. \
12                    It is based on HUnit, a unit testing framework for Haskell. \
13                    It is similar to JUnit, and other XUnit testing frameworks.
14
15homepage            http://ounit.forge.ocamlcore.org/
16platforms           darwin
17master_sites        https://forge.ocamlcore.org/frs/download.php/495/
18
19distname            ounit-${version}
20
21checksums           md5     bf82bd7f8853cd9a1aff7be716192643 \
22                    sha1    e477f8a1b4fcd6a838cbbc04450a80b1cea3456c \
23                    rmd160  f7d82446970f40eccc917a3ee57e7d6526b1b177
24
25depends_lib         port:ocaml \
26                    port:caml-findlib
27
28livecheck.url       http://forge.ocamlcore.org/frs/?group_id=162&release_id=339
29livecheck.type      regex
30livecheck.regex     {>ounit-(.*)\.tar\.gz}
31
32post-patch {
33    set ocaml_site_path [exec ocamlfind printconf destdir]
34    reinplace       "s|\$(OCAMLFIND) install|\$(OCAMLFIND) install -destdir ${destroot}/${ocaml_site_path}|g" \
35                    ${worksrcpath}/Makefile
36    # 'configure' is not executable in 1.1.0 package
37    exec chmod +x ${worksrcpath}/configure
38}
39
40pre-destroot {
41    set ocaml_site_path [exec ocamlfind printconf destdir]
42    file mkdir ${destroot}/${ocaml_site_path}
43}
44
45post-destroot {
46    xinstall -d -755 ${destroot}${prefix}/share/doc/${name}
47    eval xinstall -m 644 [glob ${worksrcpath}/_build/src/api-ounit.docdir/*] \
48        ${destroot}${prefix}/share/doc/${name}
49}
50
51configure.pre_args ''
52build.target build doc