Commit 2e8f43fd authored by Martin Storsjö's avatar 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.
parent a3d1527e
......@@ -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
......
......@@ -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/ ' \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment