[oe-commits] [meta-openembedded] 03/06: fltk: do not suffix shared library names with '_SHARED'

git at git.openembedded.org git at git.openembedded.org
Wed Dec 27 15:58:05 UTC 2017


This is an automated email from the git hooks/post-receive script.

armin_kuster pushed a commit to branch master
in repository meta-openembedded.

commit 85eedcfd2abb00da933d1ce00622df6a0c0c1ba2
Author: Andreas Müller <schnitzeltony at gmail.com>
AuthorDate: Sun Dec 17 19:21:43 2017 +0100

    fltk: do not suffix shared library names with '_SHARED'
    
    This avoids unwanted linking against static libraries as happened for yoshimi.
    
    Signed-off-by: Andreas Müller <schnitzeltony at gmail.com>
    Signed-off-by: Armin Kuster <akuster808 at gmail.com>
---
 meta-oe/recipes-support/fltk/fltk.bb               |  3 ++
 ...d-Force-shared-libs-with-unsuffixed-names.patch | 41 ++++++++++++++++++++++
 2 files changed, 44 insertions(+)

diff --git a/meta-oe/recipes-support/fltk/fltk.bb b/meta-oe/recipes-support/fltk/fltk.bb
index 619d142..6a3d1c9 100644
--- a/meta-oe/recipes-support/fltk/fltk.bb
+++ b/meta-oe/recipes-support/fltk/fltk.bb
@@ -4,6 +4,8 @@ DEPENDS = "alsa-lib zlib jpeg libpng libxext libxft"
 
 inherit binconfig lib_package gtk-icon-cache mime
 
+SRC_URI += "file://0003-CMake-build-Force-shared-libs-with-unsuffixed-names.patch"
+
 EXTRA_OECMAKE = " \
     -DOPTION_BUILD_SHARED_LIBS=ON \
     -DOPTION_USE_THREADS=ON \
@@ -15,6 +17,7 @@ EXTRA_OECMAKE = " \
 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"
diff --git a/meta-oe/recipes-support/fltk/fltk/0003-CMake-build-Force-shared-libs-with-unsuffixed-names.patch b/meta-oe/recipes-support/fltk/fltk/0003-CMake-build-Force-shared-libs-with-unsuffixed-names.patch
new file mode 100644
index 0000000..1f2f8ae
--- /dev/null
+++ b/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 at 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 at 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
+

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list