summaryrefslogtreecommitdiffstats
path: root/external/meta-openembedded/meta-oe/recipes-support/fltk
diff options
context:
space:
mode:
authorToshikazuOhiwa <toshikazu_ohiwa@mail.toyota.co.jp>2020-03-30 09:24:26 +0900
committerToshikazuOhiwa <toshikazu_ohiwa@mail.toyota.co.jp>2020-03-30 09:24:26 +0900
commit5b80bfd7bffd4c20d80b7c70a7130529e9a755dd (patch)
treeb4bb18dcd1487dbf1ea8127e5671b7bb2eded033 /external/meta-openembedded/meta-oe/recipes-support/fltk
parent706ad73eb02caf8532deaf5d38995bd258725cb8 (diff)
agl-basesystem
Diffstat (limited to 'external/meta-openembedded/meta-oe/recipes-support/fltk')
-rw-r--r--external/meta-openembedded/meta-oe/recipes-support/fltk/fltk-native.bb21
-rw-r--r--external/meta-openembedded/meta-oe/recipes-support/fltk/fltk.bb46
-rw-r--r--external/meta-openembedded/meta-oe/recipes-support/fltk/fltk.inc21
-rw-r--r--external/meta-openembedded/meta-oe/recipes-support/fltk/fltk/0001-Fl_Preferences.cxx-do-not-use-dlopen-in-case-glibc-s.patch39
-rw-r--r--external/meta-openembedded/meta-oe/recipes-support/fltk/fltk/0002-always-build-fluid-and-export-pointers.patch31
-rw-r--r--external/meta-openembedded/meta-oe/recipes-support/fltk/fltk/0003-CMake-build-Force-shared-libs-with-unsuffixed-names.patch41
-rw-r--r--external/meta-openembedded/meta-oe/recipes-support/fltk/fltk/disable_test.patch11
-rw-r--r--external/meta-openembedded/meta-oe/recipes-support/fltk/fltk/fltk-no-freetype-config.patch40
8 files changed, 250 insertions, 0 deletions
diff --git a/external/meta-openembedded/meta-oe/recipes-support/fltk/fltk-native.bb b/external/meta-openembedded/meta-oe/recipes-support/fltk/fltk-native.bb
new file mode 100644
index 00000000..2636287e
--- /dev/null
+++ b/external/meta-openembedded/meta-oe/recipes-support/fltk/fltk-native.bb
@@ -0,0 +1,21 @@
+require ${BPN}.inc
+
+DEPENDS = "zlib-native jpeg-native libpng-native libxext-native libxft-native"
+
+inherit native
+
+EXTRA_OECMAKE += " \
+ -DOPTION_BUILD_SHARED_LIBS=OFF \
+ -DOPTION_USE_THREADS=OFF \
+ -DOPTION_USE_XDBE=OFF \
+ -DOPTION_USE_XFT=OFF \
+ -DOPTION_BUILD_EXAMPLES=OFF \
+ -DOPTION_USE_XINERAMA=OFF \
+ -DOPTION_USE_XFIXES=OFF \
+ -DOPTION_USE_XCURSOR=OFF \
+"
+
+do_install_append() {
+ # make sure native fltk-config is not used accidentaly
+ rm -f ${D}${bindir}/fltk-config
+}
diff --git a/external/meta-openembedded/meta-oe/recipes-support/fltk/fltk.bb b/external/meta-openembedded/meta-oe/recipes-support/fltk/fltk.bb
new file mode 100644
index 00000000..ec9e04be
--- /dev/null
+++ b/external/meta-openembedded/meta-oe/recipes-support/fltk/fltk.bb
@@ -0,0 +1,46 @@
+require ${BPN}.inc
+
+DEPENDS = "alsa-lib zlib jpeg libpng libxext libxft"
+
+inherit distro_features_check binconfig lib_package gtk-icon-cache mime
+REQUIRED_DISTRO_FEATURES = "x11"
+
+SRC_URI += "file://0003-CMake-build-Force-shared-libs-with-unsuffixed-names.patch"
+
+EXTRA_OECMAKE = " \
+ -DOPTION_BUILD_SHARED_LIBS=ON \
+ -DOPTION_USE_THREADS=ON \
+ -DOPTION_USE_XDBE=ON \
+ -DOPTION_USE_XFT=ON \
+ -DFLTK_CONFIG_PATH=${libdir}/cmake \
+"
+
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'opengl', d)}"
+
+PACKAGECONFIG[examples] = "-DOPTION_BUILD_EXAMPLES=ON,-DOPTION_BUILD_EXAMPLES=OFF,"
+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"
+
+do_install_append() {
+ sed -i -e 's,${STAGING_DIR_HOST},,g' ${D}${bindir}/fltk-config
+}
+
+python populate_packages_prepend () {
+ if (d.getVar('DEBIAN_NAMES')):
+ d.setVar('PKG_${BPN}', 'libfltk${PV}')
+}
+
+LEAD_SONAME = "libfltk.so"
+
+# .desktop / icons / mime only necessary for fluid app
+FILES_${PN}-bin += " \
+ ${datadir}/applications \
+ ${datadir}/icons \
+ ${datadir}/mime \
+"
+
+# cmake files
+FILES_${PN}-dev += "${datadir}/fltk"
diff --git a/external/meta-openembedded/meta-oe/recipes-support/fltk/fltk.inc b/external/meta-openembedded/meta-oe/recipes-support/fltk/fltk.inc
new file mode 100644
index 00000000..d3416c8b
--- /dev/null
+++ b/external/meta-openembedded/meta-oe/recipes-support/fltk/fltk.inc
@@ -0,0 +1,21 @@
+SUMMARY = "FLTK is a cross-platform C++ GUI toolkit"
+HOMEPAGE = "http://www.fltk.org"
+SECTION = "libs"
+LICENSE = "LGPLv2 & FLTK"
+LIC_FILES_CHKSUM = "file://COPYING;md5=f6b26344a24a941a01a5b0826e80b5ca"
+
+SRC_URI = " \
+ http://fltk.org/pub/fltk/1.3.4/${BP}-source.tar.gz \
+ file://disable_test.patch \
+ file://fltk-no-freetype-config.patch \
+ file://0001-Fl_Preferences.cxx-do-not-use-dlopen-in-case-glibc-s.patch \
+ file://0002-always-build-fluid-and-export-pointers.patch \
+"
+
+PV = "1.3.4-2"
+SRC_URI[md5sum] = "b8e291343357e49dd81a22408744e400"
+SRC_URI[sha256sum] = "25d349c18c99508737d48f225a2eb26a43338f9247551cab72a317fa42cda910"
+
+inherit cmake pkgconfig
+
+TARGET_CC_ARCH += "${LDFLAGS} -DXFT_MAJOR=2"
diff --git a/external/meta-openembedded/meta-oe/recipes-support/fltk/fltk/0001-Fl_Preferences.cxx-do-not-use-dlopen-in-case-glibc-s.patch b/external/meta-openembedded/meta-oe/recipes-support/fltk/fltk/0001-Fl_Preferences.cxx-do-not-use-dlopen-in-case-glibc-s.patch
new file mode 100644
index 00000000..e6e68a0c
--- /dev/null
+++ b/external/meta-openembedded/meta-oe/recipes-support/fltk/fltk/0001-Fl_Preferences.cxx-do-not-use-dlopen-in-case-glibc-s.patch
@@ -0,0 +1,39 @@
+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
+
+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
+
diff --git a/external/meta-openembedded/meta-oe/recipes-support/fltk/fltk/0002-always-build-fluid-and-export-pointers.patch b/external/meta-openembedded/meta-oe/recipes-support/fltk/fltk/0002-always-build-fluid-and-export-pointers.patch
new file mode 100644
index 00000000..cca977c6
--- /dev/null
+++ b/external/meta-openembedded/meta-oe/recipes-support/fltk/fltk/0002-always-build-fluid-and-export-pointers.patch
@@ -0,0 +1,31 @@
+From 16010cb1a69ea2326d8102b7f1e34b65aca4b278 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
+Date: Tue, 28 Feb 2017 01:20:42 +0100
+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@googlemail.com>
+---
+ CMake/export.cmake | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/CMake/export.cmake b/CMake/export.cmake
+index 968186a..95e04eb 100644
+--- a/CMake/export.cmake
++++ b/CMake/export.cmake
+@@ -21,7 +21,7 @@
+ # final config and export
+ #######################################################################
+ # Set the fluid executable path
+-if(CMAKE_CROSSCOMPILING)
++if(FALSE)
+ find_file(FLUID_PATH
+ NAMES fluid fluid.exe
+ PATHS ENV PATH
+--
+2.9.3
+
diff --git a/external/meta-openembedded/meta-oe/recipes-support/fltk/fltk/0003-CMake-build-Force-shared-libs-with-unsuffixed-names.patch b/external/meta-openembedded/meta-oe/recipes-support/fltk/fltk/0003-CMake-build-Force-shared-libs-with-unsuffixed-names.patch
new file mode 100644
index 00000000..1f2f8aec
--- /dev/null
+++ b/external/meta-openembedded/meta-oe/recipes-support/fltk/fltk/0003-CMake-build-Force-shared-libs-with-unsuffixed-names.patch
@@ -0,0 +1,41 @@
+From bc38fb41044503c9debf5710910c51dd29674b6a Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
+Date: Fri, 15 Dec 2017 22:14:01 +0100
+Subject: [PATCH] CMake build: Force shared libs with unsuffixed names
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+For windows build sake CMake complains when a project wants to build shared and
+static libraries with same name. This caused the authors of fltk to generate
+libraries with names suffixed by '_SHARED' when building fltk with cmake -
+autotools builds do not suffix.
+
+Reasons to build shared libs with correct names:
+
+* Shared libraries are the preferred choice for embedded devices
+* There are projects (e.g yoshimi) expecting shared libraries with unsuffixed
+ names - as created by autotools build. These projects link against static
+ libraries by accident causing unusable binaries.
+
+Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
+---
+ CMake/macros.cmake | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/CMake/macros.cmake b/CMake/macros.cmake
+index 4def62d..ab675f0 100644
+--- a/CMake/macros.cmake
++++ b/CMake/macros.cmake
+@@ -49,7 +49,7 @@ macro(FL_ADD_LIBRARY LIBNAME LIBTYPE LIBFILES)
+ PROPERTIES
+ VERSION ${FLTK_VERSION_FULL}
+ SOVERSION ${FLTK_VERSION_MAJOR}.${FLTK_VERSION_MINOR}
+- PREFIX "lib" # for MSVC static/shared coexistence
++ OUTPUT_NAME ${LIBNAME} CLEAN_DIRECT_OUTPUT 1
+ )
+ endif (${LIBTYPE} STREQUAL "SHARED")
+
+--
+2.9.5
+
diff --git a/external/meta-openembedded/meta-oe/recipes-support/fltk/fltk/disable_test.patch b/external/meta-openembedded/meta-oe/recipes-support/fltk/fltk/disable_test.patch
new file mode 100644
index 00000000..1f5fd25e
--- /dev/null
+++ b/external/meta-openembedded/meta-oe/recipes-support/fltk/fltk/disable_test.patch
@@ -0,0 +1,11 @@
+--- 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\
diff --git a/external/meta-openembedded/meta-oe/recipes-support/fltk/fltk/fltk-no-freetype-config.patch b/external/meta-openembedded/meta-oe/recipes-support/fltk/fltk/fltk-no-freetype-config.patch
new file mode 100644
index 00000000..2a9915be
--- /dev/null
+++ b/external/meta-openembedded/meta-oe/recipes-support/fltk/fltk/fltk-no-freetype-config.patch
@@ -0,0 +1,40 @@
+From 699420d306cadbb5285942e09f4383d84b01985d Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
+Date: Fri, 13 Jan 2017 13:21:23 +0100
+Subject: [PATCH] replace freetype-config by pkg-config
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Upstream-Status: Pending
+
+Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
+---
+ configure.ac | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index f0efd48..3af5ecb 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1006,12 +1006,12 @@ case $host_os_gui in
+
+ xft_found=no
+ if test x$enable_xft != xno; then
+- AC_PATH_PROG(FTCONFIG, freetype-config)
++ AC_PATH_PROG(PKGCONFIG,pkg-config)
+
+- if test "x$FTCONFIG" != x; then
+- CPPFLAGS="`$FTCONFIG --cflags` $CPPFLAGS"
+- CFLAGS="`$FTCONFIG --cflags` $CFLAGS"
+- CXXFLAGS="`$FTCONFIG --cflags` $CXXFLAGS"
++ if test "x$PKGCONFIG" != x; then
++ CPPFLAGS="`$PKGCONFIG --cflags xft` $CPPFLAGS"
++ CFLAGS="`$PKGCONFIG --cflags xft` $CFLAGS"
++ CXXFLAGS="`$PKGCONFIG --cflags xft` $CXXFLAGS"
+
+ AC_CHECK_LIB(fontconfig, FcPatternCreate)
+ AC_CHECK_HEADER(X11/Xft/Xft.h,
+--
+2.7.4
+