• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

Revisionf9d94481299d8ba45cb85eaf076232adff6aa45d (tree)
Time2023-01-07 15:58:00
AuthorFs <Fsu0413@vip....>
CommiterFs

Log Message

always use GNU sed

GNU sed has different cli than BSD sed

Signed-off-by: Fs <Fsu0413@vip.qq.com>

Change Summary

Incremental Difference

--- a/qt6_deploy_host.sh
+++ b/qt6_deploy_host.sh
@@ -59,25 +59,44 @@ chmod +x "${PATH_TO_TARGET}/bin/qmake"
5959 echo "\$script_dir_path/../host/bin/qtpaths -qtconf \"\$script_dir_path/target_qt.conf\" \$*"
6060 ) > "${PATH_TO_TARGET}/bin/qtpaths"
6161
62+# judge if sed / gsed is GNU sed
63+GNU_SED=
64+
65+for SED_PROGRAM in gsed sed; do
66+ GSED_OUTPUT="`LANG=C $SED_PROGRAM --help 2> /dev/null`"
67+ if [ $? -eq 0 ] ; then
68+ if echo "$GSED_OUTPUT" | grep -q -F "GNU sed"; then
69+ echo "Found GNU sed: $SED_PROGRAM"
70+ GNU_SED=$SED_PROGRAM
71+ break
72+ fi
73+ fi
74+done
75+
76+# we have no idea but use default sed program
77+if [ x"$GNU_SED" = x ]; then
78+ GNU_SED=sed
79+fi
80+
6281 chmod +x "${PATH_TO_TARGET}/bin/qtpaths"
6382
64-sed -i '' -e 's,^HostPrefix=.*$,HostPrefix=../host,g' "${PATH_TO_TARGET}/bin/target_qt.conf"
65-sed -i '' -e 's,^HostData=.*$,HostData=..,g' "${PATH_TO_TARGET}/bin/target_qt.conf"
83+$GNU_SED -i -e 's,^HostPrefix=.*$,HostPrefix=../host,g' "${PATH_TO_TARGET}/bin/target_qt.conf"
84+$GNU_SED -i -e 's,^HostData=.*$,HostData=..,g' "${PATH_TO_TARGET}/bin/target_qt.conf"
6685
6786 # CMake tweak / Qt 6.4.1 +
6887
69-sed -i '' -e 's,^set(__qt_platform_initial_qt_host_path[[:space:]].*$,set(__qt_platform_initial_qt_host_path "${Qt6_DIR}/../../../host"),' "${PATH_TO_TARGET}/lib/cmake/Qt6/Qt6Dependencies.cmake"
70-sed -i '' -e 's,^set(__qt_platform_initial_qt_host_path_cmake_dir[[:space:]].*$,set(__qt_platform_initial_qt_host_path_cmake_dir "${Qt6_DIR}/../../../host/lib/cmake"),' "${PATH_TO_TARGET}/lib/cmake/Qt6/Qt6Dependencies.cmake"
88+$GNU_SED -i -e 's,^set(__qt_platform_initial_qt_host_path[[:space:]].*$,set(__qt_platform_initial_qt_host_path "${Qt6_DIR}/../../../host"),' "${PATH_TO_TARGET}/lib/cmake/Qt6/Qt6Dependencies.cmake"
89+$GNU_SED -i -e 's,^set(__qt_platform_initial_qt_host_path_cmake_dir[[:space:]].*$,set(__qt_platform_initial_qt_host_path_cmake_dir "${Qt6_DIR}/../../../host/lib/cmake"),' "${PATH_TO_TARGET}/lib/cmake/Qt6/Qt6Dependencies.cmake"
7190
7291 # CMake tweak / Qt 6.2.4
7392
74-sed -i '' -e '/^set(__qt_toolchain_initial_qt_host_path[[:space:]]*$/{N
93+$GNU_SED -i -e '/^set(__qt_toolchain_initial_qt_host_path[[:space:]]*$/{N
7594 c\
7695 set(__qt_toolchain_initial_qt_host_path "${CMAKE_CURRENT_LIST_DIR}/../../../host")
7796 d
7897 }' "${PATH_TO_TARGET}/lib/cmake/Qt6/qt.toolchain.cmake"
7998
80-sed -i '' -e '/^set(__qt_toolchain_initial_qt_host_path_cmake_dir[[:space:]]*$/{N
99+$GNU_SED -i -e '/^set(__qt_toolchain_initial_qt_host_path_cmake_dir[[:space:]]*$/{N
81100 c\
82101 set(__qt_toolchain_initial_qt_host_path_cmake_dir "${CMAKE_CURRENT_LIST_DIR}/../../../host/lib/cmake")
83102 d