# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4 # $Id: Portfile 147804 2016-04-16 07:53:03Z devans@macports.org $ PortSystem 1.0 PortGroup python 1.0 PortGroup active_variants 1.1 name py-exiv2 platforms darwin set my_name pyexiv2 version 0.3.2 revision 3 set branch [join [lrange [split ${version} .] 0 1] .] categories python graphics license GPL-2 maintainers devans openmaintainer description Python bindings for exiv2. long_description \ pyexiv2 is a Python binding to exiv2, the C++ library for \ manipulation of EXIF, IPTC and XMP image metadata. homepage http://tilloy.net/dev/pyexiv2/overview.html master_sites http://launchpad.net/pyexiv2/0.3.x/${version}/+download/ distname ${my_name}-${version} use_bzip2 yes checksums rmd160 cbc53e6f45b0f4251b90bfb6ffab8c659463ac5d \ sha256 0abc117c6afa71f54266cb91979a5227f60361db1fcfdb68ae9615398d7a2127 python.versions 27 python.default_version 27 if {$subport ne $name} { depends_build-append port:scons depends_lib-append port:boost \ port:exiv2 patchfiles patch-src-SConscript.diff # # Make sure that boost is installed with the correct Python variant # require_active_variants boost python${python.version} # # scons (a python script) uses python builtin procedures # to determine configuration options so correct configuation # depends on the version of python used to run scons # build.cmd ${python.bin} ${prefix}/bin/scons build.target build.args-append \ BOOSTLIB=boost_python-mt \ PYTHONLIB=python${python.branch} build.env-append \ PREFIX=${prefix} \ CXX=${configure.cxx} \ pre-build { if {[variant_isset universal]} { build.env-append \ CXXFLAGS="${configure.universal_cxxflags} -I${prefix}/include" \ LDFLAGS="${configure.universal_ldflags} -L${prefix}/lib" } else { build.env-append \ CXXFLAGS="${configure.cxxflags} -I${prefix}/include" \ LDFLAGS="${configure.ldflags} -L${prefix}/lib" } } destroot.cmd ${python.bin} ${prefix}/bin/scons destroot.destdir DESTDIR=${destroot} destroot.args-append \ BOOSTLIB=boost_python-mt \ PYTHONLIB=python${python.branch} pre-destroot { destroot.env-append \ PREFIX=${prefix} \ CXX=${configure.cxx} if {[variant_isset universal]} { destroot.env-append \ CXXFLAGS="${configure.universal_cxxflags} -I${prefix}/include" \ LDFLAGS="${configure.universal_ldflags} -L${prefix}/lib" } else { destroot.env-append \ CXXFLAGS="${configure.cxxflags} -I${prefix}/include" \ LDFLAGS="${configure.ldflags} -L${prefix}/lib" } } livecheck.type regex livecheck.url http://tilloy.net/dev/pyexiv2/download.html livecheck.regex "${my_name}-(\\d+(?:\\.\\d+)*)${extract.suffix}" } else { livecheck.type none }