From owner-freebsd-ports-bugs@FreeBSD.ORG Sat Dec 11 00:30:47 2004 Return-Path: Delivered-To: freebsd-ports-bugs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DF59516A4CE for ; Sat, 11 Dec 2004 00:30:47 +0000 (GMT) Received: from bookcase.com (user-119a5l2.biz.mindspring.com [66.149.22.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3D3CB43D4C for ; Sat, 11 Dec 2004 00:30:47 +0000 (GMT) (envelope-from chadf@bookcase.com) Received: from bookcase.com (chadf@localhost [127.0.0.1]) by bookcase.com (8.13.1/8.12.2) with ESMTP id iBB0UkuR083233 for ; Fri, 10 Dec 2004 19:30:46 -0500 (EST) (envelope-from chadf@bookcase.com) Received: from localhost (chadf@localhost) by bookcase.com (8.13.1/8.12.8/Submit) with ESMTP id iBB0Uk8a083230 for ; Fri, 10 Dec 2004 19:30:46 -0500 (EST) Date: Fri, 10 Dec 2004 19:30:46 -0500 (EST) From: "Chad M. Fraleigh" To: freebsd-ports-bugs@FreeBSD.org In-Reply-To: <200412090937.iB99b0uw034894@freefall.freebsd.org> Message-ID: <20041210190416.R82406@bookcase.com> References: <200412090937.iB99b0uw034894@freefall.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: Re: ports/74541: [patch] ports/mail/p5-Sendmail-Milter does not compile with threaded perl installed X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Dec 2004 00:30:48 -0000 > Somehow I feel that his isn't going to work since 'make' will try to run > 'perl' before it gets to the point of installing it as a prerequisite: > > p5-Sendmail-Milter@menelaos [10:33:56]> make > perl: not found > "Makefile", line 20: warning: "perl -e 'use Config; if($$Config{usethreads}) { print "YES" }'" returned non-zero status I expected perl to be bundled with the base OS, but I can accept older/newer/other OS's that may not have it. A slight adjustment of adding "|| exit 0" to the end of the perl command will suppress the error. The will leave it with the following options: 1) There is no perl installed. - In this case the original error is given, telling the user to install a threaded perl. 2) The non-threaded perl is installed. - Give the original error, so the user will know to uninstall their current perl (if a port) and manually install the threaded perl. 3) Threaded perl is installed. - Continue and compile the port. Now condition #1 isn't ideal, but I'm not sure how to tell a prerequisite to compile with specific make options (i.e. WITH_THREADS=yes). One way around this would be to create a ports/lang/perl5[.8]-threaded wrapper port and make that the prerequisite build. And even without that extra step, this would still be better than it currently is by not erroneously telling the user to do what has already been done (or having to hack the Makefile to make it work). Here is an updated patch: --- Makefile.orig Thu Aug 7 16:44:51 2003 +++ Makefile Thu Dec 9 07:20:27 2004 @@ -15,7 +15,13 @@ MAINTAINER= ports@FreeBSD.org COMMENT= A module to write mail filters in Perl using sendmail's mail filter API +.if !defined(PERL_THREADED) +PERL_THREADED!= perl -e 'use Config; if($$Config{usethreads}) { print "YES" }' || exit 0 +.endif + +.if ${PERL_THREADED} != "YES" IGNORE= "Requires perl compiled manually with threads." +.endif PERL_CONFIGURE= yes MAN3PREFIX= ${PREFIX}/lib/perl5/${PERL_VERSION} -Chad