1*4882a593SmuzhiyunFrom 3edb88b55c0870989778c670d555aa159a2c3abc Mon Sep 17 00:00:00 2001 2*4882a593SmuzhiyunFrom: Fabrice Fontaine <fontaine.fabrice@gmail.com> 3*4882a593SmuzhiyunDate: Mon, 31 Aug 2020 20:56:43 +0200 4*4882a593SmuzhiyunSubject: [PATCH] don't install a libtool file with static library 5*4882a593Smuzhiyun 6*4882a593SmuzhiyunStatic library is supported since version 1.3.11 and 7*4882a593Smuzhiyunhttps://github.com/silnrsi/graphite/commit/2f143c04da5caa43ddf4dba437b2f2bc26bf4238 8*4882a593Smuzhiyun 9*4882a593SmuzhiyunHowever, graphite2 is still installing libgraphite2.la which contains 10*4882a593Smuzhiyunincorrect information (i.e. dlname set to libgraphite2.so and 11*4882a593Smuzhiyunold_library set to ''): 12*4882a593Smuzhiyun 13*4882a593Smuzhiyundlname='libgraphite2.so' 14*4882a593Smuzhiyun 15*4882a593Smuzhiyunlibrary_names='libgraphite2.so.3.2.1 libgraphite2.so.3 libgraphite2.so' 16*4882a593Smuzhiyun 17*4882a593Smuzhiyunold_library='' 18*4882a593Smuzhiyun 19*4882a593Smuzhiyundependency_libs='' 20*4882a593Smuzhiyun 21*4882a593SmuzhiyunThis will result in the following build failure with any applications 22*4882a593Smuzhiyunusing this file such as harfbuzz: 23*4882a593Smuzhiyun 24*4882a593Smuzhiyunarm-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 25*4882a593Smuzhiyunmake[5]: *** [main] Error 1 26*4882a593Smuzhiyun 27*4882a593SmuzhiyunInstead of trying to fix this libtool file, just disable it when 28*4882a593Smuzhiyunbuilding a static library as it is not needed 29*4882a593Smuzhiyun 30*4882a593SmuzhiyunFixes: 31*4882a593Smuzhiyun - http://autobuild.buildroot.org/results/9ebe1d11e80755d59190ef2aae82bbba5cc45e44 32*4882a593Smuzhiyun 33*4882a593SmuzhiyunSigned-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> 34*4882a593Smuzhiyun[Upstream status: https://github.com/silnrsi/graphite/pull/65] 35*4882a593Smuzhiyun--- 36*4882a593Smuzhiyun src/CMakeLists.txt | 8 ++++++-- 37*4882a593Smuzhiyun 1 file changed, 6 insertions(+), 2 deletions(-) 38*4882a593Smuzhiyun 39*4882a593Smuzhiyundiff --git a/src/CMakeLists.txt b/src/CMakeLists.txt 40*4882a593Smuzhiyunindex b6ac26bf..a7ace040 100644 41*4882a593Smuzhiyun--- a/src/CMakeLists.txt 42*4882a593Smuzhiyun+++ b/src/CMakeLists.txt 43*4882a593Smuzhiyun@@ -131,7 +131,9 @@ if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux") 44*4882a593Smuzhiyun nolib_test(stdc++ $<TARGET_SONAME_FILE:graphite2>) 45*4882a593Smuzhiyun endif () 46*4882a593Smuzhiyun set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "") 47*4882a593Smuzhiyun- CREATE_LIBTOOL_FILE(graphite2 "/lib${LIB_SUFFIX}") 48*4882a593Smuzhiyun+ if (BUILD_SHARED_LIBS) 49*4882a593Smuzhiyun+ CREATE_LIBTOOL_FILE(graphite2 "/lib${LIB_SUFFIX}") 50*4882a593Smuzhiyun+ endif() 51*4882a593Smuzhiyun endif() 52*4882a593Smuzhiyun 53*4882a593Smuzhiyun if (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") 54*4882a593Smuzhiyun@@ -146,7 +148,9 @@ if (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") 55*4882a593Smuzhiyun include(Graphite) 56*4882a593Smuzhiyun nolib_test(stdc++ $<TARGET_SONAME_FILE:graphite2>) 57*4882a593Smuzhiyun set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "") 58*4882a593Smuzhiyun- CREATE_LIBTOOL_FILE(graphite2 "/lib${LIB_SUFFIX}") 59*4882a593Smuzhiyun+ if (BUILD_SHARED_LIBS) 60*4882a593Smuzhiyun+ CREATE_LIBTOOL_FILE(graphite2 "/lib${LIB_SUFFIX}") 61*4882a593Smuzhiyun+ endif() 62*4882a593Smuzhiyun endif() 63*4882a593Smuzhiyun 64*4882a593Smuzhiyun if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") 65*4882a593Smuzhiyun-- 66*4882a593Smuzhiyun2.28.0 67*4882a593Smuzhiyun 68