<div dir="ltr">On Sat, Jan 3, 2015 at 10:47 PM, Ryan Schmidt <span dir="ltr"><<a href="mailto:ryandesign@macports.org" target="_blank">ryandesign@macports.org</a>></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>
> On Jan 3, 2015, at 12:44 PM, <a href="mailto:eborisch@macports.org">eborisch@macports.org</a> wrote:<br>
><br>
> Revision<br>
> 130886<br>
> Author<br>
> <a href="mailto:eborisch@macports.org">eborisch@macports.org</a><br>
> Date<br>
> 2015-01-03 10:44:45 -0800 (Sat, 03 Jan 2015)<br>
> Log Message<br>
><br>
> libpgf: New port for Digikam support.<br>
<br>
> Added: trunk/dports/graphics/libpgf/Portfile (0 => 130886)<br>
<br>
> +depends_build port:dos2unix \<br>
> + port:doxygen \<br>
> + 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>
> +post-extract {<br>
> + reinplace "s/libtoolize/glibtoolize/" 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>
> + system -W ${worksrcpath} "dos2unix <a href="http://configure.ac" target="_blank">configure.ac</a>"<br>
<br>
In the post-extract block, the build dependencies have not necessarily been installed yet, so this could fail if someone runs "sudo port extract libpgf". 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 "s|\r||g" ${worksrcpath}/<a href="http://configure.ac" target="_blank">configure.ac</a><br>
}<br>
<br>
<br>
> +post-destroot {<br>
> + delete ${destroot}/${prefix}/share/man<br>
<br>
There should not be a "/" before "${prefix}" because the value of ${prefix} already begins with a slash.<br>
<br>
> + copy ${worksrcpath}/COPYING \<br>
> + ${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>