[130886] trunk/dports/graphics

Ryan Schmidt ryandesign at macports.org
Sat Jan 3 20:47:02 PST 2015

> On Jan 3, 2015, at 12:44 PM, eborisch at macports.org wrote:
> Revision
> 130886
> Author
> eborisch at macports.org
> Date
> 2015-01-03 10:44:45 -0800 (Sat, 03 Jan 2015)
> Log Message
> libpgf: New port for Digikam support.

> Added: trunk/dports/graphics/libpgf/Portfile (0 => 130886)

> +depends_build   port:dos2unix \
> +                port:doxygen \
> +                port:graphviz \

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:


> +post-extract {
> +    reinplace "s/libtoolize/glibtoolize/" autogen.sh

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.

> +    system -W ${worksrcpath} "dos2unix configure.ac"

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:

post-extract {
    # DOS to UNIX line endings.
    reinplace "s|\r||g" ${worksrcpath}/configure.ac

> +post-destroot {
> +    delete ${destroot}/${prefix}/share/man

There should not be a "/" before "${prefix}" because the value of ${prefix} already begins with a slash.

> +    copy ${worksrcpath}/COPYING \
> +        ${destroot}/${prefix}/share/doc/${name}-${version}/

Same here. In addition, we would prefer to use a non-versioned directory for documentation (i.e. ${name}, not ${name}-${version}).

More information about the macports-dev mailing list