Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Nov 2012 14:03:30 +0800 (CST)
From:      Po-Chien Lin <linpc@cs.nctu.edu.tw>
To:        FreeBSD-gnats-submit@freebsd.org
Cc:        perl@freebsd.org
Subject:   [PATCH] devel/p5-Curses: Add option to support UTF-8 (use ncursesw library)
Message-ID:  <201211210603.qAL63U9M053949@bsd6.cs.nctu.edu.tw>

next in thread | raw e-mail | index | archive | help

>Submitter-Id:	current-users
>Originator:	Po-Chien Lin
>Organization:	
>Confidential:	no 
>Synopsis:	[PATCH] devel/p5-Curses: Add option to support UTF-8 (use ncursesw library)
>Severity:	non-critical
>Priority:	low
>Category:	ports 
>Class:		change-request
>Release:	FreeBSD 8.3-RELEASE-p3 amd64
>Environment:
System: FreeBSD bsd6.cs.nctu.edu.tw 8.3-RELEASE-p3 FreeBSD 8.3-RELEASE-p3 #0: Tue Jun 12 00:39:29 UTC 2012
>Description:
- Add an option to using `ncursesw' library instead of `ncurses' at link state,
  which will support UTF-8 environment using.

Port maintainer (perl@FreeBSD.org) is cc'd.

Generated with FreeBSD Port Tools 0.99_6 (mode: change, diff: suffix)
>How-To-Repeat:
>Fix:

--- p5-Curses-1.28_1.patch begins here ---
diff -ruN --exclude=CVS ../p5-Curses.orig/Makefile ./Makefile
--- ../p5-Curses.orig/Makefile	2012-11-21 13:36:13.845583000 +0800
+++ ./Makefile	2012-11-21 13:57:34.560346000 +0800
@@ -7,6 +7,7 @@
 
 PORTNAME=	Curses
 PORTVERSION=	1.28
+PORTREVISION=	1
 CATEGORIES=	devel perl5
 MASTER_SITES=	CPAN
 PKGNAMEPREFIX=	p5-
@@ -15,13 +16,24 @@
 MAINTAINER=	perl@FreeBSD.org
 COMMENT=	Perl5 module for terminal screen handling and optimization
 
+OPTIONS_DEFINE=	NCURSESW
+NCURSESW_DESC=	Wide-character-capable support by ncursesw library
+
 PERL_CONFIGURE=	yes
 CONFIGURE_ARGS=	PANELS MENUS FORMS
-CONFIGURE_ENV=	CURSES_CFLAGS="-I${WRKSRC}/usr/include/ncurses"\
-		CURSES_LDFLAGS="-L/usr/lib/ -lncurses"
+CONFIGURE_ENV=	CURSES_CFLAGS="-I${WRKSRC}/usr/include/ncurses"
 
 MAN3=		Curses.3
 
+.include <bsd.port.options.mk>
+
+.if ${PORT_OPTIONS:MNCURSESW}
+CONFIGURE_ENV+=	CURSES_LDFLAGS="-L/usr/lib/ -lncursesw" \
+		CURSES_LIBTYPE="ncursesw"
+.else
+CONFIGURE_ENV+=	CURSES_LDFLAGS="-L/usr/lib/ -lncurses"
+.endif
+
 pre-configure:
 	@${LN} -sf ${WRKSRC}/hints/c-freebsd.ncurses.h \
 		${WRKSRC}/c-config.h
--- p5-Curses-1.28_1.patch ends here ---




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201211210603.qAL63U9M053949>