0001-don-t-install-a-libtool-file-with-static-library.patch 2.3 KB

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