From owner-svn-ports-head@FreeBSD.ORG Mon Aug 4 10:00:38 2014 Return-Path: Delivered-To: svn-ports-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 26CB8727 for ; Mon, 4 Aug 2014 10:00:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EFE562090 for ; Mon, 4 Aug 2014 10:00:37 +0000 (UTC) Received: from dumbbell (uid 1042) (envelope-from dumbbell@FreeBSD.org) id 57c4 by svn.freebsd.org (DragonFly Mail Agent v0.9+); Mon, 04 Aug 2014 10:00:37 +0000 From: Jean-Sebastien Pedron Date: Mon, 4 Aug 2014 10:00:37 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r363986 - in head/devel/pkgconf: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <53df59c5.57c4.42f72122@svn.freebsd.org> X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Aug 2014 10:00:38 -0000 Author: dumbbell (src committer) Date: Mon Aug 4 10:00:37 2014 New Revision: 363986 URL: http://svnweb.freebsd.org/changeset/ports/363986 QAT: https://qat.redports.org/buildarchive/r363986/ Log: devel/pkgconf: Import patch to support non-newline-terminated .pc files It fixes a bug in pkgconf(1) where the last line, if not terminated by a newline character, would be chopped by one byte. This could lead to incorrect flags returned by pkgconf(1). An example is cppunit.pc from devel/cppunit: the cppunit.pc.in, used to generate cppunit.pc, isn't newline-terminated. Our sed(1) currently adds a newline to the last line, no matter what the input stream has. But that's not the case with GNU sed and our sed should be soon fixed too. In this case, "pkgconf --cflags cppunit" returned "-I" before this fix, instead of "-I/usr/local/include" now. This patch is already committed upstream. Reviewed by: bapt@ Approved by: bapt@ Phabric: https://phabric.freebsd.org/D532 Added: head/devel/pkgconf/files/ head/devel/pkgconf/files/patch-fileio.c (contents, props changed) head/devel/pkgconf/files/patch-pkg.c (contents, props changed) Modified: head/devel/pkgconf/Makefile Modified: head/devel/pkgconf/Makefile ============================================================================== --- head/devel/pkgconf/Makefile Mon Aug 4 09:49:45 2014 (r363985) +++ head/devel/pkgconf/Makefile Mon Aug 4 10:00:37 2014 (r363986) @@ -2,6 +2,7 @@ PORTNAME= pkgconf PORTVERSION= 0.9.6 +PORTREVISION= 1 CATEGORIES= devel MASTER_SITES= http://rabbit.dereferenced.org/~nenolod/distfiles/ \ http://files.etoilebsd.net/pkgconf/ Added: head/devel/pkgconf/files/patch-fileio.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/pkgconf/files/patch-fileio.c Mon Aug 4 10:00:37 2014 (r363986) @@ -0,0 +1,23 @@ +--- ./fileio.c.orig 2014-06-07 22:32:08.000000000 +0200 ++++ ./fileio.c 2014-08-04 11:24:32.522803742 +0200 +@@ -83,10 +83,18 @@ + + } + +- *s = '\0'; +- + if (c == EOF && (s == line || ferror(stream))) + return NULL; + ++ *s = '\0'; ++ ++ /* Remove newline character. */ ++ if (s > line && *(--s) == '\n') { ++ *s = '\0'; ++ ++ if (s > line && *(--s) == '\r') ++ *s = '\0'; ++ } ++ + return line; + } Added: head/devel/pkgconf/files/patch-pkg.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/pkgconf/files/patch-pkg.c Mon Aug 4 10:00:37 2014 (r363986) @@ -0,0 +1,11 @@ +--- ./pkg.c.orig 2014-06-07 22:32:08.000000000 +0200 ++++ ./pkg.c 2014-08-04 11:24:32.524802321 +0200 +@@ -212,8 +212,6 @@ + { + char op, *p, *key, *value; + +- readbuf[strlen(readbuf) - 1] = '\0'; +- + p = readbuf; + while (*p && (isalpha(*p) || isdigit(*p) || *p == '_' || *p == '.')) + p++;