diff options
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 0000000000..353987e0fd --- /dev/null +++ b/meta-oe/recipes-support/fltk/fltk-native.bb | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | require ${BPN}.inc | ||
| 2 | |||
| 3 | DEPENDS = "zlib-native jpeg-native libpng-native libxext-native libxft-native" | ||
| 4 | |||
| 5 | inherit native | ||
| 6 | |||
| 7 | EXTRA_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 0000000000..542fd661ea --- /dev/null +++ b/meta-oe/recipes-support/fltk/fltk.bb | |||
| @@ -0,0 +1,34 @@ | |||
| 1 | require ${BPN}.inc | ||
| 2 | |||
| 3 | DEPENDS = "alsa-lib zlib jpeg libpng libxext libxft ${BPN}-native" | ||
| 4 | |||
| 5 | inherit binconfig lib_package gtk-icon-cache mime | ||
| 6 | |||
| 7 | EXTRA_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 | |||
| 15 | PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'opengl', d)}" | ||
| 16 | |||
| 17 | PACKAGECONFIG[examples] = "-DOPTION_BUILD_EXAMPLES=ON,-DOPTION_BUILD_EXAMPLES=OFF," | ||
| 18 | PACKAGECONFIG[opengl] = "-DOPTION_USE_GL=ON,-DOPTION_USE_GL=OFF,virtual/libgl" | ||
| 19 | PACKAGECONFIG[xinerama] = "-DOPTION_USE_XINERAMA=ON,-DOPTION_USE_XINERAMA=OFF,libxinerama" | ||
| 20 | PACKAGECONFIG[xfixes] = "-DOPTION_USE_XFIXES=ON,-DOPTION_USE_XFIXES=OFF,libxfixes" | ||
| 21 | PACKAGECONFIG[xcursor] = "-DOPTION_USE_XCURSOR=ON,-DOPTION_USE_XCURSOR=OFF,libxcursor" | ||
| 22 | |||
| 23 | do_install_append() { | ||
| 24 | sed -i -e 's,${STAGING_DIR_HOST},,g' ${D}${bindir}/fltk-config | ||
| 25 | } | ||
| 26 | |||
| 27 | python populate_packages_prepend () { | ||
| 28 | if (d.getVar('DEBIAN_NAMES')): | ||
| 29 | d.setVar('PKG_${BPN}', 'libfltk${PV}') | ||
| 30 | } | ||
| 31 | |||
| 32 | LEAD_SONAME = "libfltk.so" | ||
| 33 | |||
| 34 | FILES_${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 0000000000..dbe700af01 --- /dev/null +++ b/meta-oe/recipes-support/fltk/fltk.inc | |||
| @@ -0,0 +1,21 @@ | |||
| 1 | SUMMARY = "FLTK is a cross-platform C++ GUI toolkit" | ||
| 2 | HOMEPAGE = "http://www.fltk.org" | ||
| 3 | SECTION = "libs" | ||
| 4 | LICENSE = "LGPLv2 & FLTK" | ||
| 5 | LIC_FILES_CHKSUM = "file://COPYING;md5=f6b26344a24a941a01a5b0826e80b5ca" | ||
| 6 | |||
| 7 | SRC_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 | |||
| 15 | PV = "1.3.4-1" | ||
| 16 | SRC_URI[md5sum] = "d7fcd27ab928648e1a1366dd2e273970" | ||
| 17 | SRC_URI[sha256sum] = "7fb2c8882433ce694e6900c94fda505e8f4ed3fa9c7e597007098a33b85c53f4" | ||
| 18 | |||
| 19 | inherit cmake pkgconfig | ||
| 20 | |||
| 21 | TARGET_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 0000000000..e6e68a0cb8 --- /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 @@ | |||
| 1 | From e76a062338063615c069fedc5a143cc38c34d9b2 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com> | ||
| 3 | Date: Tue, 28 Feb 2017 01:00:21 +0100 | ||
| 4 | Subject: [PATCH] Fl_Preferences.cxx: do not use dlopen in case glibc's headers | ||
| 5 | are missing | ||
| 6 | MIME-Version: 1.0 | ||
| 7 | Content-Type: text/plain; charset=UTF-8 | ||
| 8 | Content-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 | |||
| 19 | Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com> | ||
| 20 | --- | ||
| 21 | src/Fl_Preferences.cxx | 2 +- | ||
| 22 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 23 | |||
| 24 | diff --git a/src/Fl_Preferences.cxx b/src/Fl_Preferences.cxx | ||
| 25 | index 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 | -- | ||
| 38 | 2.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 0000000000..cca977c66d --- /dev/null +++ b/meta-oe/recipes-support/fltk/fltk/0002-always-build-fluid-and-export-pointers.patch | |||
| @@ -0,0 +1,31 @@ | |||
| 1 | From 16010cb1a69ea2326d8102b7f1e34b65aca4b278 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com> | ||
| 3 | Date: Tue, 28 Feb 2017 01:20:42 +0100 | ||
| 4 | Subject: [PATCH] always build fluid and export pointers | ||
| 5 | MIME-Version: 1.0 | ||
| 6 | Content-Type: text/plain; charset=UTF-8 | ||
| 7 | Content-Transfer-Encoding: 8bit | ||
| 8 | |||
| 9 | Upstream-Status: Inappropriate [embedded specific] | ||
| 10 | |||
| 11 | Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com> | ||
| 12 | --- | ||
| 13 | CMake/export.cmake | 2 +- | ||
| 14 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 15 | |||
| 16 | diff --git a/CMake/export.cmake b/CMake/export.cmake | ||
| 17 | index 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 | -- | ||
| 30 | 2.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 801c8e7aa4..0000000000 --- a/meta-oe/recipes-support/fltk/fltk_1.3.4-1.bb +++ /dev/null | |||
| @@ -1,47 +0,0 @@ | |||
| 1 | SUMMARY = "FLTK is a cross-platform C++ GUI toolkit" | ||
| 2 | HOMEPAGE = "http://www.fltk.org" | ||
| 3 | SECTION = "libs" | ||
| 4 | LICENSE = "LGPLv2 & FLTK" | ||
| 5 | LIC_FILES_CHKSUM = "file://COPYING;md5=f6b26344a24a941a01a5b0826e80b5ca" | ||
| 6 | |||
| 7 | DEPENDS = "alsa-lib zlib jpeg libpng libxext libxft" | ||
| 8 | |||
| 9 | SRC_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 | |||
| 15 | SRC_URI[md5sum] = "d7fcd27ab928648e1a1366dd2e273970" | ||
| 16 | SRC_URI[sha256sum] = "7fb2c8882433ce694e6900c94fda505e8f4ed3fa9c7e597007098a33b85c53f4" | ||
| 17 | |||
| 18 | inherit autotools-brokensep binconfig pkgconfig lib_package | ||
| 19 | |||
| 20 | EXTRA_AUTORECONF = "--exclude=autopoint,autoheader" | ||
| 21 | |||
| 22 | TARGET_CC_ARCH += "${LDFLAGS} -DXFT_MAJOR=2" | ||
| 23 | |||
| 24 | EXTRA_OECONF = "--enable-shared \ | ||
| 25 | --enable-threads \ | ||
| 26 | --enable-xdbe \ | ||
| 27 | --enable-xft \ | ||
| 28 | " | ||
| 29 | |||
| 30 | PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'opengl', d)}" | ||
| 31 | |||
| 32 | PACKAGECONFIG[opengl] = "--enable-gl,--disable-gl,virtual/libgl" | ||
| 33 | PACKAGECONFIG[xinerama] = "--enable-xinerama,--disable-xinerama,libxinerama" | ||
| 34 | PACKAGECONFIG[xfixes] = "--enable-xfixes,--disable-xfixes,libxfixes" | ||
| 35 | PACKAGECONFIG[xcursor] = "--enable-xcursor,--disable-xcursor,libxcursor" | ||
| 36 | |||
| 37 | do_install_append_class-target() { | ||
| 38 | sed -i -e 's,${STAGING_DIR_HOST},,g' ${D}${bindir}/fltk-config | ||
| 39 | } | ||
| 40 | |||
| 41 | python populate_packages_prepend () { | ||
| 42 | if (d.getVar('DEBIAN_NAMES')): | ||
| 43 | d.setVar('PKG_${BPN}', 'libfltk${PV}') | ||
| 44 | } | ||
| 45 | |||
| 46 | LEAD_SONAME = "libfltk.so" | ||
| 47 | |||
