Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 1 May 2008 20:38:42 GMT
From:      Dmitry Klimov <lazyklimm@gmail.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/123311: Fix port: www/links; patch for correct UTF-8 locale
Message-ID:  <200805012038.m41KcgK8085104@www.freebsd.org>
Resent-Message-ID: <200805012040.m41Ke1M6081892@freefall.freebsd.org>

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

>Number:         123311
>Category:       ports
>Synopsis:       Fix port: www/links; patch for correct UTF-8 locale
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu May 01 20:40:01 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     Dmitry Klimov
>Release:        RELENG_6
>Organization:
TrueBSD
>Environment:
6.3-STABLE #0
>Description:
port www/links incorrectly shows some symbols(cyrillic) in X terminal when locale is set to *.UTF-8.

patch for fix taken from Gentoo Linux repositary

P.S. also added tiny fix for transparent terminals(just eyecandy)
>How-To-Repeat:
LC_ALL=ru_RU.UTF-8 links
then open page with cyrillic symbols :/
>Fix:
diff -ruN links/Makefile links-utf8/Makefile
--- links/Makefile	2008-04-11 17:44:56.000000000 +0400
+++ links-utf8/Makefile	2008-05-02 00:20:38.000000000 +0400
@@ -8,6 +8,7 @@
 PORTNAME=	links
 DISTVERSION=	2.1pre33
 PORTEPOCH=	1
+PORTREVISION=	1
 CATEGORIES?=	www
 MASTER_SITES=	http://links.twibright.com/download/
 
@@ -27,7 +28,9 @@
 
 OPTIONS=	SVGALIB "non-X11 graphics support" off \
 		DIRECTFB "directfb driver support" off \
-		X11 "X11 graphics support" on
+		X11 "X11 graphics support" on \
+		UTF8 "With gentoo utf-8 patch" on \
+		TRANS "Hack for background transparency" off
 
 .include <bsd.port.pre.mk>
 
@@ -61,6 +64,14 @@
 CONFIGURE_ARGS+=	--without-x
 .endif
 
+.if defined(WITH_UTF8)
+.include "Makefile.utf-8"
+.endif
+
+.if defined(WITH_TRANS)
+EXTRA_PATCHES+=	${FILESDIR}/extra-terminal.c.diff
+.endif
+
 MAN1=		links.1
 PLIST_FILES=	bin/links
 
diff -ruN links/Makefile.utf-8 links-utf8/Makefile.utf-8
--- links/Makefile.utf-8	1970-01-01 03:00:00.000000000 +0300
+++ links-utf8/Makefile.utf-8	2008-05-02 00:20:38.000000000 +0400
@@ -0,0 +1,7 @@
+PATCHFILES=	links-2.1pre33-utf8.diff.bz2
+PATCH_SITES=	ftp://ftp.linux.ee/pub/gentoo/distfiles/distfiles/ \
+		ftp://ftp.osuosl.org/pub/blfs/conglomeration/links/ \
+		ftp://ftp.ntua.gr/pub/linux/gentoo/distfiles/
+PATCH_DIST_STRIP=-p1
+pre-configure:
+		pwd && cd ${WRKSRC}/intl && ./gen-intl && ./synclang && cd ..
diff -ruN links/distinfo links-utf8/distinfo
--- links/distinfo	2008-04-11 17:44:56.000000000 +0400
+++ links-utf8/distinfo	2008-05-02 00:20:38.000000000 +0400
@@ -1,3 +1,6 @@
 MD5 (links-2.1pre33.tar.bz2) = 99cdbd1194579eea6d857168a57e0d74
 SHA256 (links-2.1pre33.tar.bz2) = 1f6be6db54eb5fb2947926b5214879c260030da9909c1d189d053d8dc3357f98
 SIZE (links-2.1pre33.tar.bz2) = 3817630
+MD5 (links-2.1pre33-utf8.diff.bz2) = 82ba3c492079f8664743ce03446433a3
+SHA256 (links-2.1pre33-utf8.diff.bz2) = a34de30b787e6bab984cd5000c7a576f157437f622e9fe3a076808769a56db75
+SIZE (links-2.1pre33-utf8.diff.bz2) = 4793
diff -ruN links/files/extra-terminal.c.diff links-utf8/files/extra-terminal.c.diff
--- links/files/extra-terminal.c.diff	1970-01-01 03:00:00.000000000 +0300
+++ links-utf8/files/extra-terminal.c.diff	2008-05-02 00:20:38.000000000 +0400
@@ -0,0 +1,10 @@
+--- terminal.c.orig	2008-05-01 21:02:39.000000000 +0400
++++ terminal.c	2008-05-01 21:03:50.000000000 +0400
+@@ -819,6 +819,7 @@
+ 			add_to_str(&a, &l, m);						\
+ 			m[1] = '4';							\
+ 			m[2] = ((attrib >> 3) & 7) + '0';				\
++			if (m[2]!='0')							\
+ 			add_to_str(&a, &l, m);						\
+ 		} else if (getcompcode(attrib & 7) < getcompcode(attrib >> 3 & 7))	\
+ 			add_to_str(&a, &l, ";7");					\





------------8<------------------
or see b64encoded port below

Patch attached with submission follows:

begin-base64 644 links-utf8.tbz
H4sIADMnGkgAA+1abXObSBLOV/ErxorLkdYG8Y5QVjkrNrZ1J8suSY5Tu9lSDTBInBFQgCxrvb7f
fj2DZEl+ie9DnNTmeMoyMNM93fPSDz3AKb4inh+QN68IURR1VUX0CHh4FBVd1JAkUSFZEWUdiZKs
S8obJL6mU0tM0wwn4EoSRdnX5GZjQoKv1D/s3N8Eb1GXzFAcJVmKnCgIiJP5UYgmi2WBvChplAI/
vEq5t+gQZwQ5CYGD2yiVZAn9E4dTnMyRDH0GgctxNIGK0qnvjDEJ0CecQiPhVYR+xY7v7qfZVHBC
YYo/cG9BfPsoIeRj/7CRO1CbzWY1Zqt2urC/d40kQZNo+/WaqNYkCUlKQ1Ubmo5ifI2smxhtQ1vc
+Vlv0G2dWs2Fs4ft/uCT1eu3z7rNkixIcUIUhUlZ52cHJ82SxC561qd2LiNxB62BdXzWa1v9fzRL
4Ap32uoPrN6w3x5Y/WZpnGVxo5b7J2Qz30780TgTnGhSc6NZGETYrXGg0+4O4Gf1oBGXTKJwf9FJ
IUpG3MHZ6anVHTRLnXl4wwf+FUEZucnQ5eUlspNolpKEA6HuUad9MOgvOsOLv3DccfdiSCvaxxc9
6OWcpNz95bDVO+7vNks8P/OzMZ+mAcpPo2nGx5N0TIL1EpyNSZSiLxzM1Kp0FE/WZDx7rXmr+wla
Pzg/P+q0jvvN8vbt8vwO8e3t287ZQavzsdW37mp+6ARTl5S5ziEToF51NiQC3+a4i741PDu3uv1+
J+8LLfj4W/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QYZ2kFFFu+idmEt/oVkVC1wqvtWE8upGKy/av0P0RQeiTUA26kST2IlcsjTKzP2K
nqih7rDq6vOWyu9p4rew9QPmP74awb4vdZJXtPFS/CuS+uj5n2oU8f89sPoOYe0TBERf4OUfJtA9
wf272Qks7jSvnOBwjjzYh0wTknKsAddP4wDP/XCEMrq7SCGOSDiFA4SGwHFgoIEWX1HgLCFz4Qon
sIkRJp4nONPQF5w/a/9xgsi5qt1/X7F4DcBxPHr0UQm3+U1JsccoUKBAgQIFChQoUKBAgQIFChQo
UKBAgQIFChQoUKBAgQIFChQoUKBAgQIFChQo8NPjv0z2evsAUAAA
====


>Release-Note:
>Audit-Trail:
>Unformatted:



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