<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">Brining back to dev list; seems like the right place.</div><div class="gmail_quote"><br></div><div class="gmail_quote">On Thu, Mar 20, 2014 at 4:01 PM, Sean Farley <span dir="ltr"><<a href="mailto:sean@macports.org" target="_blank">sean@macports.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div><br>
Adam Mercer <<a href="mailto:ram@macports.org" target="_blank">ram@macports.org</a>> writes:<br>
<br>
> On Thu, Mar 20, 2014 at 2:55 PM, Sean Farley <<a href="mailto:sean@macports.org" target="_blank">sean@macports.org</a>> wrote:<br>
><br>
>> I tend to agree with you but need help seeing how this worked<br>
>> before. What path did automake pick up before this change?<br>
><br>
> If you look at the patch you can see the original paths:<br>
><br>
> <<a href="http://trac.macports.org/browser/trunk/dports/devel/automake/files/patch-m4-python.m4.diff" target="_blank">http://trac.macports.org/browser/trunk/dports/devel/automake/files/patch-m4-python.m4.diff</a>><br>
><br>
> The original paths are:<br>
><br>
> AC_SUBST([PYTHON_PREFIX], ['${prefix}'])<br>
> AC_SUBST([PYTHON_EXEC_PREFIX], ['${exec_prefix}'])<br>
><br>
> Just to clarify this isn't the MacPorts prefix but the prefix for the<br>
> running configure process.<br>
<br>
</div>Right, sorry, I meant more along the lines of:<br>
<br>
Before: my project installed into /path/foo/a<br>
After: my project installed into /path/foo/b</blockquote><div><br></div><div>I think the issue here is that automake is getting patched to *only* support MacPorts-managed builds, but really automake should still be available for use to build non-MP software.</div>
<div><br></div><div>What was broken that needed fixing (by the original change)? Is there a particular port that needed the change? Is there another way to fix it without modifying automake?</div><div><br></div><div>Assuming the change is/was needed (and the best solution), perhaps setting an environment variable during MP managed builds could be used here to switch the behavior? Something along the lines of:</div>
<br>AC_SUBST([PYTHON_PREFIX], [`[ ${__MP_BUILD__} ] && $PYTHON -c "import sys; sys.stdout.write(sys.prefix);" || echo -n ${prefix}`]) <br><br></div><div class="gmail_quote">where __MP_BUILD__=1 during a managed build, and undefined otherwise?</div>
<div class="gmail_quote"><br></div><div class="gmail_quote">This way when a user outside of MacPorts is installing a python-using-software (built against MP-provided python) and they have set $prefix via configure, it doesn't get crowbarred into /opt/local/ (or wherever MP is installed.) (Granted, as the .m4 file notes, they will need to set PYTHONPATH or tell python about it in some manner to use it.)</div>
<div class="gmail_quote"><br></div><div class="gmail_quote"> - Eric</div></div></div>