On Mar 20, 2012, at 14:10, [email protected] wrote:
> Revision: 90986
> https://trac.macports.org/changeset/90986
> Author: [email protected]
> Date: 2012-03-20 12:10:28 -0700 (Tue, 20 Mar 2012)
> Log Message:
> -----------
> New port: py-healpy
>
> Added Paths:
> -----------
> trunk/dports/python/py-healpy/
> trunk/dports/python/py-healpy/Portfile
> trunk/dports/python/py-healpy/files/
> trunk/dports/python/py-healpy/files/patch-setup.py.diff
>
> Added: trunk/dports/python/py-healpy/Portfile
> ===================================================================
> --- trunk/dports/python/py-healpy/Portfile (rev 0)
> +++ trunk/dports/python/py-healpy/Portfile 2012-03-20 19:10:28 UTC (rev
> 90986)
> @@ -0,0 +1,53 @@
> +# -*- coding: utf-8; mode: tcl; tab-width: 4; truncate-lines: t;
> indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4
> +# $Id$
> +
> +PortSystem 1.0
> +PortGroup python 1.0
> +
> +name py-healpy
> +version 0.10.2
> +categories python science
> +platforms darwin
> +maintainers aronnax
> +description Python wrapper for healpix
> +long_description Python wrapper for healpix
> +
> +homepage http://code.google.com/p/healpy/
> +master_sites googlecode:healpy
> +distname healpy-${version}
> +checksums md5 c9561c318af1dedb6859de1436e98719 \
> + sha1 56006d7f38a6ce5d90f84a894d3721c7c574b1c5 \
> + rmd160 aa703d90fb23926469691773366e4628036e2068
> +
> +python.versions 25 26 27
> +python.default_version 27
> +
> +patchfiles patch-setup.py.diff
> +
> +if {${subport} != ${name}} {
Remember to test the stub port too. It fails with:
---> Applying patches to py-healpy
---> Applying
/Users/rschmidt/macports/dports/python/py-healpy/files/patch-setup.py.diff
DEBUG: Environment: CPATH='/opt/local/include'
CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build/_Users_rschmidt_macports_dports_python_py-healpy/py-healpy/work/.CC_PRINT_OPTIONS'
LIBRARY_PATH='/opt/local/lib' CC_PRINT_OPTIONS='YES'
MACOSX_DEPLOYMENT_TARGET='10.6' GI_SCANNER_DISABLE_CACHE='1'
DEBUG: Assembled command: 'cd
"/opt/local/var/macports/build/_Users_rschmidt_macports_dports_python_py-healpy/py-healpy/work/healpy-0.10.2"
&& /usr/bin/patch -p0'
DEBUG: Executing command line: cd
"/opt/local/var/macports/build/_Users_rschmidt_macports_dports_python_py-healpy/py-healpy/work/healpy-0.10.2"
&& /usr/bin/patch -p0 <
'/Users/rschmidt/macports/dports/python/py-healpy/files/patch-setup.py.diff'
sh: line 0: cd:
/opt/local/var/macports/build/_Users_rschmidt_macports_dports_python_py-healpy/py-healpy/work/healpy-0.10.2:
No such file or directory
shell command " cd
"/opt/local/var/macports/build/_Users_rschmidt_macports_dports_python_py-healpy/py-healpy/work/healpy-0.10.2"
&& /usr/bin/patch -p0 <
'/Users/rschmidt/macports/dports/python/py-healpy/files/patch-setup.py.diff'"
returned error 1
You could fix this by ensuring the patchfiles are also enclosed in the ${name}
!= ${subport} block; we've done that in other ports already. But possibly it is
the python portgroup itself, and not individual ports, that should be improved
to handle this problem. I've done that in r91021.
Still, a good rule of thumb is that anything that deals with the source files
of the port -- extracting them, patching them, configuring, building,
destrooting, variants -- should be restricted to a "if {${name} != ${subport}}"
block.
_______________________________________________
macports-dev mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macports-dev