Bug 186092 - sys-devel/flex-2.5.33 uses gettext incorrectly
Bug#: 186092 Product:  Gentoo Linux Version: unspecified Platform: All
OS/Version: Linux Status: RESOLVED Severity: normal Priority: P2
Resolution: FIXED Assigned To: base-system@gentoo.org Reported By: dushistov@mail.ru
Component: Ebuilds
URL: 
Summary: sys-devel/flex-2.5.33 uses gettext incorrectly
Keywords:  
Status Whiteboard: 
Opened: 2007-07-21 12:37 0000
Description:   Opened: 2007-07-21 12:37 0000
On my machine with LANG=ru_RU.UTF-8,
all flex messages looks like '????????'.

This is because of to force gettext work,
should be calls like this
setlocale(LC_CTYPE, "");
setlocale(LC_MESSAGE, "");

but flex uses only the second one,

this bug already fixed in flex cvs

Reproducible: Always

------- Comment #1 From Evgeniy Dushistov 2007-07-21 12:38:59 0000 -------
Created an attachment (id=125549) [details]
Fix gettex usage pattern

------- Comment #2 From Evgeniy Dushistov 2007-07-21 12:40:28 0000 -------
The possible usage of patch, is change in ebuild in such way:
--- flex-2.5.33-r2.ebuild       2007-07-21 16:42:05.000000000 +0400
+++ flex-2.5.33-r3.ebuild       2007-07-21 16:42:20.000000000 +0400
@@ -25,6 +25,7 @@
        epatch "${FILESDIR}"/${PN}-2.5.31-include.patch
        epatch "${FILESDIR}"/${P}-isatty.patch #119598
        epatch "${FILESDIR}"/${P}-pic.patch
+       epatch "${FILESDIR}"/flex-2.5.33-gettext-usage-fix.patch
 }

 src_compile() {

------- Comment #3 From SpanKY 2007-07-21 19:54:47 0000 -------
have you submitted your right upstream as well ?
http://sourceforge.net/projects/flex

------- Comment #4 From Evgeniy Dushistov 2007-07-22 06:19:17 0000 -------
(In reply to comment #3)
> have you submitted your right upstream as well ?

As I mentioned above fix already in flex cvs.

> http://sourceforge.net/projects/flex
> 

See 
http://flex.cvs.sourceforge.net/flex/flex/main.c?r1=2.132&view=log

Revision 2.132 - (view) (download) (annotate) - [selected] 
Sat Apr 14 12:27:58 2007 UTC (3 months, 1 week ago) by wlestes 
Branch: MAIN 
Changes since 2.131: +1 -0 lines 
Diff to previous 2.131 
add call to setlocale for ctype as per debian patchset

------- Comment #5 From SpanKY 2007-07-30 10:10:14 0000 -------
sorry about that

added to 2.5.33-r3