Bug 87318 - [patch] bsd.port.mk - add support for PERL_RUN_DEPENDS and PERL_BUILD_DEPENDS
[patch] bsd.port.mk - add support for PERL_RUN_DEPENDS and PERL_BUILD_DEPENDS
Status: Closed FIXED
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s)
Latest
Any Any
: Normal Affects Only Me
Assigned To: Edwin Groothuis
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-10-12 12:40 UTC by edwin
Modified: 2006-04-04 23:50 UTC (History)
0 users

See Also:


Attachments
file.diff (10.97 KB, patch)
2005-10-12 12:40 UTC, edwin
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description edwin 2005-10-12 12:40:16 UTC
Perl modules produce horrible RUN_DEPENDS and BUILD_DEPENDS:

    BUILD_DEPENDS=  \
                ${SITE_PERL}/${PERL_ARCH}/Digest/MD5.pm:${PORTSDIR}/security/p5-Digest-MD5 \
                ${SITE_PERL}/MIME/Tools.pm:${PORTSDIR}/mail/p5-MIME-Tools \
                ${SITE_PERL}/Time/Timezone.pm:${PORTSDIR}/devel/p5-Time-modules \
                ${SITE_PERL}/${PERL_ARCH}/DBD/SQLite2.pm:${PORTSDIR}/databases/p5-DBD-SQLite2 \
                ${SITE_PERL}/${PERL_ARCH}/XML/Parser.pm:${PORTSDIR}/textproc/p5-XML-Parser \
                ${SITE_PERL}/${PERL_ARCH}/Curses.pm:${PORTSDIR}/devel/p5-Curses \
                ${SITE_PERL}/Curses/UI.pm:${PORTSDIR}/devel/p5-Curses-UI \
                ${SITE_PERL}/Locale/TextDomain.pm:${PORTSDIR}/devel/p5-Locale-libintl

It would be much nicer if you could define it easier:

    PERL_BUILD_DEPENDS=	\
		Digest::MD5:${PORTSDIR}/security/p5-Digest-MD5 \
                MIME::Tools:${PORTSDIR}/mail/p5-MIME-Tools \
                Time::Timezone:${PORTSDIR}/devel/p5-Time-modules \
                DBD::SQLite2:${PORTSDIR}/databases/p5-DBD-SQLite2 \
                XML::Parser:${PORTSDIR}/textproc/p5-XML-Parser \
                Curses:${PORTSDIR}/devel/p5-Curses \
                Curses::UI:${PORTSDIR}/devel/p5-Curses-UI \
                Locale::TextDomain:${PORTSDIR}/devel/p5-Locale-libintl

Unfortunately, this introduced too much double code to handle the
::'s. But this layout didn't:

    PERL_BUILD_DEPENDS=	\
		Digest-MD5:${PORTSDIR}/security/p5-Digest-MD5 \
                MIME-Tools:${PORTSDIR}/mail/p5-MIME-Tools \
                Time-Timezone:${PORTSDIR}/devel/p5-Time-modules \
                DBD-SQLite2:${PORTSDIR}/databases/p5-DBD-SQLite2 \
                XML-Parser:${PORTSDIR}/textproc/p5-XML-Parser \
                Curses:${PORTSDIR}/devel/p5-Curses \
                Curses-UI:${PORTSDIR}/devel/p5-Curses-UI \
                Locale-TextDomain:${PORTSDIR}/devel/p5-Locale-libintl

Fix: This patch adds support for PERL_RUN_DEPENDS and PERL_BUILD_DEPENDS
by checking the existance of the Perl modules with the "perl -e
'use module;'" command. It completes all the possible -fetch, -list
and pretty-print targets.

If this patch gets commited, I volunteer for updating the Porters
Manual and, if given a carte blanch, a single sweep to convert all
the ports.
Comment 1 Anton Berezin freebsd_committer 2005-10-12 12:45:41 UTC
On Wed, Oct 12, 2005 at 09:34:14PM +1000, Edwin Groothuis wrote:
> 
> >Number:         87318
> >Category:       ports
> >Synopsis:       [patch] bsd.port.mk - add support for PERL_RUN_DEPENDS and PERL_BUILD_DEPENDS

>     PERL_BUILD_DEPENDS=	\
> 		Digest-MD5:${PORTSDIR}/security/p5-Digest-MD5 \
>                 MIME-Tools:${PORTSDIR}/mail/p5-MIME-Tools \
>                 Time-Timezone:${PORTSDIR}/devel/p5-Time-modules \
>                 DBD-SQLite2:${PORTSDIR}/databases/p5-DBD-SQLite2 \
>                 XML-Parser:${PORTSDIR}/textproc/p5-XML-Parser \
>                 Curses:${PORTSDIR}/devel/p5-Curses \
>                 Curses-UI:${PORTSDIR}/devel/p5-Curses-UI \
>                 Locale-TextDomain:${PORTSDIR}/devel/p5-Locale-libintl

If I get a vote, I am all for it!  Nice job, Edwin!

\Anton.
-- 
An undefined problem has an infinite number of solutions.
-- Robert A. Humphrey
Comment 2 Anton Berezin freebsd_committer 2005-10-12 12:45:58 UTC
Responsible Changed
From-To: freebsd-ports-bugs->portmgr

Portmgr territory.
Comment 3 edwin 2005-10-14 09:11:26 UTC
Please see the discussion at 
    http://docs.freebsd.org/cgi/mid.cgi?20051012114222.GD1278
for other peoples opinions and my replies.


-- 
Edwin Groothuis      |            Personal website: http://www.mavetju.org
edwin@mavetju.org    |          Weblog: http://weblog.barnet.com.au/edwin/
Comment 4 Mark Linimon freebsd_committer 2005-12-11 06:35:28 UTC
State Changed
From-To: open->feedback

I was not able to get the patch to apply due to two items: a) whitespace 
issues; b) premature inclusion of patch-dos2unix which is introduced in 
another PR.  Submitter should double-check my work.
Comment 5 Edwin Groothuis freebsd_committer 2005-12-12 23:11:53 UTC
State Changed
From-To: feedback->open

Feedback given 

http://www.freebsd.org/cgi/query-pr.cgi?pr=87318 

Adding to audit trail from misfiled PR ports/90314:

Date: Tue, 13 Dec 2005 10:11:33 +1100
Comment 6 Mark Linimon freebsd_committer 2005-12-19 01:27:59 UTC
State Changed
From-To: open->analyzed

Accepted for testing on the cluster.
Comment 7 Mark Linimon freebsd_committer 2006-01-21 19:52:02 UTC
State Changed
From-To: analyzed->closed

Committed, thanks.
Comment 8 Edwin Groothuis freebsd_committer 2006-01-21 21:48:34 UTC
State Changed
From-To: closed->open

over to myself for documentation and implementation 


Comment 9 Edwin Groothuis freebsd_committer 2006-01-21 21:48:34 UTC
Responsible Changed
From-To: portmgr->edwin

over to myself for documentation and implementation
Comment 10 Edwin Groothuis freebsd_committer 2006-01-21 21:48:34 UTC
State Changed
From-To: closed->open

over to myself for documentation and implementation 


Comment 11 Edwin Groothuis freebsd_committer 2006-01-21 21:48:34 UTC
Responsible Changed
From-To: portmgr->edwin

Over to myself for documentation and implementation
Comment 12 Edwin Groothuis freebsd_committer 2006-04-04 23:49:55 UTC
State Changed
From-To: open->closed

patch not implemented