[58213] trunk/dports/devel

Ryan Schmidt ryandesign at macports.org
Thu Sep 24 10:30:24 PDT 2009


On Sep 24, 2009, at 02:12, afb at macports.org wrote:

> Revision: 58213
>          http://trac.macports.org/changeset/58213
> Author:   afb at macports.org
> Date:     2009-09-24 00:11:55 -0700 (Thu, 24 Sep 2009)
> Log Message:
> -----------
> new port: xapian-bindings (#17233)
> - updated to match xapian-core
> - fixed language bindings (-tcl)
>
> Added Paths:
> -----------
>    trunk/dports/devel/xapian-bindings/
>    trunk/dports/devel/xapian-bindings/Portfile
>
> Added: trunk/dports/devel/xapian-bindings/Portfile
> ===================================================================
> --- trunk/dports/devel/xapian-bindings/ 
> Portfile	                        (rev 0)
> +++ trunk/dports/devel/xapian-bindings/Portfile	2009-09-24 07:11:55  
> UTC (rev 58213)
> @@ -0,0 +1,45 @@
> +# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode:  
> nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
> +# $Id$
> +PortSystem 1.0
> +name                xapian-bindings
> +version             1.0.15
> +categories          devel
> +maintainers         m at loonsoft.com
> +description         Xapian bindings
> +long_description    Xapian is a highly adaptable toolkit which  
> allows developers to easily add advanced indexing and search  
> facilities to their own applications. It supports the Probabilistic  
> Information Retrieval model and also supports a rich set of boolean  
> query operators.
> +
> +homepage            http://people.xapian.org
> +platforms           darwin
> +master_sites        http://oligarchy.co.uk/xapian/${version}
> +
> +checksums           md5 d365969f5ba7fa99d369ef479862c4fe \
> +                    sha1 34ed2c71df43df39c3a8c56beb1c6bdd2cf39a17 \
> +                    rmd160 6e8214e2a629662c3dcfc3b469c5159c90ecfddc
> +depends_lib         port:xapian-core
> +
> +configure.args-append  --without-python --without-csharp --without- 
> java --without-tcl --without-php --without-ruby
> +variant     ruby description {builds ruby bindings} {
> +                    configure.args-delete  --without-ruby
> +                    configure.args-append  --with-ruby
> +                    depends_lib-append port:ruby
> +                }
> +variant     php description {builds php bindings} {
> +                    configure.args-delete  --without-php
> +                    configure.args-append  --with-php
> +                    depends_lib-append port:php5
> +                }
> +variant     python description {builds python bindings} {
> +                    configure.args-delete  --without-python
> +                    configure.args-append  --with-python
> +                    configure.env-append PYTHON=${prefix}/bin/ 
> python2.5
> +                    depends_lib-append port:python25
> +                }
> +variant     java description {builds java bindings} {
> +                    configure.args-delete  --without-java
> +                    configure.args-append  --with-java
> +                }
> +default_variants +ruby
> +
> +post-destroot {
> +    delete "${destroot}${prefix}/share/doc/xapian-bindings/ruby/ 
> rdocs"
> +}

If I try to install the port without the ruby variant it fails:

$ sudo port install xapian-bindings -ruby
--->  Computing dependencies for xapian-bindings
--->  Fetching xapian-bindings
--->  Attempting to fetch xapian-bindings-1.0.15.tar.gz from http://oligarchy.co.uk/xapian/1.0.15
--->  Verifying checksum(s) for xapian-bindings
--->  Extracting xapian-bindings
--->  Configuring xapian-bindings
--->  Building xapian-bindings
--->  Staging xapian-bindings into destroot
Error: Target org.macports.destroot returned: no such file or directory
Error: Status 1 encountered during processing.
$

I imagine you want that post-destroot phase to be inside the ruby  
variant.

If I fix that, the port then fails to install any files at all:

$ sudo port install xapian-bindings -ruby
--->  Computing dependencies for xapian-bindings
--->  Fetching xapian-bindings
--->  Verifying checksum(s) for xapian-bindings
--->  Extracting xapian-bindings
--->  Configuring xapian-bindings
--->  Building xapian-bindings
--->  Staging xapian-bindings into destroot
--->  Installing xapian-bindings @1.0.15_0+universal
couldn't change working directory to "/opt/local/var/macports/build/ 
_Users_rschmidt_macports_dports_devel_xapian-bindings/work/destroot":  
no such file or directory
--->  Activating xapian-bindings @1.0.15_0+universal
Error: Target org.macports.activate returned: Image error: Source  
file /opt/local/var/macports/software/xapian-bindings/ 
1.0.15_0+universal does not appear to exist (cannot lstat it).  Unable  
to activate port xapian-bindings.
Error: Status 1 encountered during processing.

I guess you intend for the user to always select at least one variant?  
If so, please write that into the portfile so that it is not possible  
to attempt to install it with no variants selected.

Why is the ruby variant a default variant? This makes it difficult for  
a user to deselect. Does ruby have some special significance for xapian?

You may want to employ a strategy like the one in the pdftk port,  
where it auto-selects a variant for you if you have not already  
selected another variant.

Or you may want to split this into one port per language binding. That  
would allow other ports that need these bindings to actually declare  
dependencies on them. (You cannot declare dependencies on variants;  
see ticket #126.)

In the python variant, shouldn't we be using at least 2.6? I've seen  
several commits lately moving ports off 2.5 and onto 2.6 so it seems  
wrong to commit a new port using 2.5 now.

In the php variant, I already corrected it to allow php5-devel or  
php52 to satisfy the php dependency.

You may want to obfuscate your email address in the maintainer line so  
you don't get as much spam.




More information about the macports-dev mailing list