summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKai Kang <kai.kang@windriver.com>2019-12-11 17:10:36 +0800
committerArmin Kuster <akuster808@gmail.com>2020-01-05 14:43:51 -0800
commit56242b559faa490dac7d3c5882fcdd58abf5ae79 (patch)
tree8ef13d387ecfacd53cdb2882f0e1633e9e4caa8d
parentdbde96790458e11d69451d8c9580ea936b2e8752 (diff)
downloadmeta-openembedded-56242b559faa490dac7d3c5882fcdd58abf5ae79.tar.gz
fltk: fix build error when enable package config examples
Backport patch to fix fltk build error when enable package config 'examples'. Drop the useless parts such as .gitignore and Makefile from the patch. fltk-native is also required by package config 'examples'. Signed-off-by: Kai Kang <kai.kang@windriver.com> Signed-off-by: Khem Raj <raj.khem@gmail.com> (cherry picked from commit bbecc5dfc4d6da8ff3b4606d7cd24eeb2df0a7bc) Signed-off-by: Armin Kuster <akuster808@gmail.com>
-rw-r--r--meta-oe/recipes-support/fltk/fltk.bb7
-rw-r--r--meta-oe/recipes-support/fltk/fltk/0004-Fix-build-error-when-enable-package-config-examples.patch182
2 files changed, 187 insertions, 2 deletions
diff --git a/meta-oe/recipes-support/fltk/fltk.bb b/meta-oe/recipes-support/fltk/fltk.bb
index ec9e04bed..0f30acc3a 100644
--- a/meta-oe/recipes-support/fltk/fltk.bb
+++ b/meta-oe/recipes-support/fltk/fltk.bb
@@ -5,7 +5,10 @@ DEPENDS = "alsa-lib zlib jpeg libpng libxext libxft"
5inherit distro_features_check binconfig lib_package gtk-icon-cache mime 5inherit distro_features_check binconfig lib_package gtk-icon-cache mime
6REQUIRED_DISTRO_FEATURES = "x11" 6REQUIRED_DISTRO_FEATURES = "x11"
7 7
8SRC_URI += "file://0003-CMake-build-Force-shared-libs-with-unsuffixed-names.patch" 8SRC_URI += " \
9 file://0003-CMake-build-Force-shared-libs-with-unsuffixed-names.patch \
10 file://0004-Fix-build-error-when-enable-package-config-examples.patch \
11"
9 12
10EXTRA_OECMAKE = " \ 13EXTRA_OECMAKE = " \
11 -DOPTION_BUILD_SHARED_LIBS=ON \ 14 -DOPTION_BUILD_SHARED_LIBS=ON \
@@ -17,7 +20,7 @@ EXTRA_OECMAKE = " \
17 20
18PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'opengl', d)}" 21PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'opengl', d)}"
19 22
20PACKAGECONFIG[examples] = "-DOPTION_BUILD_EXAMPLES=ON,-DOPTION_BUILD_EXAMPLES=OFF," 23PACKAGECONFIG[examples] = "-DOPTION_BUILD_EXAMPLES=ON,-DOPTION_BUILD_EXAMPLES=OFF,fltk-native"
21PACKAGECONFIG[cairo] = "-DOPTION_CAIRO=ON,-DOPTION_CAIRO=OFF,cairo" 24PACKAGECONFIG[cairo] = "-DOPTION_CAIRO=ON,-DOPTION_CAIRO=OFF,cairo"
22PACKAGECONFIG[opengl] = "-DOPTION_USE_GL=ON,-DOPTION_USE_GL=OFF,virtual/libgl" 25PACKAGECONFIG[opengl] = "-DOPTION_USE_GL=ON,-DOPTION_USE_GL=OFF,virtual/libgl"
23PACKAGECONFIG[xinerama] = "-DOPTION_USE_XINERAMA=ON,-DOPTION_USE_XINERAMA=OFF,libxinerama" 26PACKAGECONFIG[xinerama] = "-DOPTION_USE_XINERAMA=ON,-DOPTION_USE_XINERAMA=OFF,libxinerama"
diff --git a/meta-oe/recipes-support/fltk/fltk/0004-Fix-build-error-when-enable-package-config-examples.patch b/meta-oe/recipes-support/fltk/fltk/0004-Fix-build-error-when-enable-package-config-examples.patch
new file mode 100644
index 000000000..974c02fe6
--- /dev/null
+++ b/meta-oe/recipes-support/fltk/fltk/0004-Fix-build-error-when-enable-package-config-examples.patch
@@ -0,0 +1,182 @@
1Fix build error when enable package config examples.
2
3Upstream-Status: Backport [https://github.com/fltk/fltk/commit/16774dd]
4
5Signed-off-by: Kai Kang <kai.kang@windriver.com>
6
7
8From 16774ddc4e000c89e560fde0ced8be9814ef041e Mon Sep 17 00:00:00 2001
9From: Albrecht Schlosser <albrechts.fltk@online.de>
10Date: Wed, 8 Feb 2017 02:06:52 +0000
11Subject: [PATCH] Rename test/help demo program to test/help_dialog.
12
13This change avoids a name conflict with CMake's auto-generated target 'help'
14for "Unix Makefiles", "Ninja", and supposedly other generators as well.
15
16
17git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12171 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
18---
19 CMake/macros.cmake | 5 -----
20 documentation/src/examples.dox | 8 +++----
21 test/CMakeLists.txt | 27 +++++++++++++++++++----
22 test/demo.menu | 2 +-
23 test/{help.cxx => help_dialog.cxx} | 6 ++---
24 test/{help-test.html => help_dialog.html} | 0
25 6 files changed, 31 insertions(+), 17 deletions(-)
26 rename test/{help.cxx => help_dialog.cxx} (88%)
27 rename test/{help-test.html => help_dialog.html} (100%)
28
29diff --git a/CMake/macros.cmake b/CMake/macros.cmake
30index 5b0d0fa..7134fcb 100644
31--- a/CMake/macros.cmake
32+++ b/CMake/macros.cmake
33@@ -90,11 +90,6 @@ function(CREATE_EXAMPLE NAME SOURCES LIBRARIES)
34
35 set (tname ${NAME}) # target name
36
37- # rename reserved target name "help" (CMake 2.8.12 and later)
38- if (${tname} MATCHES "^help$")
39- set (tname "test_help")
40- endif (${tname} MATCHES "^help$")
41-
42 foreach(src ${SOURCES})
43 if ("${src}" MATCHES "\\.fl$")
44 list(APPEND flsrcs ${src})
45diff --git a/documentation/src/examples.dox b/documentation/src/examples.dox
46index 5105b7b..7961b02 100644
47--- a/documentation/src/examples.dox
48+++ b/documentation/src/examples.dox
49@@ -60,7 +60,7 @@ you build FLTK, unlike those in the 'test' directory shown below.
50 </tr>
51 <tr>
52 <td> \ref examples_hello </td>
53-<td> \ref examples_help </td>
54+<td> \ref examples_help_dialog </td>
55 <td> \ref examples_iconize </td>
56 <td> \ref examples_image </td>
57 <td> \ref examples_inactive </td>
58@@ -326,13 +326,13 @@ easily under FLTK.
59 tiny demo shows how little is needed to get a functioning application
60 running with FLTK. Quite impressive, I'd say.
61
62-\subsection examples_help help
63+\subsection examples_help_dialog help_dialog
64
65 \par
66-\c help displays the built-in FLTK help browser. The
67+\c help_dialog displays the built-in FLTK help browser. The
68 Fl_Help_Dialog understands a subset of html and renders
69 various image formats. This widget makes it easy to provide help
70-pages to the user without depending on the operating system's
71+pages to the user without depending on the operating system's
72 html browser.
73
74 \subsection examples_iconize iconize
75diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
76index 22ec9ab..4caffa5 100644
77--- a/test/CMakeLists.txt
78+++ b/test/CMakeLists.txt
79@@ -1,3 +1,22 @@
80+#
81+# "$Id$"
82+#
83+# CMakeLists.txt used to build test and demo apps by the CMake build system
84+#
85+# Copyright 2004-2017 by Bill Spitzak and others.
86+#
87+# This library is free software. Distribution and use rights are outlined in
88+# the file "COPYING" which should have been included with this file. If this
89+# file is missing or damaged, see the license at:
90+#
91+# http://www.fltk.org/COPYING.php
92+#
93+# Please report all bugs and problems on the following page:
94+#
95+# http://www.fltk.org/str.php
96+#
97+#######################################################################
98+
99 set(EXECUTABLE_OUTPUT_PATH ${FLTK_BINARY_DIR}/bin/examples)
100
101 #######################################################################
102@@ -64,7 +83,7 @@ CREATE_EXAMPLE(file_chooser file_chooser.cxx "fltk;fltk_images")
103 CREATE_EXAMPLE(fonts fonts.cxx fltk)
104 CREATE_EXAMPLE(forms forms.cxx "fltk;fltk_forms")
105 CREATE_EXAMPLE(hello hello.cxx fltk)
106-CREATE_EXAMPLE(help help.cxx "fltk;fltk_images")
107+CREATE_EXAMPLE(help_dialog help_dialog.cxx "fltk;fltk_images")
108 CREATE_EXAMPLE(icon icon.cxx fltk)
109 CREATE_EXAMPLE(iconize iconize.cxx fltk)
110 CREATE_EXAMPLE(image image.cxx fltk)
111@@ -134,7 +153,7 @@ endif(FLTK_HAVE_CAIRO)
112 # Note: this is incomplete as of 11 Feb 2015
113 # Todo: currently all files are copied, but some of them need configuration:
114 # - demo.menu: fluid can't be started (wrong path)
115-# - demo.menu: help (help-test.html) can't find its images (not copied)
116+# - demo.menu: help_dialog (help_dialog.html) can't find its images (not copied)
117 # - maybe more ...
118
119 # prepare for a "better" test file installation path
120@@ -149,11 +168,11 @@ configure_file(demo.menu ${TESTFILE_PATH}/demo.menu COPYONLY)
121
122 # use target directory only to avoid redundancy
123 configure_file(rgb.txt ${TESTFILE_PATH} COPYONLY)
124-configure_file(help-test.html ${TESTFILE_PATH} COPYONLY)
125+configure_file(help_dialog.html ${TESTFILE_PATH} COPYONLY)
126 configure_file(browser.cxx ${TESTFILE_PATH} COPYONLY)
127 configure_file(editor.cxx ${TESTFILE_PATH} COPYONLY)
128 if(APPLE AND NOT OPTION_APPLE_X11)
129 configure_file(browser.cxx "${TESTFILE_PATH}/browser.app/Contents/Resources/browser.cxx" COPYONLY)
130 configure_file(rgb.txt ${TESTFILE_PATH}/colbrowser.app/Contents/Resources/rgb.txt COPYONLY)
131- configure_file(help-test.html ${TESTFILE_PATH}/help.app/Contents/Resources/help-test.html COPYONLY)
132+ configure_file(help_dialog.html ${TESTFILE_PATH}/help_dialog.app/Contents/Resources/help_dialog.html COPYONLY)
133 endif(APPLE AND NOT OPTION_APPLE_X11)
134diff --git a/test/demo.menu b/test/demo.menu
135index 337a71c..97e522a 100644
136--- a/test/demo.menu
137+++ b/test/demo.menu
138@@ -77,7 +77,7 @@
139 @o:Font Tests...:@of
140 @of:Fonts:fonts
141 @of:UTF-8:utf8
142- @o:HelpDialog:help
143+ @o:HelpDialog:help_dialog
144 @o:Input Choice:input_choice
145 @o:Preferences:preferences
146 @o:Threading:threads
147diff --git a/test/help.cxx b/test/help_dialog.cxx
148similarity index 88%
149rename from test/help.cxx
150rename to test/help_dialog.cxx
151index f5c51d6..7866641 100644
152--- a/test/help.cxx
153+++ b/test/help_dialog.cxx
154@@ -3,7 +3,7 @@
155 //
156 // Fl_Help_Dialog test program.
157 //
158-// Copyright 1999-2010 by Easy Software Products.
159+// Copyright 2011-2017 by Bill Spitzak and others.
160 //
161 // This library is free software. Distribution and use rights are outlined in
162 // the file "COPYING" which should have been included with this file. If this
163@@ -46,13 +46,13 @@ main(int argc, // I - Number of command-line arguments
164 strcpy(buf, argv[0]);
165 char *slash = strrchr(buf, '/');
166 if (slash)
167- strcpy(slash, "/../Resources/help-test.html");
168+ strcpy(slash, "/../Resources/help_dialog.html");
169 help->load(buf);
170
171 #else
172
173 if (argc <= 1)
174- help->load("help-test.html");
175+ help->load("help_dialog.html");
176 else
177 help->load(argv[1]);
178
179diff --git a/test/help-test.html b/test/help_dialog.html
180similarity index 100%
181rename from test/help-test.html
182rename to test/help_dialog.html