Don't use GNU grep for OpenBSD package builds

Hi --

The -P flag is only available on GNU grep, not BSD grep. This causes package builds on OpenBSD to needlessly fail when running cmake.

We will only ever package tagged versions of Olive, so we'll all know what version of Olive we're using. If a user wants to build from the tip of the tree, then they'll have a .git directory and the fallback won't even happen.
This commit is contained in:
Brian Callahan
2019-08-03 18:33:59 -04:00
committed by GitHub
parent e5481b19f5
commit d7b14e6b69
+1 -1
View File
@@ -71,7 +71,7 @@ if(EXISTS "${CMAKE_SOURCE_DIR}/.git")
OUTPUT_STRIP_TRAILING_WHITESPACE
)
endif()
elseif(UNIX AND NOT APPLE)
elseif(UNIX AND NOT APPLE AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD")
# Fallback for Ubuntu/Launchpad (extracts Git hash from debian/changelog rather than Git repo)
# (see https://answers.launchpad.net/launchpad/+question/678556)
execute_process(COMMAND sh -c "grep -Po '(?<=-)(([a-z0-9])\\w+)(?=\\+)' -m 1 changelog"