[38737] trunk/dports/devel

Ryan Schmidt ryandesign at macports.org
Tue Jul 29 18:17:39 PDT 2008


On Jul 29, 2008, at 18:24, landonf at macports.org wrote:

> Revision: 38737
>           http://trac.macosforge.org/projects/macports/changeset/38737
> Author:   landonf at macports.org
> Date:     2008-07-29 16:24:57 -0700 (Tue, 29 Jul 2008)
> Log Message:
> -----------
> Add OCamlnet library
>
> Added Paths:
> -----------
>     trunk/dports/devel/caml-ocamlnet/
>     trunk/dports/devel/caml-ocamlnet/Portfile
>
> Added: trunk/dports/devel/caml-ocamlnet/Portfile
> ===================================================================
> --- trunk/dports/devel/caml-ocamlnet/ 
> Portfile	                        (rev 0)
> +++ trunk/dports/devel/caml-ocamlnet/Portfile	2008-07-29 23:24:57  
> UTC (rev 38737)
> @@ -0,0 +1,50 @@
> +# $Id: $
> +
> +PortSystem          1.0
> +
> +name                caml-ocamlnet
> +version             2.2.9
> +categories          devel ml
> +maintainers         landonf openmaintainer
> +description         Internet protocols and helper data structures  
> for OCaml.
> +long_description    Internet protocols (http, cgi, email etc.) and  
> helper \
> +                    data structures (mail messages, character  
> sets, etc.) \
> +                    Ocamlnet implements a number of Internet  
> protocols (http \
> +                    client & server, cgi and cgi variants, SunRPC,  
> FTP, POP, \
> +                    SMTP) and is a strong base for web and Internet \
> +                    programming.
> +
> +homepage            http://projects.camlcity.org/projects/ 
> ocamlnet.html
> +platforms           darwin
> +master_sites        http://download.camlcity.org/download/
> +
> +distname            ocamlnet-${version}
> +
> +checksums           md5 3655e3be3bb2806e0a1f48bb7ce16fb3 \
> +                    sha1 ca073c60f86fede60d4c479e5589127010482804 \
> +                    rmd160 1299e1316e0547171089b0caaa9deb13c4c67c31
> +
> +
> +depends_lib         port:ocaml \
> +                    port:caml-findlib \
> +                    port:caml-pcre
> +
> +post-patch {
> +    set ocaml_site_path [exec ocamlfind printconf destdir]
> +    reinplace       "s|\$(OCAMLFIND) install|\$(OCAMLFIND) install  
> -destdir ${destroot}/${ocaml_site_path}|g" \
> +                    ${worksrcpath}/Makefile
> +}
> +
> +configure {
> +    system "cd ${worksrcpath} && ./configure"
> +}

Out of curiosity, why not use the default configure phase?


> +build.target        all opt
> +
> +pre-destroot {
> +    set ocaml_site_path [exec ocamlfind printconf destdir]
> +    file mkdir ${destroot}/${ocaml_site_path}
> +}
> +
> +destroot.env        DESTDIR="${destroot}" \
> +                    OCAMLFIND_DESTDIR="${destroot}/[exec ${prefix}/ 
> bin/ocamlfind printconf destdir]"

This last line is probably responsible for:

caml-ocamlnet $ port info
Can't map the URL 'file://.' to a port description file ("couldn't  
execute "/mp/bin/ocamlfind": no such file or directory").
Please verify that the directory and portfile syntax are correct.
To use the current port, you must be in a port's directory.
(you might also see this message if a pseudo-port such as
outdated or installed expands to no ports).

May want to put the setting of destroot.env into the pre-destroot block.




More information about the macports-dev mailing list