build: replace pwd sed in qt package with a patch

This commit is contained in:
fanquake 2020-08-18 15:12:56 +08:00
parent 9d440f4e11
commit 3aaa39d436
No known key found for this signature in database
GPG Key ID: 2EEB9F5CC09526C1
2 changed files with 31 additions and 2 deletions

View File

@ -8,7 +8,9 @@ $(package)_dependencies=zlib
$(package)_linux_dependencies=freetype fontconfig libxcb
$(package)_build_subdir=qtbase
$(package)_qt_libs=corelib network widgets gui plugins testlib
$(package)_patches=fix_qt_pkgconfig.patch mac-qmake.conf fix_configure_mac.patch fix_no_printer.patch fix_rcc_determinism.patch fix_riscv64_arch.patch xkb-default.patch no-xlib.patch fix_android_qmake_conf.patch fix_android_jni_static.patch
$(package)_patches=fix_qt_pkgconfig.patch mac-qmake.conf fix_configure_mac.patch fix_no_printer.patch
$(package)_patches+= fix_rcc_determinism.patch fix_riscv64_arch.patch xkb-default.patch no-xlib.patch
$(package)_patches+= fix_android_qmake_conf.patch fix_android_jni_static.patch dont_hardcode_pwd.patch
# Update OSX_QT_TRANSLATIONS when this is updated
$(package)_qttranslations_file_name=qttranslations-$($(package)_suffix)
@ -193,7 +195,7 @@ define $(package)_preprocess_cmds
sed -i.old "s|FT_Get_Font_Format|FT_Get_X11_Font_Format|" qtbase/src/platformsupport/fontdatabases/freetype/qfontengine_ft.cpp && \
sed -i.old "s|updateqm.commands = \$$$$\$$$$LRELEASE|updateqm.commands = $($(package)_extract_dir)/qttools/bin/lrelease|" qttranslations/translations/translations.pro && \
sed -i.old "/updateqm.depends =/d" qttranslations/translations/translations.pro && \
sed -i.old -e 's|/bin/pwd|pwd|' qtbase/configure && \
patch -p1 -i $($(package)_patch_dir)/dont_hardcode_pwd.patch &&\
mkdir -p qtbase/mkspecs/macx-clang-linux &&\
cp -f qtbase/mkspecs/macx-clang/Info.plist.lib qtbase/mkspecs/macx-clang-linux/ &&\
cp -f qtbase/mkspecs/macx-clang/Info.plist.app qtbase/mkspecs/macx-clang-linux/ &&\

View File

@ -0,0 +1,27 @@
commit 0e953866fc4672486e29e1ba6d83b4207e7b2f0b
Author: fanquake <fanquake@gmail.com>
Date: Tue Aug 18 15:09:06 2020 +0800
Don't hardcode pwd path
Let a man use his builtins if he wants to! Also, removes the unnecessary
assumption that pwd lives under /bin/pwd.
See #15581.
diff --git a/qtbase/configure b/qtbase/configure
index 08b49a8d..faea5b55 100755
--- a/qtbase/configure
+++ b/qtbase/configure
@@ -36,9 +36,9 @@
relconf=`basename $0`
# the directory of this script is the "source tree"
relpath=`dirname $0`
-relpath=`(cd "$relpath"; /bin/pwd)`
+relpath=`(cd "$relpath"; pwd)`
# the current directory is the "build tree" or "object tree"
-outpath=`/bin/pwd`
+outpath=`pwd`
WHICH="which"