aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Kohlbau <tobias@kohlbau.de>2017-04-26 15:35:17 +0200
committerTobias Kohlbau <tobias@kohlbau.de>2017-04-27 15:39:59 +0200
commit5a32a97de1086b82d3f93a082a4e5c57e4b395e4 (patch)
tree5a0d5a82db461b4fcee6c7952393a110d7825785
parentd6d506d678273f729a86b985c3cb85c291d6751b (diff)
downloadvcpkg-5a32a97de1086b82d3f93a082a4e5c57e4b395e4.tar.gz
vcpkg-5a32a97de1086b82d3f93a082a4e5c57e4b395e4.zip
[qt5] bumped to qt5.8
Signed-off-by: Tobias Kohlbau <tobias@kohlbau.de>
-rw-r--r--ports/qt5/CONTROL4
-rw-r--r--ports/qt5/configure_qt.cmake62
-rw-r--r--ports/qt5/fix-commandline-overrides.patch149
-rw-r--r--ports/qt5/fix-qalgorithms-vs2017.patch138
-rw-r--r--ports/qt5/fixcmake.py13
-rw-r--r--ports/qt5/install_qt.cmake45
-rw-r--r--ports/qt5/portfile.cmake220
-rw-r--r--ports/qt5/set-shared-qmakespec.patch18
-rw-r--r--ports/qt5/set-static-qmakespec.patch18
9 files changed, 454 insertions, 213 deletions
diff --git a/ports/qt5/CONTROL b/ports/qt5/CONTROL
index 98fd1ef98..1bda3a348 100644
--- a/ports/qt5/CONTROL
+++ b/ports/qt5/CONTROL
@@ -1,4 +1,4 @@
Source: qt5
-Version: 5.7.1-7
+Version: 5.8-1
Description: Qt5 application framework main components. Webengine, examples and tests not included.
-Build-Depends: sqlite3, libpq, double-conversion
+Build-Depends: zlib, libjpeg-turbo, libpng, freetype, pcre, harfbuzz, sqlite3, libpq, double-conversion
diff --git a/ports/qt5/configure_qt.cmake b/ports/qt5/configure_qt.cmake
new file mode 100644
index 000000000..21e3384c1
--- /dev/null
+++ b/ports/qt5/configure_qt.cmake
@@ -0,0 +1,62 @@
+function(configure_qt)
+ cmake_parse_arguments(_csc "" "SOURCE_PATH;PLATFORM" "OPTIONS;OPTIONS_DEBUG;OPTIONS_RELEASE" ${ARGN})
+
+ if (_csc_PLATFORM)
+ set(PLATFORM ${_csc_PLATFORM})
+ elseif(VCPKG_PLATFORM_TOOLSET MATCHES "v140")
+ set(PLATFORM "win32-msvc2015")
+ elseif(VCPKG_PLATFORM_TOOLSET MATCHES "v141")
+ set(PLATFORM "win32-msvc2017")
+ endif()
+
+ vcpkg_find_acquire_program(PERL)
+ get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY)
+
+ file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg)
+ set(ENV{PATH} "$ENV{PATH};${PERL_EXE_PATH}")
+
+ if(DEFINED VCPKG_CRT_LINKAGE AND VCPKG_CRT_LINKAGE STREQUAL static)
+ list(APPEND _csc_OPTIONS
+ "-static"
+ "-static-runtime"
+ )
+ endif()
+
+ message(STATUS "Configuring ${TARGET_TRIPLET}-rel")
+ file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel)
+ vcpkg_execute_required_process(
+ COMMAND "${_csc_SOURCE_PATH}/configure.bat" ${_csc_OPTIONS} ${_csc_OPTIONS_RELEASE}
+ -release
+ -prefix ${CURRENT_PACKAGES_DIR}
+ -hostbindir ${CURRENT_PACKAGES_DIR}/tools/qt5
+ -archdatadir ${CURRENT_PACKAGES_DIR}/share/qt5
+ -datadir ${CURRENT_PACKAGES_DIR}/share/qt5
+ -plugindir ${CURRENT_PACKAGES_DIR}/plugins
+ -qmldir ${CURRENT_PACKAGES_DIR}/qml
+ -I ${CURRENT_INSTALLED_DIR}/include
+ -L ${CURRENT_INSTALLED_DIR}/lib
+ -platform ${PLATFORM}
+ WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel
+ LOGNAME config-${TARGET_TRIPLET}-rel
+ )
+ message(STATUS "Configuring ${TARGET_TRIPLET}-rel done")
+
+ message(STATUS "Configuring ${TARGET_TRIPLET}-dbg")
+ file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg)
+ vcpkg_execute_required_process(
+ COMMAND "${_csc_SOURCE_PATH}/configure.bat" ${_csc_OPTIONS} ${_csc_OPTIONS_DEBUG}
+ -debug
+ -prefix ${CURRENT_PACKAGES_DIR}/debug
+ -hostbindir ${CURRENT_PACKAGES_DIR}/debug/tools/qt5
+ -archdatadir ${CURRENT_PACKAGES_DIR}/debug/share/qt5
+ -datadir ${CURRENT_PACKAGES_DIR}/debug/share/qt5
+ -plugindir ${CURRENT_PACKAGES_DIR}/debug/plugins
+ -qmldir ${CURRENT_PACKAGES_DIR}/debug/qml
+ -I ${CURRENT_INSTALLED_DIR}/include
+ -L ${CURRENT_INSTALLED_DIR}/debug/lib
+ -platform ${PLATFORM}
+ WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg
+ LOGNAME config-${TARGET_TRIPLET}-dbg
+ )
+ message(STATUS "Configuring ${TARGET_TRIPLET}-dbg done")
+endfunction() \ No newline at end of file
diff --git a/ports/qt5/fix-commandline-overrides.patch b/ports/qt5/fix-commandline-overrides.patch
new file mode 100644
index 000000000..28679c190
--- /dev/null
+++ b/ports/qt5/fix-commandline-overrides.patch
@@ -0,0 +1,149 @@
+diff --git a/qtbase/configure.json b/qtbase/configure.json
+index f774291..8903df0 100644
+--- a/qtbase/configure.json
++++ b/qtbase/configure.json
+@@ -19,8 +19,7 @@
+ "commandline": {
+ "assignments": {
+ "DBUS_HOST_PATH": "host_dbus.prefix",
+- "DBUS_PATH": "dbus.prefix",
+- "ZLIB_LIBS": "zlib.libs"
++ "DBUS_PATH": "dbus.prefix"
+ },
+ "custom": "qmakeArgs",
+ "options": {
+diff --git a/qtbase/mkspecs/features/qt_configure.prf b/qtbase/mkspecs/features/qt_configure.prf
+index eaaa161..fdec8ea 100644
+--- a/qtbase/mkspecs/features/qt_configure.prf
++++ b/qtbase/mkspecs/features/qt_configure.prf
+@@ -401,6 +401,7 @@ defineReplace(qtConfPrepareArgs) {
+ }
+
+ defineTest(qtConfSetupLibraries) {
++ asspfx = $${currentConfig}.commandline.assignments
+ for (l, $${currentConfig}.libraries._KEYS_) {
+ lpfx = $${currentConfig}.libraries.$${l}
+ # 'export' may be omitted, in which case it falls back to the library's name
+@@ -408,6 +409,15 @@ defineTest(qtConfSetupLibraries) {
+ $${lpfx}.export = $$l
+ export($${lpfx}.export)
+ }
++ # 'export' may also be empty, but we need a derived identifier
++ alias = $$eval($${lpfx}.export)
++ isEmpty(alias): alias = $$l
++ $${lpfx}.alias = $$alias
++ export($${lpfx}.alias)
++ # make it easy to refer to the library by its export name.
++ $${currentConfig}.exports._KEYS_ += $$alias
++ $${currentConfig}.exports.$$alias += $$l
++ export($${currentConfig}.exports.$$alias)
+ isEmpty($${lpfx}.sources._KEYS_): \
+ error("Library $$l defines no sources")
+ for (s, $${lpfx}.sources._KEYS_) {
+@@ -427,10 +437,35 @@ defineTest(qtConfSetupLibraries) {
+ }
+ }
+ }
++
++ $${currentConfig}.exports._KEYS_ = $$unique($${currentConfig}.exports._KEYS_)
++ export($${currentConfig}.exports._KEYS_)
++
++ for (alias, $${currentConfig}.exports._KEYS_) {
++ ua = $$upper($$alias)
++ $${asspfx}._KEYS_ += \
++ $${ua}_PREFIX $${ua}_INCDIR $${ua}_LIBDIR \
++ $${ua}_LIBS $${ua}_LIBS_DEBUG $${ua}_LIBS_RELEASE
++ uapfx = $${asspfx}.$${ua}
++ $${uapfx}_PREFIX = $${alias}.prefix
++ $${uapfx}_INCDIR = $${alias}.incdir
++ $${uapfx}_LIBDIR = $${alias}.libdir
++ $${uapfx}_LIBS = $${alias}.libs
++ $${uapfx}_LIBS_DEBUG = $${alias}.libs.debug
++ $${uapfx}_LIBS_RELEASE = $${alias}.libs.release
++ export($${uapfx}_PREFIX)
++ export($${uapfx}_INCDIR)
++ export($${uapfx}_LIBDIR)
++ export($${uapfx}_LIBS)
++ export($${uapfx}_LIBS_DEBUG)
++ export($${uapfx}_LIBS_RELEASE)
++ }
++ export($${asspfx}._KEYS_)
++
+
+ # reverse mapping for assignments on command line.
+- for (a, $${currentConfig}.commandline.assignments._KEYS_) {
+- apfx = $${currentConfig}.commandline.assignments.$${a}
++ for (a, $${asspfx}._KEYS_) {
++ apfx = $${asspfx}.$${a}
+ ra = config.commandline.rev_assignments.$$eval($$apfx)
+ $$ra = $$a
+ export($$ra)
+@@ -479,6 +514,18 @@ defineTest(qtConfLibrary_inline) {
+ export($${1}.libs)
+ }
+
++ incdir = $$val_escape(config.input.$${input}.incdir)
++ !isEmpty(incdir) {
++ $${1}.includedir = $$incdir
++ export($${1}.includedir)
++ }
++
++ libdir = $$val_escape(config.input.$${input}.libdir)
++ !isEmpty(libdir) {
++ $${1}.libs = "-L$$libdir $$eval($${1}.libs)"
++ export($${1}.libs)
++ }
++
+ return(true)
+ }
+
+diff --git a/qtbase/src/gui/configure.json b/qtbase/src/gui/configure.json
+index 1f50116..af03362 100644
+--- a/qtbase/src/gui/configure.json
++++ b/qtbase/src/gui/configure.json
+@@ -100,7 +100,7 @@
+ "test": "unix/freetype",
+ "sources": [
+ { "type": "pkgConfig", "args": "freetype2" },
+- { "type": "freetype", "libs": "-lfreetype" }
++ { "libs": "-lfreetype" }
+ ]
+ },
+ "fontconfig": {
+diff --git a/qtbase/src/network/configure.json b/qtbase/src/network/configure.json
+index 1e08aa7..314970e 100644
+--- a/qtbase/src/network/configure.json
++++ b/qtbase/src/network/configure.json
+@@ -7,9 +7,6 @@
+
+ "commandline": {
+ "assignments": {
+- "OPENSSL_LIBS": "openssl.libs",
+- "OPENSSL_LIBS_DEBUG": "openssl.libs.debug",
+- "OPENSSL_LIBS_RELEASE": "openssl.libs.release",
+ "OPENSSL_PATH": "openssl.prefix"
+ },
+ "options": {
+diff --git a/qtbase/src/sql/configure.json b/qtbase/src/sql/configure.json
+index 96c82e8..51a7e51 100644
+--- a/qtbase/src/sql/configure.json
++++ b/qtbase/src/sql/configure.json
+@@ -8,7 +8,6 @@
+ "commandline": {
+ "assignments": {
+ "MYSQL_PATH": "mysql.prefix",
+- "PSQL_LIBS": "psql.libs",
+ "SYBASE": "tds.prefix",
+ "SYBASE_LIBS": "tds.libs"
+ },
+@@ -71,8 +70,8 @@
+ "sources": [
+ { "type": "pkgConfig", "args": "libpq" },
+ { "type": "psqlConfig" },
+- { "type": "psqlEnv", "libs": "-llibpq -lws2_32 -ladvapi32", "condition": "config.win32" },
+- { "type": "psqlEnv", "libs": "-lpq", "condition": "!config.win32" }
++ { "libs": "-llibpq -lws2_32 -ladvapi32", "condition": "config.win32" },
++ { "libs": "-lpq", "condition": "!config.win32" }
+ ]
+ },
+ "tds": {
diff --git a/ports/qt5/fix-qalgorithms-vs2017.patch b/ports/qt5/fix-qalgorithms-vs2017.patch
new file mode 100644
index 000000000..49b558ae3
--- /dev/null
+++ b/ports/qt5/fix-qalgorithms-vs2017.patch
@@ -0,0 +1,138 @@
+diff --git a/qtbase/src/corelib/tools/qalgorithms.h b/qtbase/src/corelib/tools/qalgorithms.h
+index 303374b..7e84695 100644
+--- a/qtbase/src/corelib/tools/qalgorithms.h
++++ b/qtbase/src/corelib/tools/qalgorithms.h
+@@ -589,15 +589,16 @@ Q_DECL_CONSTEXPR Q_ALWAYS_INLINE uint qt_builtin_popcountll(quint64 v) Q_DECL_NO
+ return __builtin_popcountll(v);
+ }
+ #elif defined(Q_CC_MSVC) && !defined(Q_OS_WINCE) && !defined(Q_PROCESSOR_ARM)
++#define QT_POPCOUNT_CONSTEXPR
+ #define QT_HAS_BUILTIN_CTZ
+-Q_DECL_CONSTEXPR Q_ALWAYS_INLINE unsigned long qt_builtin_ctz(quint32 val)
++Q_ALWAYS_INLINE unsigned long qt_builtin_ctz(quint32 val)
+ {
+ unsigned long result;
+ _BitScanForward(&result, val);
+ return result;
+ }
+ #define QT_HAS_BUILTIN_CLZ
+-Q_DECL_CONSTEXPR Q_ALWAYS_INLINE unsigned long qt_builtin_clz(quint32 val)
++Q_ALWAYS_INLINE unsigned long qt_builtin_clz(quint32 val)
+ {
+ unsigned long result;
+ _BitScanReverse(&result, val);
+@@ -610,7 +611,7 @@ Q_DECL_CONSTEXPR Q_ALWAYS_INLINE unsigned long qt_builtin_clz(quint32 val)
+ #if Q_PROCESSOR_WORDSIZE == 8
+ // These are only defined for 64bit builds.
+ #define QT_HAS_BUILTIN_CTZLL
+-Q_DECL_CONSTEXPR Q_ALWAYS_INLINE unsigned long qt_builtin_ctzll(quint64 val)
++Q_ALWAYS_INLINE unsigned long qt_builtin_ctzll(quint64 val)
+ {
+ unsigned long result;
+ _BitScanForward64(&result, val);
+@@ -618,7 +619,7 @@ Q_DECL_CONSTEXPR Q_ALWAYS_INLINE unsigned long qt_builtin_ctzll(quint64 val)
+ }
+ // MSVC calls it _BitScanReverse and returns the carry flag, which we don't need
+ #define QT_HAS_BUILTIN_CLZLL
+-Q_DECL_CONSTEXPR Q_ALWAYS_INLINE unsigned long qt_builtin_clzll(quint64 val)
++Q_ALWAYS_INLINE unsigned long qt_builtin_clzll(quint64 val)
+ {
+ unsigned long result;
+ _BitScanReverse64(&result, val);
+@@ -628,31 +629,31 @@ Q_DECL_CONSTEXPR Q_ALWAYS_INLINE unsigned long qt_builtin_clzll(quint64 val)
+ }
+ #endif // MSVC 64bit
+ # define QT_HAS_BUILTIN_CTZS
+-Q_DECL_CONSTEXPR Q_ALWAYS_INLINE uint qt_builtin_ctzs(quint16 v) Q_DECL_NOTHROW
++Q_ALWAYS_INLINE uint qt_builtin_ctzs(quint16 v) Q_DECL_NOTHROW
+ {
+ return qt_builtin_ctz(v);
+ }
+ #define QT_HAS_BUILTIN_CLZS
+-Q_DECL_CONSTEXPR Q_ALWAYS_INLINE uint qt_builtin_clzs(quint16 v) Q_DECL_NOTHROW
++Q_ALWAYS_INLINE uint qt_builtin_clzs(quint16 v) Q_DECL_NOTHROW
+ {
+ return qt_builtin_clz(v) - 16U;
+ }
+ #define QALGORITHMS_USE_BUILTIN_POPCOUNT
+-Q_DECL_CONSTEXPR Q_ALWAYS_INLINE uint qt_builtin_popcount(quint32 v) Q_DECL_NOTHROW
++Q_ALWAYS_INLINE uint qt_builtin_popcount(quint32 v) Q_DECL_NOTHROW
+ {
+ return __popcnt(v);
+ }
+-Q_DECL_CONSTEXPR Q_ALWAYS_INLINE uint qt_builtin_popcount(quint8 v) Q_DECL_NOTHROW
++Q_ALWAYS_INLINE uint qt_builtin_popcount(quint8 v) Q_DECL_NOTHROW
+ {
+ return __popcnt16(v);
+ }
+-Q_DECL_CONSTEXPR Q_ALWAYS_INLINE uint qt_builtin_popcount(quint16 v) Q_DECL_NOTHROW
++Q_ALWAYS_INLINE uint qt_builtin_popcount(quint16 v) Q_DECL_NOTHROW
+ {
+ return __popcnt16(v);
+ }
+ #if Q_PROCESSOR_WORDSIZE == 8
+ #define QALGORITHMS_USE_BUILTIN_POPCOUNTLL
+-Q_DECL_CONSTEXPR Q_ALWAYS_INLINE uint qt_builtin_popcountll(quint64 v) Q_DECL_NOTHROW
++Q_ALWAYS_INLINE uint qt_builtin_popcountll(quint64 v) Q_DECL_NOTHROW
+ {
+ return __popcnt64(v);
+ }
+@@ -660,9 +661,13 @@ Q_DECL_CONSTEXPR Q_ALWAYS_INLINE uint qt_builtin_popcountll(quint64 v) Q_DECL_NO
+ #endif // MSVC
+ #endif // QT_HAS_CONSTEXPR_BUILTINS
+
++#ifndef QT_POPCOUNT_CONSTEXPR
++#define QT_POPCOUNT_CONSTEXPR Q_DECL_CONSTEXPR
++#endif
++
+ } //namespace QAlgorithmsPrivate
+
+-Q_DECL_CONST_FUNCTION Q_DECL_CONSTEXPR inline uint qPopulationCount(quint32 v) Q_DECL_NOTHROW
++Q_DECL_CONST_FUNCTION QT_POPCOUNT_CONSTEXPR inline uint qPopulationCount(quint32 v) Q_DECL_NOTHROW
+ {
+ #ifdef QALGORITHMS_USE_BUILTIN_POPCOUNT
+ return QAlgorithmsPrivate::qt_builtin_popcount(v);
+@@ -675,7 +680,7 @@ Q_DECL_CONST_FUNCTION Q_DECL_CONSTEXPR inline uint qPopulationCount(quint32 v) Q
+ #endif
+ }
+
+-Q_DECL_CONST_FUNCTION Q_DECL_CONSTEXPR inline uint qPopulationCount(quint8 v) Q_DECL_NOTHROW
++Q_DECL_CONST_FUNCTION QT_POPCOUNT_CONSTEXPR inline uint qPopulationCount(quint8 v) Q_DECL_NOTHROW
+ {
+ #ifdef QALGORITHMS_USE_BUILTIN_POPCOUNT
+ return QAlgorithmsPrivate::qt_builtin_popcount(v);
+@@ -685,7 +690,7 @@ Q_DECL_CONST_FUNCTION Q_DECL_CONSTEXPR inline uint qPopulationCount(quint8 v) Q_
+ #endif
+ }
+
+-Q_DECL_CONST_FUNCTION Q_DECL_CONSTEXPR inline uint qPopulationCount(quint16 v) Q_DECL_NOTHROW
++Q_DECL_CONST_FUNCTION QT_POPCOUNT_CONSTEXPR inline uint qPopulationCount(quint16 v) Q_DECL_NOTHROW
+ {
+ #ifdef QALGORITHMS_USE_BUILTIN_POPCOUNT
+ return QAlgorithmsPrivate::qt_builtin_popcount(v);
+@@ -696,7 +701,7 @@ Q_DECL_CONST_FUNCTION Q_DECL_CONSTEXPR inline uint qPopulationCount(quint16 v) Q
+ #endif
+ }
+
+-Q_DECL_CONST_FUNCTION Q_DECL_CONSTEXPR inline uint qPopulationCount(quint64 v) Q_DECL_NOTHROW
++Q_DECL_CONST_FUNCTION QT_POPCOUNT_CONSTEXPR inline uint qPopulationCount(quint64 v) Q_DECL_NOTHROW
+ {
+ #ifdef QALGORITHMS_USE_BUILTIN_POPCOUNTLL
+ return QAlgorithmsPrivate::qt_builtin_popcountll(v);
+@@ -711,7 +716,7 @@ Q_DECL_CONST_FUNCTION Q_DECL_CONSTEXPR inline uint qPopulationCount(quint64 v) Q
+ #endif
+ }
+
+-Q_DECL_CONST_FUNCTION Q_DECL_CONSTEXPR inline uint qPopulationCount(long unsigned int v) Q_DECL_NOTHROW
++Q_DECL_CONST_FUNCTION QT_POPCOUNT_CONSTEXPR inline uint qPopulationCount(long unsigned int v) Q_DECL_NOTHROW
+ {
+ return qPopulationCount(static_cast<quint64>(v));
+ }
+@@ -719,6 +724,7 @@ Q_DECL_CONST_FUNCTION Q_DECL_CONSTEXPR inline uint qPopulationCount(long unsigne
+ #if defined(Q_CC_GNU) && !defined(Q_CC_CLANG)
+ #undef QALGORITHMS_USE_BUILTIN_POPCOUNT
+ #endif
++#undef QT_POPCOUNT_CONSTEXPR
+
+ Q_DECL_RELAXED_CONSTEXPR inline uint qCountTrailingZeroBits(quint32 v) Q_DECL_NOTHROW
+ {
diff --git a/ports/qt5/fixcmake.py b/ports/qt5/fixcmake.py
index 41b74606c..93a535fa2 100644
--- a/ports/qt5/fixcmake.py
+++ b/ports/qt5/fixcmake.py
@@ -7,6 +7,8 @@ files = [y for x in os.walk('.') for y in glob(os.path.join(x[0], '*.cmake'))]
for f in files:
openedfile = open(f, "r")
builder = ""
+ dllpattern = re.compile("_install_prefix}/bin/Qt5.*d.dll")
+ libpattern = re.compile("_install_prefix}/lib/Qt5.*d.lib")
exepattern = re.compile("_install_prefix}/bin/[a-z]+.exe")
for line in openedfile:
if "_install_prefix}/bin/${LIB_LOCATION}" in line:
@@ -35,6 +37,17 @@ for f in files:
builder += " else()"
builder += "\n " + line.replace("/plugins/", "/debug/plugins/")
builder += " endif()\n"
+ elif "_install_prefix}/lib/qtmain.lib" in line:
+ builder += line
+ builder += " set(imported_location_debug \"${_qt5Core_install_prefix}/debug/lib/qtmaind.lib\")\n"
+ builder += "\n"
+ builder += " set_target_properties(Qt5::WinMain PROPERTIES\n"
+ builder += " IMPORTED_LOCATION_DEBUG ${imported_location_debug}\n"
+ builder += " )\n"
+ elif dllpattern.search(line) != None:
+ builder += line.replace("/bin/", "/debug/bin/")
+ elif libpattern.search(line) != None:
+ builder += line.replace("/lib/", "/debug/lib/")
elif exepattern.search(line) != None:
builder += line.replace("/bin/", "/tools/qt5/")
else:
diff --git a/ports/qt5/install_qt.cmake b/ports/qt5/install_qt.cmake
new file mode 100644
index 000000000..1b0bec935
--- /dev/null
+++ b/ports/qt5/install_qt.cmake
@@ -0,0 +1,45 @@
+function(install_qt)
+ cmake_parse_arguments(_bc "DISABLE_PARALLEL" "" "" ${ARGN})
+
+ if (_bc_DISABLE_PARALLEL)
+ set(JOBS "1")
+ else()
+ set(JOBS "$ENV{NUMBER_OF_PROCESSORS}")
+ endif()
+
+ vcpkg_find_acquire_program(JOM)
+ vcpkg_find_acquire_program(PYTHON3)
+ get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY)
+
+ set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}")
+ set(_path "$ENV{PATH}")
+
+ message(STATUS "Package ${TARGET_TRIPLET}-rel")
+ set(ENV{PATH} "${CURRENT_INSTALLED_DIR}/bin;${_path}")
+ vcpkg_execute_required_process(
+ COMMAND ${JOM} /J ${JOBS}
+ WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel
+ LOGNAME build-${TARGET_TRIPLET}-rel
+ )
+ vcpkg_execute_required_process(
+ COMMAND ${JOM} /J ${JOBS} install
+ WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel
+ LOGNAME package-${TARGET_TRIPLET}-rel
+ )
+ message(STATUS "Package ${TARGET_TRIPLET}-rel done")
+
+ message(STATUS "Package ${TARGET_TRIPLET}-dbg")
+ set(ENV{PATH} "${CURRENT_INSTALLED_DIR}/debug/bin;${_path}")
+ vcpkg_execute_required_process(
+ COMMAND ${JOM} /J ${JOBS}
+ WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg
+ LOGNAME build-${TARGET_TRIPLET}-dbg
+ )
+ vcpkg_execute_required_process(
+ COMMAND ${JOM} /J ${JOBS} install
+ WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg
+ LOGNAME package-${TARGET_TRIPLET}-dbg
+ )
+ set(ENV{PATH} "${_path}")
+ message(STATUS "Package ${TARGET_TRIPLET}-dbg done")
+endfunction() \ No newline at end of file
diff --git a/ports/qt5/portfile.cmake b/ports/qt5/portfile.cmake
index d79ed5d39..f5d8bbc63 100644
--- a/ports/qt5/portfile.cmake
+++ b/ports/qt5/portfile.cmake
@@ -1,195 +1,68 @@
include(${CMAKE_TRIPLET_FILE})
include(vcpkg_common_functions)
-set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/qt-5.7.1)
-set(OUTPUT_PATH ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET})
-set(ENV{QTDIR} ${OUTPUT_PATH}/qtbase)
-set(ENV{PATH} "${OUTPUT_PATH}/qtbase/bin;$ENV{PATH}")
-find_program(NMAKE nmake)
-vcpkg_find_acquire_program(JOM)
-vcpkg_find_acquire_program(PERL)
-vcpkg_find_acquire_program(PYTHON3)
-get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY)
-get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY)
-get_filename_component(JOM_EXE_PATH ${JOM} DIRECTORY)
-set(ENV{PATH} "${JOM_EXE_PATH};${PYTHON3_EXE_PATH};${CURRENT_INSTALLED_DIR}/bin;$ENV{PATH};${PERL_EXE_PATH}")
-set(ENV{INCLUDE} "${CURRENT_INSTALLED_DIR}/include;$ENV{INCLUDE}")
-set(ENV{LIB} "${CURRENT_INSTALLED_DIR}/lib;$ENV{LIB}")
+list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR})
+include(configure_qt)
+include(install_qt)
+
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/qt-5.8.0)
vcpkg_download_distfile(ARCHIVE_FILE
- URLS "http://download.qt.io/official_releases/qt/5.7/5.7.1/single/qt-everywhere-opensource-src-5.7.1.7z"
- FILENAME "qt-5.7.1.7z"
- SHA512 3ffcf490a1c0107a05113aebbf70015c50d05fbb35439273c243133ddb146d51aacae15ecd6411d563cc8cfe103df896394c365a69bc48fc86c3bce6a1af3107
+ URLS "http://download.qt.io/official_releases/qt/5.8/5.8.0/single/qt-everywhere-opensource-src-5.8.0.7z"
+ FILENAME "qt-5.8.0.7z"
+ SHA512 4c8e7931f0c48318871242c12c2d6f5406be40e037f18690017198a79ef40a72d4319ecb1b8fb5f97c080dbe30174ceb5fd604b3fab22489f977cbeee3e8abe7
)
vcpkg_extract_source_archive(${ARCHIVE_FILE})
-if (EXISTS ${CURRENT_BUILDTREES_DIR}/src/qt-everywhere-opensource-src-5.7.1)
- file(RENAME ${CURRENT_BUILDTREES_DIR}/src/qt-everywhere-opensource-src-5.7.1 ${CURRENT_BUILDTREES_DIR}/src/qt-5.7.1)
+if (EXISTS ${CURRENT_BUILDTREES_DIR}/src/qt-everywhere-opensource-src-5.8.0)
+ file(RENAME ${CURRENT_BUILDTREES_DIR}/src/qt-everywhere-opensource-src-5.8.0 ${CURRENT_BUILDTREES_DIR}/src/qt-5.8.0)
endif()
-if(EXISTS ${OUTPUT_PATH})
- file(REMOVE_RECURSE ${OUTPUT_PATH})
- if(EXISTS ${OUTPUT_PATH})
- message(FATAL_ERROR "Could not clean output directory.")
- endif()
-endif()
-file(MAKE_DIRECTORY ${OUTPUT_PATH})
-if(DEFINED VCPKG_CRT_LINKAGE AND VCPKG_CRT_LINKAGE STREQUAL static)
- list(APPEND QT_RUNTIME_LINKAGE "-static")
- list(APPEND QT_RUNTIME_LINKAGE "-static-runtime")
- vcpkg_apply_patches(
- SOURCE_PATH ${SOURCE_PATH}
- PATCHES "${CMAKE_CURRENT_LIST_DIR}/set-static-qmakespec.patch"
- QUIET
- )
-else()
- vcpkg_apply_patches(
- SOURCE_PATH ${SOURCE_PATH}
- PATCHES "${CMAKE_CURRENT_LIST_DIR}/set-shared-qmakespec.patch"
- QUIET
- )
-endif()
+vcpkg_apply_patches(
+ SOURCE_PATH ${SOURCE_PATH}
+ PATCHES "${CMAKE_CURRENT_LIST_DIR}/fix-qalgorithms-vs2017.patch" "${CMAKE_CURRENT_LIST_DIR}/fix-commandline-overrides.patch"
+)
-message(STATUS "Configuring ${TARGET_TRIPLET}")
-vcpkg_execute_required_process(
- COMMAND "${SOURCE_PATH}/configure.bat"
- -confirm-license -opensource -platform win32-msvc2015
- -debug-and-release -force-debug-info ${QT_RUNTIME_LINKAGE}
- -qt-zlib
- -no-libjpeg
- -no-libpng
- -no-freetype
- -qt-pcre
- -no-harfbuzz
- -no-angle
- -no-inotify
- -no-mtdev
- -no-evdev
+configure_qt(
+ SOURCE_PATH ${SOURCE_PATH}
+ OPTIONS
+ -confirm-license
+ -opensource
+ -system-zlib
+ -system-libjpeg
+ -system-libpng
+ -system-freetype
+ -system-pcre
+ -system-harfbuzz
-system-doubleconversion
- -no-iconv
-system-sqlite
+ -sql-sqlite
+ -sql-psql
+ -nomake examples -nomake tests
+ -skip webengine
-opengl desktop # other options are "-no-opengl" and "-opengl angle"
-mp
- -nomake examples -nomake tests -no-compile-examples
- -skip webengine -skip declarative
- -qt-sql-sqlite -qt-sql-psql
- -prefix ${CURRENT_PACKAGES_DIR}
- -bindir ${CURRENT_PACKAGES_DIR}/bin
- -hostbindir ${CURRENT_PACKAGES_DIR}/tools/qt5
- -archdatadir ${CURRENT_PACKAGES_DIR}/share/qt5
- -datadir ${CURRENT_PACKAGES_DIR}/share/qt5
- -plugindir ${CURRENT_PACKAGES_DIR}/plugins
- WORKING_DIRECTORY ${OUTPUT_PATH}
- LOGNAME configure-${TARGET_TRIPLET}
-)
-message(STATUS "Configure ${TARGET_TRIPLET} done")
-
-message(STATUS "Building ${TARGET_TRIPLET}")
-# Multiple executions are required due to https://bugreports.qt.io/browse/QTBUG-53393
-if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
- set(COUNT 1)
-else()
- set(COUNT 3)
-endif()
-vcpkg_execute_required_process_repeat(
- COUNT ${COUNT}
- COMMAND ${JOM}
- WORKING_DIRECTORY ${OUTPUT_PATH}
- LOGNAME build-${TARGET_TRIPLET}
+ LIBJPEG_LIBS="-ljpeg"
+ OPTIONS_RELEASE
+ ZLIB_LIBS="-lzlib"
+ LIBPNG_LIBS="-llibpng16"
+ OPTIONS_DEBUG
+ ZLIB_LIBS="-lzlibd"
+ LIBPNG_LIBS="-llibpng16d"
+ PCRE_LIBS="-lpcre16d"
+ PSQL_LIBS="-llibpqd"
+ FREETYPE_LIBS="-lfreetyped"
)
-message(STATUS "Build ${TARGET_TRIPLET} done")
+install_qt()
-message(STATUS "Installing ${TARGET_TRIPLET}")
-vcpkg_execute_required_process(
- COMMAND ${JOM} -j1 install
- WORKING_DIRECTORY ${OUTPUT_PATH}
- LOGNAME install-${TARGET_TRIPLET}
-)
-message(STATUS "Install ${TARGET_TRIPLET} done")
-
-message(STATUS "Packaging ${TARGET_TRIPLET}")
-file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug)
-file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/lib)
-file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin)
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/share/cmake)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
-if(DEFINED VCPKG_CRT_LINKAGE AND VCPKG_CRT_LINKAGE STREQUAL dynamic)
- file(INSTALL ${CURRENT_PACKAGES_DIR}/bin
- DESTINATION ${CURRENT_PACKAGES_DIR}/debug
- FILES_MATCHING PATTERN "*d.dll"
- )
- file(INSTALL ${CURRENT_PACKAGES_DIR}/bin
- DESTINATION ${CURRENT_PACKAGES_DIR}/debug
- FILES_MATCHING PATTERN "*d.pdb"
- )
- file(GLOB DEBUG_BIN_FILES "${CURRENT_PACKAGES_DIR}/bin/*d.dll")
- file(REMOVE ${DEBUG_BIN_FILES})
- file(GLOB DEBUG_BIN_FILES "${CURRENT_PACKAGES_DIR}/bin/*d.pdb")
- file(REMOVE ${DEBUG_BIN_FILES})
- if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/bin/Qt5Gamepad.dll)
- file(RENAME ${CURRENT_PACKAGES_DIR}/debug/bin/Qt5Gamepad.dll ${CURRENT_PACKAGES_DIR}/bin/Qt5Gamepad.dll)
- endif()
-endif()
-
-file(INSTALL ${CURRENT_PACKAGES_DIR}/lib
- DESTINATION ${CURRENT_PACKAGES_DIR}/debug
- FILES_MATCHING PATTERN "*d.lib"
-)
-file(INSTALL ${CURRENT_PACKAGES_DIR}/lib
- DESTINATION ${CURRENT_PACKAGES_DIR}/debug
- FILES_MATCHING PATTERN "*d.prl"
-)
-file(INSTALL ${CURRENT_PACKAGES_DIR}/lib
- DESTINATION ${CURRENT_PACKAGES_DIR}/debug
- FILES_MATCHING PATTERN "*d.pdb"
-)
-file(GLOB DEBUG_LIB_FILES "${CURRENT_PACKAGES_DIR}/lib/*d.lib")
-file(REMOVE ${DEBUG_LIB_FILES})
-file(GLOB DEBUG_LIB_FILES "${CURRENT_PACKAGES_DIR}/lib/*d.prl")
-file(REMOVE ${DEBUG_LIB_FILES})
-file(GLOB DEBUG_LIB_FILES "${CURRENT_PACKAGES_DIR}/lib/*d.pdb")
-if(DEBUG_LIB_FILES)
- file(REMOVE ${DEBUG_LIB_FILES})
-endif()
-if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/Qt5Gamepad.lib)
- file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/Qt5Gamepad.lib ${CURRENT_PACKAGES_DIR}/lib/Qt5Gamepad.lib)
-endif()
-if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/Qt5Gamepad.prl)
- file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/Qt5Gamepad.prl ${CURRENT_PACKAGES_DIR}/lib/Qt5Gamepad.prl)
-endif()
file(GLOB BINARY_TOOLS "${CURRENT_PACKAGES_DIR}/bin/*.exe")
file(INSTALL ${BINARY_TOOLS} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/qt5)
file(REMOVE ${BINARY_TOOLS})
-file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/debug/plugins")
-file(GLOB_RECURSE DEBUG_PLUGINS
- "${CURRENT_PACKAGES_DIR}/plugins/*d.dll"
- "${CURRENT_PACKAGES_DIR}/plugins/*d.pdb"
-)
-foreach(file ${DEBUG_PLUGINS})
- get_filename_component(file_n ${file} NAME)
- file(RELATIVE_PATH file_rel "${CURRENT_PACKAGES_DIR}/plugins" ${file})
- get_filename_component(rel_dir ${file_rel} DIRECTORY)
- file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/debug/plugins/${rel_dir}")
- file(RENAME ${file} "${CURRENT_PACKAGES_DIR}/debug/plugins/${rel_dir}/${file_n}")
-endforeach()
-
-if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/plugins/gamepads/xinputgamepad.dll)
- file(RENAME
- ${CURRENT_PACKAGES_DIR}/debug/plugins/gamepads/xinputgamepad.dll
- ${CURRENT_PACKAGES_DIR}/plugins/gamepads/xinputgamepad.dll)
-endif()
-if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/plugins/gamepads/xinputgamepad.pdb)
- file(RENAME
- ${CURRENT_PACKAGES_DIR}/debug/plugins/gamepads/xinputgamepad.pdb
- ${CURRENT_PACKAGES_DIR}/plugins/gamepads/xinputgamepad.pdb)
-endif()
-
-if(NOT EXISTS ${CURRENT_PACKAGES_DIR}/lib/Qt5Bootstrap.lib AND EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/Qt5Bootstrapd.lib)
- # QT bug: https://bugreports.qt.io/browse/QTBUG-55499
- # The release copy of Qt5Bootstrap.lib is not created when using -debug-and-release
- # Comments from Oswald Buddenhagen indicate this is an internal library, so simply removing the mismatch should be safe.
- file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/Qt5Bootstrapd.lib)
-endif()
-
-vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/qt5)
+file(GLOB BINARY_TOOLS "${CURRENT_PACKAGES_DIR}/debug/bin/*.exe")
+file(REMOVE ${BINARY_TOOLS})
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
vcpkg_execute_required_process(
COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py
@@ -204,6 +77,3 @@ endif()
if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/plugins)
file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/qtdeploy.ps1 DESTINATION ${CURRENT_PACKAGES_DIR}/debug/plugins)
endif()
-
-vcpkg_copy_pdbs()
-
diff --git a/ports/qt5/set-shared-qmakespec.patch b/ports/qt5/set-shared-qmakespec.patch
deleted file mode 100644
index d4b7c2a82..000000000
--- a/ports/qt5/set-shared-qmakespec.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-diff --git a/qtbase/mkspecs/common/msvc-desktop.conf b/qtbase/mkspecs/common/msvc-desktop.conf
-index 80fcd9b..1b9d57b 100644
---- a/qtbase/mkspecs/common/msvc-desktop.conf
-+++ b/qtbase/mkspecs/common/msvc-desktop.conf
-@@ -29,9 +29,9 @@
- QMAKE_YACCFLAGS = -d
- QMAKE_CFLAGS = -nologo -Zc:wchar_t
- QMAKE_CFLAGS_WARN_ON = -W3
- QMAKE_CFLAGS_WARN_OFF = -W0
--QMAKE_CFLAGS_RELEASE = -O2 -MT
--QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += -O2 -MT -Zi
--QMAKE_CFLAGS_DEBUG = -Zi -MTd
-+QMAKE_CFLAGS_RELEASE = -O2 -MD
-+QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += -O2 -MD -Zi
-+QMAKE_CFLAGS_DEBUG = -Zi -MDd
- QMAKE_CFLAGS_YACC =
- QMAKE_CFLAGS_LTCG = -GL
- \ No newline at end of file
diff --git a/ports/qt5/set-static-qmakespec.patch b/ports/qt5/set-static-qmakespec.patch
deleted file mode 100644
index 26b312f2f..000000000
--- a/ports/qt5/set-static-qmakespec.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-diff --git a/qtbase/mkspecs/common/msvc-desktop.conf b/qtbase/mkspecs/common/msvc-desktop.conf
-index 1b9d57b..80fcd9b 100644
---- a/qtbase/mkspecs/common/msvc-desktop.conf
-+++ b/qtbase/mkspecs/common/msvc-desktop.conf
-@@ -29,9 +29,9 @@
- QMAKE_YACCFLAGS = -d
- QMAKE_CFLAGS = -nologo -Zc:wchar_t
- QMAKE_CFLAGS_WARN_ON = -W3
- QMAKE_CFLAGS_WARN_OFF = -W0
--QMAKE_CFLAGS_RELEASE = -O2 -MD
--QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += -O2 -MD -Zi
--QMAKE_CFLAGS_DEBUG = -Zi -MDd
-+QMAKE_CFLAGS_RELEASE = -O2 -MT
-+QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += -O2 -MT -Zi
-+QMAKE_CFLAGS_DEBUG = -Zi -MTd
- QMAKE_CFLAGS_YACC =
- QMAKE_CFLAGS_LTCG = -GL
- \ No newline at end of file