1 | # $Id$ |
---|
2 | |
---|
3 | PortSystem 1.0 |
---|
4 | PortGroup python 1.0 |
---|
5 | |
---|
6 | name py-exiv2 |
---|
7 | version 0.3.2 |
---|
8 | maintainers mnot openmaintainer |
---|
9 | |
---|
10 | description Python binding to exiv2 (image metadata manipulation) |
---|
11 | long_description Python bindings to Exiv2, a C++ library \ |
---|
12 | which allows you to manipulate EXIF and IPTC image metadata. |
---|
13 | categories-append graphics |
---|
14 | platforms darwin |
---|
15 | license GPL-2+ |
---|
16 | |
---|
17 | homepage http://tilloy.net/dev/pyexiv2/ |
---|
18 | master_sites http://launchpad.net/pyexiv2/0.3.x/${version}/+download/ |
---|
19 | distname pyexiv2-${version} |
---|
20 | |
---|
21 | checksums sha256 0abc117c6afa71f54266cb91979a5227f60361db1fcfdb68ae9615398d7a2127 \ |
---|
22 | rmd160 cbc53e6f45b0f4251b90bfb6ffab8c659463ac5d \ |
---|
23 | md5 9c0377ca4cf7d5ceeee994af0b5536ae |
---|
24 | |
---|
25 | platforms darwin |
---|
26 | python.versions 27 |
---|
27 | use_bzip2 yes |
---|
28 | extract.suffix .tar.bz2 |
---|
29 | |
---|
30 | if {$subport != $name} { |
---|
31 | |
---|
32 | depends_lib-append port:exiv2 \ |
---|
33 | port:boost |
---|
34 | |
---|
35 | if {![file exists ${prefix}/lib/libboost_python-mt.dylib]} { |
---|
36 | depends_lib-delete port:boost |
---|
37 | pre-configure { |
---|
38 | ui_error " |
---|
39 | **** |
---|
40 | **** ${name} requires port boost installed with variant +python. |
---|
41 | **** Please do the following then try installing ${name} again: |
---|
42 | **** |
---|
43 | **** sudo port install boost +python${python.version} |
---|
44 | **** |
---|
45 | |
---|
46 | " |
---|
47 | return -code error "incompatible boost installation" |
---|
48 | } |
---|
49 | } |
---|
50 | |
---|
51 | depends_build port:scons |
---|
52 | use_configure no |
---|
53 | build.cmd CXXFLAGS="-I${prefix}/include" \ |
---|
54 | LDFLAGS="-L${prefix}/lib -lpython${python.branch}" \ |
---|
55 | scons |
---|
56 | build.target lib |
---|
57 | build.args PREFIX=${prefix} |
---|
58 | use_parallel_build no |
---|
59 | |
---|
60 | |
---|
61 | ### scons seems to want to rebuild things during destroot... |
---|
62 | destroot.env CXXFLAGS="-I${prefix}/include" \ |
---|
63 | LDFLAGS="-L${prefix}/lib -lpython${python.branch}" |
---|
64 | destroot.cmd scons |
---|
65 | destroot.destdir DESTDIR=${destroot} |
---|
66 | destroot.target install |
---|
67 | destroot.args --debug=explain |
---|
68 | destroot.keepdirs ${destroot}${prefix}/Library/Frameworks/Python.framework/Versions/${python.branch}/lib/python${python.branch}/site-packages/ |
---|
69 | |
---|
70 | ### scons creates a .dylib; we need a .so |
---|
71 | post-destroot { |
---|
72 | file copy ${worksrcpath}/build/libexiv2python.dylib \ |
---|
73 | ${destroot}${prefix}/Library/Frameworks/Python.framework/Versions/${python.branch}/lib/python${python.branch}/site-packages/libexiv2python.so |
---|
74 | } |
---|
75 | |
---|
76 | } |
---|
77 | |
---|