[Buildroot] [git commit branch/2022.02.x] package/zziplib: fix static build failure with mpd

Peter Korsgaard peter at korsgaard.com
Wed Mar 30 19:40:41 UTC 2022


commit: https://git.buildroot.net/buildroot/commit/?id=43fd3fd836d142a7c5d16c8b25366d59bdb6d8fc
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/2022.02.x

The current released version of zziplib copies static libraries with appended
major version, but omits creating the necessary links to the base file names.
This prevents the linker to find the libraries via the search path.

The issue (https://github.com/gdraheim/zziplib/issues/117) has been
fixed upstream; this patch extracts the necessary part of commit 0e8d35f92efb680c81f6ec1fca9f11d173dce389, to enable creation of symlinks.

This resolves the following autobuild issues:

http://autobuild.buildroot.net/results/6c56b645a2b723920f07b98474452824fba5e2c1
http://autobuild.buildroot.net/results/032aaff121fb114f388c67dbca3ad2b02f670e38
http://autobuild.buildroot.net/results/ba711034c0abe980f677e26de41739223e2f66e9

Signed-off-by: Andreas Ziegler <br015 at umbiko.net>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout at mind.be>
(cherry picked from commit 0f3d6d2e6a924b9075accb27cf5d7351a30d8f17)
Signed-off-by: Peter Korsgaard <peter at korsgaard.com>
---
 .../0001-implant-ZZIP_LIBLATEST-for-zzip_lib.patch | 75 ++++++++++++++++++++++
 1 file changed, 75 insertions(+)

diff --git a/package/zziplib/0001-implant-ZZIP_LIBLATEST-for-zzip_lib.patch b/package/zziplib/0001-implant-ZZIP_LIBLATEST-for-zzip_lib.patch
new file mode 100644
index 0000000000..780d990ab7
--- /dev/null
+++ b/package/zziplib/0001-implant-ZZIP_LIBLATEST-for-zzip_lib.patch
@@ -0,0 +1,75 @@
+From 0e8d35f92efb680c81f6ec1fca9f11d173dce389 Mon Sep 17 00:00:00 2001
+From: Guido Draheim <guidod at gmx.de>
+Date: Sat, 22 May 2021 15:13:28 +0200
+Subject: [PATCH] #117 implant ZZIP_LIBLATEST for zzip.lib
+
+[Andreas: Extract link creation for versioned libraries from commit
+0e8d35f92efb680c81f6ec1fca9f11d173dce389.]
+Signed-off-by: Andreas Ziegler <br015 at umbiko.net>
+---
+ zzip/CMakeLists.txt | 57 +++++++++++++++++++++++++++++++++++----------
+ 1 file changed, 45 insertions(+), 12 deletions(-)
+
+diff --git a/zzip/CMakeLists.txt b/zzip/CMakeLists.txt
+index a966d5f..ccd08b6 100644
+--- a/zzip/CMakeLists.txt
++++ b/zzip/CMakeLists.txt
+@@ -28,6 +28,12 @@ option(ZZIP_LIBTOOL "Ensure binary compatibility with libtool" OFF)
+ option(ZZIP_PKGCONFIG "Generate pkg-config files for linking" OFF)
+ endif()
+ 
++if(ZZIP_LIBTOOL OR ZZIP_PKGCONFIG)
++option(ZZIP_LIBLATEST "Ensure libname.lib links to libname-REL.lib" ON)
++else()
++option(ZZIP_LIBLATEST "Ensure libname.lib links to libname-REL.lib" OFF)
++endif()
++
+ # used in zzip/_config.h
+ set(ZZIP_PACKAGE "${PROJECT_NAME}lib")
+ set(ZZIP_VERSION "${PROJECT_VERSION}")
+@@ -346,6 +340,45 @@ if(ZZIP_LIBTOOL)
+   endif(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG)
+ endif(ZZIP_LIBTOOL)
+ 
++if(ZZIP_LIBLATEST)
++  if(BUILD_SHARED_LIBS)
++    set(lib ${CMAKE_SHARED_LIBRARY_PREFIX})
++    set(dll ${CMAKE_SHARED_LIBRARY_SUFFIX})
++  else()
++    set(lib ${CMAKE_STATIC_LIBRARY_PREFIX})
++    set(dll ${CMAKE_STATIC_LIBRARY_SUFFIX})
++  endif()
++    get_target_property(libname libzzip OUTPUT_NAME)
++    get_target_property(librelease libzzip RELEASE_POSTFIX)
++    add_custom_target(libzzip_latest ALL
++        COMMAND ${CMAKE_COMMAND} -E create_symlink $<TARGET_FILE_NAME:libzzip> ${lib}${libname}${dll}
++        )
++    install(FILES
++        ${outdir}/${lib}${libname}${dll}
++        DESTINATION ${CMAKE_INSTALL_LIBDIR})
++    if(ZZIPFSEEKO)
++    get_target_property(libname libzzipfseeko OUTPUT_NAME)
++    get_target_property(librelease libzzipfseeko RELEASE_POSTFIX)
++    add_custom_target(libzzipfseeko_latest ALL
++        COMMAND ${CMAKE_COMMAND} -E create_symlink $<TARGET_FILE_NAME:libzzipfseeko> ${lib}${libname}${dll}
++        )
++    install(FILES
++        ${outdir}/${lib}${libname}${dll}
++        DESTINATION ${CMAKE_INSTALL_LIBDIR})
++    endif(ZZIPFSEEKO)
++    if(ZZIPMMAPPED)
++    get_target_property(libname libzzipmmapped OUTPUT_NAME)
++    get_target_property(librelease libzzipmmapped RELEASE_POSTFIX)
++    add_custom_target(libzzipmmaped_latest ALL
++        COMMAND ${CMAKE_COMMAND} -E create_symlink $<TARGET_FILE_NAME:libzzipmmapped> ${lib}${libname}${dll}
++        )
++    install(FILES
++        ${outdir}/${lib}${libname}${dll}
++        DESTINATION ${CMAKE_INSTALL_LIBDIR})
++    endif(ZZIPMMAPPED)
++endif(ZZIP_LIBLATEST)
++
++
+ ## messages ##############################################
+ 
+ message(STATUS "lib zzipfseeko  to be compiled: ${ZZIPFSEEKO}")



More information about the buildroot mailing list