Ticket #16182: Portfile

File Portfile, 1.6 KB (added by toots@…, 16 years ago)
Line 
1# $Id$
2
3PortSystem          1.0
4
5name                ocaml-lastfm
6version             0.1.2
7categories          devel ml
8maintainers         toots@rastageeks.org
9description         OCaml API to lastfm radios and submission protocol
10homepage            http://savonet.sf.net/
11platforms           darwin
12master_sites        sourceforge:savonet
13
14checksums           md5  2aa9223dcff9d227dc72db9f7d3f61c8 \
15                    sha1  a45458594c52b06228cb734cd38b3649f8176d7c \
16                    rmd160  a8a8d1af822fa50c161f763c2c06f4e08e25b8d1
17
18depends_lib         bin:camlc.opt:ocaml \
19  bin:ocamlfind:caml-findlib \
20  port:ocaml-xmlplaylist \
21  port:ocamlnet
22
23proc ocamlfind_xml_light {} {
24    # only bother calculating this darn thing once
25    variable ocamlfind_xml_light {}
26    variable destroot
27    variable prefix
28    if {![string length $ocamlfind_xml_light]} {
29        set ocamlfind_xml_light [exec ${prefix}/bin/ocamlfind query xml-light]
30    }
31    return $ocamlfind_xml_light
32}
33
34pre-configure {
35        reinplace "s|@@INC@@|[ocamlfind_xml_light] @@INC@@|" ${worksrcpath}/src/Makefile.in
36}
37
38proc ocamlfind_destdir {} {
39    # only bother calculating this darn thing once
40    variable ocamlfind_destdir {}
41    variable destroot
42    variable prefix
43    if {![string length $ocamlfind_destdir]} {
44        set ocamlfind_destdir ${destroot}[exec ${prefix}/bin/ocamlfind printconf destdir]
45    }
46    return $ocamlfind_destdir
47}
48
49pre-destroot {
50  system "mkdir -p [ocamlfind_destdir]"
51  reinplace "s#\$(OCAMLFIND_INSTFLAGS)# -ldconf ignore -destdir '[ocamlfind_destdir]'#g" ${worksrcpath}/src/OCamlMakefile
52}
53