1From 3edb88b55c0870989778c670d555aa159a2c3abc Mon Sep 17 00:00:00 2001 2From: Fabrice Fontaine <fontaine.fabrice@gmail.com> 3Date: Mon, 31 Aug 2020 20:56:43 +0200 4Subject: [PATCH] don't install a libtool file with static library 5 6Static library is supported since version 1.3.11 and 7https://github.com/silnrsi/graphite/commit/2f143c04da5caa43ddf4dba437b2f2bc26bf4238 8 9However, graphite2 is still installing libgraphite2.la which contains 10incorrect information (i.e. dlname set to libgraphite2.so and 11old_library set to ''): 12 13dlname='libgraphite2.so' 14 15library_names='libgraphite2.so.3.2.1 libgraphite2.so.3 libgraphite2.so' 16 17old_library='' 18 19dependency_libs='' 20 21This will result in the following build failure with any applications 22using this file such as harfbuzz: 23 24arm-linux-g++.br_real: error: /home/buildroot/autobuild/run/instance-3/output-1/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libgraphite2.so: No such file or directory 25make[5]: *** [main] Error 1 26 27Instead of trying to fix this libtool file, just disable it when 28building a static library as it is not needed 29 30Fixes: 31 - http://autobuild.buildroot.org/results/9ebe1d11e80755d59190ef2aae82bbba5cc45e44 32 33Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> 34[Upstream status: https://github.com/silnrsi/graphite/pull/65] 35--- 36 src/CMakeLists.txt | 8 ++++++-- 37 1 file changed, 6 insertions(+), 2 deletions(-) 38 39diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt 40index b6ac26bf..a7ace040 100644 41--- a/src/CMakeLists.txt 42+++ b/src/CMakeLists.txt 43@@ -131,7 +131,9 @@ if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux") 44 nolib_test(stdc++ $<TARGET_SONAME_FILE:graphite2>) 45 endif () 46 set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "") 47- CREATE_LIBTOOL_FILE(graphite2 "/lib${LIB_SUFFIX}") 48+ if (BUILD_SHARED_LIBS) 49+ CREATE_LIBTOOL_FILE(graphite2 "/lib${LIB_SUFFIX}") 50+ endif() 51 endif() 52 53 if (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") 54@@ -146,7 +148,9 @@ if (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") 55 include(Graphite) 56 nolib_test(stdc++ $<TARGET_SONAME_FILE:graphite2>) 57 set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "") 58- CREATE_LIBTOOL_FILE(graphite2 "/lib${LIB_SUFFIX}") 59+ if (BUILD_SHARED_LIBS) 60+ CREATE_LIBTOOL_FILE(graphite2 "/lib${LIB_SUFFIX}") 61+ endif() 62 endif() 63 64 if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") 65-- 662.28.0 67 68