pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

too stupid to code a codition for builtin libtirpc



Hi folks,

I am trying to fix the build of math/R-GRASS and seem unable to grasp
how definiton of USE_BUILTIN.libtirpc works. Considering this Makefile:

# $NetBSD: Makefile,v 1.11 2019/08/08 19:53:44 brook Exp $

R_PKGNAME=      GRASS
R_PKGVER=       0.3-8
CATEGORIES=     math databases geography

MAINTAINER=     pkgsrc-users%NetBSD.org@localhost
COMMENT=        Interface between GRASS 5.0 geographical information system and R

USE_LANGUAGES=  c

.if ${USE_BUILTIN.libtirpc:tl} == "yes"
CONFIGURE_ARGS+=        --with-xdr-include=/usr/include/tirpc
.else
CONFIGURE_ARGS+=        --with-xdr-include=${PREFIX}/include/tirpc
.endif

post-extract:
        ${ECHO} 'exportPattern(".")' > ${WRKSRC}/NAMESPACE

.include "../../math/R/Makefile.extension"
.include "../../devel/zlib/buildlink3.mk"
.include "../../devel/libtirpc/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"


This always has USE_BUILTIN.libtirpc undefined, apparently. I tried
variants of reordering includes, adding bsd.fast.prefs.mk … but am
unable to get rid of

$ bmake show-var VARNAME=CONFIGURE_ARGS
bmake: "[…]/pkgsrc/math/R-GRASS/Makefile" line 12: Malformed conditional '${USE_BUILTIN.libtirpc:tl} == "yes"'
bmake: Fatal errors encountered -- cannot continue
bmake: stopped making "show-var" in […]/pkgsrc/devel/pkgsrc/math/R-GRASS

But when I comment out the .if, I can do this:

$ bmake show-var VARNAME=USE_BUILTIN.libtirpc
yes

So at some point, the variable _is_ defined. But even putting the
conditional at the end doesn't seem to catch it. Is this something
special for R extensions? Clearly I don't grasp the model that
determines symbol values in bmake and when they are available.

How do I insert the desired switch to add the libtirpc header path
depending on built in use?


Alrighty then,

Thomas

-- 
Dr. Thomas Orgis
HPC @ Universität Hamburg


Home | Main Index | Thread Index | Old Index