Lower Qt requirement to 5.11

Partially reverts 4037143f4e
Closes #14611
This commit is contained in:
sledgehammer999 2021-03-26 12:42:08 +02:00
parent 332b173e08
commit 1570b51f6c
No known key found for this signature in database
GPG key ID: 6E4A2D025B7CC9A2
5 changed files with 38 additions and 30 deletions

View file

@ -12,7 +12,7 @@ project(qBittorrent
set(CMAKE_FIND_PACKAGE_PREFER_CONFIG ON) set(CMAKE_FIND_PACKAGE_PREFER_CONFIG ON)
# version requirements - older vesions may work, but you are on your own # version requirements - older vesions may work, but you are on your own
set(minBoostVersion 1.65) set(minBoostVersion 1.65)
set(minQtVersion 5.12) set(minQtVersion 5.11)
set(minOpenSSLVersion 1.1.1) set(minOpenSSLVersion 1.1.1)
set(minLibtorrentVersion 1.2.12) set(minLibtorrentVersion 1.2.12)
set(minZlibVersion 1.2.11) set(minZlibVersion 1.2.11)

42
configure vendored
View file

@ -1455,7 +1455,7 @@ Some influential environment variables:
directories to add to pkg-config's search path directories to add to pkg-config's search path
PKG_CONFIG_LIBDIR PKG_CONFIG_LIBDIR
path overriding pkg-config's built-in search path path overriding pkg-config's built-in search path
QT_QMAKE value of host_bins for Qt5Core >= 5.12, overriding pkg-config QT_QMAKE value of host_bins for Qt5Core >= 5.11, overriding pkg-config
Qt5Svg_CFLAGS Qt5Svg_CFLAGS
C compiler flags for Qt5Svg, overriding pkg-config C compiler flags for Qt5Svg, overriding pkg-config
Qt5Svg_LIBS linker flags for Qt5Svg, overriding pkg-config Qt5Svg_LIBS linker flags for Qt5Svg, overriding pkg-config
@ -5525,8 +5525,8 @@ printf "%s\n" "$enable_webui" >&6; }
esac esac
if test -n "$PKG_CONFIG" && \ if test -n "$PKG_CONFIG" && \
{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"Qt5Core >= 5.12\""; } >&5 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"Qt5Core >= 5.11\""; } >&5
($PKG_CONFIG --exists --print-errors "Qt5Core >= 5.12") 2>&5 ($PKG_CONFIG --exists --print-errors "Qt5Core >= 5.11") 2>&5
ac_status=$? ac_status=$?
printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then test $ac_status = 0; }; then
@ -5535,12 +5535,12 @@ if test -n "$QT_QMAKE"; then
pkg_cv_QT_QMAKE="$QT_QMAKE" pkg_cv_QT_QMAKE="$QT_QMAKE"
elif test -n "$PKG_CONFIG"; then elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \ if test -n "$PKG_CONFIG" && \
{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"Qt5Core >= 5.12\""; } >&5 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"Qt5Core >= 5.11\""; } >&5
($PKG_CONFIG --exists --print-errors "Qt5Core >= 5.12") 2>&5 ($PKG_CONFIG --exists --print-errors "Qt5Core >= 5.11") 2>&5
ac_status=$? ac_status=$?
printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then test $ac_status = 0; }; then
pkg_cv_QT_QMAKE=`$PKG_CONFIG --variable="host_bins" "Qt5Core >= 5.12" 2>/dev/null` pkg_cv_QT_QMAKE=`$PKG_CONFIG --variable="host_bins" "Qt5Core >= 5.11" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes test "x$?" != "x0" && pkg_failed=yes
else else
pkg_failed=yes pkg_failed=yes
@ -5570,8 +5570,8 @@ fi
fi fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Qt5 qmake >= 5.12" >&5 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Qt5 qmake >= 5.11" >&5
printf %s "checking for Qt5 qmake >= 5.12... " >&6; } printf %s "checking for Qt5 qmake >= 5.11... " >&6; }
if test "x$QT_QMAKE" != "x" if test "x$QT_QMAKE" != "x"
then : then :
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $QT_QMAKE" >&5 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $QT_QMAKE" >&5
@ -5598,12 +5598,12 @@ if test -n "$Qt5Svg_CFLAGS"; then
pkg_cv_Qt5Svg_CFLAGS="$Qt5Svg_CFLAGS" pkg_cv_Qt5Svg_CFLAGS="$Qt5Svg_CFLAGS"
elif test -n "$PKG_CONFIG"; then elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \ if test -n "$PKG_CONFIG" && \
{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"Qt5Svg >= 5.12\""; } >&5 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"Qt5Svg >= 5.11\""; } >&5
($PKG_CONFIG --exists --print-errors "Qt5Svg >= 5.12") 2>&5 ($PKG_CONFIG --exists --print-errors "Qt5Svg >= 5.11") 2>&5
ac_status=$? ac_status=$?
printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then test $ac_status = 0; }; then
pkg_cv_Qt5Svg_CFLAGS=`$PKG_CONFIG --cflags "Qt5Svg >= 5.12" 2>/dev/null` pkg_cv_Qt5Svg_CFLAGS=`$PKG_CONFIG --cflags "Qt5Svg >= 5.11" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes test "x$?" != "x0" && pkg_failed=yes
else else
pkg_failed=yes pkg_failed=yes
@ -5615,12 +5615,12 @@ if test -n "$Qt5Svg_LIBS"; then
pkg_cv_Qt5Svg_LIBS="$Qt5Svg_LIBS" pkg_cv_Qt5Svg_LIBS="$Qt5Svg_LIBS"
elif test -n "$PKG_CONFIG"; then elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \ if test -n "$PKG_CONFIG" && \
{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"Qt5Svg >= 5.12\""; } >&5 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"Qt5Svg >= 5.11\""; } >&5
($PKG_CONFIG --exists --print-errors "Qt5Svg >= 5.12") 2>&5 ($PKG_CONFIG --exists --print-errors "Qt5Svg >= 5.11") 2>&5
ac_status=$? ac_status=$?
printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then test $ac_status = 0; }; then
pkg_cv_Qt5Svg_LIBS=`$PKG_CONFIG --libs "Qt5Svg >= 5.12" 2>/dev/null` pkg_cv_Qt5Svg_LIBS=`$PKG_CONFIG --libs "Qt5Svg >= 5.11" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes test "x$?" != "x0" && pkg_failed=yes
else else
pkg_failed=yes pkg_failed=yes
@ -5641,14 +5641,14 @@ else
_pkg_short_errors_supported=no _pkg_short_errors_supported=no
fi fi
if test $_pkg_short_errors_supported = yes; then if test $_pkg_short_errors_supported = yes; then
Qt5Svg_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "Qt5Svg >= 5.12" 2>&1` Qt5Svg_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "Qt5Svg >= 5.11" 2>&1`
else else
Qt5Svg_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "Qt5Svg >= 5.12" 2>&1` Qt5Svg_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "Qt5Svg >= 5.11" 2>&1`
fi fi
# Put the nasty error message in config.log where it belongs # Put the nasty error message in config.log where it belongs
echo "$Qt5Svg_PKG_ERRORS" >&5 echo "$Qt5Svg_PKG_ERRORS" >&5
as_fn_error $? "Package requirements (Qt5Svg >= 5.12) were not met: as_fn_error $? "Package requirements (Qt5Svg >= 5.11) were not met:
$Qt5Svg_PKG_ERRORS $Qt5Svg_PKG_ERRORS
@ -5688,11 +5688,11 @@ case "x$enable_qt_dbus" in #(
"xyes") : "xyes") :
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; } printf "%s\n" "yes" >&6; }
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Qt5DBus >= 5.12" >&5 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Qt5DBus >= 5.11" >&5
printf %s "checking for Qt5DBus >= 5.12... " >&6; } printf %s "checking for Qt5DBus >= 5.11... " >&6; }
if test -n "$PKG_CONFIG" && \ if test -n "$PKG_CONFIG" && \
{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"Qt5DBus >= 5.12\""; } >&5 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"Qt5DBus >= 5.11\""; } >&5
($PKG_CONFIG --exists --print-errors "Qt5DBus >= 5.12") 2>&5 ($PKG_CONFIG --exists --print-errors "Qt5DBus >= 5.11") 2>&5
ac_status=$? ac_status=$?
printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then test $ac_status = 0; }; then

View file

@ -141,7 +141,7 @@ AS_IF([test "x$QT_QMAKE" = "x"],
[AC_MSG_ERROR([Could not find qmake]) [AC_MSG_ERROR([Could not find qmake])
]) ])
AS_IF([test "x$enable_gui" = "xyes"], AS_IF([test "x$enable_gui" = "xyes"],
[PKG_CHECK_MODULES(Qt5Svg, [Qt5Svg >= 5.12]) [PKG_CHECK_MODULES(Qt5Svg, [Qt5Svg >= 5.11])
]) ])
AC_MSG_CHECKING([whether QtDBus should be enabled]) AC_MSG_CHECKING([whether QtDBus should be enabled])
AS_CASE(["x$enable_qt_dbus"], AS_CASE(["x$enable_qt_dbus"],

View file

@ -5,9 +5,9 @@
# Sets the QT_QMAKE variable to the path of Qt5 qmake if found. # Sets the QT_QMAKE variable to the path of Qt5 qmake if found.
# -------------------------------------- # --------------------------------------
AC_DEFUN([FIND_QT5], AC_DEFUN([FIND_QT5],
[PKG_CHECK_EXISTS([Qt5Core >= 5.12], [PKG_CHECK_EXISTS([Qt5Core >= 5.11],
[PKG_CHECK_VAR(QT_QMAKE, [PKG_CHECK_VAR(QT_QMAKE,
[Qt5Core >= 5.12], [Qt5Core >= 5.11],
[host_bins]) [host_bins])
]) ])
@ -18,7 +18,7 @@ AS_IF([test -f "$QT_QMAKE/qmake"],
[QT_QMAKE=""]) [QT_QMAKE=""])
]) ])
AC_MSG_CHECKING([for Qt5 qmake >= 5.12]) AC_MSG_CHECKING([for Qt5 qmake >= 5.11])
AS_IF([test "x$QT_QMAKE" != "x"], AS_IF([test "x$QT_QMAKE" != "x"],
[AC_MSG_RESULT([$QT_QMAKE])], [AC_MSG_RESULT([$QT_QMAKE])],
[AC_MSG_RESULT([not found])] [AC_MSG_RESULT([not found])]
@ -29,8 +29,8 @@ AS_IF([test "x$QT_QMAKE" != "x"],
# Sets the HAVE_QTDBUS variable to true or false. # Sets the HAVE_QTDBUS variable to true or false.
# -------------------------------------- # --------------------------------------
AC_DEFUN([FIND_QTDBUS], AC_DEFUN([FIND_QTDBUS],
[AC_MSG_CHECKING([for Qt5DBus >= 5.12]) [AC_MSG_CHECKING([for Qt5DBus >= 5.11])
PKG_CHECK_EXISTS([Qt5DBus >= 5.12], PKG_CHECK_EXISTS([Qt5DBus >= 5.11],
[AC_MSG_RESULT([found]) [AC_MSG_RESULT([found])
HAVE_QTDBUS=[true]], HAVE_QTDBUS=[true]],
[AC_MSG_RESULT([not found]) [AC_MSG_RESULT([not found])

View file

@ -4,14 +4,22 @@
# Based on https://gist.github.com/giraldeau/546ba5512a74dfe9d8ea0862d66db412 # Based on https://gist.github.com/giraldeau/546ba5512a74dfe9d8ea0862d66db412
file(GLOB QBT_TS_FILES "${qBittorrent_SOURCE_DIR}/src/lang/*.ts") file(GLOB QBT_TS_FILES "${qBittorrent_SOURCE_DIR}/src/lang/*.ts")
set_source_files_properties(${QBT_TS_FILES} PROPERTIES OUTPUT_LOCATION "${qBittorrent_BINARY_DIR}/src/lang") set_source_files_properties(${QBT_TS_FILES} PROPERTIES OUTPUT_LOCATION "${qBittorrent_BINARY_DIR}/src/lang")
if (Qt5_VERSION VERSION_LESS 5.12)
qt5_add_translation(QBT_QM_FILES ${QBT_TS_FILES})
else()
qt5_add_translation(QBT_QM_FILES ${QBT_TS_FILES} OPTIONS -silent) qt5_add_translation(QBT_QM_FILES ${QBT_TS_FILES} OPTIONS -silent)
endif()
configure_file("${qBittorrent_SOURCE_DIR}/src/lang/lang.qrc" "${qBittorrent_BINARY_DIR}/src/lang/lang.qrc" COPYONLY) configure_file("${qBittorrent_SOURCE_DIR}/src/lang/lang.qrc" "${qBittorrent_BINARY_DIR}/src/lang/lang.qrc" COPYONLY)
if (WEBUI) if (WEBUI)
file(GLOB QBT_WEBUI_TS_FILES "${qBittorrent_SOURCE_DIR}/src/webui/www/translations/*.ts") file(GLOB QBT_WEBUI_TS_FILES "${qBittorrent_SOURCE_DIR}/src/webui/www/translations/*.ts")
set_source_files_properties(${QBT_WEBUI_TS_FILES} set_source_files_properties(${QBT_WEBUI_TS_FILES}
PROPERTIES OUTPUT_LOCATION "${qBittorrent_BINARY_DIR}/src/webui/www/translations") PROPERTIES OUTPUT_LOCATION "${qBittorrent_BINARY_DIR}/src/webui/www/translations")
if (Qt5_VERSION VERSION_LESS 5.12)
qt5_add_translation(QBT_WEBUI_QM_FILES ${QBT_WEBUI_TS_FILES})
else()
qt5_add_translation(QBT_WEBUI_QM_FILES ${QBT_WEBUI_TS_FILES} OPTIONS -silent) qt5_add_translation(QBT_WEBUI_QM_FILES ${QBT_WEBUI_TS_FILES} OPTIONS -silent)
endif()
configure_file("${qBittorrent_SOURCE_DIR}/src/webui/www/translations/webui_translations.qrc" configure_file("${qBittorrent_SOURCE_DIR}/src/webui/www/translations/webui_translations.qrc"
"${qBittorrent_BINARY_DIR}/src/webui/www/translations/webui_translations.qrc" COPYONLY) "${qBittorrent_BINARY_DIR}/src/webui/www/translations/webui_translations.qrc" COPYONLY)
endif() endif()