Skip to contentSkip to conversation

fix build failed if the path includes "-static"

PATCH New Jamin Lin 1 participant 2 messages Nov 6, 2023

lore
Share & tools
lore

Jamin Lin

author
#0 lore raw

cover fix build failed if the path includes "-static"

v0: fix build failed if the path includes "-static"
v1: add a sepator in path

Jamin Lin (1):
Brotli: fix build failed if the path includes "-static"

 meta-oe/recipes-extended/brotli/brotli_1.0.9.bb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Signature · 1 line
2.34.1
author
#1 lore raw

PATCH 1/1 Brotli: fix build failed if the path includes "-static"

It would like to remove "-static" in the name of statice library at the do_install task. For example: replace libbrotlicommon-static.a with ibbrotlicommon-static.a However, if the patch of
this statice library includes "-static", it would build failed. (ex: set my build directory "build-static")
Change to remove "-static" in the base name of static library to fix this build failed.

---
 meta-oe/recipes-extended/brotli/brotli_1.0.9.bb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
meta-oe/recipes-extended/brotli/brotli_1.0.9.bb +2 -1
index 4e2813dde..708c1c194 100644
@@ -16,7 +16,8 @@ inherit cmake lib_package
 
 do_install:append () {
 	for lib in $(ls ${D}${libdir}/*-static.a); do
-		mv -v "${lib}" "$(echo ${lib} | sed s/-static//)"
+		basename=$(basename ${lib})
+		mv -v "${lib}" "${D}${libdir}/$(echo ${basename} | sed s/-static//)"
 	done
 }
 
Signature · 1 line
2.34.1