From f65bcfa852cc0a122c6a1542b81f9c2167df4c5f Mon Sep 17 00:00:00 2001 From: Thomas Debesse Date: Mon, 5 Aug 2019 05:02:55 +0200 Subject: [PATCH] bundle: do not bundle gtk and other deps on linux - gtk is not easily bundlable on linux because it looks for harcoded system path to optional shared libraries like image codecs, theme engines, sound notification system, etc. so expect user to install gtk first - since we ask user to instal gtk, we can also ask them to install gtkglext, which is likely to pull gtk itself, x11 and gl dependencies - old fontconfig does not work correctly if newer fontconfig configuration is installed - if gtk and fontconfig is installed, freetype is --- bundle/CMakeLists.txt | 9 ++++++++- library-bundler | 11 ++++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/bundle/CMakeLists.txt b/bundle/CMakeLists.txt index 1e2546d0..eb09c24d 100644 --- a/bundle/CMakeLists.txt +++ b/bundle/CMakeLists.txt @@ -1,5 +1,6 @@ if (WIN32) set(BUNDLE_OS_NAME "windows") + set(BUNDLE_SHARE ON) elseif ("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux") set(BUNDLE_OS_NAME "linux") else () @@ -15,6 +16,12 @@ add_custom_target(bundle ALL install(DIRECTORY ${PROJECT_BINARY_DIR}/lib - ${PROJECT_BINARY_DIR}/share DESTINATION ${CMAKE_INSTALL_PREFIX} ) + +if (BUNDLE_SHARE) + install(DIRECTORY + ${PROJECT_BINARY_DIR}/share + DESTINATION ${CMAKE_INSTALL_PREFIX} + ) +endif () diff --git a/library-bundler b/library-bundler index 2758de7a..ceac213f 100755 --- a/library-bundler +++ b/library-bundler @@ -38,7 +38,16 @@ Common::stripLdd () { Multi::excludeLdd () { case "${system_name}" in 'linux') - egrep -v '/libc\.|/libdl\.|/libm\.|/libX|/libxcb|/libGL' + # - always rely on up-to-date x11 and gl libraries, bundling them will break on future distros + # - gtk is not easily bundlable on linux because it looks for harcoded system path to optional + # shared libraries like image codecs, theme engines, sound notification system, etc. + # so expect user to install gtk first + # - since we ask user to instal gtk, we can also ask them to install gtkglext, + # which is likely to pull gtk itself, x11 and gl dependencies + # - old fontconfig does not work correctly if newer fontconfig configuration is installed + # - if gtk and fontconfig is installed, freetype is + egrep -v '/libc\.|/libdl\.|/libm\.|/libX|/libxcb|/libGL' \ + | egrep -v '/libatk|/libgdk|/libgtk|/libgio|/libglib|/libgmodule|/libgobject|/libfontconfig|/libfreetype' ;; 'windows') egrep -i '\.dll => [A-Z]:\\msys64\\' \ -- 2.39.2