diff --git a/.github/workflows/autotools-cmake.yml b/.github/workflows/autotools-cmake.yml index bf48db9b..9b05914a 100644 --- a/.github/workflows/autotools-cmake.yml +++ b/.github/workflows/autotools-cmake.yml @@ -81,7 +81,6 @@ jobs: automake \ cmake \ docbook2x \ - gnu-sed \ libtool \ lzip @@ -128,8 +127,14 @@ jobs: # Autotools' LT_LIB_M has a hardcoded exclude for "*-*-darwin*" hosts, # while macOS does have libm and is successfully found by CMake. # We patch the CMake side in line here to get the differ below to empty. - export PATH="$(brew --prefix)/opt/gnu-sed/libexec/gnubin:${PATH}" - sed 's,-lm,,' -i build_cmake/ROOT/usr/local/lib*/pkgconfig/expat.pc + # + # Both GNU and BSD sed can edit in-place without creating a backup, + # but not with the same syntax. The syntax for editing in-place + # _with_ a backup however is the same, so do that, then remove the + # backup so it doesn't show up in the diff later. + sed -e 's,-lm,,' -i.bak \ + build_cmake/ROOT/usr/local/lib*/pkgconfig/expat.pc + rm -f build_cmake/ROOT/usr/local/lib*/pkgconfig/expat.pc.bak fi diff \ diff --git a/expat/Makefile.am b/expat/Makefile.am index 18d3221c..47cdd1b9 100644 --- a/expat/Makefile.am +++ b/expat/Makefile.am @@ -117,7 +117,7 @@ buildlib: @echo 'ERROR: # find . -name Makefile.am -exec sed \' >&2 @echo 'ERROR: -e "s,libexpat\.la,libexpatw.la," \' >&2 @echo 'ERROR: -e "s,libexpat_la,libexpatw_la," \' >&2 - @echo 'ERROR: -i {} +' >&2 + @echo 'ERROR: -i.bak {} +' >&2 @echo 'ERROR:' >&2 @echo 'ERROR: * Run automake to re-generate Makefile.in files' >&2 @echo 'ERROR:' >&2 diff --git a/expat/README.md b/expat/README.md index 3e949063..709afd2e 100644 --- a/expat/README.md +++ b/expat/README.md @@ -161,7 +161,7 @@ support this mode of compilation (yet): `find . -name Makefile.am -exec sed -e 's,libexpat\.la,libexpatw.la,' -e 's,libexpat_la,libexpatw_la,' - -i {} +` + -i.bak {} +` 1. Run `automake` to re-write `Makefile.in` files:
`automake` diff --git a/expat/apply-clang-format.sh b/expat/apply-clang-format.sh index 8d2cf938..ddff1255 100755 --- a/expat/apply-clang-format.sh +++ b/expat/apply-clang-format.sh @@ -56,5 +56,5 @@ clang-format "${args[@]}" -- "${files[@]}" sed \ -e 's, @$,@,' \ -e 's,#\( \+\)cmakedefine,#cmakedefine,' \ - -i \ + -i.bak \ expat_config.h.cmake