From nobody@FreeBSD.org  Wed Jan  6 15:00:41 2010
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id ADC21106566B
	for <freebsd-gnats-submit@FreeBSD.org>; Wed,  6 Jan 2010 15:00:41 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 9D4C98FC12
	for <freebsd-gnats-submit@FreeBSD.org>; Wed,  6 Jan 2010 15:00:41 +0000 (UTC)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id o06F0fvg062010
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 6 Jan 2010 15:00:41 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id o06F0fKa062009;
	Wed, 6 Jan 2010 15:00:41 GMT
	(envelope-from nobody)
Message-Id: <201001061500.o06F0fKa062009@www.freebsd.org>
Date: Wed, 6 Jan 2010 15:00:41 GMT
From: Wen Heping <wen@FreeBSD.org>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [Patch]ports-mgmt/portlint:Fix the bug when it check apache
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         142381
>Category:       ports
>Synopsis:       [Patch]ports-mgmt/portlint:Fix the bug when it check apache
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    marcus
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jan 06 15:10:02 UTC 2010
>Closed-Date:    Sun Apr 04 18:13:08 UTC 2010
>Last-Modified:  Sun Apr 04 18:13:08 UTC 2010
>Originator:     Wen Heping
>Release:        FreeBSD 9.0-Current
>Organization:
ChangAn Middle School
>Environment:
>Description:
When portslint check the ports which depends on ports such as p5-Apache-*,
it always mistake it as apache13 or apache20 apache22, then it will produce 
the fatal error message while the ports has no problem.

For example:

fb9$ cd /usr/ports/www/p5-HTML-Mason
fb9$ portlint
FATAL: Makefile: do not depend on any apache port in *_DEPENDS directly.  Instead use USE_APACHE=VERSION, where VERSION can be found in ${PORTSDIR}/Mk/bsd.apache.mk.
FATAL: Makefile: do not depend on any apache port in *_DEPENDS directly.  Instead use USE_APACHE=VERSION, where VERSION can be found in ${PORTSDIR}/Mk/bsd.apache.mk.
2 fatal errors and 0 warnings found.


But actually p5-HTML-Mason has no problem.

The bug was caused by the regular ~m/apache/i in the source, remove the "i"
could fix the bug.

>How-To-Repeat:
fb9$ cd /usr/ports/www/p5-HTML-Mason
fb9$ portlint
FATAL: Makefile: do not depend on any apache port in *_DEPENDS directly.  Instead use USE_APACHE=VERSION, where VERSION can be found in ${PORTSDIR}/Mk/bsd.apache.mk.
FATAL: Makefile: do not depend on any apache port in *_DEPENDS directly.  Instead use USE_APACHE=VERSION, where VERSION can be found in ${PORTSDIR}/Mk/bsd.apache.mk.
2 fatal errors and 0 warnings found.

>Fix:


Patch attached with submission follows:

--- portlint.pl.orig	2010-01-06 22:52:39.000000000 +0800
+++ portlint.pl	2010-01-06 22:52:53.000000000 +0800
@@ -1213,7 +1213,7 @@
 			}
 
 			# Check for direct dependency on apache.
-			if ($m{'dep'} =~ /apache/i) {
+			if ($m{'dep'} =~ /apache/) {
 				&perror("FATAL", $file, -1, "do not depend on any apache ".
 					"port in *_DEPENDS directly.  ".
 					"Instead use USE_APACHE=VERSION, where VERSION can be ".


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->marcus 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Wed Jan 6 15:10:13 UTC 2010 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=142381 
State-Changed-From-To: open->closed 
State-Changed-By: marcus 
State-Changed-When: Sun Apr 4 18:12:57 UTC 2010 
State-Changed-Why:  
Committed, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=142381 
>Unformatted:
