source: trunk/dports/devel/ocaml-json-wheel/Portfile

Last change on this file was 137992, checked in by mww@…, 2 years ago

inc. revision to rebuild library dependents of ocaml (ocaml update to version 4.02.2)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.1 KB
Line 
1# $Id: Portfile 137992 2015-06-24 16:17:51Z ryandesign@macports.org $
2
3PortSystem          1.0
4
5name                ocaml-json-wheel
6version             1.0.6
7revision            6
8categories          devel ml
9license             BSD
10maintainers         mww openmaintainer
11description         JSON parsing library for OCaml
12long_description    Implements RFC4627 for parsing the JSON interchange format.\
13                    Uses key/value pairs to represent objects, and lists to \
14                    represent JSON arrays.  Also provides pretty-print support.
15homepage            http://martin.jambon.free.fr/json-wheel.html
16platforms           darwin
17master_sites        http://martin.jambon.free.fr/
18
19distname            json-wheel-${version}
20use_bzip2           yes
21
22checksums           md5 8685ecee7a7416c77c14fbdf05c5a06e \
23                    sha1 dea8a5b3bd580c39f3cfb3139aeca4fef653aa31 \
24                    rmd160 cd31f74e67c4241dbb3e3b792440d02ea45b739b
25
26depends_lib         port:ocaml \
27                    port:ocaml-findlib \
28                    port:ocaml-ocamlnet
29
30use_configure       no
31use_parallel_build  no
32destroot.env-append BINDIR=${destroot}${prefix}/bin
33
34livecheck.type      regex
35livecheck.url       http://martin.jambon.free.fr/json-wheel.html
36livecheck.regex     {>json-wheel-(.*)\.tar\.gz}
37
38post-patch {
39    set ocaml_site_path [exec ocamlfind printconf destdir]
40    reinplace       "s|\$(OCAMLFIND) install|\$(OCAMLFIND) install -destdir ${destroot}/${ocaml_site_path}|g" \
41                    ${worksrcpath}/Makefile
42}
43
44build.target        all opt
45
46pre-destroot {
47    set ocaml_site_path [exec ocamlfind printconf destdir]
48    file mkdir ${destroot}${ocaml_site_path}/stublibs
49    destroot.args DESTDIR="${destroot}" OCAMLFIND_DESTDIR="${destroot}${ocaml_site_path}"
50}
51
52pre-activate {
53    # caml-json-wheel 1.0.6_0 installed an item in ${prefix}/bin; remove it if found
54    set filepath ${prefix}/bin/jsoncat
55    if {[file exists ${filepath}] && [registry_file_registered ${filepath}] == "0"} {
56        if {[catch {delete ${filepath}}]} {
57            ui_warn "Cannot delete ${filepath}; please remove it manually"
58        }
59    }
60}
Note: See TracBrowser for help on using the repository browser.