source: trunk/dports/python/py-exiv2/Portfile

Last change on this file was 147804, checked in by devans@…, 14 months ago

dependents of exiv2: increment revision to rebuild with exiv2 version 0.25.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.2 KB
Line 
1# -*- 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
2# $Id: Portfile 147804 2016-04-16 07:53:03Z ryandesign@macports.org $
3
4PortSystem      1.0
5PortGroup       python 1.0
6PortGroup       active_variants 1.1
7
8name            py-exiv2
9platforms       darwin
10set my_name     pyexiv2
11version         0.3.2
12revision        3
13set branch      [join [lrange [split ${version} .] 0 1] .]
14categories      python graphics
15license         GPL-2
16maintainers     devans openmaintainer
17description     Python bindings for exiv2.
18
19long_description \
20                pyexiv2 is a Python binding to exiv2, the C++ library for \
21                manipulation of EXIF, IPTC and XMP image metadata.
22
23homepage        http://tilloy.net/dev/pyexiv2/overview.html
24master_sites    http://launchpad.net/pyexiv2/0.3.x/${version}/+download/
25distname        ${my_name}-${version}
26use_bzip2       yes
27
28checksums       rmd160  cbc53e6f45b0f4251b90bfb6ffab8c659463ac5d \
29                sha256  0abc117c6afa71f54266cb91979a5227f60361db1fcfdb68ae9615398d7a2127
30
31python.versions 27
32python.default_version  27
33
34if {$subport ne $name} {
35    depends_build-append    port:scons
36
37    depends_lib-append      port:boost \
38                            port:exiv2
39
40    patchfiles              patch-src-SConscript.diff
41
42#
43# Make sure that boost is installed with the correct Python variant
44#
45
46    require_active_variants boost python${python.version}
47
48#
49# scons (a python script) uses python builtin procedures
50# to determine configuration options so correct configuation
51# depends on the version of python used to run scons
52#
53
54    build.cmd       ${python.bin} ${prefix}/bin/scons
55    build.target
56    build.args-append \
57        BOOSTLIB=boost_python-mt \
58        PYTHONLIB=python${python.branch}
59    build.env-append \
60        PREFIX=${prefix} \
61        CXX=${configure.cxx} \
62
63    pre-build {
64        if {[variant_isset universal]} {
65            build.env-append \
66                CXXFLAGS="${configure.universal_cxxflags} -I${prefix}/include" \
67                LDFLAGS="${configure.universal_ldflags} -L${prefix}/lib"
68        } else {
69            build.env-append \
70                CXXFLAGS="${configure.cxxflags} -I${prefix}/include" \
71                LDFLAGS="${configure.ldflags} -L${prefix}/lib"
72        }
73    }
74
75    destroot.cmd        ${python.bin} ${prefix}/bin/scons
76    destroot.destdir    DESTDIR=${destroot}
77    destroot.args-append \
78        BOOSTLIB=boost_python-mt \
79        PYTHONLIB=python${python.branch}
80
81    pre-destroot {
82        destroot.env-append \
83            PREFIX=${prefix} \
84            CXX=${configure.cxx}
85
86        if {[variant_isset universal]} {
87            destroot.env-append \
88                CXXFLAGS="${configure.universal_cxxflags} -I${prefix}/include" \
89                LDFLAGS="${configure.universal_ldflags} -L${prefix}/lib"
90        } else {
91            destroot.env-append \
92                CXXFLAGS="${configure.cxxflags} -I${prefix}/include" \
93                LDFLAGS="${configure.ldflags} -L${prefix}/lib"
94        }
95    }
96
97    livecheck.type  regex
98    livecheck.url   http://tilloy.net/dev/pyexiv2/download.html
99    livecheck.regex "${my_name}-(\\d+(?:\\.\\d+)*)${extract.suffix}"
100} else {
101    livecheck.type  none
102}
Note: See TracBrowser for help on using the repository browser.