Ticket #16171: Portfile

File Portfile, 1.6 KB (added by toots@…, 16 years ago)
Line 
1# $Id$
2
3PortSystem          1.0
4
5name                camomile
6version             0.7.1
7categories          devel ml
8maintainers         toots@rastageeks.org
9description         OCaml module to convert strings to and from various encodings
10homepage            http://savonet.sf.net/
11platforms           darwin
12master_sites        http://rastageeks.org/~toots/macports \
13                    http://ftp.de.debian.org/debian/pool/main/c/camomile/
14distfiles           camomile_${version}.orig.tar.gz
15
16checksums           md5  10bb9c0ad374f351a75dbc921c12f3d8 \
17                    sha1  c5e922e9f0bdeeb273d05d26ef4fb69d7309aadc \
18                    rmd160  4a1c785413139312ab99584aa025f1e52339ee99
19
20depends_lib         bin:camlc.opt:ocaml \
21  bin:ocamlfind:caml-findlib
22
23configure.cflags    {}
24configure.cxxflags  {}
25configure.cppflags  {}
26configure.ldflags   {}
27configure.cxx       {}     
28configure.objc      {}
29configure.cpp       {}
30configure.cc        {}
31
32build.args          LIBDIRS=${prefix}/lib
33
34proc ocamlfind_destdir {} {
35    # only bother calculating this darn thing once
36    variable ocamlfind_destdir {}
37    variable destroot
38    variable prefix
39    if {![string length $ocamlfind_destdir]} {
40        set ocamlfind_destdir ${destroot}[exec ${prefix}/bin/ocamlfind printconf destdir]
41    }
42    return $ocamlfind_destdir
43}
44
45pre-destroot {
46  system "mkdir -p [ocamlfind_destdir]"
47  reinplace "s#ocamlfind install#ocamlfind install -ldconf ignore -destdir '[ocamlfind_destdir]'#g" ${worksrcpath}/Makefile
48  reinplace "s#\$(DATADIR)#${destroot}\$(DATADIR)#g" ${worksrcpath}/Makefile
49  reinplace "s#\$(BINDIR)#${destroot}\$(BINDIR)#g" ${worksrcpath}/Makefile
50}
51
52
53