@@ -2,21 +2,19 @@ require ${BPN}.inc
DEPENDS = "zlib-native jpeg-native libpng-native libxext-native libxft-native"
-SRC_URI += "file://fltk-native-link-libdl.patch"
-
-UPSTREAM_CHECK_URI = "https://www.fltk.org/software.php"
-
inherit native
EXTRA_OECMAKE += " \
- -DOPTION_BUILD_SHARED_LIBS=OFF \
- -DOPTION_USE_THREADS=OFF \
- -DOPTION_USE_XDBE=OFF \
- -DOPTION_USE_XFT=OFF \
- -DFLTK_BUILD_TEST=OFF \
- -DOPTION_USE_XINERAMA=OFF \
- -DOPTION_USE_XFIXES=OFF \
- -DOPTION_USE_XCURSOR=OFF \
+ -DFLTK_BACKEND_WAYLAND=OFF \
+ -DFLTK_BUILD_SHARED_LIBS=OFF \
+ -DFLTK_BUILD_GL=OFF \
+ -DFLTK_USE_PTHREADS=OFF \
+ -DFLTK_USE_XFT=OFF \
+ -DFLTK_USE_XINERAMA=OFF \
+ -DFLTK_USE_XFIXES=OFF \
+ -DFLTK_USE_XCURSOR=OFF \
+ -DFLTK_USE_XRENDER=OFF \
+ -DHAVE_TRUNC=1 \
"
do_install:append() {
@@ -1,35 +1,32 @@
require ${BPN}.inc
-DEPENDS = "alsa-lib zlib jpeg libpng libxext libxft"
+DEPENDS = "alsa-lib zlib jpeg libpng libxext libxft libxrender"
inherit features_check binconfig lib_package gtk-icon-cache mime mime-xdg
REQUIRED_DISTRO_FEATURES = "x11"
SRC_URI += "file://0003-fluid-CMakeLists.txt-Do-not-export-fluid-target.patch"
-UPSTREAM_CHECK_URI = "https://www.fltk.org/software.php"
-
-EXTRA_OECMAKE = " \
- -DOPTION_BUILD_SHARED_LIBS=ON \
- -DOPTION_USE_THREADS=ON \
- -DFLTK_BUILD_TEST=OFF \
- -DOPTION_USE_XDBE=ON \
- -DOPTION_USE_XFT=ON \
- -DFLTK_CONFIG_PATH=${libdir}/cmake \
+EXTRA_OECMAKE += " \
+ -DFLTK_BUILD_SHARED_LIBS=ON \
+ -DFLTK_USE_PTHREADS=ON \
+ -DFLTK_USE_XFT=ON \
"
-PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'opengl', d)}"
+# The Wayland backend builds a hybrid Wayland/X11 library, which needs all optional X11 extensions
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'opengl wayland', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'xinerama xfixes xcursor', '', d)}"
-PACKAGECONFIG[cairo] = "-DOPTION_CAIRO=ON,-DOPTION_CAIRO=OFF,cairo"
-PACKAGECONFIG[opengl] = "-DOPTION_USE_GL=ON,-DOPTION_USE_GL=OFF,virtual/libgl"
-PACKAGECONFIG[xinerama] = "-DOPTION_USE_XINERAMA=ON,-DOPTION_USE_XINERAMA=OFF,libxinerama"
-PACKAGECONFIG[xfixes] = "-DOPTION_USE_XFIXES=ON,-DOPTION_USE_XFIXES=OFF,libxfixes"
-PACKAGECONFIG[xcursor] = "-DOPTION_USE_XCURSOR=ON,-DOPTION_USE_XCURSOR=OFF,libxcursor"
+PACKAGECONFIG[cairo] = "-DFLTK_OPTION_CAIRO_WINDOW=ON,-DFLTK_OPTION_CAIRO_WINDOW=OFF,cairo"
+FLTK_GL_DEPS = "virtual/libgl libglu ${@bb.utils.contains('PACKAGECONFIG', 'wayland', 'virtual/egl', '', d)}"
+PACKAGECONFIG[opengl] = "-DFLTK_BUILD_GL=ON,-DFLTK_BUILD_GL=OFF,${FLTK_GL_DEPS}"
+PACKAGECONFIG[wayland] = "-DFLTK_BACKEND_WAYLAND=ON -DFLTK_USE_SYSTEM_LIBDECOR=ON,-DFLTK_BACKEND_WAYLAND=OFF,wayland wayland-native wayland-protocols libxkbcommon libdecor cairo pango dbus"
+PACKAGECONFIG[xinerama] = "-DFLTK_USE_XINERAMA=ON,-DFLTK_USE_XINERAMA=OFF,libxinerama"
+PACKAGECONFIG[xfixes] = "-DFLTK_USE_XFIXES=ON,-DFLTK_USE_XFIXES=OFF,libxfixes"
+PACKAGECONFIG[xcursor] = "-DFLTK_USE_XCURSOR=ON,-DFLTK_USE_XCURSOR=OFF,libxcursor"
do_install:append() {
- sed -i -e 's,${TMPDIR},,g' ${D}${bindir}/fltk-config
- sed -i -e 's,${TMPDIR},,g' ${D}${datadir}/fltk/UseFLTK.cmake
- sed -i -e 's,${TMPDIR},,g' ${D}${datadir}/fltk/FLTK-Targets.cmake
+ sed -i -e 's,${TMPDIR},,g' ${D}${bindir}/fltk-config ${D}${datadir}/fltk/*.cmake
}
python populate_packages:prepend () {
@@ -2,18 +2,23 @@ SUMMARY = "FLTK is a cross-platform C++ GUI toolkit"
HOMEPAGE = "https://www.fltk.org"
SECTION = "libs"
LICENSE = "LGPL-2.0-only AND LicenseRef-FLTK"
-LIC_FILES_CHKSUM = "file://COPYING;md5=f6b26344a24a941a01a5b0826e80b5ca"
+LIC_FILES_CHKSUM = "file://COPYING;md5=353c9fd4163eef6500f7e057aed0b083"
-SRC_URI = " \
- https://github.com/fltk/fltk/releases/download/release-${PV}/${BP}-source.tar.bz2 \
- file://disable_test.patch \
- file://0001-Fl_Preferences.cxx-do-not-use-dlopen-in-case-glibc-s.patch \
- file://0002-always-build-fluid-and-export-pointers.patch \
-"
+SRC_URI = "https://github.com/fltk/fltk/releases/download/release-${PV}/${BP}-source.tar.bz2"
+
+PV = "1.4.5"
+SRC_URI[sha256sum] = "b5a52489b7ffae196db2076adb4c1b18170db0d047f5e93539a382603461564b"
-PV = "1.3.11"
-SRC_URI[sha256sum] = "ca2e144e5f89173cd094cc273940d56230b1bf613083a0792e6406dc191cd99f"
+UPSTREAM_CHECK_URI = "https://www.fltk.org/software.php"
+UPSTREAM_CHECK_REGEX = "fltk-(?P<pver>\d+(\.\d+)+)-source\.tar"
inherit cmake pkgconfig
+EXTRA_OECMAKE += " \
+ -DFLTK_BUILD_TEST=OFF \
+ -DFLTK_BUILD_EXAMPLES=OFF \
+ -DFLTK_BUILD_HTML_DOCS=OFF \
+ -DFLTK_BUILD_PDF_DOCS=OFF \
+"
+
TARGET_CC_ARCH += "${LDFLAGS} -DXFT_MAJOR=2"
deleted file mode 100644
@@ -1,41 +0,0 @@
-From e76a062338063615c069fedc5a143cc38c34d9b2 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
-Date: Tue, 28 Feb 2017 01:00:21 +0100
-Subject: [PATCH] Fl_Preferences.cxx: do not use dlopen in case glibc's headers
- are missing
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-| /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*)’:
-| /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
-| dl = dlopen(filename, RTLD_LAZY);
-| ^~~~~~~~~
-| /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
-| dl = dlopen(filename, RTLD_LAZY);
-| ^
-| src/CMakeFiles/fltk.dir/build.make:1217: recipe for target 'src/CMakeFiles/fltk.dir/Fl_Preferences.cxx.o' failed
-
-Upstream-Status: Pending
-
-Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
----
- src/Fl_Preferences.cxx | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/Fl_Preferences.cxx b/src/Fl_Preferences.cxx
-index 1233bb1..7857b9b 100644
---- a/src/Fl_Preferences.cxx
-+++ b/src/Fl_Preferences.cxx
-@@ -1737,7 +1737,7 @@ int Fl_Plugin_Manager::load(const char *filename) {
- HMODULE dl = LoadLibrary(filename);
- #else
- void * dl = NULL;
--# if HAVE_DLSYM
-+# if HAVE_DLSYM && HAVE_DLFCN_H
- dl = dlopen(filename, RTLD_LAZY);
- # endif
- #endif
-2.9.3
-
deleted file mode 100644
@@ -1,31 +0,0 @@
-From 16010cb1a69ea2326d8102b7f1e34b65aca4b278 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
-Date: Sat, 22 May 2021 12:33:15 +0200
-Subject: [PATCH] always build fluid and export pointers
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Upstream-Status: Inappropriate [embedded specific]
-
-Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
----
- CMake/export.cmake | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/CMake/export.cmake b/CMake/export.cmake
-index 6e8bc5d..71b6f6c 100644
---- a/CMake/export.cmake
-+++ b/CMake/export.cmake
-@@ -20,7 +20,7 @@
- #######################################################################
-
- # Set the fluid executable path
--if (CMAKE_CROSSCOMPILING)
-+if (FALSE)
- find_file(FLUID_PATH
- NAMES fluid fluid.exe
- PATHS ENV PATH
-2.31.1
-
@@ -22,21 +22,19 @@ Upstream-Status: Inappropriate [OE specific]
Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
---
- fluid/CMakeLists.txt | 1 -
- 1 file changed, 1 deletion(-)
+ fluid/CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fluid/CMakeLists.txt b/fluid/CMakeLists.txt
-index 472c84c..f971121 100644
+index 7792446..df5a391 100644
--- a/fluid/CMakeLists.txt
+++ b/fluid/CMakeLists.txt
-@@ -86,7 +86,6 @@ if (APPLE AND (NOT OPTION_APPLE_X11))
- install (TARGETS fluid DESTINATION ${FLTK_BINDIR})
- else()
- install (TARGETS fluid
-- EXPORT FLTK-Targets
- RUNTIME DESTINATION ${FLTK_BINDIR}
- LIBRARY DESTINATION ${FLTK_LIBDIR}
- ARCHIVE DESTINATION ${FLTK_LIBDIR}
-2.31.1
-
+@@ -194,7 +194,7 @@ target_link_libraries(fluid-lib PUBLIC fltk::images)
+
+ # Build targets
+
+-make_target(fluid TRUE "${MAIN_FILES}" fluid-lib fluid TRUE)
++make_target(fluid TRUE "${MAIN_FILES}" fluid-lib fluid FALSE)
+
+ # Build the console app on Windows
+ # This is done for all Windows targets, even if cross-compiling.
deleted file mode 100644
@@ -1,13 +0,0 @@
-Upstream-Status: Pending
-
---- a/Makefile.orig 2015-11-26 15:35:31.485357862 +0800
-+++ b/Makefile 2015-11-26 15:35:37.037357764 +0800
-@@ -18,7 +18,7 @@
-
- include makeinclude
-
--DIRS = $(IMAGEDIRS) src $(CAIRODIR) fluid test documentation
-+DIRS = $(IMAGEDIRS) src $(CAIRODIR) fluid documentation
-
- all: makeinclude fltk-config
- for dir in $(DIRS); do\
deleted file mode 100644
@@ -1,44 +0,0 @@
-Upstream-Status: Inappropriate [cross build specific]
-
-It fails to build fltk-native on Ubuntu 20.04 with glibc 2.31:
-
-| /path_to/tmp/hosttools/ld: lib/libfltk.a(Fl_Native_File_Chooser.cxx.o): in function `fl_dlopen(char const*, char const*)':
-| Fl_Native_File_Chooser.cxx:(.text+0x61a): undefined reference to `dlopen'
-| /path_to/tmp/hosttools/ld: lib/libfltk.a(Fl_Native_File_Chooser.cxx.o): in function `Fl_GTK_File_Chooser::probe_for_GTK_libs()':
-| Fl_Native_File_Chooser.cxx:(.text+0xf92): undefined reference to `dlerror'
-
-The original fix in fltk-native recipe does not work any more because '-ldl'
-appears before lib/libfltk.a and causes dlopen() unresolved. The reason why it
-doesn't fail on other hosts is that the functions dlopen(), dlerror() etc. have
-been moved to libc.so since glibc 2.34 via the commits in glibc:
-
-0c1c3a771e dlfcn: Move dlopen into libc
-add8d7ea01 dlfcn: Move dlvsym into libc
-6dfc0207eb dlfcn: Move dlinfo into libc
-492560a32e dlfcn: Move dladdr1 into libc
-6a1ed32789 dlfcn: Move dlmopen into libc
-77f876c0e3 dlfcn: Move dlsym into libc
-602252b553 dlfcn: Move dladdr into libc
-d8cce17d2a dlfcn: Move dlclose into libc
-
-Append 'dl' to fltk link items explictly to fix the error.
-
-Signed-off-by: Kai Kang <kai.kang@windriver.com>
-
----
- src/CMakeLists.txt | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
-index d153b1c..0fe5c11 100644
---- a/src/CMakeLists.txt
-+++ b/src/CMakeLists.txt
-@@ -306,7 +306,7 @@ endif (USE_XFT)
- #######################################################################
-
- FL_ADD_LIBRARY (fltk STATIC "${STATIC_FILES}")
--target_link_libraries (fltk ${OPTIONAL_LIBS})
-+target_link_libraries (fltk ${OPTIONAL_LIBS} dl)
-
- #######################################################################
-
FLTK 1.4 is a new ABI (libfltk.so.1.4); the API is mostly source compatible with 1.3. - New Wayland backend (hybrid Wayland/X11 library on Linux), with client-side decorations through libdecor and Cairo/Pango drawing - HiDPI support and GUI scaling on all platforms - CMake is the primary build system ("modern CMake" targets); the OPTION_* CMake options were renamed to FLTK_* - New Fl_Flex and Fl_Grid layout widgets, fltk-options tool, SVG image support - 1.4.1-1.4.5 are bug-fix releases (Wayland, X11, macOS, Windows) Recipe changes: map the renamed CMake options (FLTK_BUILD_SHARED_LIBS, FLTK_USE_PTHREADS, FLTK_USE_XFT/XINERAMA/XFIXES/XCURSOR, FLTK_BUILD_GL, FLTK_OPTION_CAIRO_WINDOW); OPTION_USE_XDBE no longer exists. Add a wayland PACKAGECONFIG, enabled with the wayland distro feature, using the system libdecor; it also needs the X11 extensions because the library is hybrid. fltk-native and x11-only builds disable the Wayland backend. GL now links libGLU, so add libglu. Disable docs and examples. FLTK_CONFIG_PATH is no longer settable; the CMake files stay in ${datadir}/fltk and UseFLTK.cmake is gone, so sed all installed *.cmake files. Patches: disable_test.patch touched the unused autotools Makefile; the Fl_Preferences dlopen guard and linking libdl are upstream; 1.4 always builds fluid when cross-compiling, so drop all four. Refresh the "do not export fluid" patch, which is still needed because fluid is not staged in the sysroot. fltk-native: CMake cannot find the host libm in the native sysroot, so the trunc() check fails and the fallback definition clashes with glibc's declaration; preset HAVE_TRUNC. License-Update: COPYING only switches its URLs to https and the bug tracker link from str.php to bugs.php. Move UPSTREAM_CHECK_URI to fltk.inc and add an UPSTREAM_CHECK_REGEX matching the release source tarballs. AI-Generated: Uses Claude Code Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com> --- meta-oe/recipes-support/fltk/fltk-native.bb | 22 +++++----- meta-oe/recipes-support/fltk/fltk.bb | 35 +++++++-------- meta-oe/recipes-support/fltk/fltk.inc | 23 ++++++---- ...xx-do-not-use-dlopen-in-case-glibc-s.patch | 41 ----------------- ...ways-build-fluid-and-export-pointers.patch | 31 ------------- ...Lists.txt-Do-not-export-fluid-target.patch | 26 +++++------ .../fltk/fltk/disable_test.patch | 13 ------ .../fltk/fltk/fltk-native-link-libdl.patch | 44 ------------------- 8 files changed, 52 insertions(+), 183 deletions(-) delete mode 100644 meta-oe/recipes-support/fltk/fltk/0001-Fl_Preferences.cxx-do-not-use-dlopen-in-case-glibc-s.patch delete mode 100644 meta-oe/recipes-support/fltk/fltk/0002-always-build-fluid-and-export-pointers.patch delete mode 100644 meta-oe/recipes-support/fltk/fltk/disable_test.patch delete mode 100644 meta-oe/recipes-support/fltk/fltk/fltk-native-link-libdl.patch