diff --git a/pkgs/development/libraries/qt-6/hooks/fix-qt-builtin-paths.sh b/pkgs/development/libraries/qt-6/hooks/fix-qt-builtin-paths.sh index 0fd0aee7dbf9..d6f8ab32f799 100644 --- a/pkgs/development/libraries/qt-6/hooks/fix-qt-builtin-paths.sh +++ b/pkgs/development/libraries/qt-6/hooks/fix-qt-builtin-paths.sh @@ -7,9 +7,6 @@ fixQtBuiltinPaths() { local dir="$1" local pattern="$2" - local bin="${!outputBin}" - local dev="${!outputDev}" - local doc="${!outputDoc}" local lib="${!outputLib}" if [ -d "$dir" ]; then @@ -17,48 +14,48 @@ fixQtBuiltinPaths() { if grep -q '\$\$\[QT_' "${pr_:?}"; then echo "fixQtBuiltinPaths: Fixing Qt builtin paths in \`${pr_:?}'..." sed -i "${pr_:?}" \ - -e "s|\\\$\\\$\\[QT_HOST_BINS[^]]*\\]|$dev/bin|g" \ - -e "s|\\\$\\\$\\[QT_HOST_LIBEXECS[^]]*\\]|$dev/libexec|g" \ - -e "s|\\\$\\\$\\[QT_HOST_DATA[^]]*\\]/mkspecs|$dev/mkspecs|g" \ - -e "s|\\\$\\\$\\[QT_HOST_PREFIX[^]]*\\]|$dev|g" \ + -e "s|\\\$\\\$\\[QT_HOST_BINS[^]]*\\]|$lib/bin|g" \ + -e "s|\\\$\\\$\\[QT_HOST_LIBEXECS[^]]*\\]|$lib/libexec|g" \ + -e "s|\\\$\\\$\\[QT_HOST_DATA[^]]*\\]/mkspecs|$lib/mkspecs|g" \ + -e "s|\\\$\\\$\\[QT_HOST_PREFIX[^]]*\\]|$lib|g" \ -e "s|\\\$\\\$\\[QT_INSTALL_ARCHDATA[^]]*\\]|$lib|g" \ - -e "s|\\\$\\\$\\[QT_INSTALL_BINS[^]]*\\]|$bin/bin|g" \ - -e "s|\\\$\\\$\\[QT_INSTALL_CONFIGURATION[^]]*\\]|$bin|g" \ + -e "s|\\\$\\\$\\[QT_INSTALL_BINS[^]]*\\]|$lib/bin|g" \ + -e "s|\\\$\\\$\\[QT_INSTALL_CONFIGURATION[^]]*\\]|$lib|g" \ -e "s|\\\$\\\$\\[QT_INSTALL_DATA[^]]*\\]|$lib|g" \ - -e "s|\\\$\\\$\\[QT_INSTALL_DOCS[^]]*\\]|$doc/share/doc|g" \ - -e "s|\\\$\\\$\\[QT_INSTALL_EXAMPLES[^]]*\\]|$doc/examples|g" \ - -e "s|\\\$\\\$\\[QT_INSTALL_HEADERS[^]]*\\]|$dev/include|g" \ + -e "s|\\\$\\\$\\[QT_INSTALL_DOCS[^]]*\\]|$lib/share/doc|g" \ + -e "s|\\\$\\\$\\[QT_INSTALL_EXAMPLES[^]]*\\]|$lib/examples|g" \ + -e "s|\\\$\\\$\\[QT_INSTALL_HEADERS[^]]*\\]|$lib/include|g" \ -e "s|\\\$\\\$\\[QT_INSTALL_LIBS[^]]*\\]|$lib/lib|g" \ -e "s|\\\$\\\$\\[QT_INSTALL_LIBEXECS[^]]*\\]|$lib/libexec|g" \ - -e "s|\\\$\\\$\\[QT_INSTALL_PLUGINS[^]]*\\]|$bin/$qtPluginPrefix|g" \ + -e "s|\\\$\\\$\\[QT_INSTALL_PLUGINS[^]]*\\]|$lib/$qtPluginPrefix|g" \ -e "s|\\\$\\\$\\[QT_INSTALL_PREFIX[^]]*\\]|$lib|g" \ - -e "s|\\\$\\\$\\[QT_INSTALL_TESTS[^]]*\\]|$dev/tests|g" \ + -e "s|\\\$\\\$\\[QT_INSTALL_TESTS[^]]*\\]|$lib/tests|g" \ -e "s|\\\$\\\$\\[QT_INSTALL_TRANSLATIONS[^]]*\\]|$lib/translations|g" \ - -e "s|\\\$\\\$\\[QT_INSTALL_QML[^]]*\\]|$bin/$qtQmlPrefix|g" + -e "s|\\\$\\\$\\[QT_INSTALL_QML[^]]*\\]|$lib/$qtQmlPrefix|g" fi done elif [ -e "$dir" ]; then if grep -q '\$\$\[QT_' "${dir:?}"; then echo "fixQtBuiltinPaths: Fixing Qt builtin paths in \`${dir:?}'..." sed -i "${dir:?}" \ - -e "s|\\\$\\\$\\[QT_HOST_BINS[^]]*\\]|$dev/bin|g" \ - -e "s|\\\$\\\$\\[QT_HOST_LIBEXECS[^]]*\\]|$dev/libexec|g" \ - -e "s|\\\$\\\$\\[QT_HOST_DATA[^]]*\\]/mkspecs|$dev/mkspecs|g" \ - -e "s|\\\$\\\$\\[QT_HOST_PREFIX[^]]*\\]|$dev|g" \ + -e "s|\\\$\\\$\\[QT_HOST_BINS[^]]*\\]|$lib/bin|g" \ + -e "s|\\\$\\\$\\[QT_HOST_LIBEXECS[^]]*\\]|$lib/libexec|g" \ + -e "s|\\\$\\\$\\[QT_HOST_DATA[^]]*\\]/mkspecs|$lib/mkspecs|g" \ + -e "s|\\\$\\\$\\[QT_HOST_PREFIX[^]]*\\]|$lib|g" \ -e "s|\\\$\\\$\\[QT_INSTALL_ARCHDATA[^]]*\\]|$lib|g" \ - -e "s|\\\$\\\$\\[QT_INSTALL_BINS[^]]*\\]|$bin/bin|g" \ - -e "s|\\\$\\\$\\[QT_INSTALL_CONFIGURATION[^]]*\\]|$bin|g" \ + -e "s|\\\$\\\$\\[QT_INSTALL_BINS[^]]*\\]|$lib/bin|g" \ + -e "s|\\\$\\\$\\[QT_INSTALL_CONFIGURATION[^]]*\\]|$lib|g" \ -e "s|\\\$\\\$\\[QT_INSTALL_DATA[^]]*\\]|$lib|g" \ - -e "s|\\\$\\\$\\[QT_INSTALL_DOCS[^]]*\\]|$doc/share/doc|g" \ - -e "s|\\\$\\\$\\[QT_INSTALL_EXAMPLES[^]]*\\]|$doc/examples|g" \ - -e "s|\\\$\\\$\\[QT_INSTALL_HEADERS[^]]*\\]|$dev/include|g" \ + -e "s|\\\$\\\$\\[QT_INSTALL_DOCS[^]]*\\]|$lib/share/doc|g" \ + -e "s|\\\$\\\$\\[QT_INSTALL_EXAMPLES[^]]*\\]|$lib/examples|g" \ + -e "s|\\\$\\\$\\[QT_INSTALL_HEADERS[^]]*\\]|$lib/include|g" \ -e "s|\\\$\\\$\\[QT_INSTALL_LIBS[^]]*\\]|$lib/lib|g" \ -e "s|\\\$\\\$\\[QT_INSTALL_LIBEXECS[^]]*\\]|$lib/libexec|g" \ - -e "s|\\\$\\\$\\[QT_INSTALL_PLUGINS[^]]*\\]|$bin/$qtPluginPrefix|g" \ + -e "s|\\\$\\\$\\[QT_INSTALL_PLUGINS[^]]*\\]|$lib/$qtPluginPrefix|g" \ -e "s|\\\$\\\$\\[QT_INSTALL_PREFIX[^]]*\\]|$lib|g" \ - -e "s|\\\$\\\$\\[QT_INSTALL_TESTS[^]]*\\]|$dev/tests|g" \ + -e "s|\\\$\\\$\\[QT_INSTALL_TESTS[^]]*\\]|$lib/tests|g" \ -e "s|\\\$\\\$\\[QT_INSTALL_TRANSLATIONS[^]]*\\]|$lib/translations|g" \ - -e "s|\\\$\\\$\\[QT_INSTALL_QML[^]]*\\]|$bin/$qtQmlPrefix|g" + -e "s|\\\$\\\$\\[QT_INSTALL_QML[^]]*\\]|$lib/$qtQmlPrefix|g" fi else echo "fixQtBuiltinPaths: Warning: \`$dir' does not exist" diff --git a/pkgs/development/libraries/qt-6/hooks/fix-qt-module-paths.sh b/pkgs/development/libraries/qt-6/hooks/fix-qt-module-paths.sh index 0a0e0d51e27d..4884f45b9930 100644 --- a/pkgs/development/libraries/qt-6/hooks/fix-qt-module-paths.sh +++ b/pkgs/development/libraries/qt-6/hooks/fix-qt-module-paths.sh @@ -6,8 +6,6 @@ # fixQtModulePaths() { local dir="$1" - local bin="${!outputBin}" - local dev="${!outputDev}" local lib="${!outputLib}" if [ -d "$dir" ]; then @@ -17,8 +15,8 @@ fixQtModulePaths() { sed -i "${pr:?}" \ -e "s|\\\$\\\$QT_MODULE_LIB_BASE|$lib/lib|g" \ -e "s|\\\$\\\$QT_MODULE_HOST_LIB_BASE|$lib/lib|g" \ - -e "s|\\\$\\\$QT_MODULE_INCLUDE_BASE|$dev/include|g" \ - -e "s|\\\$\\\$QT_MODULE_BIN_BASE|$dev/bin|g" + -e "s|\\\$\\\$QT_MODULE_INCLUDE_BASE|$lib/include|g" \ + -e "s|\\\$\\\$QT_MODULE_BIN_BASE|$lib/bin|g" fi done elif [ -e "$dir" ]; then @@ -26,11 +24,4 @@ fixQtModulePaths() { else echo "fixQtModulePaths: Warning: \`$dir' does not exist" fi - - if [ "z$bin" != "z$dev" ]; then - if [ -d "$bin/bin" ]; then - mkdir -p "$dev/bin" - lndir -silent "$bin/bin" "$dev/bin" - fi - fi } diff --git a/pkgs/development/libraries/qt-6/hooks/qtbase-setup-hook.sh b/pkgs/development/libraries/qt-6/hooks/qtbase-setup-hook.sh index f0fa226e06ae..38a0a1d0530c 100644 --- a/pkgs/development/libraries/qt-6/hooks/qtbase-setup-hook.sh +++ b/pkgs/development/libraries/qt-6/hooks/qtbase-setup-hook.sh @@ -53,25 +53,18 @@ else # Only set up Qt once. # Prevent this hook from running multiple times dontPatchMkspecs=1 - local bin="${!outputBin}" - local dev="${!outputDev}" - local doc="${!outputDoc}" local lib="${!outputLib}" - moveToOutput "mkspecs" "$dev" - moveToOutput "modules" "$dev" - moveToOutput "lib/*.prl" "$dev" - - if [ -d "$dev/mkspecs/modules" ]; then - fixQtModulePaths "$dev/mkspecs/modules" + if [ -d "$lib/mkspecs/modules" ]; then + fixQtModulePaths "$lib/mkspecs/modules" fi - if [ -d "$dev/mkspecs" ]; then - fixQtBuiltinPaths "$dev/mkspecs" '*.pr?' + if [ -d "$lib/mkspecs" ]; then + fixQtBuiltinPaths "$lib/mkspecs" '*.pr?' fi - if [ -d "$dev/lib" ]; then - fixQtBuiltinPaths "$dev/lib" '*.pr?' + if [ -d "$lib/lib" ]; then + fixQtBuiltinPaths "$lib/lib" '*.pr?' fi } if [ -z "${dontPatchMkspecs-}" ]; then