[153749] trunk/dports/gnome/gnucash-devel

dports at macports.org dports at macports.org
Mon Oct 10 02:38:53 CEST 2016


Revision: 153749
          https://trac.macports.org/changeset/153749
Author:   dports at macports.org
Date:     2016-10-09 17:38:53 -0700 (Sun, 09 Oct 2016)
Log Message:
-----------
gnucash-devel: fix bugs involving DYLD_LIBRARY_PATH (#52494)

Install gnucash libraries into a separate subdir of $prefix/lib, and
add these as well as the guile18 library directory to
DYLD_LIBRARY_PATH at runtime instead of $prefix/lib. This prevents
errors caused by unintentionally including all of MacPorts's libraries
in DYLD_LIBRARY_PATH.

[merge r153748 from gnucash port]

Revision Links:
--------------
    https://trac.macports.org/changeset/153748

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

Added Paths:
-----------
    trunk/dports/gnome/gnucash-devel/files/patch-src_bin_environment.in.diff
    trunk/dports/gnome/gnucash-devel/files/patch-src_core-utils_gnc-path.c.diff

Property Changed:
----------------
    trunk/dports/gnome/gnucash-devel/
    trunk/dports/gnome/gnucash-devel/Portfile


Property changes on: trunk/dports/gnome/gnucash-devel
___________________________________________________________________
Modified: svn:mergeinfo
   - /trunk/dports/gnome/gnucash:75076,76649,87597,88798,88800,89699,95009,95767,97916,98516,105077,133443,135862,138425,141081,143967,144811,148757,150844,153091,153356
   + /trunk/dports/gnome/gnucash:75076,76649,87597,88798,88800,89699,95009,95767,97916,98516,105077,133443,135862,138425,141081,143967,144811,148757,150844,153091,153356,153748

Modified: trunk/dports/gnome/gnucash-devel/Portfile
===================================================================
--- trunk/dports/gnome/gnucash-devel/Portfile	2016-10-10 00:38:15 UTC (rev 153748)
+++ trunk/dports/gnome/gnucash-devel/Portfile	2016-10-10 00:38:53 UTC (rev 153749)
@@ -8,6 +8,7 @@
 conflicts         gnucash
 set my_name       gnucash
 version           2.6.14
+revision          1
 perl5.branches    5.22
 categories        gnome x11
 license           GPL-2+
@@ -37,9 +38,23 @@
 checksums           rmd160  3e7eb1da511efe7b1a91224d1ca2a53b3fd42052 \
                     sha256  3b144f2ca5025df5eb1977b11e6f93208f3e90d840285ae952fa9b3da8158e75
 
-patchfiles        patch-configure.ac.diff
+# We'll install gnucash's libraries in a separate subdir of
+# ${prefix}/lib, because gnucash sets DYLD_LIBRARY_PATH at runtime in
+# order to dynamically load these directories, and including all
+# MacPorts libraries in DYLD_LIBRARY_PATH can cause problems.
+# guile18 modules are also installed in a separate subdirectory.
+# See https://trac.macports.org/ticket/52494.
+set gnclibdir     ${prefix}/lib/gnucash
 
+patchfiles        patch-configure.ac.diff \
+                  patch-src_bin_environment.in.diff \
+                  patch-src_core-utils_gnc-path.c.diff
+
 post-patch {
+    reinplace "s|@@GUILEPATH@@|${prefix}/lib/guile18|" ${worksrcpath}/src/bin/environment.in
+    reinplace "s|@@LIBDIR@@|${gnclibdir}|" ${worksrcpath}/src/bin/environment.in
+    reinplace "s|@@LIBDIR@@|${gnclibdir}|" ${worksrcpath}/src/core-utils/gnc-path.c
+    
     # gnc-fq-dump needs to be patched to use MacPorts perl.
     # (autoconf takes care of the other perl scripts.)
     reinplace "s|^#!/usr/bin/perl|#!${perl5.bin}|" ${worksrcpath}/src/quotes/gnc-fq-dump
@@ -108,6 +123,9 @@
                   --disable-ofx \
                   --disable-dbi \
                   --with-html-engine=webkit
+
+configure.args-append   --libdir=${gnclibdir}
+
 configure.perl    ${perl5.bin}
 configure.env \
     GUILE=${prefix}/bin/guile18 \


Property changes on: trunk/dports/gnome/gnucash-devel/Portfile
___________________________________________________________________
Modified: svn:mergeinfo
   - /trunk/dports/gnome/gnucash/Portfile:75076,76649,77149,77299,77346,78188,79161,80328,80330,84977,86481,87597,88798,88800,89699,94888,94890,94892,95009,95767,97916,98516,105077,116990,118521,118834-118835,120699,120704,121044,129619,129799,133443,135862,138425,141081,143967,144811,148757,150844,153091,153356
   + /trunk/dports/gnome/gnucash/Portfile:75076,76649,77149,77299,77346,78188,79161,80328,80330,84977,86481,87597,88798,88800,89699,94888,94890,94892,95009,95767,97916,98516,105077,116990,118521,118834-118835,120699,120704,121044,129619,129799,133443,135862,138425,141081,143967,144811,148757,150844,153091,153356,153748

Copied: trunk/dports/gnome/gnucash-devel/files/patch-src_bin_environment.in.diff (from rev 153748, trunk/dports/gnome/gnucash/files/patch-src_bin_environment.in.diff)
===================================================================
--- trunk/dports/gnome/gnucash-devel/files/patch-src_bin_environment.in.diff	                        (rev 0)
+++ trunk/dports/gnome/gnucash-devel/files/patch-src_bin_environment.in.diff	2016-10-10 00:38:53 UTC (rev 153749)
@@ -0,0 +1,11 @@
+--- src/bin/environment.in.orig	2016-10-04 23:47:24.000000000 -0700
++++ src/bin/environment.in	2016-10-04 23:46:34.000000000 -0700
+@@ -56,7 +56,7 @@
+ GUILE_LOAD_COMPILED_PATH={GNC_LIB}/scm/ccache/@-GUILE_EFFECTIVE_VERSION-@;{GUILE_COMPILED_LIBS};{GUILE_LOAD_COMPILED_PATH}
+ 
+ # Tell Guile where to find GnuCash specific shared libraries
+-GNC_LIBRARY_PATH={SYS_LIB};{GNC_LIB}
++GNC_LIBRARY_PATH={GNC_LIB};@@GUILEPATH@@;@@LIBDIR@@
+ LD_LIBRARY_PATH={GNC_LIBRARY_PATH};{LD_LIBRARY_PATH}
+ # The same, but for GnuCash on OS X
+ DYLD_LIBRARY_PATH={GNC_LIBRARY_PATH};{DYLD_LIBRARY_PATH}

Copied: trunk/dports/gnome/gnucash-devel/files/patch-src_core-utils_gnc-path.c.diff (from rev 153748, trunk/dports/gnome/gnucash/files/patch-src_core-utils_gnc-path.c.diff)
===================================================================
--- trunk/dports/gnome/gnucash-devel/files/patch-src_core-utils_gnc-path.c.diff	                        (rev 0)
+++ trunk/dports/gnome/gnucash-devel/files/patch-src_core-utils_gnc-path.c.diff	2016-10-10 00:38:53 UTC (rev 153749)
@@ -0,0 +1,11 @@
+--- src/core-utils/gnc-path.c.orig	2016-10-09 12:42:19.000000000 -0700
++++ src/core-utils/gnc-path.c	2016-10-09 12:44:04.000000000 -0700
+@@ -48,7 +48,7 @@
+ gchar *gnc_path_get_libdir()
+ {
+     //printf("Returning libdir %s\n", gnc_gbr_find_lib_dir (LIBDIR));
+-    return gnc_gbr_find_lib_dir (LIBDIR);
++    return g_strdup("@@LIBDIR@@");
+ }
+ 
+ /** Returns the datadir path, usually
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macports.org/pipermail/macports-changes/attachments/20161009/1dee8785/attachment-0002.html>


More information about the macports-changes mailing list