<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[153749] trunk/dports/gnome/gnucash-devel</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="https://trac.macports.org/changeset/153749">153749</a></dd>
<dt>Author</dt> <dd>dports@macports.org</dd>
<dt>Date</dt> <dd>2016-10-09 17:38:53 -0700 (Sun, 09 Oct 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>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 <a href="https://trac.macports.org/changeset/153748">r153748</a> from gnucash port]</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkdportsgnomegnucashdevelPortfile">trunk/dports/gnome/gnucash-devel/Portfile</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkdportsgnomegnucashdevelfilespatchsrc_bin_environmentindiff">trunk/dports/gnome/gnucash-devel/files/patch-src_bin_environment.in.diff</a></li>
<li><a href="#trunkdportsgnomegnucashdevelfilespatchsrc_coreutils_gncpathcdiff">trunk/dports/gnome/gnucash-devel/files/patch-src_core-utils_gnc-path.c.diff</a></li>
</ul>

<h3>Property Changed</h3>
<ul>
<li><a href="#trunkdportsgnomegnucashdevel">trunk/dports/gnome/gnucash-devel/</a></li>
<li><a href="#trunkdportsgnomegnucashdevelPortfile">trunk/dports/gnome/gnucash-devel/Portfile</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkdportsgnomegnucashdevel"></a>
<div class="propset"><h4>Property changes: trunk/dports/gnome/gnucash-devel</h4>
<pre class="diff"><span>
</span></pre></div>
<a id="svnmergeinfo"></a>
<div class="modfile"><h4>Modified: svn:mergeinfo</h4></div>
<span class="cx">   + /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
</span><a id="trunkdportsgnomegnucashdevelPortfile"></a>
<div class="modfile"><h4>Modified: trunk/dports/gnome/gnucash-devel/Portfile (153748 => 153749)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -8,6 +8,7 @@
</span><span class="cx"> conflicts         gnucash
</span><span class="cx"> set my_name       gnucash
</span><span class="cx"> version           2.6.14
</span><ins>+revision          1
</ins><span class="cx"> perl5.branches    5.22
</span><span class="cx"> categories        gnome x11
</span><span class="cx"> license           GPL-2+
</span><span class="lines">@@ -37,9 +38,23 @@
</span><span class="cx"> checksums           rmd160  3e7eb1da511efe7b1a91224d1ca2a53b3fd42052 \
</span><span class="cx">                     sha256  3b144f2ca5025df5eb1977b11e6f93208f3e90d840285ae952fa9b3da8158e75
</span><span class="cx"> 
</span><del>-patchfiles        patch-configure.ac.diff
</del><ins>+# 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
</ins><span class="cx"> 
</span><ins>+patchfiles        patch-configure.ac.diff \
+                  patch-src_bin_environment.in.diff \
+                  patch-src_core-utils_gnc-path.c.diff
+
</ins><span class="cx"> post-patch {
</span><ins>+    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
+    
</ins><span class="cx">     # gnc-fq-dump needs to be patched to use MacPorts perl.
</span><span class="cx">     # (autoconf takes care of the other perl scripts.)
</span><span class="cx">     reinplace "s|^#!/usr/bin/perl|#!${perl5.bin}|" ${worksrcpath}/src/quotes/gnc-fq-dump
</span><span class="lines">@@ -108,6 +123,9 @@
</span><span class="cx">                   --disable-ofx \
</span><span class="cx">                   --disable-dbi \
</span><span class="cx">                   --with-html-engine=webkit
</span><ins>+
+configure.args-append   --libdir=${gnclibdir}
+
</ins><span class="cx"> configure.perl    ${perl5.bin}
</span><span class="cx"> configure.env \
</span><span class="cx">     GUILE=${prefix}/bin/guile18 \
</span><span class="cx">Property changes on: trunk/dports/gnome/gnucash-devel/Portfile
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svnmergeinfo"></a>
<div class="modfile"><h4>Modified: svn:mergeinfo</h4></div>
<span class="cx">   + /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
</span><a id="trunkdportsgnomegnucashdevelfilespatchsrc_bin_environmentindifffromrev153748trunkdportsgnomegnucashfilespatchsrc_bin_environmentindiff"></a>
<div class="copfile"><h4>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) (0 => 153749)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -0,0 +1,11 @@
</span><ins>+--- 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}
</ins></span></pre></div>
<a id="trunkdportsgnomegnucashdevelfilespatchsrc_coreutils_gncpathcdifffromrev153748trunkdportsgnomegnucashfilespatchsrc_coreutils_gncpathcdiff"></a>
<div class="copfile"><h4>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) (0 => 153749)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -0,0 +1,11 @@
</span><ins>+--- 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
</ins></span></pre>
</div>
</div>

</body>
</html>