Date: Wed, 22 Sep 2010 14:51:48 +0200 From: Baptiste Daroussin <bapt@FreeBSD.org> To: perl@freebsd.org Subject: New MACROS for dependence to avoid depending on a version already in core modules Message-ID: <20100922125148.GA65578@azathoth.lan>
next in thread | raw e-mail | index | archive | help
--2B/JsCI69OhZNC5r Content-Type: multipart/mixed; boundary="AhhlLboLdkugWU4S" Content-Disposition: inline --AhhlLboLdkugWU4S Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi, Here is a quick and dirty patch that provide 3 new macros: PERL_MODULES BUILD_PERL_MODULES RUN_PERL_MODULES they replace BUILD_DEPENDS and RUN_DEPENDS (*DEPENDS can still be used) syntax is the same a *_DEPENDS except that it should depends on package rather than a file. ie: PERL_MODULES= p5-Digest-MD5>0:${PORTSDIR}/security/p5-Digest-MD5 it will first check if Digest::MD5 is in core modules if yes it will compares the version if the version is greater than the one in core modules the dependency will be added to BUILD_DEPENDS and/or RUN_DEPENDS. the core modules are found in ${PORTSDIR}/lang/${PERL_PORT}/perl.modules.mk the form is CORE_MODULES+= p5-Digest-MD5=2.39 there is a helper to build the list: make list-modules which is not perfect but quite works it should be generated for each available perl version. corelist which is used, is part of perl since 5.10 or available here devel/p5-Module-CoreList for 5.8 this is dirty but this works, before getting further I wanted to share it with you to be able to discuss it and improve it regards, Bapt --AhhlLboLdkugWU4S-- --2B/JsCI69OhZNC5r Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (FreeBSD) iEYEARECAAYFAkyZ++QACgkQ8kTtMUmk6EzUzgCglKdpC5jnAvGYzL1K7TV8Oem1 zykAoIo/UZAU1q3VBvdCOkMXQf8hgqdx =KJ2h -----END PGP SIGNATURE----- --2B/JsCI69OhZNC5r--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100922125148.GA65578>