From thierry@pompo.net  Thu Aug  8 15:15:47 2013
Return-Path: <thierry@pompo.net>
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 ESMTP id D90BE47E;
	Thu,  8 Aug 2013 15:15:47 +0000 (UTC)
	(envelope-from thierry@pompo.net)
Received: from mx1a.lautre.net (mx1a.lautre.net [80.67.160.71])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id A0CEA2A59;
	Thu,  8 Aug 2013 15:15:47 +0000 (UTC)
Received: from graf.pompo.net (graf.pompo.net [78.225.128.39])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	(Authenticated sender: thierry@pompo.net)
	by mx1a.lautre.net (Postfix) with ESMTPSA id CF25F4132B;
	Thu,  8 Aug 2013 17:15:45 +0200 (CEST)
Received: by graf.pompo.net (Postfix, from userid 1001)
	id 33F3842D193A; Thu,  8 Aug 2013 17:15:45 +0200 (CEST)
Message-Id: <20130808151545.33F3842D193A@graf.pompo.net>
Date: Thu,  8 Aug 2013 17:15:45 +0200 (CEST)
From: Thierry Thomas <thierry@pompo.net>
Reply-To: Thierry Thomas <thierry@pompo.net>
To: FreeBSD-gnats-submit@freebsd.org
Cc: kde@FreeBSD.org
Subject: devel/qmake4: gdb_dwarf_index.prf contains gsed specific syntax
X-Send-Pr-Version: 3.114
X-GNATS-Notify:

>Number:         181146
>Category:       ports
>Synopsis:       devel/qmake4: gdb_dwarf_index.prf contains gsed specific syntax
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    kde
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Aug 08 15:20:02 UTC 2013
>Closed-Date:    Thu Aug 15 11:40:55 UTC 2013
>Last-Modified:  Thu Aug 15 15:10:00 UTC 2013
>Originator:     Thierry Thomas
>Release:        FreeBSD 9.2-BETA2 i386
>Organization:
Kabbale Eros
>Environment:
System: FreeBSD graf.pompo.net 9.2-BETA2 FreeBSD 9.2-BETA2 #0 r253984: Tue Aug 6 19:35:52 CEST 2013 thierry@graf.pompo.net:/usr/obj/usr/src/sys/GRAF130324 i386


	
>Description:
	qt4-qmake-4.8.4 installs the file
	$PREFIX/share/qt4/mkspecs/features/unix/gdb_dwarf_index.prf
	which contains the following lines:

    QMAKE_GDB_INDEX += \
      test \$\$(gdb --version | sed -e \'s,[^0-9]\\+\\([0-9]\\)\\.\\([0-9]\\).*,\\1\\2,;q\') -gt 72 && \
      gdb --nx --batch --quiet -ex \'set confirm off\' -ex \"save gdb-index $$QMAKE_GDB_DIR\" -ex quit \'$(TARGET)\'  && \
      test -f $(TARGET).gdb-index && \
      $$QMAKE_OBJCOPY --add-section \'.gdb_index=$(TARGET).gdb-index\' --set-section-flags \'.gdb_index=readonly\' \'$(TARGET)\' \'$
(TARGET)\' && \
      $$QMAKE_DEL_FILE $(TARGET).gdb-index || true

	Unfortunately, the regex is specific to gsed, and when the
	corresponding scriptlet

	test $(gdb --version | sed -e 's,[^0-9]\+\([0-9]\)\.\([0-9]\).*,\1\2,;q') -gt 72

	is run, it fails with the following error:

	test: GNU: unexpected operator

>How-To-Repeat:
	Test the line:
	test $(gdb --version | sed -e 's,[^0-9]\+\([0-9]\)\.\([0-9]\).*,\1\2,;q') -gt 72

	Then compare to:
	test $(gdb --version | gsed -e 's,[^0-9]\+\([0-9]\)\.\([0-9]\).*,\1\2,;q') -gt 72

>Fix:
	Either replace sed by gsed, adding the dependency, or
	translate the regex to our sed.

	Yet better, since the base GDB is older, this part might be
	ommitted?

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->kde 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Thu Aug 8 15:20:15 UTC 2013 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=181146 

From: Raphael Kubo da Costa <rakuco@FreeBSD.org>
To: bug-followup@FreeBSD.org
Cc: Thierry Thomas <thierry@pompo.net>
Subject: Re: ports/181146: devel/qmake4: gdb_dwarf_index.prf contains gsed specific syntax
Date: Sun, 11 Aug 2013 15:28:49 +0300

 Interesting, it looks like this has been broken forever for our sed,
 which uses basic regular expressions by default.
 
 Simply replacing the "+" in the regexp with "{1,}", as suggested by
 re_format(7), seems to do the trick. I'd rather not remove the code
 altogether because it would make us needlessly deviate from upstream and
 have to commit to carrying a patch forever.
 
 I've submitted https://codereview.qt-project.org/#change,62742 to fix it
 upstream (the Qt4 backport comes after it is accepted), and I'll include
 the fix in the port after that.

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/181146: commit references a PR
Date: Thu, 15 Aug 2013 11:39:50 +0000 (UTC)

 Author: rakuco
 Date: Thu Aug 15 11:39:41 2013
 New Revision: 324763
 URL: http://svnweb.freebsd.org/changeset/ports/324763
 
 Log:
   Make the sed(1) call to add a GDB index to generated files work with base sed.
   
   Add my upstream patch to fix it: use a POSIX-compliant call instead of one
   that only works with GNU sed.
   
   Note that it does not still work automatically because `gdb' is called, and
   the version we have in base does not support index generation.
   
   PR:		ports/181146
 
 Added:
   head/devel/qmake4/files/patch-mkspecs__features__unix__gdb_dwarf_index.prf   (contents, props changed)
 Modified:
   head/devel/qmake4/Makefile
 
 Modified: head/devel/qmake4/Makefile
 ==============================================================================
 --- head/devel/qmake4/Makefile	Thu Aug 15 11:37:57 2013	(r324762)
 +++ head/devel/qmake4/Makefile	Thu Aug 15 11:39:41 2013	(r324763)
 @@ -3,6 +3,7 @@
  
  PORTNAME=	qmake
  DISTVERSION=	${QT4_VERSION}
 +PORTREVISION=	1
  CATEGORIES=	devel
  PKGNAMEPREFIX=	qt4-
  
 
 Added: head/devel/qmake4/files/patch-mkspecs__features__unix__gdb_dwarf_index.prf
 ==============================================================================
 --- /dev/null	00:00:00 1970	(empty, because file is newly added)
 +++ head/devel/qmake4/files/patch-mkspecs__features__unix__gdb_dwarf_index.prf	Thu Aug 15 11:39:41 2013	(r324763)
 @@ -0,0 +1,36 @@
 +From fdecdc39399994d2c0309005922590e2f106bbef Mon Sep 17 00:00:00 2001
 +From: Raphael Kubo da Costa <rakuco@FreeBSD.org>
 +Date: Sun, 11 Aug 2013 15:08:48 +0300
 +Subject: [PATCH] gdb_dwarf_index: Use a sed call that's more POSIX-compliant.
 +
 +sed versions other than the GNU one often default to being POSIX-compliant,
 +in which case "+" (with and without escaping) is always an ordinary
 +character.
 +
 +Achieve the same functionality in a way that works with both GNU and BSD
 +seds by using "xx*" insted of "x\+".
 +
 +Cherry-picked from qtbase/faea8d1056e4b034404febd0ef44a00e7784018d.
 +
 +Change-Id: I462e070992ff214a7261d45c208f2e5f3e962e8f
 +Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
 +---
 + mkspecs/features/unix/gdb_dwarf_index.prf | 2 +-
 + 1 file changed, 1 insertion(+), 1 deletion(-)
 +
 +diff --git a/mkspecs/features/unix/gdb_dwarf_index.prf b/mkspecs/features/unix/gdb_dwarf_index.prf
 +index e3f79cd..84b4e18 100644
 +--- mkspecs/features/unix/gdb_dwarf_index.prf
 ++++ mkspecs/features/unix/gdb_dwarf_index.prf
 +@@ -9,7 +9,7 @@
 +     }
 + 
 +     QMAKE_GDB_INDEX += \
 +-      test \$\$(gdb --version | sed -e \'s,[^0-9]\\+\\([0-9]\\)\\.\\([0-9]\\).*,\\1\\2,;q\') -gt 72 && \
 ++      test \$\$(gdb --version | sed -e \'s,[^0-9][^0-9]*\\([0-9]\\)\\.\\([0-9]\\).*,\\1\\2,;q\') -gt 72 && \
 +       gdb --nx --batch --quiet -ex \'set confirm off\' -ex \"save gdb-index $$QMAKE_GDB_DIR\" -ex quit \'$(TARGET)\'  && \
 +       test -f $(TARGET).gdb-index && \
 +       $$QMAKE_OBJCOPY --add-section \'.gdb_index=$(TARGET).gdb-index\' --set-section-flags \'.gdb_index=readonly\' \'$(TARGET)\' \'$(TARGET)\' && \
 +-- 
 +1.8.3.4
 +
 _______________________________________________
 svn-ports-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-ports-all
 To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: open->closed 
State-Changed-By: rakuco 
State-Changed-When: Thu Aug 15 11:40:54 UTC 2013 
State-Changed-Why:  
Fixed, thank you. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=181146 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/181146: commit references a PR
Date: Thu, 15 Aug 2013 15:07:30 +0000 (UTC)

 Author: rakuco
 Date: Thu Aug 15 15:07:11 2013
 New Revision: 324772
 URL: http://svnweb.freebsd.org/changeset/ports/324772
 
 Log:
   Fix `make patch'.
   
   I forgot WRKSRC was not the expected one in this port. Huge pointy hat to
   me.
   
   PR:		ports/181325
   PR:		ports/181326
   PR:		ports/181146
 
 Modified:
   head/devel/qmake4/files/patch-mkspecs__features__unix__gdb_dwarf_index.prf
 
 Modified: head/devel/qmake4/files/patch-mkspecs__features__unix__gdb_dwarf_index.prf
 ==============================================================================
 --- head/devel/qmake4/files/patch-mkspecs__features__unix__gdb_dwarf_index.prf	Thu Aug 15 14:39:14 2013	(r324771)
 +++ head/devel/qmake4/files/patch-mkspecs__features__unix__gdb_dwarf_index.prf	Thu Aug 15 15:07:11 2013	(r324772)
 @@ -20,8 +20,8 @@ Reviewed-by: Oswald Buddenhagen <oswald.
  
  diff --git a/mkspecs/features/unix/gdb_dwarf_index.prf b/mkspecs/features/unix/gdb_dwarf_index.prf
  index e3f79cd..84b4e18 100644
 ---- mkspecs/features/unix/gdb_dwarf_index.prf
 -+++ mkspecs/features/unix/gdb_dwarf_index.prf
 +--- ../mkspecs/features/unix/gdb_dwarf_index.prf
 ++++ ../mkspecs/features/unix/gdb_dwarf_index.prf
  @@ -9,7 +9,7 @@
       }
   
 _______________________________________________
 svn-ports-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-ports-all
 To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
 
>Unformatted:
