[vlc-devel] [PATCH 3.0 03/41] contrib: Always use the -i.orig form for in-place sed edits
Steve Lhomme
robux4 at ycbcr.xyz
Tue Jul 7 15:11:02 CEST 2020
From: Martin Storsjö <martin at martin.st>
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.
(cherry picked from commit 2e8f43fdcf59b77cea87d2ff4ccc2d110ed5c252) (rebased)
rebased:
- this branch already uses $(LN_S)
Signed-off-by: Steve Lhomme <robux4 at ycbcr.xyz>
---
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 d2c0038f93..5d87e797e8 100644
--- a/contrib/src/qt/rules.mak
+++ b/contrib/src/qt/rules.mak
@@ -77,9 +77,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_S)f $(QT_VERSION)/QtCore/private private
diff --git a/contrib/src/qtsvg/rules.mak b/contrib/src/qtsvg/rules.mak
index 37c5e4d815..c82d157885 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/ ' \
--
2.26.2
More information about the vlc-devel
mailing list