mason
mason copied to clipboard
sed: invalid option -- 'E'
On Sailfish SDK, I get an invalid usage error for sed (GNU sed version 4.1.5) when trying to build mapbox-gl-native.
Based on http://blog.dmitryleskov.com/small-hacks/mysterious-gnu-sed-option-e/ it looks like -r is equivalent to -E
Possible fix for /mapbox/mason/mason.sh:
if test | sed -E 's///g' 2>/dev/null; then
SED_REGEX_ARG="E"
else
SED_REGEX_ARG="r"
fi
...
MASON_CONFIG_INCLUDE_DIRS=$(echo -n "${MASON_CONFIG_CFLAGS}" | sed -$SED_REGEX_ARG -n 's/^-(I|isystem) *([^ ]+)/\2/p' | uniq)
MASON_CONFIG_DEFINITIONS=$(echo -n "${MASON_CONFIG_CFLAGS}" | sed -$SED_REGEX_ARG -n 's/^-(D) *([^ ]+)/\2/p')
MASON_CONFIG_OPTIONS=$(echo -n "${MASON_CONFIG_CFLAGS}" | sed -$SED_REGEX_ARG -n '/^-(D|I|isystem) *([^ ]+)/!p')
Thank you for reporting this. /cc @kkaefer who wrote those sed
lines and will have the best idea of how to test/land this fix.