Skip to content

Commit 3aaa39d

Browse files
committed
build: replace pwd sed in qt package with a patch
1 parent 9d440f4 commit 3aaa39d

File tree

2 files changed

+31
-2
lines changed

2 files changed

+31
-2
lines changed

depends/packages/qt.mk

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ $(package)_dependencies=zlib
88
$(package)_linux_dependencies=freetype fontconfig libxcb
99
$(package)_build_subdir=qtbase
1010
$(package)_qt_libs=corelib network widgets gui plugins testlib
11-
$(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
11+
$(package)_patches=fix_qt_pkgconfig.patch mac-qmake.conf fix_configure_mac.patch fix_no_printer.patch
12+
$(package)_patches+= fix_rcc_determinism.patch fix_riscv64_arch.patch xkb-default.patch no-xlib.patch
13+
$(package)_patches+= fix_android_qmake_conf.patch fix_android_jni_static.patch dont_hardcode_pwd.patch
1214

1315
# Update OSX_QT_TRANSLATIONS when this is updated
1416
$(package)_qttranslations_file_name=qttranslations-$($(package)_suffix)
@@ -193,7 +195,7 @@ define $(package)_preprocess_cmds
193195
sed -i.old "s|FT_Get_Font_Format|FT_Get_X11_Font_Format|" qtbase/src/platformsupport/fontdatabases/freetype/qfontengine_ft.cpp && \
194196
sed -i.old "s|updateqm.commands = \$$$$\$$$$LRELEASE|updateqm.commands = $($(package)_extract_dir)/qttools/bin/lrelease|" qttranslations/translations/translations.pro && \
195197
sed -i.old "/updateqm.depends =/d" qttranslations/translations/translations.pro && \
196-
sed -i.old -e 's|/bin/pwd|pwd|' qtbase/configure && \
198+
patch -p1 -i $($(package)_patch_dir)/dont_hardcode_pwd.patch &&\
197199
mkdir -p qtbase/mkspecs/macx-clang-linux &&\
198200
cp -f qtbase/mkspecs/macx-clang/Info.plist.lib qtbase/mkspecs/macx-clang-linux/ &&\
199201
cp -f qtbase/mkspecs/macx-clang/Info.plist.app qtbase/mkspecs/macx-clang-linux/ &&\
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
commit 0e953866fc4672486e29e1ba6d83b4207e7b2f0b
2+
Author: fanquake <[email protected]>
3+
Date: Tue Aug 18 15:09:06 2020 +0800
4+
5+
Don't hardcode pwd path
6+
7+
Let a man use his builtins if he wants to! Also, removes the unnecessary
8+
assumption that pwd lives under /bin/pwd.
9+
10+
See #15581.
11+
12+
diff --git a/qtbase/configure b/qtbase/configure
13+
index 08b49a8d..faea5b55 100755
14+
--- a/qtbase/configure
15+
+++ b/qtbase/configure
16+
@@ -36,9 +36,9 @@
17+
relconf=`basename $0`
18+
# the directory of this script is the "source tree"
19+
relpath=`dirname $0`
20+
-relpath=`(cd "$relpath"; /bin/pwd)`
21+
+relpath=`(cd "$relpath"; pwd)`
22+
# the current directory is the "build tree" or "object tree"
23+
-outpath=`/bin/pwd`
24+
+outpath=`pwd`
25+
26+
WHICH="which"
27+

0 commit comments

Comments
 (0)