[oe] [meta-oe][morty][PATCH] fltk: fix undefined Fl_XFont_On_Demand

Michael Powell michael_powell at mentor.com
Fri Feb 3 17:45:55 UTC 2017


http://www.fltk.org/str.php?L3156

Signed-off-by: Michael Powell <michael_powell at mentor.com>
---
 .../fltk/fix-undefined-Fl-XFont-On-Demand.patch    | 42 ++++++++++++++++++++++
 meta-oe/recipes-support/fltk/fltk_1.3.3.bb         |  1 +
 2 files changed, 43 insertions(+)
 create mode 100644 meta-oe/recipes-support/fltk/fltk/fix-undefined-Fl-XFont-On-Demand.patch

diff --git a/meta-oe/recipes-support/fltk/fltk/fix-undefined-Fl-XFont-On-Demand.patch b/meta-oe/recipes-support/fltk/fltk/fix-undefined-Fl-XFont-On-Demand.patch
new file mode 100644
index 0000000..7820324
--- /dev/null
+++ b/meta-oe/recipes-support/fltk/fltk/fix-undefined-Fl-XFont-On-Demand.patch
@@ -0,0 +1,42 @@
+diff --git a/FL/x.H b/FL/x.H
+index 85c6f6c..96f198a 100644
+--- a/FL/x.H
++++ b/FL/x.H
+@@ -132,6 +132,7 @@ private:
+   XFontStruct *ptr;
+ };
+ extern FL_EXPORT Fl_XFont_On_Demand fl_xfont;
++extern FL_EXPORT XFontStruct* fl_X_core_font();
+ 
+ // this object contains all X-specific stuff about a window:
+ // Warning: this object is highly subject to change!  
+diff --git a/src/fl_font.cxx b/src/fl_font.cxx
+index 48a5bb5..3786ce7 100644
+--- a/src/fl_font.cxx
++++ b/src/fl_font.cxx
+@@ -55,6 +55,12 @@
+ #  include "fl_font_x.cxx"
+ #endif // WIN32
+ 
++#if ! (defined(WIN32) || defined(__APPLE__))
++XFontStruct *fl_X_core_font()
++{
++  return fl_xfont.value();
++}
++#endif
+ 
+ double fl_width(const char* c) {
+   if (c) return fl_width(c, (int) strlen(c));
+diff --git a/src/gl_draw.cxx b/src/gl_draw.cxx
+index 5f78902..8059254 100644
+--- a/src/gl_draw.cxx
++++ b/src/gl_draw.cxx
+@@ -84,7 +84,7 @@ void  gl_font(int fontid, int size) {
+  * then sorting through them at draw time (for normal X rendering) to find which one can
+  * render the current glyph... But for now, just use the first font in the list for GL...
+  */
+-    XFontStruct *font = fl_xfont;
++    XFontStruct *font = fl_X_core_font();
+     int base = font->min_char_or_byte2;
+     int count = font->max_char_or_byte2-base+1;
+     fl_fontsize->listbase = glGenLists(256);
diff --git a/meta-oe/recipes-support/fltk/fltk_1.3.3.bb b/meta-oe/recipes-support/fltk/fltk_1.3.3.bb
index 117ecc3..487d278 100644
--- a/meta-oe/recipes-support/fltk/fltk_1.3.3.bb
+++ b/meta-oe/recipes-support/fltk/fltk_1.3.3.bb
@@ -10,6 +10,7 @@ SRC_URI = "http://fltk.org/pub/fltk/${PV}/${BP}-source.tar.gz \
            file://disable_test.patch \
            file://fltk-no-freetype-config.patch \
            file://fix-boolean-issue-with-jpeg9.patch \
+           file://fix-undefined-Fl-XFont-On-Demand.patch \
 "
 
 SRC_URI[md5sum] = "9ccdb0d19dc104b87179bd9fd10822e3"
-- 
2.7.4




More information about the Openembedded-devel mailing list