Subject: Re: Perl Module::Build and installation to DESTDIR
To: None <tech-pkg@NetBSD.org>
From: Joerg Sonnenberger <joerg@britannica.bec.de>
List: tech-pkg
Date: 05/18/2007 12:40:05
On Wed, May 16, 2007 at 11:31:11PM +0200, Klaus Heinz wrote:
> --- module.mk 21 Apr 2007 09:41:00 -0000 1.54
> +++ module.mk 16 May 2007 21:20:29 -0000
> @@ -55,6 +55,11 @@
>
> .if ${PERL5_MODULE_TYPE} == "Module::Build"
> _PERL5_MODTYPE= modbuild
> +. if ${_USE_DESTDIR} != "no"
> +_PERL5_MODBUILD_DESTDIR_OPTION=--destdir ${DESTDIR:Q}
> +. else
> +_PERL5_MODBUILD_DESTDIR_OPTION=
> +. endif
> .elif ${PERL5_MODULE_TYPE} == "MakeMaker"
> _PERL5_MODTYPE= makemaker
> .endif
> @@ -134,7 +139,7 @@
>
> .PHONY: do-modbuild-install
> do-modbuild-install:
> - @cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ./Build install
> + @cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ./Build install ${_PERL5_MODBUILD_DESTDIR_OPTION}
Maybe just use :U and don't define it for the non-destdir case?
>
> .if target(do-${_PERL5_MODTYPE}-build) && !defined(NO_BUILD)
> do-build: do-${_PERL5_MODTYPE}-build
Looks good otherwise.
Joerg