Question about creating a port for saga gis

Eygene Ryabinkin rea-fbsd at codelabs.ru
Sat Nov 14 11:36:56 UTC 2009


Sat, Nov 14, 2009 at 10:41:58AM +0100, Rainer Hurling wrote:
> The original configure script of SAGA GIS expects 'wx-config', but in
> newer FreeBSD systems there only is e.g. wxgtk2-2.8-config.
> 
> The porters handbook shows how to configure the ports Makefile to let
> the port know what wxWidget version to use. I patched the original
> configure script but obviously that's not enough. The attached files
> are saved under math/saga and show what I have tried.

Seems like spawning REINPLACE_CMD over the whole horde of Makefile.in
files will do the trick:
-----
post-patch:
	@for f in `${FIND} '${WRKSRC}' -name Makefile.in` \
	  ${WRKSRC}/configure; do \
		${REINPLACE_CMD} -e's|wx-config |${WX_CONFIG} |g' "$$f"; \
	done
-----

> It would be nice if someone with more experience could give me a hint
> how to do it right.

I am not sure for 100% that the above is the Only Right Way (tm), but
the Porter's Handbook suggests that in such cases (when "wx-config" is
hardcoded), the best thing is to patch the sources and that's what I did.

BTW, there is absolutely no need to specify WX_CONFIG in your Makefile,
bsd.wx.mk will take care of it.  WX_CONF_ARGS seems redundant too:
SAGA's configure understands no --with-wx-config option, so it is just
a no-op.
-- 
Eygene
 _                ___       _.--.   #
 \`.|\..----...-'`   `-._.-'_.-'`   #  Remember that it is hard
 /  ' `         ,       __.--'      #  to read the on-line manual
 )/' _/     \   `-_,   /            #  while single-stepping the kernel.
 `-'" `"\_  ,_.-;_.-\_ ',  fsc/as   #
     _.-'_./   {_.'   ; /           #    -- FreeBSD Developers handbook
    {_.-``-'         {_/            #


More information about the freebsd-ports mailing list