[116165] trunk/dports/gnome/dia

g5pw at macports.org g5pw at macports.org
Mon Jan 20 06:19:08 PST 2014


Revision: 116165
          https://trac.macports.org/changeset/116165
Author:   g5pw at macports.org
Date:     2014-01-20 06:19:08 -0800 (Mon, 20 Jan 2014)
Log Message:
-----------
gnome/dia:
  add python bindings (fixes #29790)

Modified Paths:
--------------
    trunk/dports/gnome/dia/Portfile

Added Paths:
-----------
    trunk/dports/gnome/dia/files/configure.diff

Modified: trunk/dports/gnome/dia/Portfile
===================================================================
--- trunk/dports/gnome/dia/Portfile	2014-01-20 13:50:28 UTC (rev 116164)
+++ trunk/dports/gnome/dia/Portfile	2014-01-20 14:19:08 UTC (rev 116165)
@@ -97,3 +97,17 @@
 }
 
 livecheck.type  gnome-with-unstable
+
+variant python27 description {Add python 2.7 bindings} {
+    set python_prefix       ${frameworks_dir}/Python.framework/Versions/2.7
+    depends_build-append    port:swig
+    depends_lib-append      port:py27-pygtk
+
+    patchfiles-append       configure.diff
+
+    configure.args-append   --with-swig \
+                            --with-python
+    configure.python        ${python_prefix}/bin/python2.7
+    configure.env-append    am_cv_python_pyexecdir=${python_prefix} \
+                            am_cv_python_pythondir=${python_prefix}
+}

Added: trunk/dports/gnome/dia/files/configure.diff
===================================================================
--- trunk/dports/gnome/dia/files/configure.diff	                        (rev 0)
+++ trunk/dports/gnome/dia/files/configure.diff	2014-01-20 14:19:08 UTC (rev 116165)
@@ -0,0 +1,42 @@
+--- dia-0.97.2/configure	2011-04-25 15:04:56.000000000 +0200
++++ dia-0.97.2/configure.new	2014-01-20 11:53:29.000000000 +0100
+@@ -18090,7 +18090,7 @@
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for headers required to compile python extensions" >&5
+ $as_echo_n "checking for headers required to compile python extensions... " >&6; }
+ py_prefix=`$PYTHON -c "import sys; print sys.prefix"`
+-py_lib=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(0,1)" | cut -d '/' -f 3`
++py_lib="lib"
+ py_exec_prefix=`$PYTHON -c "import sys; print sys.exec_prefix"`
+ PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}"
+ if test "$py_prefix" != "$py_exec_prefix"; then
+@@ -18128,7 +18128,7 @@
+   py_basemodlibs=`sed -n -e 's/^BASEMODLIBS=\(.*\)/\1/p' $py_makefile`
+   py_other_libs=`sed -n -e 's/^LIBS=\(.*\)/\1/p' $py_makefile`
+ 
+-  if test -e "$PYTHON_PREFIX/${py_lib}/libpython${PYTHON_VERSION}.so"; then
++  if test -e "$PYTHON_PREFIX/${py_lib}/libpython${PYTHON_VERSION}.dylib"; then
+     PYTHON_LIBS="-L${py_config_dir} -lpython${PYTHON_VERSION} $py_basemodlibs $py_other_libs"
+     { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5
+ $as_echo "found" >&6; }
+@@ -18222,7 +18222,7 @@
+ $as_echo "$swig_version" >&6; }
+                 if test -n "$swig_version" ; then
+                         # Calculate the required version number components
+-                        required=1.3.31
++                        required=2.0.3
+                         required_major=`echo $required | sed 's/[^0-9].*//'`
+                         if test -z "$required_major" ; then
+                                 required_major=0
+@@ -18256,9 +18256,9 @@
+                         if test $available_major -ne $required_major \
+                                 -o $available_minor -ne $required_minor \
+                                 -o $available_patch -lt $required_patch ; then
+-                                { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: SWIG version >= 1.3.31 is required.  You have $swig_version.  You should look at http://www.swig.org" >&5
+-$as_echo "$as_me: WARNING: SWIG version >= 1.3.31 is required.  You have $swig_version.  You should look at http://www.swig.org" >&2;}
+-                                SWIG='echo "Error: SWIG version >= 1.3.31 is required.  You have '"$swig_version"'.  You should look at http://www.swig.org" ; false'
++                                { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: SWIG version >= 2.0.3 is required.  You have $swig_version.  You should look at http://www.swig.org" >&5
++$as_echo "$as_me: WARNING: SWIG version >= 2.0.3 is required.  You have $swig_version.  You should look at http://www.swig.org" >&2;}
++                                SWIG='echo "Error: SWIG version >= 2.0.3 is required.  You have '"$swig_version"'.  You should look at http://www.swig.org" ; false'
+                         else
+                                 { $as_echo "$as_me:${as_lineno-$LINENO}: SWIG executable is '$SWIG'" >&5
+ $as_echo "$as_me: SWIG executable is '$SWIG'" >&6;}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20140120/9daa0474/attachment.html>


More information about the macports-changes mailing list