From jbeich@tormail.org  Wed Sep 26 01:18:15 2012
Return-Path: <jbeich@tormail.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id A58A3106566B
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 26 Sep 2012 01:18:15 +0000 (UTC)
	(envelope-from jbeich@tormail.org)
Received: from outgoing.tormail.org (outgoing.tormail.org [82.221.96.22])
	by mx1.freebsd.org (Postfix) with ESMTP id 4482B8FC08
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 26 Sep 2012 01:18:14 +0000 (UTC)
Received: from localhost ([127.0.0.1] helo=internal.tormail.org)
	by outgoing.tormail.org with esmtp (Exim 4.72)
	(envelope-from <jbeich@tormail.org>)
	id 1TGgGS-0004T8-Rx
	for FreeBSD-gnats-submit@freebsd.org; Wed, 26 Sep 2012 05:18:13 +0400
Received: from jbeich by internal.tormail.org with local (Exim 4.63)
	(envelope-from <jbeich@tormail.org>)
	id 1TGgEu-00072L-0j
	for FreeBSD-gnats-submit@freebsd.org; Wed, 26 Sep 2012 01:16:43 +0000
Message-Id: <1TGgEu-00072L-0j@internal.tormail.org>
Date: Wed, 26 Sep 2012 06:16:06 +0500
From: Jan Beich <jbeich@tormail.org>
To: FreeBSD-gnats-submit@freebsd.org
Subject: [patch] devel/gdb: drop dependency on devel/readline

>Number:         172077
>Category:       ports
>Synopsis:       [patch] devel/gdb: drop dependency on devel/readline
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    zeising
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Sep 26 01:20:05 UTC 2012
>Closed-Date:    Sun Oct 28 21:50:56 UTC 2012
>Last-Modified:  Sun Oct 28 21:50:56 UTC 2012
>Originator:     Jan Beich
>Release:        FreeBSD 10.0-CURRENT amd64
>Organization:
>Environment:
http://sourceware.org/git/?p=gdb.git;a=blobdiff;f=gdb/tui/tui-io.c;h=afcd9f9
>Description:
Partially revert r289869. readline removal from base was met with flak[1].

[1] http://marc.info/?l=freebsd-current&m=132254304216015
>How-To-Repeat:
>Fix:
--- base_readline.diff begins here ---
Index: devel/gdb/Makefile
===================================================================
--- devel/gdb/Makefile	(revision 304222)
+++ devel/gdb/Makefile	(working copy)
@@ -39,9 +39,9 @@ MAN1=	gdb${VER}.1
 
 ONLY_FOR_ARCHS=	i386 amd64	# untested elsewhere, might work
 
-# Forcing to use readline.6 from ports (newer readline in FreeBSD world is not
-# compatible anymore).
-USE_READLINE=	port
+# renamed in readline 6.0
+CFLAGS+=	-D_rl_echoing_p=readline_echoing_p
+USE_READLINE=	base
 
 OPTIONS_DEFINE=	DEBUG EXPAT PYTHON THREADS GDB_LINK
 GDB_LINK_DESC=	Create the gdb link
--- base_readline.diff ends here ---
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: edwin 
State-Changed-When: Wed Sep 26 01:20:17 UTC 2012 
State-Changed-Why:  
Awaiting maintainers feedback (via the GNATS Auto Assign Tool) 

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

From: Edwin Groothuis <edwin@FreeBSD.org>
To: luca.pizzamiglio@gmail.com
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/172077: [patch] devel/gdb: drop dependency on devel/readline
Date: Wed, 26 Sep 2012 01:20:14 UT

 Maintainer of devel/gdb,
 
 Please note that PR ports/172077 has just been submitted.
 
 If it contains a patch for an upgrade, an enhancement or a bug fix
 you agree on, reply to this email stating that you approve the patch
 and a committer will take care of it.
 
 The full text of the PR can be found at:
     http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/172077
 
 -- 
 Edwin Groothuis via the GNATS Auto Assign Tool
 edwin@FreeBSD.org
Responsible-Changed-From-To: freebsd-ports-bugs->zeising 
Responsible-Changed-By: zeising 
Responsible-Changed-When: Wed Sep 26 15:02:09 UTC 2012 
Responsible-Changed-Why:  
I'll take it. 

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

From: Luca Pizzamiglio <luca.pizzamiglio@gmail.com>
To: bug-followup@freebsd.org
Cc:  
Subject: Re: ports/172077: [patch] devel/gdb: drop dependency on devel/readline
Date: Mon, 1 Oct 2012 09:39:51 +0200

 unfortunately, I could not accept this patch...
 
 I tried to build gdb with this patch on redports and it failed on
 every system I tried...
 Moreover, I think it's better to use the ports readline library, it's
 more consistent with the actual gdb source...
 
 Best regards,
 Luca
 
 On Wed, Sep 26, 2012 at 3:20 AM, Edwin Groothuis <edwin@freebsd.org> wrote:
 > Maintainer of devel/gdb,
 >
 > Please note that PR ports/172077 has just been submitted.
 >
 > If it contains a patch for an upgrade, an enhancement or a bug fix
 > you agree on, reply to this email stating that you approve the patch
 > and a committer will take care of it.
 >
 > The full text of the PR can be found at:
 >     http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/172077
 >
 > --
 > Edwin Groothuis via the GNATS Auto Assign Tool
 > edwin@FreeBSD.org

From: Jan Beich <jbeich@tormail.org>
To: Luca Pizzamiglio <luca.pizzamiglio@gmail.com>
Cc: bug-followup@freebsd.org
Subject: Re: ports/172077: [patch] devel/gdb: drop dependency on devel/readline
Date: Thu, 11 Oct 2012 06:56:34 +0400

 --=-=-=
 Content-Type: text/plain
 
 (please CC me, I don't get replies otherwise)
 
 Luca Pizzamiglio <luca.pizzamiglio@gmail.com> writes:
 
 > I tried to build gdb with this patch on redports and it failed on
 > every system I tried...
 
 bsd.port.mk adds port CFLAGS/LDFLAGS unconditionally on 10.0. This makes
 my patch fail there due to readline_echoing_p not being present in
 devel/readline. It's a known bug, see ports/172079.
 
 https://redports.org/buildarchive/20121011010307-18811/ # 10.0 not built
 https://redports.org/buildarchive/20121011020007-63264/
 
 > Moreover, I think it's better to use the ports readline library, it's
 > more consistent with the actual gdb source...
 
 How about an option to choose the color then?
 
 
 --=-=-=
 Content-Type: text/x-patch
 Content-Disposition: attachment; filename=readline_option.diff
 
 Index: devel/gdb/Makefile
 ===================================================================
 --- devel/gdb/Makefile	(revision 305684)
 +++ devel/gdb/Makefile	(working copy)
 @@ -24,13 +24,12 @@ CONFIGURE_ENV=	CONFIGURED_M4=m4 CONFIGURED_BISON=b
  CONFIGURE_ARGS=	--program-suffix=${PORTVERSION:S/.//g} \
  		--with-gdb-datadir=${PREFIX}/share/gdb${PORTVERSION:S/.//g} \
  		--with-libiconv-prefix=${LOCALBASE} \
 -		--with-system-readline \
  		--without-libunwind \
  		--enable-target=all \
  		--enable-tui
  CFLAGS:=	${CFLAGS:C/ +$//}	# blanks at EOL creep in sometimes
  CFLAGS+=	-DRL_NO_COMPAT
 -EXCLUDE=	dejagnu expect readline sim texinfo intl
 +EXCLUDE=	dejagnu expect sim texinfo intl
  EXTRACT_AFTER_ARGS=	| ${TAR} -xf - ${EXCLUDE:S/^/--exclude /} \
  			--no-same-owner --no-same-permissions
  VER=	${PORTVERSION:S/.//g}
 @@ -39,13 +39,14 @@ MAN1=	gdb${VER}.1
  
  ONLY_FOR_ARCHS=	i386 amd64	# untested elsewhere, might work
  
 -# Forcing to use readline.6 from ports (newer readline in FreeBSD world is not
 -# compatible anymore).
 -USE_READLINE=	port
 -
  OPTIONS_DEFINE=	DEBUG EXPAT PYTHON THREADS GDB_LINK
 +OPTIONS_SINGLE_READLINE=	BASE_READLINE BUNDLED_READLINE PORT_READLINE
 +OPTIONS_SINGLE=	READLINE
 +BASE_READLINE_DESC=	from base system
 +BUNDLED_READLINE_DESC=	from gdb distfile
 +PORT_READLINE_DESC=	from devel/readline
  GDB_LINK_DESC=	Create the gdb link
 -OPTIONS_DEFAULT=	THREADS GDB_LINK
 +OPTIONS_DEFAULT=	THREADS GDB_LINK PORT_READLINE
  
  .include <bsd.port.options.mk>
  
 @@ -59,6 +60,18 @@ PLIST_SUB+=	GDB_LINK="@comment "
  USE_PYTHON=	2.5-2.7
  .endif
  
 +.if ! ${PORT_OPTIONS:MBUNDLED_READLINE}
 +EXCLUDE+=	readline
 +CONFIGURE_ARGS+=--with-system-readline
 +.endif
 +
 +.if ${PORT_OPTIONS:MBASE_READLINE}
 +CFLAGS+=	-D_rl_echoing_p=readline_echoing_p # < 6.0
 +USE_READLINE=	base
 +.elif ${PORT_OPTIONS:MPORT_READLINE}
 +USE_READLINE=	port
 +.endif
 +
  .include <bsd.port.pre.mk>
  
  .if ${PORT_OPTIONS:MTHREADS}
 
 --=-=-=--

From: Luca Pizzamiglio <luca.pizzamiglio@gmail.com>
To: bug-followup@freebsd.org, jbeich@tormail.org
Cc:  
Subject: Re: ports/172077: [patch] devel/gdb: drop dependency on devel/readline
Date: Wed, 17 Oct 2012 17:29:49 +0200

 Hi, I integrated your patch in this Pr ports/172828, that also close
 the current one.
 
 I found and correct a small error: the line:
 .if ! ${PORT_OPTIONS:MBUNDLED_READLINE}
 
 doesn't work, the right one is:
 .if empty(PORT_OPTIONS:MBUNDLED_READLINE)
 
 Thanks for the support
 Luca

From: Jan Beich <jbeich@tormail.org>
To: Luca Pizzamiglio <luca.pizzamiglio@gmail.com>
Cc: bug-followup@freebsd.org
Subject: Re: ports/172077: [patch] devel/gdb: drop dependency on devel/readline
Date: Wed, 17 Oct 2012 14:55:27 -0500

 Luca Pizzamiglio <luca.pizzamiglio@gmail.com> writes:
 
 > Hi, I integrated your patch in this Pr ports/172828, that also close
 > the current one.
 >
 > I found and correct a small error: the line:
 > .if ! ${PORT_OPTIONS:MBUNDLED_READLINE}
 >
 > doesn't work,
 
 http://marc.info/?l=freebsd-ports&m=134951696126022
 
 > the right one is:
 > .if empty(PORT_OPTIONS:MBUNDLED_READLINE)
 
 It's not "the" right one, just another way of spelling.
 
 >
 > Thanks for the support
 > Luca
State-Changed-From-To: feedback->closed 
State-Changed-By: rakuco 
State-Changed-When: Sun Oct 28 21:50:55 UTC 2012 
State-Changed-Why:  
Closing since this was committed as part of ports/172828. 

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