[97517] trunk/dports/python
devans at macports.org
devans at macports.org
Fri Sep 7 13:38:59 PDT 2012
Revision: 97517
https://trac.macports.org/changeset/97517
Author: devans at macports.org
Date: 2012-09-07 13:38:59 -0700 (Fri, 07 Sep 2012)
Log Message:
-----------
py2[67]-exiv2: Pythons bindings to exiv2, the C++ library for manipulation of EXIF, IPTC and XMP image metadata.
Added Paths:
-----------
trunk/dports/python/py26-exiv2/
trunk/dports/python/py26-exiv2/Portfile
trunk/dports/python/py26-exiv2/files/
trunk/dports/python/py26-exiv2/files/patch-src-SConscript.diff
trunk/dports/python/py27-exiv2/
trunk/dports/python/py27-exiv2/Portfile
trunk/dports/python/py27-exiv2/files/
trunk/dports/python/py27-exiv2/files/patch-src-SConscript.diff
Added: trunk/dports/python/py26-exiv2/Portfile
===================================================================
--- trunk/dports/python/py26-exiv2/Portfile (rev 0)
+++ trunk/dports/python/py26-exiv2/Portfile 2012-09-07 20:38:59 UTC (rev 97517)
@@ -0,0 +1,111 @@
+# -*- 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$
+
+PortSystem 1.0
+
+name py26-exiv2
+#
+# conflict due to dependency on
+# Python version specific variant of boost
+#
+conflicts py27-exiv2
+platforms darwin
+set my_name pyexiv2
+version 0.3.2
+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
+
+depends_build port:scons
+
+depends_lib port:boost \
+ port:exiv2 \
+ port:python26
+
+#
+# Make sure that boost is installed with the correct Python variant
+#
+
+pre-build {
+ set boost_python_lib ${prefix}/lib/libboost_python-mt.dylib
+ set boost_python_version "0"
+ if {[file exists ${boost_python_lib}]} {
+ set boost_python_version [exec /usr/bin/otool -L ${boost_python_lib} | /usr/bin/grep Python | /usr/bin/sed -e "s|^.*Versions/||" -e "s|/.*||"]
+ }
+ if {${boost_python_version} != "2.6"} {
+ ui_error "This port requires 'boost +python26'. Please install as follows:"
+ ui_error " sudo port install boost +python26."
+ return -code error
+ }
+}
+
+patchfiles patch-src-SConscript.diff
+
+use_configure no
+
+#
+# universal_variant is not set by default if configure is disabled
+#
+
+universal_variant yes
+
+#
+# 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 ${prefix}/bin/python2.6 ${prefix}/bin/scons
+build.target
+build.args-append \
+ BOOSTLIB=boost_python-mt \
+ PYTHONLIB=python2.6
+build.env-append \
+ PREFIX=${prefix} \
+ CXX=${configure.cxx}
+
+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="-I${prefix}/include" \
+ LDFLAGS="-L${prefix}/lib"
+}
+
+destroot.cmd ${prefix}/bin/python2.6 ${prefix}/bin/scons
+destroot.args-append \
+ BOOSTLIB=boost_python-mt \
+ PYTHONLIB=python2.6
+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="-I${prefix}/include" \
+ LDFLAGS="-L${prefix}/lib"
+}
+
+livecheck.type regex
+livecheck.url http://tilloy.net/dev/pyexiv2/download.html
+livecheck.regex "${my_name}-(\\d+(?:\\.\\d+)*)${extract.suffix}"
Property changes on: trunk/dports/python/py26-exiv2/Portfile
___________________________________________________________________
Added: svn:keywords
+ Id
Added: svn:eol-style
+ native
Added: trunk/dports/python/py26-exiv2/files/patch-src-SConscript.diff
===================================================================
--- trunk/dports/python/py26-exiv2/files/patch-src-SConscript.diff (rev 0)
+++ trunk/dports/python/py26-exiv2/files/patch-src-SConscript.diff 2012-09-07 20:38:59 UTC (rev 97517)
@@ -0,0 +1,17 @@
+--- src/SConscript.orig 2011-10-24 10:06:02.000000000 -0700
++++ src/SConscript 2012-09-06 18:42:31.000000000 -0700
+@@ -23,12 +23,12 @@
+ # On some systems, boost_python is actually called boost_python-mt.
+ # Use the BOOSTLIB argument to override the default value.
+ # See https://bugs.launchpad.net/pyexiv2/+bug/523858.
+-libs = [ARGUMENTS.get('BOOSTLIB', 'boost_python'), 'exiv2']
++libs = [ARGUMENTS.get('BOOSTLIB', 'boost_python'), 'exiv2', ARGUMENTS.get('PYTHONLIB', 'python2.7')]
+ env.Append(LIBS=libs)
+
+ # Build shared library libpyexiv2
+ cpp_sources = ['exiv2wrapper.cpp', 'exiv2wrapper_python.cpp']
+-libpyexiv2 = env.SharedLibrary('exiv2python', cpp_sources)
++libpyexiv2 = env.LoadableModule('libexiv2python.so', cpp_sources)
+ env.Alias('lib', libpyexiv2)
+
+ # Install the shared library and the Python modules, invoked with
Added: trunk/dports/python/py27-exiv2/Portfile
===================================================================
--- trunk/dports/python/py27-exiv2/Portfile (rev 0)
+++ trunk/dports/python/py27-exiv2/Portfile 2012-09-07 20:38:59 UTC (rev 97517)
@@ -0,0 +1,111 @@
+# -*- 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$
+
+PortSystem 1.0
+
+name py27-exiv2
+#
+# conflict due to dependency on
+# Python version specific variant of boost
+#
+conflicts py26-exiv2
+platforms darwin
+set my_name pyexiv2
+version 0.3.2
+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
+
+depends_build port:scons
+
+depends_lib port:boost \
+ port:exiv2 \
+ port:python27
+
+#
+# Make sure that boost is installed with the correct Python variant
+#
+
+pre-build {
+ set boost_python_lib ${prefix}/lib/libboost_python-mt.dylib
+ set boost_python_version "0"
+ if {[file exists ${boost_python_lib}]} {
+ set boost_python_version [exec /usr/bin/otool -L ${boost_python_lib} | /usr/bin/grep Python | /usr/bin/sed -e "s|^.*Versions/||" -e "s|/.*||"]
+ }
+ if {${boost_python_version} != "2.7"} {
+ ui_error "This port requires 'boost +python27'. Please install as follows:"
+ ui_error " sudo port install boost +python27."
+ return -code error
+ }
+}
+
+patchfiles patch-src-SConscript.diff
+
+use_configure no
+
+#
+# universal_variant is not set by default if configure is disabled
+#
+
+universal_variant yes
+
+#
+# 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 ${prefix}/bin/python2.7 ${prefix}/bin/scons
+build.target
+build.args-append \
+ BOOSTLIB=boost_python-mt \
+ PYTHONLIB=python2.7
+build.env-append \
+ PREFIX=${prefix} \
+ CXX=${configure.cxx} \
+
+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="-I${prefix}/include" \
+ LDFLAGS="-L${prefix}/lib"
+}
+
+destroot.cmd ${prefix}/bin/python2.7 ${prefix}/bin/scons
+destroot.args-append \
+ BOOSTLIB=boost_python-mt \
+ PYTHONLIB=python2.7
+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="-I${prefix}/include" \
+ LDFLAGS="-L${prefix}/lib"
+}
+
+livecheck.type regex
+livecheck.url http://tilloy.net/dev/pyexiv2/download.html
+livecheck.regex "${my_name}-(\\d+(?:\\.\\d+)*)${extract.suffix}"
Property changes on: trunk/dports/python/py27-exiv2/Portfile
___________________________________________________________________
Added: svn:keywords
+ Id
Added: svn:eol-style
+ native
Added: trunk/dports/python/py27-exiv2/files/patch-src-SConscript.diff
===================================================================
--- trunk/dports/python/py27-exiv2/files/patch-src-SConscript.diff (rev 0)
+++ trunk/dports/python/py27-exiv2/files/patch-src-SConscript.diff 2012-09-07 20:38:59 UTC (rev 97517)
@@ -0,0 +1,17 @@
+--- src/SConscript.orig 2011-10-24 10:06:02.000000000 -0700
++++ src/SConscript 2012-09-06 18:42:31.000000000 -0700
+@@ -23,12 +23,12 @@
+ # On some systems, boost_python is actually called boost_python-mt.
+ # Use the BOOSTLIB argument to override the default value.
+ # See https://bugs.launchpad.net/pyexiv2/+bug/523858.
+-libs = [ARGUMENTS.get('BOOSTLIB', 'boost_python'), 'exiv2']
++libs = [ARGUMENTS.get('BOOSTLIB', 'boost_python'), 'exiv2', ARGUMENTS.get('PYTHONLIB', 'python2.7')]
+ env.Append(LIBS=libs)
+
+ # Build shared library libpyexiv2
+ cpp_sources = ['exiv2wrapper.cpp', 'exiv2wrapper_python.cpp']
+-libpyexiv2 = env.SharedLibrary('exiv2python', cpp_sources)
++libpyexiv2 = env.LoadableModule('libexiv2python.so', cpp_sources)
+ env.Alias('lib', libpyexiv2)
+
+ # Install the shared library and the Python modules, invoked with
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120907/bd3d7837/attachment.html>
More information about the macports-changes
mailing list