Skip to contentSkip to conversation

glslang: strip whitespace in pkgconfig file

PATCH In review Ross Burton 2 participants 2 messages Apr 9, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 glslang: strip whitespace in pkgconfig file

Whilst pkg-config is fine with .pc files containing leading whitespace, pkgconf is less forgiving.

---
 .../0001-generate-glslang-pkg-config.patch    | 22 +++++++++----------
 1 file changed, 11 insertions(+), 11 deletions(-)
meta/recipes-graphics/glslang/glslang/0001-generate-glslang-pkg-config.patch +11 -11
index ef092f17a1..cddd330971 100644
@@ -34,14 +34,14 @@ index 00000000..64b6882d
 --- /dev/null
 +++ b/glslang/glslang.pc.cmake.in
 @@ -0,0 +1,11 @@
-+    prefix=@CMAKE_INSTALL_PREFIX@
-+    exec_prefix=@CMAKE_INSTALL_PREFIX@
-+    libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
-+    includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@
-+    
-+    Name: @PROJECT_NAME@
-+    Description: OpenGL and OpenGL ES shader front end and validator
-+    Requires:
-+    Version: @GLSLANG_VERSION@
-+    Libs: -L${libdir} -lglslang -lOSDependent -lHLSL -lOGLCompiler -lSPVRemapper
-+    Cflags: -I${includedir}
++prefix=@CMAKE_INSTALL_PREFIX@
++exec_prefix=@CMAKE_INSTALL_PREFIX@
++libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
++includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@
++
++Name: @PROJECT_NAME@
++Description: OpenGL and OpenGL ES shader front end and validator
++Requires:
++Version: @GLSLANG_VERSION@
++Libs: -L${libdir} -lglslang -lOSDependent -lHLSL -lOGLCompiler -lSPVRemapper
++Cflags: -I${includedir}
Signature · 1 line
2.25.1
#1 lore raw
Quoted 3 lines · Ross Burton

Whilst pkg-config is fine with .pc files containing leading whitespace, pkgconf is less forgiving.

thanks, I was thinking this could be painful, perhaps a QA check might ease out the issue a bit as well. I dont know how many .pc files will have this issue. What are usual signs when this fails in this way ?

Quoted 40 lines
---
  .../0001-generate-glslang-pkg-config.patch    | 22 +++++++++----------
  1 file changed, 11 insertions(+), 11 deletions(-)
meta/recipes-graphics/glslang/glslang/0001-generate-glslang-pkg-config.patch +11 -11
index ef092f17a1..cddd330971 100644
@@ -34,14 +34,14 @@ index 00000000..64b6882d
  --- /dev/null
  +++ b/glslang/glslang.pc.cmake.in
  @@ -0,0 +1,11 @@
-+    prefix=@CMAKE_INSTALL_PREFIX@
-+    exec_prefix=@CMAKE_INSTALL_PREFIX@
-+    libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
-+    includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@
-+
-+    Name: @PROJECT_NAME@
-+    Description: OpenGL and OpenGL ES shader front end and validator
-+    Requires:
-+    Version: @GLSLANG_VERSION@
-+    Libs: -L${libdir} -lglslang -lOSDependent -lHLSL -lOGLCompiler -lSPVRemapper
-+    Cflags: -I${includedir}
++prefix=@CMAKE_INSTALL_PREFIX@
++exec_prefix=@CMAKE_INSTALL_PREFIX@
++libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
++includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@
++
++Name: @PROJECT_NAME@
++Description: OpenGL and OpenGL ES shader front end and validator
++Requires:
++Version: @GLSLANG_VERSION@
++Libs: -L${libdir} -lglslang -lOSDependent -lHLSL -lOGLCompiler -lSPVRemapper
++Cflags: -I${includedir}