From 3a814ee6bca9ee24a868c0dc032b321048a53e08 Mon Sep 17 00:00:00 2001 From: Ethan Sommer Date: Tue, 5 Nov 2019 20:29:11 -0500 Subject: makepkg: replaces sed in-place with built in substitution Reads PKGBUILD into an array and replaces the pkgver and pkgrel with bash parameter substitution, then uses shell redirection to write to to the file. Because shell redirection follows symlinks, this accomplishes the same thing as the previous default of using the GNU-specific --follow-symlinks sed flag. Removes SEDPATH and SEDINPLACEFLAGS from the build systems as they are not used elsewhere. Signed-off-by: Ethan Sommer Signed-off-by: Allan McRae --- configure.ac | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 305432b3..e59f82e9 100644 --- a/configure.ac +++ b/configure.ac @@ -369,7 +369,6 @@ AC_CHECK_MEMBERS([struct statfs.f_flags],,,[[#include GCC_VISIBILITY_CC # Host-dependant definitions -DEFAULT_SEDINPLACEFLAGS=" --follow-symlinks -i" INODECMD="stat -c '%i %n'" STRIP_BINARIES="--strip-all" STRIP_SHARED="--strip-unneeded" @@ -377,30 +376,21 @@ STRIP_STATIC="--strip-debug" case "${host_os}" in *bsd*) INODECMD="stat -f '%i %N'" - DEFAULT_SEDINPLACEFLAGS=" -i \"\"" ;; darwin*) host_os_darwin=yes INODECMD="/usr/bin/stat -f '%i %N'" - DEFAULT_SEDINPLACEFLAGS=" -i ''" STRIP_BINARIES="" STRIP_SHARED="-S" STRIP_STATIC="-S" ;; esac AM_CONDITIONAL([DARWIN], test "x$host_os_darwin" = "xyes") -AC_PATH_PROGS([SEDPATH], [sed], [sed], [/usr/bin$PATH_SEPARATOR/bin] ) AC_SUBST(INODECMD) AC_SUBST(STRIP_BINARIES) AC_SUBST(STRIP_SHARED) AC_SUBST(STRIP_STATIC) -# Flags for sed in place -if test "${SEDINPLACEFLAGS+set}" != "set"; then - SEDINPLACEFLAGS="${DEFAULT_SEDINPLACEFLAGS}" -fi -AC_ARG_VAR(SEDINPLACEFLAGS, [flags for sed, overriding the default]) - # Variables plugged into makepkg.conf CARCH="${host%%-*}" CHOST="${host}" @@ -576,7 +566,6 @@ ${PACKAGE_NAME}: Architecture : ${CARCH} Host Type : ${CHOST} File inode command : ${INODECMD} - In-place sed command : ${SEDPATH} ${SEDINPLACEFLAGS} File seccomp command : ${FILECMD} libalpm version : ${LIB_VERSION} -- cgit v1.2.3-54-g00ecf