Ticket #16184: Portfile

File Portfile, 1.3 KB (added by toots@…, 16 years ago)
Line 
1# $Id$
2
3PortSystem          1.0
4
5name                ocaml-magic
6version             0.7.3
7categories          devel ml
8maintainers         toots@rastageeks.org
9description         OCaml bindings for the libmagic file MIME detection library
10homepage            http://savonet.sf.net/
11platforms           darwin
12master_sites        sourceforge
13
14checksums           md5  5b8a4d149fe8ce095ab8115f2e49beba \
15                    sha1  1722b189b2d530d313e990a21d94c39749edeb7e \
16                    rmd160  f4ab1763f84ecd95656a85d100fb9d63b53f5868
17
18depends_lib         bin:camlc.opt:ocaml \
19  bin:ocamlfind:caml-findlib \
20  port:file \
21  bin:pkg-config:pkgconfig
22
23configure.pkg_config    ${prefix}/bin/pkg-config
24
25build.args          INCDIRS=${prefix}/include  LIBDIRS=${prefix}/lib
26
27proc ocamlfind_destdir {} {
28    # only bother calculating this darn thing once
29    variable ocamlfind_destdir {}
30    variable destroot
31    variable prefix
32    if {![string length $ocamlfind_destdir]} {
33        set ocamlfind_destdir ${destroot}[exec ${prefix}/bin/ocamlfind printconf destdir]
34    }
35    return $ocamlfind_destdir
36}
37
38pre-destroot {
39  system "mkdir -p [ocamlfind_destdir]"
40  reinplace "s#\$(OCAMLFIND_INSTFLAGS)# -ldconf ignore -destdir '[ocamlfind_destdir]'#g" ${worksrcpath}/OCamlMakefile
41}
42