<div dir="ltr">On Sat, Jan 3, 2015 at 10:47 PM, Ryan Schmidt <span dir="ltr">&lt;<a href="mailto:ryandesign@macports.org" target="_blank">ryandesign@macports.org</a>&gt;</span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><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"><br>
&gt; On Jan 3, 2015, at 12:44 PM, <a href="mailto:eborisch@macports.org">eborisch@macports.org</a> wrote:<br>
&gt;<br>
&gt; Revision<br>
&gt; 130886<br>
&gt; Author<br>
&gt; <a href="mailto:eborisch@macports.org">eborisch@macports.org</a><br>
&gt; Date<br>
&gt; 2015-01-03 10:44:45 -0800 (Sat, 03 Jan 2015)<br>
&gt; Log Message<br>
&gt;<br>
&gt; libpgf: New port for Digikam support.<br>
<br>
&gt; Added: trunk/dports/graphics/libpgf/Portfile (0 =&gt; 130886)<br>
<br>
&gt; +depends_build   port:dos2unix \<br>
&gt; +                port:doxygen \<br>
&gt; +                port:graphviz \<br>
<br>
Dependencies on ports that have -devel counterparts, like graphviz, should be written such that the -devel counterpart could satisfy it. In this case, that means it should be written:<br>
<br>
path:bin/dot:graphviz<br>
<br>
<br>
&gt; +post-extract {<br>
&gt; +    reinplace &quot;s/libtoolize/glibtoolize/&quot; autogen.sh<br>
<br>
reinplace is typically done in post-patch, and unless there are extenuating circumstances, such as the need to replace a variable, or an inordinately high number of replacements, it should actually be a patchfile, not a reinplace.<br>
<br>
&gt; +    system -W ${worksrcpath} &quot;dos2unix <a href="http://configure.ac" target="_blank">configure.ac</a>&quot;<br>
<br>
In the post-extract block, the build dependencies have not necessarily been installed yet, so this could fail if someone runs &quot;sudo port extract libpgf&quot;. You could make dos2unix an extract dependency instead of a build dependency, but it would be better to do this with a reinplace and no dependency. Here is how I do it when I encounter this need:<br>
<br>
post-extract {<br>
    # DOS to UNIX line endings.<br>
    reinplace &quot;s|\r||g&quot; ${worksrcpath}/<a href="http://configure.ac" target="_blank">configure.ac</a><br>
}<br>
<br>
<br>
&gt; +post-destroot {<br>
&gt; +    delete ${destroot}/${prefix}/share/man<br>
<br>
There should not be a &quot;/&quot; before &quot;${prefix}&quot; because the value of ${prefix} already begins with a slash.<br>
<br>
&gt; +    copy ${worksrcpath}/COPYING \<br>
&gt; +        ${destroot}/${prefix}/share/doc/${name}-${version}/<br>
<br>
Same here. In addition, we would prefer to use a non-versioned directory for documentation (i.e. ${name}, not ${name}-${version}).<br>
</blockquote></div><br></div><div class="gmail_extra">Addressed most comments in r130798; kept reinplace rather than adding a more brittle patch file for autogen.sh fix.</div><div class="gmail_extra"><br></div><div class="gmail_extra"> - Eric</div></div>