Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Apr 2010 09:14:11 GMT
From:      Eric Freeman <freebsdports@chillibear.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/146058: [PATCH] update devel/p5-Module-Build from 0.3601 to 0.3607
Message-ID:  <201004260914.o3Q9EB11039750@www.freebsd.org>
Resent-Message-ID: <201004260920.o3Q9K2wO007972@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         146058
>Category:       ports
>Synopsis:       [PATCH] update devel/p5-Module-Build from 0.3601 to 0.3607
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Apr 26 09:20:02 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator:     Eric Freeman
>Release:        7.2
>Organization:
>Environment:
FreeBSD localhost 7.2-RELEASE FreeBSD 7.2-RELEASE #0: Fri May  1 07:18:07 UTC 2009     root@driscoll.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  amd64
>Description:
The current release of p5-Module-Build has a small bug in it which was introduced at some point after 0.35.  I noticed it when sending in another Perl port that used this module to build and didn't have any initial problems (with my old version of Module::Build) until I submitted and the port was build against a current tree.  For details of that see ports/145386.  That port is essentially dependent on an update to the Module::Build one.

I've contacted the maintainer twice with no reply (over a period of a couple of weeks) so have submitted this patch to update the existing port to version 0.3607.

Basically during the prerequisites check done in Module::Build, version numbers are matched using
the following function:

sub _simple_prereq {
  return $_[0] =~ /^[0-9_]+\.?[0-9_]*$/; # crudly, a decimal literal
}

That's called from a simple loop that checks the versions:

for my $p ( $req, $breq ) {
    for my $k (keys %$p) {
      die "Prereq '$p->{$k}' for '$k' is not supported by
Module::Build::Compat\n"
        unless _simple_prereq($p->{$k});
    }
  }

Unfortunately my port of File::BOM (and other future ports I imagine) include the perl version as a
prerequisite, so in my case File::BOM fails with the following error:

  Prereq '5.8.3' for 'perl' is not supported by Module::Build::Compat

The latest version of Module::Build has a small fix to stop this problem,
which essentially ignores "simple" version number checks when the perquisite
is 'perl'.  That loop from above becomes:

for my $p ( $req, $breq ) {
    for my $k (keys %$p) {
      next if $k eq 'perl';
      die "Prereq '$p->{$k}' for '$k' is not supported by
Module::Build::Compat\n"
        unless _simple_prereq($p->{$k});
    }
  }


>How-To-Repeat:
Try installing my uncommitted port here: ports/145386
>Fix:
diff -rupN p5-Module-Build/Makefile p5-Module-Build/Makefile.new
--- p5-Module-Build/Makefile	2010-04-08 17:20:28.000000000 +0100
+++ p5-Module-Build/Makefile.new	2010-04-08 17:25:09.000000000 +0100
@@ -6,7 +6,7 @@
 #
 
 PORTNAME=	Module-Build
-PORTVERSION=	0.3601
+PORTVERSION=	0.3607
 CATEGORIES=	devel perl5
 MASTER_SITES=	CPAN
 PKGNAMEPREFIX=	p5-
@@ -17,7 +17,9 @@ COMMENT=	Build and install Perl modules
 
 RUN_DEPENDS=	p5-YAML>=0.35:${PORTSDIR}/textproc/p5-YAML \
 		p5-ExtUtils-CBuilder>=0.15:${PORTSDIR}/devel/p5-ExtUtils-CBuilder \
-		p5-ExtUtils-ParseXS>=1.02:${PORTSDIR}/devel/p5-ExtUtils-ParseXS
+		p5-ExtUtils-ParseXS>=1.02:${PORTSDIR}/devel/p5-ExtUtils-ParseXS \
+		p5-ExtUtils-Install>=1.54:${PORTSDIR}/devel/p5-ExtUtils-Install \
+		p5-Test-Harness>=3.16:${PORTSDIR}/devel/p5-Test-Harness
 BUILD_DEPENDS=	${RUN_DEPENDS}
 
 PERL_MODBUILD=	yes
diff -rupN p5-Module-Build/distinfo p5-Module-Build/distinfo.new
--- p5-Module-Build/distinfo	2010-04-08 17:19:02.000000000 +0100
+++ p5-Module-Build/distinfo.new	2010-04-08 17:21:35.000000000 +0100
@@ -1,3 +1,3 @@
-MD5 (Module-Build-0.3601.tar.gz) = 01020d7355aa09b2c0557ba1bf858e49
-SHA256 (Module-Build-0.3601.tar.gz) = 32a9fb9315f15dda872971c8045c5607b4a0044db444b7a63cc42415d2003733
-SIZE (Module-Build-0.3601.tar.gz) = 296085
+MD5 (Module-Build-0.3607.tar.gz) = 9dbbbed68e80e28a9e9f3ab5512a6dab
+SHA256 (Module-Build-0.3607.tar.gz) = bb7eb79be077db98980e2d2052152dd77b9de7399e371240d5fd71b665d91de2
+SIZE (Module-Build-0.3607.tar.gz) = 297358


>Release-Note:
>Audit-Trail:
>Unformatted:



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