From murashin@gfd-dennou.org  Tue Mar 25 11:22:46 2014
Return-Path: <murashin@gfd-dennou.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 A8E60A40
	for <freebsd-gnats-submit@freebsd.org>; Tue, 25 Mar 2014 11:22:46 +0000 (UTC)
Received: from dennou-k.gfd-dennou.org (studenno.kugi.kyoto-u.ac.jp [130.54.59.159])
	by mx1.freebsd.org (Postfix) with SMTP id 23A32D31
	for <freebsd-gnats-submit@freebsd.org>; Tue, 25 Mar 2014 11:22:45 +0000 (UTC)
Received: (qmail 16634 invoked by uid 0); 25 Mar 2014 20:22:43 +0900
Received: from unknown (HELO localhost) (125.4.234.249)
	by studenno.kugi.kyoto-u.ac.jp with (RC4-SHA encrypted) SMTP; Tue, 25 Mar 2014 20:22:43 +0900
Message-Id: <20140325.202125.336563667.murashin@gfd-dennou.org>
Date: Tue, 25 Mar 2014 20:21:25 +0900 (JST)
From: Shin-ya Murakami <murashin@gfd-dennou.org>
To: FreeBSD-gnats-submit@freebsd.org
Subject: lang/ruby{20,21}: support for readline 6.3

>Number:         187928
>Category:       ports
>Synopsis:       lang/ruby{20,21}: support for readline 6.3
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    swills
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Tue Mar 25 11:30:00 UTC 2014
>Closed-Date:    Fri May 30 18:36:34 UTC 2014
>Last-Modified:  Fri May 30 18:40:00 UTC 2014
>Originator:     Shin-ya Murakami
>Release:        FreeBSD 11.0-CURRENT amd64
>Organization:
GFD-Dennou Club
>Environment:
System: FreeBSD phase 11.0-CURRENT FreeBSD 11.0-CURRENT #0 r263062: Sat Mar 15 02:00:48 JST 2014 murashin@phase:/usr/obj/usr/src/sys/PHASE amd64

>Description:
	build of lang/ruby{20,21} were broken because of readline update.
	See https://bugs.ruby-lang.org/issues/9578 for details.
	The attached patch is available for both of lang/ruby{20,21}.
>How-To-Repeat:
	just type make in the ports dirs with readline-6.3.
>Fix:

--- ruby21.diff begins here ---
diff -urN /usr/ports/lang/ruby21/files/patch-ext_readline.c ruby21/files/patch-ext_readline.c
--- /usr/ports/lang/ruby21/files/patch-ext_readline.c	1970-01-01 09:00:00.000000000 +0900
+++ ruby21/files/patch-ext_readline.c	2014-03-25 18:20:14.260403000 +0900
@@ -0,0 +1,12 @@
+--- ext/readline/readline.c	2013/10/29 03:09:00	43458
++++ ext/readline/readline.c	2014/03/01 07:19:08	45225
+@@ -1974,7 +1974,7 @@
+ 
+     rl_attempted_completion_function = readline_attempted_completion_function;
+ #if defined(HAVE_RL_PRE_INPUT_HOOK)
+-    rl_pre_input_hook = (Function *)readline_pre_input_hook;
++    rl_pre_input_hook = (rl_hook_func_t *)readline_pre_input_hook;
+ #endif
+ #ifdef HAVE_RL_CATCH_SIGNALS
+     rl_catch_signals = 0;
+
--- ruby21.diff ends here ---


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->ruby 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Tue Mar 25 15:58:39 UTC 2014 
Responsible-Changed-Why:  
Over to maintainer(s). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=187928 
Responsible-Changed-From-To: ruby->swills 
Responsible-Changed-By: swills 
Responsible-Changed-When: Wed Mar 26 03:08:55 UTC 2014 
Responsible-Changed-Why:  
I'll take it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=187928 
State-Changed-From-To: open->closed 
State-Changed-By: swills 
State-Changed-When: Fri May 30 18:36:33 UTC 2014 
State-Changed-Why:  
Committed. Thanks! 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/187928: commit references a PR
Date: Fri, 30 May 2014 18:34:34 +0000 (UTC)

 Author: swills
 Date: Fri May 30 18:34:29 2014
 New Revision: 355890
 URL: http://svnweb.freebsd.org/changeset/ports/355890
 QAT: https://qat.redports.org/buildarchive/r355890/
 
 Log:
   - Force use of libreadline from ports rather than base, in order to avoid
     unexpectedly getting readline from ports if it's already installed.
   - Add patch to work with newer libreadline
   - Provide an option to use libedit from ports, avoiding the libedit in base.
   - Note 1: The patch to work with newer libreadline is only applied in the
     libreadline case since it actually breaks building with libedit.
   - Note 2: libreadline is not BSD licensed and while libedit would be
     preferable, it seems to have issues with UTF8 still, see ruby bug 9204. Once
     that's resolved, we can make libedit the default.
   
   PR:		ports/187928 [1] (based on)
   PR:		ports/188077 [2] (based on)
   Submitted by:	Shin-ya Murakami <murashin@gfd-dennou.org> [1]
   Submitted by:	Christoph Moench-Tegeder <cmt@burggraben.net> [2]
   Obtained from:	http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ext/readline/readline.c?r1=43458&r2=45225 (ruby upstream)
   MFH:		2014Q2
 
 Added:
   head/lang/ruby20/files/extra-patch-ext__readline__readline.c   (contents, props changed)
   head/lang/ruby21/files/extra-patch-ext__readline__readline.c   (contents, props changed)
 Modified:
   head/Mk/bsd.ruby.mk
   head/lang/ruby20/Makefile
   head/lang/ruby21/Makefile
 
 Modified: head/Mk/bsd.ruby.mk
 ==============================================================================
 --- head/Mk/bsd.ruby.mk	Fri May 30 18:33:59 2014	(r355889)
 +++ head/Mk/bsd.ruby.mk	Fri May 30 18:34:29 2014	(r355890)
 @@ -193,7 +193,7 @@ RUBY21=			"@comment "
  # Ruby 2.0
  #
  RUBY_RELVERSION=	2.0.0
 -RUBY_PORTREVISION=	5
 +RUBY_PORTREVISION=	6
  RUBY_PORTEPOCH=		1
  RUBY_PATCHLEVEL=	353
  
 @@ -209,7 +209,7 @@ RUBY21=			"@comment "
  # Ruby 2.1
  #
  RUBY_RELVERSION=	2.1.1
 -RUBY_PORTREVISION=	1
 +RUBY_PORTREVISION=	2
  RUBY_PORTEPOCH=		1
  RUBY_PATCHLEVEL=	0
  
 
 Modified: head/lang/ruby20/Makefile
 ==============================================================================
 --- head/lang/ruby20/Makefile	Fri May 30 18:33:59 2014	(r355889)
 +++ head/lang/ruby20/Makefile	Fri May 30 18:34:29 2014	(r355890)
 @@ -40,16 +40,25 @@ USE_AUTOTOOLS=	autoconf
  WRKSRC=		${WRKDIR}/${PORTNAME}-${RUBY_DISTVERSION}
  
  RUBY_VER=		2.0
 -USE_BZIP2=		yes
  USE_RUBY=		yes
  RUBY_NO_BUILD_DEPENDS=	yes
  RUBY_NO_RUN_DEPENDS=	yes
  
  NO_LATEST_LINK=	yes
  
 -OPTIONS_DEFINE=	RDOC DEBUG
 -RDOC_DESC=	Build and install Rdoc indexes
 -DEBUG_DESC=	Compile-in debug info
 +OPTIONS_DEFINE=		RDOC DEBUG
 +OPTIONS_DEFAULT=	READLINE
 +OPTIONS_RADIO=		EDIT
 +OPTIONS_RADIO_EDIT=	LIBEDIT READLINE
 +RDOC_DESC=		Build and install Rdoc indexes
 +DEBUG_DESC=		Compile-in debug info
 +EDIT_DESC=		Which line editing lib to use
 +LIBEDIT_DESC=		Use libedit
 +READLINE_DESC=		Use libreadline
 +
 +.include <bsd.port.options.mk>
 +
 +USES=		tar:bzip2
  
  .include <bsd.port.pre.mk>
  
 @@ -83,6 +92,19 @@ CONFIGURE_ENV=	CFLAGS="-I${LOCALBASE}/in
  		LIBS="-L${LOCALBASE}/lib ${LDFLAGS}" \
  		debugflags=
  
 +.if ${PORT_OPTIONS:MLIBEDIT}
 +BUILD_DEPENDS+=	libedit>=0:${PORTSDIR}/devel/libedit
 +RUN_DEPENDS+=	libedit>=0:${PORTSDIR}/devel/libedit
 +CONFIGURE_ARGS+=	--enable-libedit --with-libedit-prefix=${LOCALBASE}
 +.endif
 +
 +.if ${PORT_OPTIONS:MREADLINE}
 +BUILD_DEPENDS+=	readline>=0:${PORTSDIR}/devel/readline
 +RUN_DEPENDS+=	readline>=0:${PORTSDIR}/devel/readline
 +CONFIGURE_ARGS+=	--disable-libedit --with-readline-prefix=${LOCALBASE}
 +EXTRA_PATCHES+=		${FILESDIR}/extra-patch-ext__readline__readline.c
 +.endif
 +
  .if ${RUBY_VER} == ${RUBY_DEFAULT_VER}
  MLINKS=		${RUBY_NAME}.1 ruby.1
  PLIST_SUB+=	IF_DEFAULT=""
 @@ -159,8 +181,6 @@ pre-su-install:
  			${STAGEDIR}${RUBY_SITEARCHLIBDIR}	\
  			${STAGEDIR}${RUBY_VENDORARCHLIBDIR}
  
 -	${SETENV} LC_TIME=C /bin/date > ${STAGEDIR}${RUBY_RIDIR}/created.rid
 -	${SETENV} LC_TIME=C /bin/date > ${STAGEDIR}${RUBY_SITERIDIR}/created.rid
  	${TOUCH} ${STAGEDIR}${RUBY_EXAMPLESDIR}/.keep_me
  	${TOUCH} ${STAGEDIR}${RUBY_DOCDIR}/.keep_me
  	${TOUCH} ${STAGEDIR}${RUBY_SITEARCHLIBDIR}/.keep_me
 
 Added: head/lang/ruby20/files/extra-patch-ext__readline__readline.c
 ==============================================================================
 --- /dev/null	00:00:00 1970	(empty, because file is newly added)
 +++ head/lang/ruby20/files/extra-patch-ext__readline__readline.c	Fri May 30 18:34:29 2014	(r355890)
 @@ -0,0 +1,11 @@
 +--- ext/readline/readline.c.orig	2013/10/29 03:09:00	43458
 ++++ ext/readline/readline.c	2014/03/01 07:19:08	45225
 +@@ -1974,7 +1974,7 @@
 + 
 +     rl_attempted_completion_function = readline_attempted_completion_function;
 + #if defined(HAVE_RL_PRE_INPUT_HOOK)
 +-    rl_pre_input_hook = (Function *)readline_pre_input_hook;
 ++    rl_pre_input_hook = (rl_hook_func_t *)readline_pre_input_hook;
 + #endif
 + #ifdef HAVE_RL_CATCH_SIGNALS
 +     rl_catch_signals = 0;
 
 Modified: head/lang/ruby21/Makefile
 ==============================================================================
 --- head/lang/ruby21/Makefile	Fri May 30 18:33:59 2014	(r355889)
 +++ head/lang/ruby21/Makefile	Fri May 30 18:34:29 2014	(r355890)
 @@ -40,16 +40,25 @@ USE_AUTOTOOLS=	autoconf
  WRKSRC=		${WRKDIR}/${PORTNAME}-${RUBY_DISTVERSION}
  
  RUBY_VER=		2.1
 -USE_BZIP2=		yes
  USE_RUBY=		yes
  RUBY_NO_BUILD_DEPENDS=	yes
  RUBY_NO_RUN_DEPENDS=	yes
  NO_LATEST_LINK=		yes
  MAKE_JOBS_UNSAFE=	yes
  
 -OPTIONS_DEFINE=	RDOC DEBUG
 -RDOC_DESC=	Build and install Rdoc indexes
 -DEBUG_DESC=	Compile-in debug info
 +OPTIONS_DEFINE=		RDOC DEBUG
 +OPTIONS_DEFAULT=	READLINE
 +OPTIONS_RADIO=		EDIT
 +OPTIONS_RADIO_EDIT=	LIBEDIT READLINE
 +RDOC_DESC=		Build and install Rdoc indexes
 +DEBUG_DESC=		Compile-in debug info
 +EDIT_DESC=		Which line editing lib to use
 +LIBEDIT_DESC=		Use libedit
 +READLINE_DESC=		Use libreadline
 +
 +.include <bsd.port.options.mk>
 +
 +USES=		tar:bzip2
  
  .include <bsd.port.pre.mk>
  
 @@ -83,6 +92,19 @@ CONFIGURE_ENV=	CFLAGS="-I${LOCALBASE}/in
  		LIBS="-L${LOCALBASE}/lib ${LDFLAGS}" \
  		debugflags=
  
 +.if ${PORT_OPTIONS:MLIBEDIT}
 +BUILD_DEPENDS+=	libedit>=0:${PORTSDIR}/devel/libedit
 +RUN_DEPENDS+=	libedit>=0:${PORTSDIR}/devel/libedit
 +CONFIGURE_ARGS+=	--enable-libedit --with-libedit-prefix=${LOCALBASE}
 +.endif
 +
 +.if ${PORT_OPTIONS:MREADLINE}
 +BUILD_DEPENDS+=	readline>=0:${PORTSDIR}/devel/readline
 +RUN_DEPENDS+=	readline>=0:${PORTSDIR}/devel/readline
 +CONFIGURE_ARGS+=	--disable-libedit --with-readline-prefix=${LOCALBASE}
 +EXTRA_PATCHES+=		${FILESDIR}/extra-patch-ext__readline__readline.c
 +.endif
 +
  .if ${RUBY_VER} == ${RUBY_DEFAULT_VER}
  MLINKS=		${RUBY_NAME}.1 ruby.1
  PLIST_SUB+=	IF_DEFAULT=""
 @@ -155,8 +177,6 @@ pre-su-install:
  			${STAGEDIR}${RUBY_SITEARCHLIBDIR}	\
  			${STAGEDIR}${RUBY_VENDORARCHLIBDIR}
  
 -	${SETENV} LC_TIME=C /bin/date > ${STAGEDIR}${RUBY_RIDIR}/created.rid
 -	${SETENV} LC_TIME=C /bin/date > ${STAGEDIR}${RUBY_SITERIDIR}/created.rid
  	${TOUCH} ${STAGEDIR}${RUBY_EXAMPLESDIR}/.keep_me
  	${TOUCH} ${STAGEDIR}${RUBY_DOCDIR}/.keep_me
  	${TOUCH} ${STAGEDIR}${RUBY_SITEARCHLIBDIR}/.keep_me
 
 Added: head/lang/ruby21/files/extra-patch-ext__readline__readline.c
 ==============================================================================
 --- /dev/null	00:00:00 1970	(empty, because file is newly added)
 +++ head/lang/ruby21/files/extra-patch-ext__readline__readline.c	Fri May 30 18:34:29 2014	(r355890)
 @@ -0,0 +1,11 @@
 +--- ext/readline/readline.c.orig	2013/10/29 03:09:00	43458
 ++++ ext/readline/readline.c	2014/03/01 07:19:08	45225
 +@@ -1974,7 +1974,7 @@
 + 
 +     rl_attempted_completion_function = readline_attempted_completion_function;
 + #if defined(HAVE_RL_PRE_INPUT_HOOK)
 +-    rl_pre_input_hook = (Function *)readline_pre_input_hook;
 ++    rl_pre_input_hook = (rl_hook_func_t *)readline_pre_input_hook;
 + #endif
 + #ifdef HAVE_RL_CATCH_SIGNALS
 +     rl_catch_signals = 0;
 _______________________________________________
 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:
