brewkit
brewkit copied to clipboard
fixup.ts needs to do more work on .cmake files
Of interest is their encoding full versions for deps:
CMake Error in CMakeLists.txt:
Imported target "sodium" includes non-existent path
"/Users/jacob/.tea/libsodium.org/v1.0.18/include"
in its INTERFACE_INCLUDE_DIRECTORIES. Possible reasons include:
* The path was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and references files it does not
provide.
fixup.ts should truncate those to e.g. v1 for proper compatibility.
current state-of-the-art in manual fixes looks like this:
- run: |
sed -E -i.bak \
-e "s:{{pkgx.prefix}}:\$\{_IMPORT_PREFIX\}/../../..:g" \
-e '/^ INTERFACE_INCLUDE_DIRECTORIES/ s|/v([0-9]+)(\.[0-9]+)*[a-z]?/include|/v\1/include|g' \
-e '/^ INTERFACE_LINK_LIBRARIES/ s|/v([0-9]+)(\.[0-9]+)*[a-z]?/lib|/v\1/lib|g' \
wangle-targets.cmake
rm wangle-targets.cmake.bak
working-directory: "{{prefix}}/lib/cmake/wangle"