From owner-svn-ports-head@FreeBSD.ORG Mon Aug 13 20:56:03 2012 Return-Path: Delivered-To: svn-ports-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 61136106566C; Mon, 13 Aug 2012 20:56:03 +0000 (UTC) (envelope-from utisoft@gmail.com) Received: from mail-bk0-f54.google.com (mail-bk0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 49DFD8FC0C; Mon, 13 Aug 2012 20:56:01 +0000 (UTC) Received: by bkcje9 with SMTP id je9so1632274bkc.13 for ; Mon, 13 Aug 2012 13:56:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=ORMnC9zM/xnOu8zRlJ9fveHSZ3kcWM4XRXIa00W0uXI=; b=iN3vIeL5UJXL4deLhbhMTu8/+wb7A9dWJ/ehDb2zGFBsmYkUmR0Wt29mjK4x2Y+OAT PH490xBXvxA1Bh7e7a1uMUQnajhwVeXZf+CA+56NaMk+2rHUHps8i18oO+5Pz+1TlnGz 19t+c8dBMtqqNEtLQTYtb9A8ld9lGv/u1/t1inJAZuLpDGC2gpM3uhVH/1jUxEb+dtct 41jHLA5hdI9h2pxZs1CQFVGdFUeQM4/q+IzRdShm5ktdKqj7cmShC3IxFuDR5188Ovdr KeTYPWrUP3ZKPY2kJ8HPlDsxitUpEjUbgAKBXrqJJY5B5fue93RwIkrAVBRGQBI/v9k2 SnEg== MIME-Version: 1.0 Received: by 10.204.15.199 with SMTP id l7mr5185250bka.51.1344891360992; Mon, 13 Aug 2012 13:56:00 -0700 (PDT) Received: by 10.205.134.12 with HTTP; Mon, 13 Aug 2012 13:56:00 -0700 (PDT) Received: by 10.205.134.12 with HTTP; Mon, 13 Aug 2012 13:56:00 -0700 (PDT) In-Reply-To: <201208131508.q7DF83iY055100@svn.freebsd.org> References: <201208131508.q7DF83iY055100@svn.freebsd.org> Date: Mon, 13 Aug 2012 21:56:00 +0100 Message-ID: From: Chris Rees To: "Vanilla I. Shu" Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: svn-ports-head@freebsd.org, svn-ports-all@freebsd.org, ports-committers@freebsd.org Subject: Re: svn commit: r302471 - in head/irc/irssi: . files X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.5 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, 13 Aug 2012 20:56:03 -0000 On 13 Aug 2012 17:08, "Vanilla I. Shu" wrote: > > Author: vanilla > Date: Mon Aug 13 15:08:03 2012 > New Revision: 302471 > URL: http://svn.freebsd.org/changeset/ports/302471 > > Log: > 1: fix utf-8 decoding. > 2: convert to optionng. > > PR: ports/169780 http://www.FreeBSD.org/cgi/query-pr.cgi?pr=169780 > Submitted by: Kuan-Chung Chiu [1] > > Added: > head/irc/irssi/files/patch-irssi-utf8 (contents, props changed) > Modified: > head/irc/irssi/Makefile > > Modified: head/irc/irssi/Makefile > ============================================================================== > --- head/irc/irssi/Makefile Mon Aug 13 14:45:36 2012 (r302470) > +++ head/irc/irssi/Makefile Mon Aug 13 15:08:03 2012 (r302471) > @@ -7,14 +7,14 @@ > > PORTNAME= irssi > PORTVERSION= 0.8.15 > -PORTREVISION= 3 > +PORTREVISION= 4 > CATEGORIES?= irc > MASTER_SITES= http://mirror.irssi.org/ > > MAINTAINER?= vanilla@FreeBSD.org > COMMENT?= A modular IRC client with many features > > -LIB_DEPENDS= glib-2.0:${PORTSDIR}/devel/glib20 > +LIB_DEPENDS= glib-2:${PORTSDIR}/devel/glib20 > > CONFLICTS= irssi-devel-[0-9]* zh-irssi-[0-9]* > > @@ -26,11 +26,14 @@ WANT_PERL= yes > > MAN1= irssi.1 > > -OPTIONS= PERL "Enable perl support" on \ > - PROXY "Enable proxy support" off \ > - SOCKS "Enable socks proxy support" off \ > - IPV6 "Enable IPv6" on \ > - BOT "Enable bot" off > +OPTIONS_DEFINE= PERL PROXY SOCKS IPV6 BOT > +PERL_DESC= Perl support > +PROXY_DESC= Proxy support > +SOCKS_DESC= Socks proxy support > +IPV6_DESC= IPV6 support > +BOT_DESC= Bot support > +OPTIONS_DEFAULT= PERL IPV6 Some of these descriptions are already in bsd.options.desc.mk. > # USE_OPENSSL must be defined before bsd.port.pre.mk so use old schema > # for WITH_SSL option > > @@ -40,11 +43,11 @@ CONFIGURE_ARGS+= --disable-ssl > USE_OPENSSL= yes > .endif Perhaps this section could now be moved below BSD.port.options.mk? > -.include > +.include > > # Process options. > > -.if !defined(WITHOUT_PERL) > +.if ${PORT_OPTIONS:MPERL} > USE_PERL5= yes > CONFIGURE_ARGS+= --with-perl-lib=site > PLIST_SUB+= WITH_PERL="" > @@ -53,23 +56,23 @@ CONFIGURE_ARGS+= --without-perl > PLIST_SUB+= WITH_PERL="@comment " > .endif > > -.if defined(WITH_PROXY) > +.if ${PORT_OPTIONS:MPROXY} > CONFIGURE_ARGS+= --with-proxy > PLIST_SUB+= WITH_PROXY="" > .else > PLIST_SUB+= WITH_PROXY="@comment " > .endif > > -.if defined(WITH_SOCKS) > +.if ${PORT_OPTIONS:MSOCKS} > CONFIGURE_ARGS+= --with-socks > .endif > > -.if defined(WITHOUT_IPV6) > +.if !${PORT_OPTIONS:MIPV6} > CONFIGURE_ARGS+= --disable-ipv6 > CATEGORIES+= ipv6 > .endif > > -.if defined(WITH_BOT) > +.if ${PORT_OPTIONS:MBOT} > CONFIGURE_ARGS+= --with-bot > PLIST_SUB+= WITH_BOT="" > .else > @@ -92,4 +95,4 @@ post-install: > @${ECHO_MSG} "You may install x11-themes/irssi-themes for" > @${ECHO_MSG} " additional themes." > > -.include > +.include > > Added: head/irc/irssi/files/patch-irssi-utf8 > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/irc/irssi/files/patch-irssi-utf8 Mon Aug 13 15:08:03 2012 (r302471) > @@ -0,0 +1,38 @@ > +# > +# $FreeBSD$ > +# > +--- src/fe-common/core/utf8.h (revision 5189) > ++++ src/fe-common/core/utf8.h (working copy) > +@@ -12,5 +12,6 @@ > + int mk_wcwidth(unichar c); > + > + #define unichar_isprint(c) (((c) & ~0x80) >= 32) > ++#define is_utf8_leading(c) (((c) & 0xc0) != 0x80) > + > + #endif > +--- src/fe-text/textbuffer.c (revision 5189) > ++++ src/fe-text/textbuffer.c (working copy) > +@@ -23,6 +23,7 @@ > + #include "module.h" > + #include "misc.h" > + #include "formats.h" > ++#include "utf8.h" > + > + #include "textbuffer.h" > + > +@@ -157,6 +158,16 @@ > + if (left > 0 && data[left-1] == 0) > + left--; /* don't split the commands */ > + > ++ /* don't split utf-8 character. (assume we can split non-utf8 anywhere. */ > ++ if (left < TEXT_CHUNK_USABLE_SIZE && !is_utf8_leading(data[left])) { > ++ int i; > ++ for (i = 1; i < 4 && left >= i; i++) > ++ if (is_utf8_leading(data[left - i])) { > ++ left -= i; > ++ break; > ++ } > ++ } > ++ > + memcpy(chunk->buffer + chunk->pos, data, left); > + chunk->pos += left; >