mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-13 13:39:02 +00:00
Fix broken fish.pc build on non-GNU platforms
`-v` is a non-standard GNU-only extension to `awk`, its usage in the generation of the fish.pc script breaks on non-GNU platforms (such as FreeBSD and presumably macOS). Using `sed` with only standard posix commands instead.
This commit is contained in:
parent
2ba76a7115
commit
462b9c2209
1 changed files with 3 additions and 1 deletions
|
@ -113,7 +113,9 @@ FISH_CREATE_DIRS(${rel_datadir}/pkgconfig ${extra_completionsdir}
|
|||
# $v $(INSTALL) -m 644 fish.pc $(DESTDIR)$(datadir)/pkgconfig
|
||||
CONFIGURE_FILE(fish.pc.in fish.pc.noversion)
|
||||
ADD_CUSTOM_COMMAND(OUTPUT fish.pc
|
||||
COMMAND awk -v `cat ${FBVF} | tr -d '\"'` '/^Version:/ {$$0=$$0 FISH_BUILD_VERSION} 1' fish.pc.noversion > fish.pc
|
||||
COMMAND sed '/Version/d' fish.pc.noversion > fish.pc
|
||||
COMMAND echo -n "Version: " >> fish.pc
|
||||
COMMAND sed 's/FISH_BUILD_VERSION=//\;s/\"//g' ${FBVF} >> fish.pc
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
DEPENDS ${FBVF} ${CMAKE_CURRENT_BINARY_DIR}/fish.pc.noversion)
|
||||
|
||||
|
|
Loading…
Reference in a new issue