Question about creating a port for saga gis
Eygene Ryabinkin
rea-fbsd at codelabs.ru
Sat Nov 14 14:56:18 UTC 2009
Sat, Nov 14, 2009 at 02:58:02PM +0100, Rainer Hurling wrote:
> > 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.
>
> Both are deleted now from my Makefile and everything build and install
> just fine.
Cool.
> So far, I only tested my new port "math/saga" under very recent
> 9.0-CURRENT, both i386 and amd64. Is there any need for me to let it
> test on other platforms and/or system versions before requesting a
> commit?
If you have access to other variants of systems, it will be good, but if
you can't -- just submit it. If there will be build troubles when the
port will be included to the ports collection, then you'll be warned
about this as the maintainer.
>
> 'portlint -A' gives me the following errors:
> FATAL: Makefile: MASTER_SITES appears out-of-order.
> FATAL: Makefile: order must be
> PORTNAME/PORTVERSION/DISTVERSIONPREFIX/DISTVERSION/DISTVERSIONSUFFIX/PORTREVISION/PORTEPOCH/CATEGORIES/MASTER_SITES/MASTER_SITE_SUBDIR/PKGNAMEPREFIX/PKGNAMESUFFIX/DISTNAME/EXTRACT_SUFX/DISTFILES/DIST_SUBDIR/EXTRACT_ONLY.
> WARN: Makefile: "BUILD_DEPENDS" has to appear earlier.
> 2 fatal errors and 1 warning found.
>
> I think there is no chance to avoid the fatal errors with the used URL?
Why? Just move DISTNAME below the MASTER_SITES and MASTER_SITE_SUBDIR
and that's it. What worried you about the URL?
> Irritating is the warning about the position of "BUILD_DEPENDS". I am
> not sure if this is the right way to optionally install a library. What
> do you think?
This is the right way. The thing is that the only BUILD_DEPENDS is
OPTION-dependent, so you can't use WITH/WITHOUT_HARU prior to the
inclusion of bsd.port.options.mk and this will enable portlint to emit
warnings. So, if I am not missing some important point, you should live
with it.
But I had glanced over Haru usage inside the current sources and it
turns out that Haru is disabled: preprocessor symbol _SAGA_DONOTUSE_HARU
is defined throughout the whole load of the Makefiles. This symbol is
actively used only inside src/saga_core/saga_api/doc_pdf.cpp and, in
fact, PDF generation is disabled if _SAGA_DONOTUSE_HARU is here.
I see no knobs to enable it without manual patching, so, if you really
don't need PDFs -- you can drop haru dependency completely. If you
still want to have it -- patch Makefile.in files once again (basing on
the value of WITH_HARU), add the needed link knobs to the LDFLAGS and,
possibly, some stuff to the CFLAGS.
Attaching slightly cleaned-up version of the Makefile from which
OPTIONS were removed.
--
Eygene
_ ___ _.--. #
\`.|\..----...-'` `-._.-'_.-'` # Remember that it is hard
/ ' ` , __.--' # to read the on-line manual
)/' _/ \ `-_, / # while single-stepping the kernel.
`-'" `"\_ ,_.-;_.-\_ ', fsc/as #
_.-'_./ {_.' ; / # -- FreeBSD Developers handbook
{_.-``-' {_/ #
-------------- next part --------------
# Ports collection makefile for: saga
# Date created: 13 November 2009
# Whom: Rainer Hurling <rhurlin at gwdg.de>
#
# $FreeBSD$
#
PORTNAME= saga
PORTVERSION= 2.0.4
CATEGORIES= math
MASTER_SITES= SF
MASTER_SITE_SUBDIR= saga-gis/SAGA%20-%20${PORTVERSION:C/\.[[:digit:]]*$//}/SAGA%20${PORTVERSION}
DISTNAME= ${PORTNAME}_${PORTVERSION}_src_linux
MAINTAINER= rhurlin at gwdg.de
COMMENT= System for Automated Geoscientific Analyses
LIB_DEPENDS= proj.5:${PORTSDIR}/graphics/proj \
gdal.14:${PORTSDIR}/graphics/gdal \
jasper.4:${PORTSDIR}/graphics/jasper \
tiff.4:${PORTSDIR}/graphics/tiff
WRKSRC= ${WRKDIR}/saga-${PORTVERSION:C/\.[[:digit:]]*$//}
USE_LDCONFIG= yes
GNU_CONFIGURE= yes
USE_WX= 2.8
CFLAGS+= -I${LOCALBASE}/include
post-patch:
@for f in `${FIND} '${WRKSRC}' -name Makefile.in` \
${WRKSRC}/configure; do \
${REINPLACE_CMD} -e's|wx-config |${WX_CONFIG} |g' "$$f"; \
done
@${REINPLACE_CMD} -e 's,malloc.h,stdlib.h,' \
${WRKSRC}/src/saga_core/saga_api/api_memory.cpp \
${WRKSRC}/src/modules_projection/pj_georeference/pj_georeference/lmdif0.c
.include <bsd.port.mk>
More information about the freebsd-ports
mailing list