Date: Tue, 20 Jan 2004 14:20:05 +0300 From: skv@FreeBSD.org To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/61621: Add support for p5-Module::Build into bsd.port.mk Message-ID: <E1AitvR-0007B1-Nj@mail.3wgraphics.net> Resent-Message-ID: <200401201120.i0KBKCYr006294@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 61621 >Category: ports >Synopsis: Add support for p5-Module::Build into bsd.port.mk >Confidential: no >Severity: serious >Priority: high >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Tue Jan 20 03:20:12 PST 2004 >Closed-Date: >Last-Modified: >Originator: Sergey Skvortsov >Release: FreeBSD 4.9-STABLE i386 >Organization: <Organization of PR author (multiple lines)> >Environment: <Relevant environment information (multiple lines)> >Description: "Module::Build" is a system for building, testing, and installing Perl modules. It will replace obsoleted "ExtUtils::MakeMaker". Many of perl modules on CPAN upgrade its Makefile.PL scripts to Build.PL. This patch is intended to add support for such modules into bsd.port.mk. In new-fashion ports just one line in port's Makefile should be added: PERL_MODBUILD= yes (instead usual "PERL_CONFIGURE= yes"). Also this patch make operations with SITE_PERL more simple and obvious. >How-To-Repeat: <Code/input/activities to reproduce the problem (multiple lines)> >Fix: --- bsd.port.orig.mk Tue Jan 20 13:00:44 2004 +++ bsd.port.mk Tue Jan 20 13:54:09 2004 @@ -327,6 +327,7 @@ # (value: perl5) # SITE_PERL - Directory name where site specific perl packages go. # This value is added to PLIST_SUB. +# PERL_MODBUILD - Use Module::Build to configure, build and install port. ## # USE_BISON - Says that the port uses bison for building. ## @@ -1095,7 +1096,8 @@ PERL_PORT?= perl5 .endif -SITE_PERL?= ${LOCALBASE}/lib/perl5/site_perl/${PERL_VER} +SITE_PERL_REL?= lib/perl5/site_perl/${PERL_VER} +SITE_PERL?= ${LOCALBASE}/${SITE_PERL_REL} .if exists(/usr/bin/perl5) && ${OSVERSION} >= 300000 && ${OSVERSION} < 500036 PERL5= /usr/bin/perl${PERL_VERSION} @@ -1598,7 +1600,22 @@ PLIST_SUB+= PERL_VERSION=${PERL_VERSION} \ PERL_VER=${PERL_VER} \ PERL_ARCH=${PERL_ARCH} \ - SITE_PERL=${SITE_PERL:S|^${LOCALBASE}/||} + SITE_PERL=${SITE_PERL_REL} + +.if defined(PERL_MODBUILD) +PERL_CONFIGURE= yes +CONFIGURE_SCRIPT?= Build.PL +BUILD_DEPENDS+= ${SITE_PERL}/Module/Build.pm:${PORTSDIR}/devel/p5-Module-Build +ALL_TARGET?= +PL_BUILD?= Build +CONFIGURE_ARGS+= \ + install_path=lib="${PREFIX}/${SITE_PERL_REL}" \ + install_path=arch="${PREFIX}/${SITE_PERL_REL}/${PERL_ARCH}" \ + install_path=script="${PREFIX}/bin" \ + install_path=bin="${PREFIX}/bin" \ + install_path=libdoc="${MAN3PREFIX}/man/man3" \ + install_path=bindoc="${MAN1PREFIX}/man/man1" +.endif .if defined(PERL_CONFIGURE) USE_PERL5= yes @@ -3076,9 +3093,13 @@ .if defined(USE_GMAKE) @(cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} ${ALL_TARGET}) .else +.if defined(PERL_MODBUILD) + @(cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} ${PERL5} ${PL_BUILD} ${MAKE_ARGS} ${ALL_TARGET}) +.else @(cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} ${ALL_TARGET}) .endif .endif +.endif # Check conflicts @@ -3120,11 +3141,15 @@ .endif .endif .else defined(USE_GMAKE) +.if defined(PERL_MODBUILD) + @(cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} ${PERL5} ${PL_BUILD} ${MAKE_ARGS} ${INSTALL_TARGET}) +.else @(cd ${INSTALL_WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} ${INSTALL_TARGET}) .if defined(USE_IMAKE) && !defined(NO_INSTALL_MANPAGES) @(cd ${INSTALL_WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} install.man) .if ${XFREE86_HTML_MAN:L} == yes @${MKHTMLINDEX} ${PREFIX}/lib/X11/doc/html +.endif .endif .endif .endif >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E1AitvR-0007B1-Nj>