Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 454804

Summary: media-libs/freetype:2 freetype-config broken under some locales
Product: Gentoo Linux Reporter: Julian Ospald <hasufell>
Component: New packagesAssignee: Gentoo Fonts Team <fonts>
Status: RESOLVED FIXED    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
URL: https://savannah.nongnu.org/bugs/index.php?38227
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 437488    
Attachments: freetype-config.diff
freetype-config.diff
freetype-config.diff

Description Julian Ospald 2013-01-31 10:41:05 UTC
Created attachment 337426 [details, diff]
freetype-config.diff

under locale et_EE.utf8 you will get:

# freetype-config --prefix=/la --cflags
-I--prefix/la/include/freetype2 -I--prefix/la/include
# freetype-config --exec-prefix=/la --libs
-L--exec-prefix/la/lib -lfreetype -lz -lbz2


attached patch was tested under different locales and also with dash
Comment 1 Julian Ospald 2013-01-31 14:40:25 UTC
Created attachment 337454 [details, diff]
freetype-config.diff
Comment 2 Julian Ospald 2013-02-01 19:05:07 UTC
Created attachment 337622 [details, diff]
freetype-config.diff

according to some voices (such as https://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=f2dbe03dccc95f41429d60e4221b02fc0f112cc4 ) it seems that "[:alnum:]" is also locale-dependant, so forcing LC_ALL=C for sed seems to be a safer method
Comment 3 Julian Ospald 2013-02-01 22:48:22 UTC
upstream fixed it slightly different

http://git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/?id=3b1f206b04a05f07a86944669e36e67b0145e60b
Comment 4 Ben de Groot (RETIRED) gentoo-dev 2013-02-02 13:15:33 UTC
Wouldn't LC_COLLATE=C be enough?
Comment 5 Julian Ospald 2013-02-02 13:17:48 UTC
IMO it's safer to force LC_ALL instead of running scripts under a mixed locale setup

that's what autoconf does and kernel hackers as well
Comment 6 Julian Ospald 2013-02-02 13:28:37 UTC
anyway, the patch is upstream, comment there if you think it's wrong

https://savannah.nongnu.org/bugs/index.php?38227
Comment 7 Julian Ospald 2013-03-24 01:11:11 UTC
I will fix this in 2 weeks if the maintainer does not respond.
Comment 8 Ben de Groot (RETIRED) gentoo-dev 2013-03-25 15:20:39 UTC
(In reply to comment #7)
> I will fix this in 2 weeks if the maintainer does not respond.

Please feel free to commit this at your convenience. I currently have too little time and too many things to do...
Comment 9 Ben de Groot (RETIRED) gentoo-dev 2013-04-05 15:24:07 UTC
+  05 Apr 2013; Ben de Groot <yngwin@gentoo.org>
+  +files/freetype-2.4.11-locale.patch, freetype-2.4.11.ebuild:
+  Add upstream patch to fix locale breakage (bug #454804). Punt unnecessary
+  epunt_cxx.