[98378] trunk/dports/gis
Ryan Schmidt
ryandesign at macports.org
Wed Oct 3 20:37:00 PDT 2012
On Oct 3, 2012, at 18:06, stromnov at macports.org wrote:
> Revision: 98378
> http://trac.macports.org//changeset/98378
> Author: stromnov at macports.org
> Date: 2012-10-03 16:06:17 -0700 (Wed, 03 Oct 2012)
> Log Message:
> -----------
> mapnik: new port (#35671)
> Added: trunk/dports/gis/mapnik/Portfile
> +name mapnik
> +conflicts py26-mapnik
Is the plan for py26-mapnik to be replaced_by mapnik and ultimately deleted? Because we shouldn't have two active ports that conflict with one another that have such differing naming conventions. Please also see (and possibly resolve as wontfix, if that's the plan) #30187 which requested the addition of py27-mapnik.
> +distname mapnik-v${version}
> +worksrcdir mapnik-v${version}
The default for worksrcdir is distname so you don't need to set worksrcdir manually.
> +set python_suffixes {26 27}
> +set python_ports {}
> +foreach s ${python_suffixes} {
> + lappend python_ports python${s}
> +}
> +foreach s ${python_suffixes} {
> + set p python${s}
> + set v [string index ${s} 0].[string index ${s} 1]
> + set i [lsearch -exact ${python_ports} ${p}]
> + set c [lreplace ${python_ports} ${i} ${i}]
> + eval [subst {
> + variant ${p} conflicts ${c} description {Build Python bindings} {
> + depends_lib-append port:${p}
> + configure.args-delete BINDINGS=none
> + configure.args-append BINDINGS=python
> + configure.args-append PYTHON=${prefix}/bin/python${v}
> + }
> + }]
> +}
> +
> +proc python_branch {} {
> + global python_suffixes
> + foreach s ${python_suffixes} {
> + if {[variant_isset python${s}]} { return ${s} }
> + }
> + error "Python support not enabled."
> +}
> +default_variants +python27
> +configure.python /usr/bin/python
> +build.cmd ${configure.python} scons/scons.py
Since you already have python variants, it might be better to use that python as configure.python instead of the system python, since the system python has a wide range of possible versions (if you consider Tiger through Mountain Lion) so using a known good version of python would provide one fewer possible point of failure.
More information about the macports-dev
mailing list