Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 24 Feb 2008 23:24:35 -0800
From:      "Yen-Ming Lee" <leeym@leeym.com>
To:        "=?UTF-8?Q?Dag-Erling_Sm=C3=B8rgrav?=" <des@des.no>
Cc:        ports@freebsd.org, perl@freebsd.org
Subject:   Re: Port dependencies on p5-Test-*
Message-ID:  <759236930802242324o614598d1i1a8ca3cc8c12478c@mail.gmail.com>
In-Reply-To: <86zltpzrxt.fsf@ds4.des.no>

index | next in thread | previous in thread | raw e-mail

2008/2/24, Dag-Erling Smørgrav <des@des.no>:
>
> There is a ridiculous amount of p5-* ports that have completely
> unnecessary build dependencies on p5-Test-*.  These package are usually
> only needed to run unit tests (cd ${WRKSRC} && make test), which *none*
> of those ports do.
>
> (ridiculous, in this case, means close to 300)
>
> What's worse, most of these ports have RUN_DEPENDS = ${BUILD_DEPENDS},
> which means even the prebuilt packages have these unnecessary
> dependencies!
>
> All of this could be avoided by adding these few lines to the port's
> Makefile, and removing p5-Test-* from BUILD_DEPENDS:
>
> pre-configure:
>         @(cd ${WRKSRC} && ${REINPLACE_CMD} -E -e \
>             "s/'?Test::[^']+'?[[:space:]]*=>[[:space:]]'?[0-9.]+'?,//" \
>             Makefile.PL)
>
> (some ports also need to edit Build.PL)
>
> Alternatively, this could be added to bsd.perl.mk, conditional on the
> presence of a PERL_UNTESTIFY_FILES variable which would list Makefile.PL
> and / or Build.PL for the ports that require it.
>
> DES
>
> --
> Dag-Erling Smørgrav - des@des.no


I guess some of these PERL ports which depends on p5-Test;* are committed by
me.

For Makefile.PL, all dependencies are listed in 'PREREQ_PM' so it's hard to
tell which ones are really needed and which ones are needed only for tests.
For Build.PL, it will be easier since they are listed in 'requires' and
'build_requires' separately.

What I did for these packages is:

RUN_DEPENDS= the real dependencies
BUILD_DEPENDS=${RUN_DEPENDS}
BUILD_DEPENDS+= the dependencies needed only for test

It will make the port depend on the real dependencies only.

Most PERL ports can build without any other p5- port if we ignore the ones
needed for tests.
Does it mean that we should ignore BUILD_DEPENDS entirely?

Removing all p5-Test-* from Makefile.PL or Build.PL may break some ports
(for example, some other p5-Test-* ports) which really need p5-Test-*.
However, I agree to remove p5-Test-Simple from dependency since it's in PERL
core list already.

-- 
Yen-Ming Lee <leeym@leeym.com>

home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?759236930802242324o614598d1i1a8ca3cc8c12478c>