On Jun 18, 2011, at 14:38, [email protected] wrote:
> Revision: 79570
> http://trac.macports.org/changeset/79570
> Author: [email protected]
> Date: 2011-06-18 12:38:20 -0700 (Sat, 18 Jun 2011)
> Log Message:
> -----------
> mail/sqlgrey: New port.
> +maintainers pixilla.com:brad
You don't wish to use your macports handle?
> +pre-configure {
> + reinplace "s|@@PREFIX@@|${destroot}${prefix}|g" ${worksrcpath}/Makefile
> + reinplace "s|@@PREFIX@@|${prefix}|g" ${worksrcpath}/etc/sqlgrey.conf
> + reinplace "s|@@NAME@@|${name}|g" ${worksrcpath}/etc/sqlgrey.conf
> + reinplace "s|@@SQLGREYUSER@@|${sqlgreyuser}|g"
> ${worksrcpath}/etc/sqlgrey.conf
> + reinplace "s|@@SQLGREYGROUP@@|${sqlgreygroup}|g"
> ${worksrcpath}/etc/sqlgrey.conf
> + reinplace "s|@@PREFIX@@|${prefix}|g" ${worksrcpath}/sqlgrey-logstats.pl
> + reinplace "s|@@NAME@@|${name}|g" ${worksrcpath}/sqlgrey
> + reinplace "s|@@PREFIX@@|${prefix}|g" ${worksrcpath}/sqlgrey
> + reinplace "s|@@SQLGREYUSER@@|${sqlgreyuser}|g" ${worksrcpath}/sqlgrey
> + reinplace "s|@@SQLGREYGROUP@@|${sqlgreygroup}|g" ${worksrcpath}/sqlgrey
> + reinplace "s|@@PREFIX@@|${prefix}|g" ${worksrcpath}/tester.pl
> +}
post-patch is a better place to do these reinplaces.
reinplace can do multiple files at once, so it might be more concise to combine
the multiple reinplaces for each placeholder into single reinplaces for that
placeholder.
reinplace "s|@@PREFIX@@|${prefix}|g" \
${worksrcpath}/etc/sqlgrey.conf \
${worksrcpath}/sqlgrey-logstats.pl \
${worksrcpath}/sqlgrey \
${worksrcpath}/tester.pl
The first reinplace is also slightly confusing; it might be clearer if the
placeholder @@PREFIX@@ were always replaced with ${prefix} (and not sometimes
with ${destroot}${prefix}); instead, you might want to just have a new
placeholder @@DESTROOT@@.
> +use_configure no
This is a great indicator that you either need to address
UsingTheRightCompiler, build_arch, and a universal variant, or in this case,
that the port doesn't install any architecture-specific files at all and
therefore needs "supported_archs noarch".
_______________________________________________
macports-dev mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macports-dev