[vlc-commits] contrib: Always use the -i.orig form for in-place sed edits

Martin Storsjö git at videolan.org
Thu Jun 14 10:09:10 CEST 2018


vlc | branch: master | Martin Storsjö <martin at martin.st> | Thu Jun 14 11:06:11 2018 +0300| [2e8f43fdcf59b77cea87d2ff4ccc2d110ed5c252] | committer: Martin Storsjö

contrib: Always use the -i.orig form for in-place sed edits

The form when no backup is saved for in-place edits differs between
sed implementations; on macOS, the correct form is 'sed -i "" ...'
while it is 'sed -i ...' on Linux. This form of saving an .orig
file works the same on both.

This fixes cross compiling Qt with contribs from macOS.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2e8f43fdcf59b77cea87d2ff4ccc2d110ed5c252
---

 contrib/src/qt/rules.mak    | 4 ++--
 contrib/src/qtsvg/rules.mak | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/contrib/src/qt/rules.mak b/contrib/src/qt/rules.mak
index ae336380d1..e80fa0feb7 100644
--- a/contrib/src/qt/rules.mak
+++ b/contrib/src/qt/rules.mak
@@ -73,9 +73,9 @@ QT_CONFIG += -release
 	# Clean Qt mess
 	rm -rf $(PREFIX)/lib/libQt5Bootstrap* $</lib/libQt5Bootstrap*
 	# Fix .pc files to remove debug version (d)
-	cd $(PREFIX)/lib/pkgconfig; for i in Qt5Core.pc Qt5Gui.pc Qt5Widgets.pc; do sed -i -e 's/d\.a/.a/g' -e 's/d $$/ /' $$i; done
+	cd $(PREFIX)/lib/pkgconfig; for i in Qt5Core.pc Qt5Gui.pc Qt5Widgets.pc; do sed -i.orig -e 's/d\.a/.a/g' -e 's/d $$/ /' $$i; done
 	# Fix Qt5Gui.pc file to include qwindows (QWindowsIntegrationPlugin) and Qt5Platform Support
-	cd $(PREFIX)/lib/pkgconfig; sed -i -e 's/ -lQt5Gui/ -lqwindows -lQt5PlatformSupport -lQt5Gui/g' Qt5Gui.pc
+	cd $(PREFIX)/lib/pkgconfig; sed -i.orig -e 's/ -lQt5Gui/ -lqwindows -lQt5PlatformSupport -lQt5Gui/g' Qt5Gui.pc
 ifdef HAVE_CROSS_COMPILE
 	# Building Qt build tools for Xcompilation
 	cd $</include/QtCore; ln -sf $(QT_VERSION)/QtCore/private
diff --git a/contrib/src/qtsvg/rules.mak b/contrib/src/qtsvg/rules.mak
index 7e00e30db6..d9628062c9 100644
--- a/contrib/src/qtsvg/rules.mak
+++ b/contrib/src/qtsvg/rules.mak
@@ -31,7 +31,7 @@ qtsvg: qtsvg-$(QTSVG_VERSION).tar.xz .sum-qtsvg
 	cd $< && $(MAKE) -C src sub-plugins-install_subtargets sub-svg-install_subtargets
 	mv $(PREFIX)/plugins/iconengines/libqsvgicon.a $(PREFIX)/lib/
 	mv $(PREFIX)/plugins/imageformats/libqsvg.a $(PREFIX)/lib/
-	cd $(PREFIX)/lib/pkgconfig; sed -i \
+	cd $(PREFIX)/lib/pkgconfig; sed -i.orig \
 		-e 's/d\.a/.a/g' \
 		-e 's/-lQt\([^ ]*\)d/-lQt\1/g' \
 		-e '/Libs:/  s/-lQt5Svg/-lqsvg -lqsvgicon -lQt5Svg/ ' \



More information about the vlc-commits mailing list