[111270] trunk/dports/devel
Ryan Schmidt
ryandesign at macports.org
Wed Sep 18 18:40:11 PDT 2013
On Sep 17, 2013, at 21:18, devans at macports.org wrote:
> Revision: 111270
> https://trac.macports.org/changeset/111270
> Author: devans at macports.org
> Date: 2013-09-17 19:18:42 -0700 (Tue, 17 Sep 2013)
> Log Message:
> -----------
> libpwquality: new port, a library for password quality checking.
> Added: trunk/dports/devel/libpwquality/Portfile
> +variant python26 conflicts python27 description {Use python 2.6} {
> + set python_ver 2.6
> + depends_lib-append port:python26
> + configure.python ${prefix}/bin/python${python_ver}
> + set python_prefix ${frameworks_dir}/Python.framework/Versions/${python_ver}
> + set python_site_path ${python_prefix}/lib/python${python_ver}/site-packages
> + configure.args-append --with-python-rev=${python_ver} \
> + --with-pythonsitedir=${python_site_path}
> +}
> +
> +variant python27 conflicts python26 description {Use python 2.7} {
> + set python_ver 2.7
> + depends_lib-append port:python27
> + configure.python ${prefix}/bin/python${python_ver}
> + set python_prefix ${frameworks_dir}/Python.framework/Versions/${python_ver}
> + set python_site_path ${python_prefix}/lib/python${python_ver}/site-packages
> + configure.args-append --with-python-rev=${python_ver} \
> + --with-pythonsitedir=${python_site_path}
> +}
It would be nice if the identical code could be factored out of these variants. This is untested but might work:
variant python26 conflicts python27 description {Use python 2.6} {
set python_ver 2.6
depends_lib-append port:python26
}
variant python27 conflicts python26 description {Use python 2.7} {
set python_ver 2.7
depends_lib-append port:python27
}
pre-configure {
configure.python ${prefix}/bin/python${python_ver}
set python_prefix ${frameworks_dir}/Python.framework/Versions/${python_ver}
set python_site_path ${python_prefix}/lib/python${python_ver}/site-packages
configure.args-append --with-python-rev=${python_ver} \
--with-pythonsitedir=${python_site_path}
}
More information about the macports-dev
mailing list