[153356] trunk/dports/gnome/gnucash

dports at macports.org dports at macports.org
Thu Sep 29 01:16:39 PDT 2016


Revision: 153356
          https://trac.macports.org/changeset/153356
Author:   dports at macports.org
Date:     2016-09-29 01:16:39 -0700 (Thu, 29 Sep 2016)
Log Message:
-----------
gnucash: fix +python27 variant (#43254)

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

Removed Paths:
-------------
    trunk/dports/gnome/gnucash/files/patch-configure-python.diff

Modified: trunk/dports/gnome/gnucash/Portfile
===================================================================
--- trunk/dports/gnome/gnucash/Portfile	2016-09-29 07:45:33 UTC (rev 153355)
+++ trunk/dports/gnome/gnucash/Portfile	2016-09-29 08:16:39 UTC (rev 153356)
@@ -88,10 +88,16 @@
 
 post-patch {
     xinstall -m 755 ${filespath}/autogen.sh ${worksrcpath}
+    system "cd ${worksrcpath} && ./autogen.sh"
+    if {[variant_isset python27]} {
+        # Fix python exec_prefix
+        reinplace "s|\\(PYTHON_EXEC_PREFIX=\\).*$|\\1${frameworks_dir}/Python.framework/Versions/2.7/|" \
+            ${worksrcpath}/configure
+        reinplace "s|\\(PYTHON_PREFIX=\\).*$|\\1${frameworks_dir}/Python.framework/Versions/2.7/|" \
+            ${worksrcpath}/configure
+    }
 }
 
-configure.cmd     ./autogen.sh && ./configure
-
 configure.args    --disable-dependency-tracking \
                   --disable-aqbanking \
                   --disable-ofx \
@@ -126,12 +132,14 @@
 
 default_variants +ofx +hbci
 
-# variant python27 description {Install Python bindings for Python 2.7} {
-#     #patchfiles-append patch-configure-python.diff
-#     depends_lib-append port:python27
-#     configure.args-append --enable-python
-#     configure.python ${prefix}/bin/python2.7
-# }
+variant python27 description {Install Python bindings for Python 2.7} { 
+    depends_lib-append  port:python27 
+    set python_bindir ${frameworks_dir}/Python.framework/Versions/2.7/bin/ 
+    configure.args-append --enable-python \
+                          PYTHON_EXTRA_LDFLAGS=\"\`${python_bindir}/python2.7-config --ldflags\`\" \
+                          PYTHON_CPPFLAGS=\"\`${python_bindir}/python2.7-config --cflags\`\" 
+    configure.python    ${python_bindir}/python2.7 
+} 
 
 post-activate {
     system "${prefix}/bin/gtk-update-icon-cache -f -t ${prefix}/share/icons/hicolor"

Deleted: trunk/dports/gnome/gnucash/files/patch-configure-python.diff
===================================================================
--- trunk/dports/gnome/gnucash/files/patch-configure-python.diff	2016-09-29 07:45:33 UTC (rev 153355)
+++ trunk/dports/gnome/gnucash/files/patch-configure-python.diff	2016-09-29 08:16:39 UTC (rev 153356)
@@ -1,20 +0,0 @@
---- configure.orig	2012-07-03 16:53:51.000000000 -0400
-+++ configure	2012-07-03 16:59:57.000000000 -0400
-@@ -23852,7 +23852,7 @@
-      else
-        am_py_prefix=$prefix
-      fi
--     am_cv_python_pythondir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(0,0,prefix='$am_py_prefix'))" 2>/dev/null ||
-+     am_cv_python_pythondir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(0,0))" 2>/dev/null ||
-      echo "$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages"`
-      case $am_cv_python_pythondir in
-      $am_py_prefix*)
-@@ -23890,7 +23890,7 @@
-      else
-        am_py_exec_prefix=$exec_prefix
-      fi
--     am_cv_python_pyexecdir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(1,0,prefix='$am_py_exec_prefix'))" 2>/dev/null ||
-+     am_cv_python_pyexecdir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(1,0))" 2>/dev/null ||
-      echo "$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages"`
-      case $am_cv_python_pyexecdir in
-      $am_py_exec_prefix*)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20160929/648bf636/attachment.html>


More information about the macports-changes mailing list