From owner-freebsd-perl@FreeBSD.ORG Tue Mar 25 14:40:23 2014 Return-Path: Delivered-To: perl@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3046BC4C; Tue, 25 Mar 2014 14:40:23 +0000 (UTC) Received: from mailrelay009.isp.belgacom.be (mailrelay009.isp.belgacom.be [195.238.6.176]) by mx1.freebsd.org (Postfix) with ESMTP id 6BABC32D; Tue, 25 Mar 2014 14:40:22 +0000 (UTC) X-Belgacom-Dynamic: yes X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AlkGACKUMVNbsUul/2dsb2JhbABZgwY7S8J5gRkXdIIlAQEBBFYzCw4GBAklDxIYHgYBEgmHXAMVAQjHYQ2HMheMUoE6EQE/GIQ4BJBVhguBbIEzizaFSoMvPIE1 Received: from 165.75-177-91.adsl-dyn.isp.belgacom.be (HELO kalimero.tijl.coosemans.org) ([91.177.75.165]) by relay.skynet.be with ESMTP; 25 Mar 2014 15:40:14 +0100 Received: from kalimero.tijl.coosemans.org (kalimero.tijl.coosemans.org [127.0.0.1]) by kalimero.tijl.coosemans.org (8.14.8/8.14.8) with ESMTP id s2PEeDFj032401; Tue, 25 Mar 2014 15:40:13 +0100 (CET) (envelope-from tijl@FreeBSD.org) Date: Tue, 25 Mar 2014 15:40:13 +0100 From: Tijl Coosemans To: Guido Falsi , mat@FreeBSD.org, perl@FreeBSD.org Subject: Re: svn commit: r349107 - in head/converters/p5-Text-Iconv: . files Message-ID: <20140325154013.06cfd18a@kalimero.tijl.coosemans.org> In-Reply-To: <201403250723.s2P7N6cc052424@svn.freebsd.org> References: <201403250723.s2P7N6cc052424@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="MP_/axLHS=G3lpQ+4hx7Nh4JHbv" X-BeenThere: freebsd-perl@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: maintainer of a number of perl-related ports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Mar 2014 14:40:23 -0000 --MP_/axLHS=G3lpQ+4hx7Nh4JHbv Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline On Tue, 25 Mar 2014 07:23:06 +0000 (UTC) Guido Falsi wrote: > Author: madpilot > Date: Tue Mar 25 07:23:06 2014 > New Revision: 349107 > URL: http://svnweb.freebsd.org/changeset/ports/349107 > QAT: https://qat.redports.org/buildarchive/r349107/ > > Log: > Fix build on 10 and head when converters/libiconv is installed. > > Reported by: Mike Harding (via email) > Approved by: perl (mat) > > Added: > head/converters/p5-Text-Iconv/files/ > head/converters/p5-Text-Iconv/files/patch-Makefile.PL (contents, props changed) > Modified: > head/converters/p5-Text-Iconv/Makefile > > Modified: head/converters/p5-Text-Iconv/Makefile > ============================================================================== > --- head/converters/p5-Text-Iconv/Makefile Tue Mar 25 06:46:36 2014 (r349106) > +++ head/converters/p5-Text-Iconv/Makefile Tue Mar 25 07:23:06 2014 (r349107) > @@ -13,6 +13,15 @@ COMMENT= Perl interface to iconv() codes > USES= perl5 iconv > USE_PERL5= configure > CONFIGURE_ARGS+= INC="-I${LOCALBASE}/include" \ > - LIBS="-L${LOCALBASE}/lib ${ICONV_LIB}" > + LIBS="-L${LOCALBASE}/lib ${ICONV_LIB}" \ > + ccflags="${CFLAGS}" > > -.include > +.include > + > +post-patch: > +.if ${OSVERSION} >= 1000043 > + @${REINPLACE_CMD} 's||"/usr/include/iconv.h"|' \ > + ${WRKSRC}/Iconv.xs > +.endif > + > +.include Thanks, I received a PR about this yesterday: http://www.freebsd.org/cgi/query-pr.cgi?pr=187907 The OSVERSION check isn't correct though. It should be empty(ICONV_LIB). But, I've attached a patch that uses a different approach. You can make the port use /usr/include/iconv.h by replacing LOCALBASE in CONFIGURE_ARGS with ICONV_PREFIX. That fixes the build phase, during configure however, something(?) is still adding -I/usr/local/include to the command line so you still need -DLIBICONV_PLUG when empty(ICONV_LIB). The patch adds CFLAGS to INC in CONFIGURE_ARGS for this. You can verify this by adding verbose=1 to CONFIGURE_ARGS and running "make configure". Can perl@ review/approve this? --MP_/axLHS=G3lpQ+4hx7Nh4JHbv Content-Type: text/x-patch Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=p5-Text-Iconv.patch Index: converters/p5-Text-Iconv/Makefile =================================================================== --- converters/p5-Text-Iconv/Makefile (revision 349143) +++ converters/p5-Text-Iconv/Makefile (working copy) @@ -3,6 +3,7 @@ PORTNAME= Text-Iconv PORTVERSION= 1.7 +PORTREVISION= 1 CATEGORIES= converters perl5 MASTER_SITES= CPAN PKGNAMEPREFIX= p5- @@ -12,16 +13,7 @@ COMMENT= Perl interface to iconv() codes USES= perl5 iconv USE_PERL5= configure -CONFIGURE_ARGS+= INC="-I${LOCALBASE}/include" \ - LIBS="-L${LOCALBASE}/lib ${ICONV_LIB}" \ - ccflags="${CFLAGS}" - -.include - -post-patch: -.if ${OSVERSION} >= 1000043 - @${REINPLACE_CMD} 's||"/usr/include/iconv.h"|' \ - ${WRKSRC}/Iconv.xs -.endif +CONFIGURE_ARGS+=INC="-I${ICONV_PREFIX}/include ${CFLAGS}" \ + LIBS="-L${ICONV_PREFIX}/lib ${ICONV_LIB}" -.include +.include Index: converters/p5-Text-Iconv/files/patch-Makefile.PL =================================================================== --- converters/p5-Text-Iconv/files/patch-Makefile.PL (revision 349143) +++ converters/p5-Text-Iconv/files/patch-Makefile.PL (working copy) @@ -1,25 +0,0 @@ ---- Makefile.PL.orig 2007-10-17 16:06:22.000000000 +0200 -+++ Makefile.PL 2014-03-24 21:28:37.147481295 +0100 -@@ -90,6 +90,7 @@ - AUTHOR => 'Michael Piotrowski ') : ()), - 'LIBS' => $config{LIBS}, - 'DEFINE' => "@DEFINE", -+ 'CCFLAGS' => $config{ccflags}, - 'INC' => $config{INC}, - 'dist' => {COMPRESS => 'gzip', SUFFIX => 'gz'}, - ); -@@ -119,12 +120,12 @@ - { - # It is admittedly a bit simplistic to simply concatenate all - # flags, but it seems to work in most cases. -- $compile = join ' ', $Config{cc}, $incs, $Config{ccflags}, -+ $compile = join ' ', $Config{cc}, $incs, $config{ccflags}, - $Config{ldflags}, $libs; - } - else - { -- $compile = join ' ', $Config{cc}, $incs, $Config{ccflags}, $libs; -+ $compile = join ' ', $Config{cc}, $incs, $config{ccflags}, $libs; - } - - if (exists $config{verbose}) --MP_/axLHS=G3lpQ+4hx7Nh4JHbv--