summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Müller <schnitzeltony@googlemail.com>2017-02-28 02:09:42 +0100
committerMartin Jansa <Martin.Jansa@gmail.com>2017-04-18 14:21:42 +0200
commit2c78fa9134074c8bdb3e34c7ad41e2832354bb8c (patch)
treee09de165819e088840cb6cc2ae2c8b682d68ed97
parentb6e7cc35d4a6becbbf3bef4afed70a5660992d1f (diff)
downloadmeta-openembedded-2c78fa9134074c8bdb3e34c7ad41e2832354bb8c.tar.gz
fltk: rework completely
* Use cmake as build system. Projects also using cmake and depending on fltk would not find all required components. Note that FindFLTK.cmake is part of cmake. * Add a native recipe and split out common - we need fluid (Fast Light User Interface Designer) as working binary Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
-rw-r--r--meta-oe/recipes-support/fltk/fltk-native.bb16
-rw-r--r--meta-oe/recipes-support/fltk/fltk.bb34
-rw-r--r--meta-oe/recipes-support/fltk/fltk.inc21
-rw-r--r--meta-oe/recipes-support/fltk/fltk/0001-Fl_Preferences.cxx-do-not-use-dlopen-in-case-glibc-s.patch39
-rw-r--r--meta-oe/recipes-support/fltk/fltk/0002-always-build-fluid-and-export-pointers.patch31
-rw-r--r--meta-oe/recipes-support/fltk/fltk_1.3.4-1.bb47
6 files changed, 141 insertions, 47 deletions
diff --git a/meta-oe/recipes-support/fltk/fltk-native.bb b/meta-oe/recipes-support/fltk/fltk-native.bb
new file mode 100644
index 000000000..353987e0f
--- /dev/null
+++ b/meta-oe/recipes-support/fltk/fltk-native.bb
@@ -0,0 +1,16 @@
1require ${BPN}.inc
2
3DEPENDS = "zlib-native jpeg-native libpng-native libxext-native libxft-native"
4
5inherit native
6
7EXTRA_OECMAKE += " \
8 -DOPTION_BUILD_SHARED_LIBS=OFF \
9 -DOPTION_USE_THREADS=OFF \
10 -DOPTION_USE_XDBE=OFF \
11 -DOPTION_USE_XFT=OFF \
12 -DOPTION_BUILD_EXAMPLES=OFF \
13 -DOPTION_USE_XINERAMA=OFF \
14 -DOPTION_USE_XFIXES=OFF \
15 -DOPTION_USE_XCURSOR=OFF \
16"
diff --git a/meta-oe/recipes-support/fltk/fltk.bb b/meta-oe/recipes-support/fltk/fltk.bb
new file mode 100644
index 000000000..542fd661e
--- /dev/null
+++ b/meta-oe/recipes-support/fltk/fltk.bb
@@ -0,0 +1,34 @@
1require ${BPN}.inc
2
3DEPENDS = "alsa-lib zlib jpeg libpng libxext libxft ${BPN}-native"
4
5inherit binconfig lib_package gtk-icon-cache mime
6
7EXTRA_OECMAKE = " \
8 -DOPTION_BUILD_SHARED_LIBS=ON \
9 -DOPTION_USE_THREADS=ON \
10 -DOPTION_USE_XDBE=ON \
11 -DOPTION_USE_XFT=ON \
12 -DFLTK_CONFIG_PATH=${libdir}/cmake \
13"
14
15PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'opengl', d)}"
16
17PACKAGECONFIG[examples] = "-DOPTION_BUILD_EXAMPLES=ON,-DOPTION_BUILD_EXAMPLES=OFF,"
18PACKAGECONFIG[opengl] = "-DOPTION_USE_GL=ON,-DOPTION_USE_GL=OFF,virtual/libgl"
19PACKAGECONFIG[xinerama] = "-DOPTION_USE_XINERAMA=ON,-DOPTION_USE_XINERAMA=OFF,libxinerama"
20PACKAGECONFIG[xfixes] = "-DOPTION_USE_XFIXES=ON,-DOPTION_USE_XFIXES=OFF,libxfixes"
21PACKAGECONFIG[xcursor] = "-DOPTION_USE_XCURSOR=ON,-DOPTION_USE_XCURSOR=OFF,libxcursor"
22
23do_install_append() {
24 sed -i -e 's,${STAGING_DIR_HOST},,g' ${D}${bindir}/fltk-config
25}
26
27python populate_packages_prepend () {
28 if (d.getVar('DEBIAN_NAMES')):
29 d.setVar('PKG_${BPN}', 'libfltk${PV}')
30}
31
32LEAD_SONAME = "libfltk.so"
33
34FILES_${PN} += "${datadir}/mime"
diff --git a/meta-oe/recipes-support/fltk/fltk.inc b/meta-oe/recipes-support/fltk/fltk.inc
new file mode 100644
index 000000000..dbe700af0
--- /dev/null
+++ b/meta-oe/recipes-support/fltk/fltk.inc
@@ -0,0 +1,21 @@
1SUMMARY = "FLTK is a cross-platform C++ GUI toolkit"
2HOMEPAGE = "http://www.fltk.org"
3SECTION = "libs"
4LICENSE = "LGPLv2 & FLTK"
5LIC_FILES_CHKSUM = "file://COPYING;md5=f6b26344a24a941a01a5b0826e80b5ca"
6
7SRC_URI = " \
8 http://fltk.org/pub/fltk/1.3.4/${BP}-source.tar.gz \
9 file://disable_test.patch \
10 file://fltk-no-freetype-config.patch \
11 file://0001-Fl_Preferences.cxx-do-not-use-dlopen-in-case-glibc-s.patch \
12 file://0002-always-build-fluid-and-export-pointers.patch \
13"
14
15PV = "1.3.4-1"
16SRC_URI[md5sum] = "d7fcd27ab928648e1a1366dd2e273970"
17SRC_URI[sha256sum] = "7fb2c8882433ce694e6900c94fda505e8f4ed3fa9c7e597007098a33b85c53f4"
18
19inherit cmake pkgconfig
20
21TARGET_CC_ARCH += "${LDFLAGS} -DXFT_MAJOR=2"
diff --git a/meta-oe/recipes-support/fltk/fltk/0001-Fl_Preferences.cxx-do-not-use-dlopen-in-case-glibc-s.patch b/meta-oe/recipes-support/fltk/fltk/0001-Fl_Preferences.cxx-do-not-use-dlopen-in-case-glibc-s.patch
new file mode 100644
index 000000000..e6e68a0cb
--- /dev/null
+++ b/meta-oe/recipes-support/fltk/fltk/0001-Fl_Preferences.cxx-do-not-use-dlopen-in-case-glibc-s.patch
@@ -0,0 +1,39 @@
1From e76a062338063615c069fedc5a143cc38c34d9b2 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
3Date: Tue, 28 Feb 2017 01:00:21 +0100
4Subject: [PATCH] Fl_Preferences.cxx: do not use dlopen in case glibc's headers
5 are missing
6MIME-Version: 1.0
7Content-Type: text/plain; charset=UTF-8
8Content-Transfer-Encoding: 8bit
9
10| /home/work/x86_64-linux/fltk-native/1.3.4-1-r0/fltk-1.3.4-1/src/Fl_Preferences.cxx: In static member function ‘static int Fl_Plugin_Manager::load(const char*)’:
11| /home/work/x86_64-linux/fltk-native/1.3.4-1-r0/fltk-1.3.4-1/src/Fl_Preferences.cxx:1741:27: error: ‘RTLD_LAZY’ was not declared in this scope
12| dl = dlopen(filename, RTLD_LAZY);
13| ^~~~~~~~~
14| /home/work/x86_64-linux/fltk-native/1.3.4-1-r0/fltk-1.3.4-1/src/Fl_Preferences.cxx:1741:36: error: ‘dlopen’ was not declared in this scope
15| dl = dlopen(filename, RTLD_LAZY);
16| ^
17| src/CMakeFiles/fltk.dir/build.make:1217: recipe for target 'src/CMakeFiles/fltk.dir/Fl_Preferences.cxx.o' failed
18
19Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
20---
21 src/Fl_Preferences.cxx | 2 +-
22 1 file changed, 1 insertion(+), 1 deletion(-)
23
24diff --git a/src/Fl_Preferences.cxx b/src/Fl_Preferences.cxx
25index 1233bb1..7857b9b 100644
26--- a/src/Fl_Preferences.cxx
27+++ b/src/Fl_Preferences.cxx
28@@ -1737,7 +1737,7 @@ int Fl_Plugin_Manager::load(const char *filename) {
29 HMODULE dl = LoadLibrary(filename);
30 #else
31 void * dl = NULL;
32-# if HAVE_DLSYM
33+# if HAVE_DLSYM && HAVE_DLFCN_H
34 dl = dlopen(filename, RTLD_LAZY);
35 # endif
36 #endif
37--
382.9.3
39
diff --git a/meta-oe/recipes-support/fltk/fltk/0002-always-build-fluid-and-export-pointers.patch b/meta-oe/recipes-support/fltk/fltk/0002-always-build-fluid-and-export-pointers.patch
new file mode 100644
index 000000000..cca977c66
--- /dev/null
+++ b/meta-oe/recipes-support/fltk/fltk/0002-always-build-fluid-and-export-pointers.patch
@@ -0,0 +1,31 @@
1From 16010cb1a69ea2326d8102b7f1e34b65aca4b278 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
3Date: Tue, 28 Feb 2017 01:20:42 +0100
4Subject: [PATCH] always build fluid and export pointers
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9Upstream-Status: Inappropriate [embedded specific]
10
11Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
12---
13 CMake/export.cmake | 2 +-
14 1 file changed, 1 insertion(+), 1 deletion(-)
15
16diff --git a/CMake/export.cmake b/CMake/export.cmake
17index 968186a..95e04eb 100644
18--- a/CMake/export.cmake
19+++ b/CMake/export.cmake
20@@ -21,7 +21,7 @@
21 # final config and export
22 #######################################################################
23 # Set the fluid executable path
24-if(CMAKE_CROSSCOMPILING)
25+if(FALSE)
26 find_file(FLUID_PATH
27 NAMES fluid fluid.exe
28 PATHS ENV PATH
29--
302.9.3
31
diff --git a/meta-oe/recipes-support/fltk/fltk_1.3.4-1.bb b/meta-oe/recipes-support/fltk/fltk_1.3.4-1.bb
deleted file mode 100644
index 801c8e7aa..000000000
--- a/meta-oe/recipes-support/fltk/fltk_1.3.4-1.bb
+++ /dev/null
@@ -1,47 +0,0 @@
1SUMMARY = "FLTK is a cross-platform C++ GUI toolkit"
2HOMEPAGE = "http://www.fltk.org"
3SECTION = "libs"
4LICENSE = "LGPLv2 & FLTK"
5LIC_FILES_CHKSUM = "file://COPYING;md5=f6b26344a24a941a01a5b0826e80b5ca"
6
7DEPENDS = "alsa-lib zlib jpeg libpng libxext libxft"
8
9SRC_URI = " \
10 http://fltk.org/pub/fltk/1.3.4/${BP}-source.tar.gz \
11 file://disable_test.patch \
12 file://fltk-no-freetype-config.patch \
13"
14
15SRC_URI[md5sum] = "d7fcd27ab928648e1a1366dd2e273970"
16SRC_URI[sha256sum] = "7fb2c8882433ce694e6900c94fda505e8f4ed3fa9c7e597007098a33b85c53f4"
17
18inherit autotools-brokensep binconfig pkgconfig lib_package
19
20EXTRA_AUTORECONF = "--exclude=autopoint,autoheader"
21
22TARGET_CC_ARCH += "${LDFLAGS} -DXFT_MAJOR=2"
23
24EXTRA_OECONF = "--enable-shared \
25 --enable-threads \
26 --enable-xdbe \
27 --enable-xft \
28"
29
30PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'opengl', d)}"
31
32PACKAGECONFIG[opengl] = "--enable-gl,--disable-gl,virtual/libgl"
33PACKAGECONFIG[xinerama] = "--enable-xinerama,--disable-xinerama,libxinerama"
34PACKAGECONFIG[xfixes] = "--enable-xfixes,--disable-xfixes,libxfixes"
35PACKAGECONFIG[xcursor] = "--enable-xcursor,--disable-xcursor,libxcursor"
36
37do_install_append_class-target() {
38 sed -i -e 's,${STAGING_DIR_HOST},,g' ${D}${bindir}/fltk-config
39}
40
41python populate_packages_prepend () {
42 if (d.getVar('DEBIAN_NAMES')):
43 d.setVar('PKG_${BPN}', 'libfltk${PV}')
44}
45
46LEAD_SONAME = "libfltk.so"
47