wok-current rev 19447
fltk: add Fl_XFont_On_Demand.patch
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sat Oct 15 19:21:45 2016 +0200 (2016-10-15) |
parents | acb8ffc53deb |
children | ad032d861141 |
files | fltk/receipt fltk/stuff/Fl_XFont_On_Demand.patch |
line diff
1.1 --- a/fltk/receipt Sat Oct 15 18:21:21 2016 +0200 1.2 +++ b/fltk/receipt Sat Oct 15 19:21:45 2016 +0200 1.3 @@ -14,7 +14,7 @@ 1.4 DEPENDS="expat fontconfig freetype libpng jpeg xorg-libX11 xorg-libXau xorg-libXdmcp \ 1.5 xorg-libXext xorg-libXft xorg-libXrender zlib gcc-lib-base mesa libglu-mesa" 1.6 BUILD_DEPENDS="jpeg-dev libpng-dev libglu-mesa libglu-mesa-dev mesa mesa-dev \ 1.7 -xorg-libXinerama-dev" 1.8 +xorg-libXinerama-dev xorg-libXft-dev" 1.9 1.10 # Handle SliTaz arch 1.11 case "$SLITAZ_ARCH" in 1.12 @@ -34,6 +34,7 @@ 1.13 # Rules to configure and make the package. 1.14 compile_rules() 1.15 { 1.16 + patch -p0 < $stuff/Fl_XFont_On_Demand.patch 1.17 ./configure ${ARCH_ARGS} \ 1.18 --enable-shared \ 1.19 --enable-xft \
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/fltk/stuff/Fl_XFont_On_Demand.patch Sat Oct 15 19:21:45 2016 +0200 2.3 @@ -0,0 +1,42 @@ 2.4 +Index: src/fl_font.cxx 2.5 +=================================================================== 2.6 +--- src/fl_font.cxx (revision 10503) 2.7 ++++ src/fl_font.cxx (revision 10504) 2.8 +@@ -55,6 +55,12 @@ 2.9 + # include "fl_font_x.cxx" 2.10 + #endif // WIN32 2.11 + 2.12 ++#if ! (defined(WIN32) || defined(__APPLE__)) 2.13 ++XFontStruct *fl_X_core_font() 2.14 ++{ 2.15 ++ return fl_xfont.value(); 2.16 ++} 2.17 ++#endif 2.18 + 2.19 + double fl_width(const char* c) { 2.20 + if (c) return fl_width(c, (int) strlen(c)); 2.21 +Index: src/gl_draw.cxx 2.22 +=================================================================== 2.23 +--- src/gl_draw.cxx (revision 10503) 2.24 ++++ src/gl_draw.cxx (revision 10504) 2.25 +@@ -81,7 +81,7 @@ 2.26 + * then sorting through them at draw time (for normal X rendering) to find which one can 2.27 + * render the current glyph... But for now, just use the first font in the list for GL... 2.28 + */ 2.29 +- XFontStruct *font = fl_xfont; 2.30 ++ XFontStruct *font = fl_X_core_font(); 2.31 + int base = font->min_char_or_byte2; 2.32 + int count = font->max_char_or_byte2-base+1; 2.33 + fl_fontsize->listbase = glGenLists(256); 2.34 +Index: FL/x.H 2.35 +=================================================================== 2.36 +--- FL/x.H (revision 10503) 2.37 ++++ FL/x.H (revision 10504) 2.38 +@@ -132,6 +132,7 @@ 2.39 + XFontStruct *ptr; 2.40 + }; 2.41 + extern FL_EXPORT Fl_XFont_On_Demand fl_xfont; 2.42 ++extern FL_EXPORT XFontStruct* fl_X_core_font(); 2.43 + 2.44 + // this object contains all X-specific stuff about a window: 2.45 + // Warning: this object is highly subject to change!