Re: exec()ing a program

"OBATA Akio" <[email protected]>
Newsgroups gmane.os.netbsd.devel.pkgsrc.wip.general
Message-ID <[email protected]>
Hi,

On Mon, 26 Apr 2010 17:27:05 +0900, Stefan Schaeckeler <[email protected]> wrote:

> I'm building a package that is exec()ing gs and pstotext. It looks to me that pkgsrc wants absolute paths for exec()ing programs.
>
> For exec()ing gs, apparently, I can do this (+ appropriate patch):
>
> SUBST_CLASSES+=	gs
> SUBST_STAGE.gs=	do-configure
> SUBST_FILES.gs=	afile.c bfile.c cfile.c
> SUBST_SED.gs=	-e 's|@GS_CMD@|${TOOLS_PATH.gs}|'
>
>
> How can I do this with pstoext? TOOLS_PATH.pstotext is not defined.

You can use mk/find-prefix.mk for such purposees:

FIND_PREFIX:= PSTOTEXT_DIR=pstotext
.include "../../mk/find-prefix.mk"
#......
SUBST_SED.pstotext= -e 's|@PSTOTEXT@|${PSTOTEXT_DIR}/bin/pstotext|'
#......

-- 
OBATA Akio / [email protected]

------------------------------------------------------------------------------
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.