aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBarath Kannan <barathsotd@gmail.com>2017-11-05 19:44:44 +1100
committerBarath Kannan <barathsotd@gmail.com>2017-11-05 19:44:44 +1100
commit938a8fe401ebf88de37e6149a4e9818a8f130a7e (patch)
tree66e0eeb8427e3f8306b86d3b2e07d24121347062
parent9ed2fc546cd9896340706f25c04aab93ddf45e45 (diff)
downloadvcpkg-938a8fe401ebf88de37e6149a4e9818a8f130a7e.tar.gz
vcpkg-938a8fe401ebf88de37e6149a4e9818a8f130a7e.zip
fix path lengths limit for qt source, add qt5 modules: datavis3d, imageformats, multimedia, xmlpatterns
-rw-r--r--ports/cairomm/cmake/FindSigC++.cmake2
-rw-r--r--ports/qt53d/portfile.cmake2
-rw-r--r--ports/qt5base/portfile.cmake2
-rw-r--r--ports/qt5charts/portfile.cmake2
-rw-r--r--ports/qt5datavisualization3d/CONTROL4
-rw-r--r--ports/qt5datavisualization3d/fixcmake.py57
-rw-r--r--ports/qt5datavisualization3d/portfile.cmake79
-rw-r--r--ports/qt5declarative/portfile.cmake2
-rw-r--r--ports/qt5imageformats/CONTROL4
-rw-r--r--ports/qt5imageformats/fixcmake.py57
-rw-r--r--ports/qt5imageformats/portfile.cmake73
-rw-r--r--ports/qt5multimedia/CONTROL4
-rw-r--r--ports/qt5multimedia/fixcmake.py57
-rw-r--r--ports/qt5multimedia/portfile.cmake81
-rw-r--r--ports/qt5serial/portfile.cmake2
-rw-r--r--ports/qt5speech/portfile.cmake2
-rw-r--r--ports/qt5svg/portfile.cmake2
-rw-r--r--ports/qt5tools/portfile.cmake2
-rw-r--r--ports/qt5winextras/portfile.cmake2
-rw-r--r--ports/qt5xmlpatterns/CONTROL4
-rw-r--r--ports/qt5xmlpatterns/fixcmake.py57
-rw-r--r--ports/qt5xmlpatterns/portfile.cmake86
22 files changed, 573 insertions, 10 deletions
diff --git a/ports/cairomm/cmake/FindSigC++.cmake b/ports/cairomm/cmake/FindSigC++.cmake
index ed16ef93f..8d65f70d9 100644
--- a/ports/cairomm/cmake/FindSigC++.cmake
+++ b/ports/cairomm/cmake/FindSigC++.cmake
@@ -108,4 +108,4 @@ find_package_handle_standard_args(SIGC++
FAIL_MESSAGE "Could NOT find SIGC++, try to set the path to SIGC++ root folder in the system variable SIGC++"
)
-MARK_AS_ADVANCED(SIGC++_CONFIG_INCLUDE_DIR SIGC++_INCLUDE_DIR SIGC++_INCLUDE_DIRS SIGC++_LIBRARY SIGC++_LIBRARIES) \ No newline at end of file
+MARK_AS_ADVANCED(SIGC++_CONFIG_INCLUDE_DIR SIGC++_INCLUDE_DIR SIGC++_INCLUDE_DIRS SIGC++_LIBRARY SIGC++_LIBRARIES)
diff --git a/ports/qt53d/portfile.cmake b/ports/qt53d/portfile.cmake
index cb0ac87ef..d31904043 100644
--- a/ports/qt53d/portfile.cmake
+++ b/ports/qt53d/portfile.cmake
@@ -1,7 +1,7 @@
include(vcpkg_common_functions)
string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH)
-if(BUILDTREES_PATH_LENGTH GREATER 27)
+if(BUILDTREES_PATH_LENGTH GREATER 37)
message(WARNING "Qt5's buildsystem uses very long paths and may fail on your system.\n"
"We recommend moving vcpkg to a short path such as 'C:\\src\\vcpkg' or using the subst command."
)
diff --git a/ports/qt5base/portfile.cmake b/ports/qt5base/portfile.cmake
index 623ff29c2..3c18a13f6 100644
--- a/ports/qt5base/portfile.cmake
+++ b/ports/qt5base/portfile.cmake
@@ -1,7 +1,7 @@
include(vcpkg_common_functions)
string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH)
-if(BUILDTREES_PATH_LENGTH GREATER 27)
+if(BUILDTREES_PATH_LENGTH GREATER 37)
message(WARNING "Qt5's buildsystem uses very long paths and may fail on your system.\n"
"We recommend moving vcpkg to a short path such as 'C:\\src\\vcpkg' or using the subst command."
)
diff --git a/ports/qt5charts/portfile.cmake b/ports/qt5charts/portfile.cmake
index 2ff08e715..e9b0d9dda 100644
--- a/ports/qt5charts/portfile.cmake
+++ b/ports/qt5charts/portfile.cmake
@@ -1,7 +1,7 @@
include(vcpkg_common_functions)
string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH)
-if(BUILDTREES_PATH_LENGTH GREATER 27)
+if(BUILDTREES_PATH_LENGTH GREATER 37)
message(WARNING "Qt5's buildsystem uses very long paths and may fail on your system.\n"
"We recommend moving vcpkg to a short path such as 'C:\\src\\vcpkg' or using the subst command."
)
diff --git a/ports/qt5datavisualization3d/CONTROL b/ports/qt5datavisualization3d/CONTROL
new file mode 100644
index 000000000..f48b02579
--- /dev/null
+++ b/ports/qt5datavisualization3d/CONTROL
@@ -0,0 +1,4 @@
+Source: qt5datavisualization3d
+Version: 5.9.2-0
+Description: Qt5 Data Visualization 3d Module - UI Components for creating 3D data visualizations
+Build-Depends: qt5base \ No newline at end of file
diff --git a/ports/qt5datavisualization3d/fixcmake.py b/ports/qt5datavisualization3d/fixcmake.py
new file mode 100644
index 000000000..923e600bc
--- /dev/null
+++ b/ports/qt5datavisualization3d/fixcmake.py
@@ -0,0 +1,57 @@
+import os
+import re
+from glob import glob
+
+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")
+ tooldllpattern = re.compile("_install_prefix}/tools/qt5/Qt5.*d.dll")
+ for line in openedfile:
+ if "_install_prefix}/tools/qt5/${LIB_LOCATION}" in line:
+ builder += " if (${Configuration} STREQUAL \"RELEASE\")"
+ builder += "\n " + line.replace("/tools/qt5/", "/bin/")
+ builder += " else()"
+ builder += "\n " + line.replace("/tools/qt5/", "/debug/bin/")
+ builder += " endif()\n"
+ elif "_install_prefix}/bin/${LIB_LOCATION}" in line:
+ builder += " if (${Configuration} STREQUAL \"RELEASE\")"
+ builder += "\n " + line
+ builder += " else()"
+ builder += "\n " + line.replace("/bin/", "/debug/bin/")
+ builder += " endif()\n"
+ elif "_install_prefix}/lib/${LIB_LOCATION}" in line:
+ builder += " if (${Configuration} STREQUAL \"RELEASE\")"
+ builder += "\n " + line
+ builder += " else()"
+ builder += "\n " + line.replace("/lib/", "/debug/lib/")
+ builder += " endif()\n"
+ elif "_install_prefix}/lib/${IMPLIB_LOCATION}" in line:
+ builder += " if (${Configuration} STREQUAL \"RELEASE\")"
+ builder += "\n " + line
+ builder += " else()"
+ builder += "\n " + line.replace("/lib/", "/debug/lib/")
+ builder += " endif()\n"
+ elif "_install_prefix}/plugins/${PLUGIN_LOCATION}" in line:
+ builder += " if (${Configuration} STREQUAL \"RELEASE\")"
+ builder += "\n " + line
+ builder += " else()"
+ builder += "\n " + line.replace("/plugins/", "/debug/plugins/")
+ builder += " endif()\n"
+ elif dllpattern.search(line) != None:
+ builder += line.replace("/bin/", "/debug/bin/")
+ elif libpattern.search(line) != None:
+ builder += line.replace("/lib/", "/debug/lib/")
+ elif tooldllpattern.search(line) != None:
+ builder += line.replace("/tools/qt5/", "/debug/bin/")
+ elif exepattern.search(line) != None:
+ builder += line.replace("/bin/", "/tools/qt5/")
+ else:
+ builder += line
+ new_file = open(f, "w")
+ new_file.write(builder)
+ new_file.close() \ No newline at end of file
diff --git a/ports/qt5datavisualization3d/portfile.cmake b/ports/qt5datavisualization3d/portfile.cmake
new file mode 100644
index 000000000..85bd0e21b
--- /dev/null
+++ b/ports/qt5datavisualization3d/portfile.cmake
@@ -0,0 +1,79 @@
+include(vcpkg_common_functions)
+
+string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH)
+if(BUILDTREES_PATH_LENGTH GREATER 37)
+ message(WARNING "Qt5's buildsystem uses very long paths and may fail on your system.\n"
+ "We recommend moving vcpkg to a short path such as 'C:\\src\\vcpkg' or using the subst command."
+ )
+endif()
+
+if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
+ message(FATAL_ERROR "Qt5 doesn't currently support static builds. Please use a dynamic triplet instead.")
+endif()
+
+list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR})
+
+set(SRCDIR_NAME "qtdatavis3d-5.9.2")
+set(ARCHIVE_NAME "qtdatavis3d-opensource-src-5.9.2")
+set(ARCHIVE_EXTENSION ".tar.xz")
+
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME})
+vcpkg_download_distfile(ARCHIVE_FILE
+ URLS "http://download.qt.io/official_releases/qt/5.9/5.9.2/submodules/${ARCHIVE_NAME}${ARCHIVE_EXTENSION}"
+ FILENAME ${SRCDIR_NAME}${ARCHIVE_EXTENSION}
+ SHA512 5f173401ba2f0ebb4bbb1ff65053f1ece44a97a8bf1d9fc8d81540709c588e140c533d5f317d6a9109d538e38aa742d42bf00906f63d433811bc1c8526788dc3
+)
+vcpkg_extract_source_archive(${ARCHIVE_FILE})
+if (EXISTS ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME})
+ file(RENAME ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME} ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME})
+endif()
+
+# This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings
+set(ENV{_CL_} "/utf-8")
+
+vcpkg_configure_qmake_debug(
+ SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
+)
+
+vcpkg_build_qmake_debug()
+
+vcpkg_configure_qmake_release(
+ SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
+)
+
+vcpkg_build_qmake_release()
+
+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}")
+
+set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg")
+set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel")
+
+vcpkg_execute_required_process(
+ COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py
+ WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake
+ LOGNAME fix-cmake
+)
+
+set(ENV{PATH} "${_path}")
+
+file(INSTALL ${DEBUG_DIR}/bin DESTINATION ${CURRENT_PACKAGES_DIR}/debug)
+file(INSTALL ${DEBUG_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug)
+file(INSTALL ${DEBUG_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug)
+file(INSTALL ${DEBUG_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug)
+
+file(INSTALL ${RELEASE_DIR}/bin DESTINATION ${CURRENT_PACKAGES_DIR})
+file(INSTALL ${RELEASE_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR})
+file(INSTALL ${RELEASE_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR})
+file(INSTALL ${RELEASE_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5)
+
+file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/share/cmake)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
+
+file(GLOB RELEASE_DLLS "${CURRENT_PACKAGES_DIR}/lib/*.dll")
+file(GLOB DEBUG_DLLS "${CURRENT_PACKAGES_DIR}/debug/lib/*.dll")
+file(REMOVE ${RELEASE_DLLS} ${DEBUG_DLLS})
+
+file(INSTALL ${SOURCE_PATH}/LICENSE.GPL3 DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5datavisualization3d RENAME copyright) \ No newline at end of file
diff --git a/ports/qt5declarative/portfile.cmake b/ports/qt5declarative/portfile.cmake
index 614eecd37..70c502dfa 100644
--- a/ports/qt5declarative/portfile.cmake
+++ b/ports/qt5declarative/portfile.cmake
@@ -1,7 +1,7 @@
include(vcpkg_common_functions)
string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH)
-if(BUILDTREES_PATH_LENGTH GREATER 27)
+if(BUILDTREES_PATH_LENGTH GREATER 37)
message(WARNING "Qt5's buildsystem uses very long paths and may fail on your system.\n"
"We recommend moving vcpkg to a short path such as 'C:\\src\\vcpkg' or using the subst command."
)
diff --git a/ports/qt5imageformats/CONTROL b/ports/qt5imageformats/CONTROL
new file mode 100644
index 000000000..bcafa4558
--- /dev/null
+++ b/ports/qt5imageformats/CONTROL
@@ -0,0 +1,4 @@
+Source: qt5imageformats
+Version: 5.9.2-0
+Description: Qt5 Image Formats Module - Plugins for additional image formats: TIFF, MNG, TGA, WBMP
+Build-Depends: qt5base \ No newline at end of file
diff --git a/ports/qt5imageformats/fixcmake.py b/ports/qt5imageformats/fixcmake.py
new file mode 100644
index 000000000..923e600bc
--- /dev/null
+++ b/ports/qt5imageformats/fixcmake.py
@@ -0,0 +1,57 @@
+import os
+import re
+from glob import glob
+
+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")
+ tooldllpattern = re.compile("_install_prefix}/tools/qt5/Qt5.*d.dll")
+ for line in openedfile:
+ if "_install_prefix}/tools/qt5/${LIB_LOCATION}" in line:
+ builder += " if (${Configuration} STREQUAL \"RELEASE\")"
+ builder += "\n " + line.replace("/tools/qt5/", "/bin/")
+ builder += " else()"
+ builder += "\n " + line.replace("/tools/qt5/", "/debug/bin/")
+ builder += " endif()\n"
+ elif "_install_prefix}/bin/${LIB_LOCATION}" in line:
+ builder += " if (${Configuration} STREQUAL \"RELEASE\")"
+ builder += "\n " + line
+ builder += " else()"
+ builder += "\n " + line.replace("/bin/", "/debug/bin/")
+ builder += " endif()\n"
+ elif "_install_prefix}/lib/${LIB_LOCATION}" in line:
+ builder += " if (${Configuration} STREQUAL \"RELEASE\")"
+ builder += "\n " + line
+ builder += " else()"
+ builder += "\n " + line.replace("/lib/", "/debug/lib/")
+ builder += " endif()\n"
+ elif "_install_prefix}/lib/${IMPLIB_LOCATION}" in line:
+ builder += " if (${Configuration} STREQUAL \"RELEASE\")"
+ builder += "\n " + line
+ builder += " else()"
+ builder += "\n " + line.replace("/lib/", "/debug/lib/")
+ builder += " endif()\n"
+ elif "_install_prefix}/plugins/${PLUGIN_LOCATION}" in line:
+ builder += " if (${Configuration} STREQUAL \"RELEASE\")"
+ builder += "\n " + line
+ builder += " else()"
+ builder += "\n " + line.replace("/plugins/", "/debug/plugins/")
+ builder += " endif()\n"
+ elif dllpattern.search(line) != None:
+ builder += line.replace("/bin/", "/debug/bin/")
+ elif libpattern.search(line) != None:
+ builder += line.replace("/lib/", "/debug/lib/")
+ elif tooldllpattern.search(line) != None:
+ builder += line.replace("/tools/qt5/", "/debug/bin/")
+ elif exepattern.search(line) != None:
+ builder += line.replace("/bin/", "/tools/qt5/")
+ else:
+ builder += line
+ new_file = open(f, "w")
+ new_file.write(builder)
+ new_file.close() \ No newline at end of file
diff --git a/ports/qt5imageformats/portfile.cmake b/ports/qt5imageformats/portfile.cmake
new file mode 100644
index 000000000..0dfe68b8d
--- /dev/null
+++ b/ports/qt5imageformats/portfile.cmake
@@ -0,0 +1,73 @@
+include(vcpkg_common_functions)
+
+string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH)
+if(BUILDTREES_PATH_LENGTH GREATER 37)
+ message(WARNING "Qt5's buildsystem uses very long paths and may fail on your system.\n"
+ "We recommend moving vcpkg to a short path such as 'C:\\src\\vcpkg' or using the subst command."
+ )
+endif()
+
+if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
+ message(FATAL_ERROR "Qt5 doesn't currently support static builds. Please use a dynamic triplet instead.")
+endif()
+
+list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR})
+
+set(SRCDIR_NAME "qtimageformats-5.9.2")
+set(ARCHIVE_NAME "qtimageformats-opensource-src-5.9.2")
+set(ARCHIVE_EXTENSION ".tar.xz")
+
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME})
+vcpkg_download_distfile(ARCHIVE_FILE
+ URLS "http://download.qt.io/official_releases/qt/5.9/5.9.2/submodules/${ARCHIVE_NAME}${ARCHIVE_EXTENSION}"
+ FILENAME ${SRCDIR_NAME}${ARCHIVE_EXTENSION}
+ SHA512 5f1b93c0e5fffa4c2c063d14c12ad97114a452b16814ca9ac45f00ec36308a09770b3b4d137cb5d19bd3aa3a6f576724084df5d0dad75236d49868af9243c9d2
+)
+vcpkg_extract_source_archive(${ARCHIVE_FILE})
+if (EXISTS ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME})
+ file(RENAME ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME} ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME})
+endif()
+
+# This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings
+set(ENV{_CL_} "/utf-8")
+
+vcpkg_configure_qmake_debug(
+ SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
+)
+
+vcpkg_build_qmake_debug()
+
+vcpkg_configure_qmake_release(
+ SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
+)
+
+vcpkg_build_qmake_release()
+
+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}")
+
+set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg")
+set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel")
+
+vcpkg_execute_required_process(
+ COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py
+ WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake
+ LOGNAME fix-cmake
+)
+
+set(ENV{PATH} "${_path}")
+
+file(INSTALL ${DEBUG_DIR}/plugins DESTINATION ${CURRENT_PACKAGES_DIR}/debug)
+file(INSTALL ${DEBUG_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug)
+
+file(INSTALL ${RELEASE_DIR}/plugins DESTINATION ${CURRENT_PACKAGES_DIR})
+file(INSTALL ${RELEASE_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5)
+
+file(INSTALL ${RELEASE_DIR}/lib/cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share)
+
+#Create an empty include file so that vcpkg doesn't complain
+file(WRITE ${CURRENT_PACKAGES_DIR}/include/.empty "")
+
+file(INSTALL ${SOURCE_PATH}/LICENSE.LGPLv3 DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5imageformats RENAME copyright) \ No newline at end of file
diff --git a/ports/qt5multimedia/CONTROL b/ports/qt5multimedia/CONTROL
new file mode 100644
index 000000000..3a4d01030
--- /dev/null
+++ b/ports/qt5multimedia/CONTROL
@@ -0,0 +1,4 @@
+Source: qt5multimedia
+Version: 5.9.2-0
+Description: Qt5 Multimedia Module - Classes and widgets for audio, video, radio and camera functionality
+Build-Depends: qt5base \ No newline at end of file
diff --git a/ports/qt5multimedia/fixcmake.py b/ports/qt5multimedia/fixcmake.py
new file mode 100644
index 000000000..923e600bc
--- /dev/null
+++ b/ports/qt5multimedia/fixcmake.py
@@ -0,0 +1,57 @@
+import os
+import re
+from glob import glob
+
+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")
+ tooldllpattern = re.compile("_install_prefix}/tools/qt5/Qt5.*d.dll")
+ for line in openedfile:
+ if "_install_prefix}/tools/qt5/${LIB_LOCATION}" in line:
+ builder += " if (${Configuration} STREQUAL \"RELEASE\")"
+ builder += "\n " + line.replace("/tools/qt5/", "/bin/")
+ builder += " else()"
+ builder += "\n " + line.replace("/tools/qt5/", "/debug/bin/")
+ builder += " endif()\n"
+ elif "_install_prefix}/bin/${LIB_LOCATION}" in line:
+ builder += " if (${Configuration} STREQUAL \"RELEASE\")"
+ builder += "\n " + line
+ builder += " else()"
+ builder += "\n " + line.replace("/bin/", "/debug/bin/")
+ builder += " endif()\n"
+ elif "_install_prefix}/lib/${LIB_LOCATION}" in line:
+ builder += " if (${Configuration} STREQUAL \"RELEASE\")"
+ builder += "\n " + line
+ builder += " else()"
+ builder += "\n " + line.replace("/lib/", "/debug/lib/")
+ builder += " endif()\n"
+ elif "_install_prefix}/lib/${IMPLIB_LOCATION}" in line:
+ builder += " if (${Configuration} STREQUAL \"RELEASE\")"
+ builder += "\n " + line
+ builder += " else()"
+ builder += "\n " + line.replace("/lib/", "/debug/lib/")
+ builder += " endif()\n"
+ elif "_install_prefix}/plugins/${PLUGIN_LOCATION}" in line:
+ builder += " if (${Configuration} STREQUAL \"RELEASE\")"
+ builder += "\n " + line
+ builder += " else()"
+ builder += "\n " + line.replace("/plugins/", "/debug/plugins/")
+ builder += " endif()\n"
+ elif dllpattern.search(line) != None:
+ builder += line.replace("/bin/", "/debug/bin/")
+ elif libpattern.search(line) != None:
+ builder += line.replace("/lib/", "/debug/lib/")
+ elif tooldllpattern.search(line) != None:
+ builder += line.replace("/tools/qt5/", "/debug/bin/")
+ elif exepattern.search(line) != None:
+ builder += line.replace("/bin/", "/tools/qt5/")
+ else:
+ builder += line
+ new_file = open(f, "w")
+ new_file.write(builder)
+ new_file.close() \ No newline at end of file
diff --git a/ports/qt5multimedia/portfile.cmake b/ports/qt5multimedia/portfile.cmake
new file mode 100644
index 000000000..d326bb783
--- /dev/null
+++ b/ports/qt5multimedia/portfile.cmake
@@ -0,0 +1,81 @@
+include(vcpkg_common_functions)
+
+string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH)
+if(BUILDTREES_PATH_LENGTH GREATER 37)
+ message(WARNING "Qt5's buildsystem uses very long paths and may fail on your system.\n"
+ "We recommend moving vcpkg to a short path such as 'C:\\src\\vcpkg' or using the subst command."
+ )
+endif()
+
+if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
+ message(FATAL_ERROR "Qt5 doesn't currently support static builds. Please use a dynamic triplet instead.")
+endif()
+
+list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR})
+
+set(SRCDIR_NAME "qtmultimedia-5.9.2")
+set(ARCHIVE_NAME "qtmultimedia-opensource-src-5.9.2")
+set(ARCHIVE_EXTENSION ".tar.xz")
+
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME})
+vcpkg_download_distfile(ARCHIVE_FILE
+ URLS "http://download.qt.io/official_releases/qt/5.9/5.9.2/submodules/${ARCHIVE_NAME}${ARCHIVE_EXTENSION}"
+ FILENAME ${SRCDIR_NAME}${ARCHIVE_EXTENSION}
+ SHA512 b9fab874706440e97185475bfd0ad769c23d5ddbff5086cc0da9783777e81ed8140fb06fa0e7536ebfb67f2c9db39e1b9f3c2241834e74a9e1fb6ffd5cb7af11
+)
+vcpkg_extract_source_archive(${ARCHIVE_FILE})
+if (EXISTS ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME})
+ file(RENAME ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME} ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME})
+endif()
+
+# This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings
+set(ENV{_CL_} "/utf-8")
+
+vcpkg_configure_qmake_debug(
+ SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
+)
+
+vcpkg_build_qmake_debug()
+
+vcpkg_configure_qmake_release(
+ SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
+)
+
+vcpkg_build_qmake_release()
+
+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}")
+
+set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg")
+set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel")
+
+vcpkg_execute_required_process(
+ COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py
+ WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake
+ LOGNAME fix-cmake
+)
+
+set(ENV{PATH} "${_path}")
+
+file(INSTALL ${DEBUG_DIR}/bin DESTINATION ${CURRENT_PACKAGES_DIR}/debug)
+file(INSTALL ${DEBUG_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug)
+file(INSTALL ${DEBUG_DIR}/plugins DESTINATION ${CURRENT_PACKAGES_DIR}/debug)
+file(INSTALL ${DEBUG_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug)
+file(INSTALL ${DEBUG_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug)
+
+file(INSTALL ${RELEASE_DIR}/bin DESTINATION ${CURRENT_PACKAGES_DIR})
+file(INSTALL ${RELEASE_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR})
+file(INSTALL ${RELEASE_DIR}/plugins DESTINATION ${CURRENT_PACKAGES_DIR})
+file(INSTALL ${RELEASE_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR})
+file(INSTALL ${RELEASE_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5)
+
+file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/share/cmake)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
+
+file(GLOB RELEASE_DLLS "${CURRENT_PACKAGES_DIR}/lib/*.dll")
+file(GLOB DEBUG_DLLS "${CURRENT_PACKAGES_DIR}/debug/lib/*.dll")
+file(REMOVE ${RELEASE_DLLS} ${DEBUG_DLLS})
+
+file(INSTALL ${SOURCE_PATH}/LICENSE.LGPL3 DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5multimedia RENAME copyright) \ No newline at end of file
diff --git a/ports/qt5serial/portfile.cmake b/ports/qt5serial/portfile.cmake
index 732675337..edcd4b20a 100644
--- a/ports/qt5serial/portfile.cmake
+++ b/ports/qt5serial/portfile.cmake
@@ -1,7 +1,7 @@
include(vcpkg_common_functions)
string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH)
-if(BUILDTREES_PATH_LENGTH GREATER 27)
+if(BUILDTREES_PATH_LENGTH GREATER 37)
message(WARNING "Qt5's buildsystem uses very long paths and may fail on your system.\n"
"We recommend moving vcpkg to a short path such as 'C:\\src\\vcpkg' or using the subst command."
)
diff --git a/ports/qt5speech/portfile.cmake b/ports/qt5speech/portfile.cmake
index fab35389e..39b52ff58 100644
--- a/ports/qt5speech/portfile.cmake
+++ b/ports/qt5speech/portfile.cmake
@@ -1,7 +1,7 @@
include(vcpkg_common_functions)
string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH)
-if(BUILDTREES_PATH_LENGTH GREATER 27)
+if(BUILDTREES_PATH_LENGTH GREATER 37)
message(WARNING "Qt5's buildsystem uses very long paths and may fail on your system.\n"
"We recommend moving vcpkg to a short path such as 'C:\\src\\vcpkg' or using the subst command."
)
diff --git a/ports/qt5svg/portfile.cmake b/ports/qt5svg/portfile.cmake
index e06c6ef85..13ea3d1e7 100644
--- a/ports/qt5svg/portfile.cmake
+++ b/ports/qt5svg/portfile.cmake
@@ -1,7 +1,7 @@
include(vcpkg_common_functions)
string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH)
-if(BUILDTREES_PATH_LENGTH GREATER 27)
+if(BUILDTREES_PATH_LENGTH GREATER 37)
message(WARNING "Qt5's buildsystem uses very long paths and may fail on your system.\n"
"We recommend moving vcpkg to a short path such as 'C:\\src\\vcpkg' or using the subst command."
)
diff --git a/ports/qt5tools/portfile.cmake b/ports/qt5tools/portfile.cmake
index 84c00d0c8..b0bf93f29 100644
--- a/ports/qt5tools/portfile.cmake
+++ b/ports/qt5tools/portfile.cmake
@@ -1,7 +1,7 @@
include(vcpkg_common_functions)
string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH)
-if(BUILDTREES_PATH_LENGTH GREATER 27)
+if(BUILDTREES_PATH_LENGTH GREATER 37)
message(WARNING "Qt5's buildsystem uses very long paths and may fail on your system.\n"
"We recommend moving vcpkg to a short path such as 'C:\\src\\vcpkg' or using the subst command."
)
diff --git a/ports/qt5winextras/portfile.cmake b/ports/qt5winextras/portfile.cmake
index 5d7b85909..b5842494a 100644
--- a/ports/qt5winextras/portfile.cmake
+++ b/ports/qt5winextras/portfile.cmake
@@ -1,7 +1,7 @@
include(vcpkg_common_functions)
string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH)
-if(BUILDTREES_PATH_LENGTH GREATER 27)
+if(BUILDTREES_PATH_LENGTH GREATER 37)
message(WARNING "Qt5's buildsystem uses very long paths and may fail on your system.\n"
"We recommend moving vcpkg to a short path such as 'C:\\src\\vcpkg' or using the subst command."
)
diff --git a/ports/qt5xmlpatterns/CONTROL b/ports/qt5xmlpatterns/CONTROL
new file mode 100644
index 000000000..baef1b3fd
--- /dev/null
+++ b/ports/qt5xmlpatterns/CONTROL
@@ -0,0 +1,4 @@
+Source: qt5xmlpatterns
+Version: 5.9.2-0
+Description: Qt5 XML Patterns Module - Support for XPath, XQuery, XSLT and XML schema validation
+Build-Depends: qt5base \ No newline at end of file
diff --git a/ports/qt5xmlpatterns/fixcmake.py b/ports/qt5xmlpatterns/fixcmake.py
new file mode 100644
index 000000000..923e600bc
--- /dev/null
+++ b/ports/qt5xmlpatterns/fixcmake.py
@@ -0,0 +1,57 @@
+import os
+import re
+from glob import glob
+
+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")
+ tooldllpattern = re.compile("_install_prefix}/tools/qt5/Qt5.*d.dll")
+ for line in openedfile:
+ if "_install_prefix}/tools/qt5/${LIB_LOCATION}" in line:
+ builder += " if (${Configuration} STREQUAL \"RELEASE\")"
+ builder += "\n " + line.replace("/tools/qt5/", "/bin/")
+ builder += " else()"
+ builder += "\n " + line.replace("/tools/qt5/", "/debug/bin/")
+ builder += " endif()\n"
+ elif "_install_prefix}/bin/${LIB_LOCATION}" in line:
+ builder += " if (${Configuration} STREQUAL \"RELEASE\")"
+ builder += "\n " + line
+ builder += " else()"
+ builder += "\n " + line.replace("/bin/", "/debug/bin/")
+ builder += " endif()\n"
+ elif "_install_prefix}/lib/${LIB_LOCATION}" in line:
+ builder += " if (${Configuration} STREQUAL \"RELEASE\")"
+ builder += "\n " + line
+ builder += " else()"
+ builder += "\n " + line.replace("/lib/", "/debug/lib/")
+ builder += " endif()\n"
+ elif "_install_prefix}/lib/${IMPLIB_LOCATION}" in line:
+ builder += " if (${Configuration} STREQUAL \"RELEASE\")"
+ builder += "\n " + line
+ builder += " else()"
+ builder += "\n " + line.replace("/lib/", "/debug/lib/")
+ builder += " endif()\n"
+ elif "_install_prefix}/plugins/${PLUGIN_LOCATION}" in line:
+ builder += " if (${Configuration} STREQUAL \"RELEASE\")"
+ builder += "\n " + line
+ builder += " else()"
+ builder += "\n " + line.replace("/plugins/", "/debug/plugins/")
+ builder += " endif()\n"
+ elif dllpattern.search(line) != None:
+ builder += line.replace("/bin/", "/debug/bin/")
+ elif libpattern.search(line) != None:
+ builder += line.replace("/lib/", "/debug/lib/")
+ elif tooldllpattern.search(line) != None:
+ builder += line.replace("/tools/qt5/", "/debug/bin/")
+ elif exepattern.search(line) != None:
+ builder += line.replace("/bin/", "/tools/qt5/")
+ else:
+ builder += line
+ new_file = open(f, "w")
+ new_file.write(builder)
+ new_file.close() \ No newline at end of file
diff --git a/ports/qt5xmlpatterns/portfile.cmake b/ports/qt5xmlpatterns/portfile.cmake
new file mode 100644
index 000000000..0bf42b19d
--- /dev/null
+++ b/ports/qt5xmlpatterns/portfile.cmake
@@ -0,0 +1,86 @@
+include(vcpkg_common_functions)
+
+string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH)
+if(BUILDTREES_PATH_LENGTH GREATER 37)
+ message(WARNING "Qt5's buildsystem uses very long paths and may fail on your system.\n"
+ "We recommend moving vcpkg to a short path such as 'C:\\src\\vcpkg' or using the subst command."
+ )
+endif()
+
+if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
+ message(FATAL_ERROR "Qt5 doesn't currently support static builds. Please use a dynamic triplet instead.")
+endif()
+
+list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR})
+
+set(SRCDIR_NAME "qtxmlpatterns-5.9.2")
+set(ARCHIVE_NAME "qtxmlpatterns-opensource-src-5.9.2")
+set(ARCHIVE_EXTENSION ".tar.xz")
+
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME})
+vcpkg_download_distfile(ARCHIVE_FILE
+ URLS "http://download.qt.io/official_releases/qt/5.9/5.9.2/submodules/${ARCHIVE_NAME}${ARCHIVE_EXTENSION}"
+ FILENAME ${SRCDIR_NAME}${ARCHIVE_EXTENSION}
+ SHA512 c14dbd97988473ba73b4e21352c5560278aa4dbfdf2be1d12e9119c0b5dbe8a0e4eff9a682052024a01bb21dcf52d40ba00da98947901fb91518af92a225da83
+)
+vcpkg_extract_source_archive(${ARCHIVE_FILE})
+if (EXISTS ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME})
+ file(RENAME ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME} ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME})
+endif()
+
+# This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings
+set(ENV{_CL_} "/utf-8")
+
+vcpkg_configure_qmake_debug(
+ SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
+)
+
+vcpkg_build_qmake_debug()
+
+vcpkg_configure_qmake_release(
+ SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
+)
+
+vcpkg_build_qmake_release()
+
+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}")
+
+set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg")
+set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel")
+
+vcpkg_execute_required_process(
+ COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py
+ WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake
+ LOGNAME fix-cmake
+)
+
+set(ENV{PATH} "${_path}")
+
+file(INSTALL ${DEBUG_DIR}/bin DESTINATION ${CURRENT_PACKAGES_DIR}/debug)
+file(INSTALL ${DEBUG_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug)
+file(INSTALL ${DEBUG_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug)
+file(INSTALL ${DEBUG_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug)
+
+file(INSTALL ${RELEASE_DIR}/bin DESTINATION ${CURRENT_PACKAGES_DIR})
+file(INSTALL ${RELEASE_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR})
+file(INSTALL ${RELEASE_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR})
+file(INSTALL ${RELEASE_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5)
+
+file(GLOB BINARY_TOOLS "${CURRENT_PACKAGES_DIR}/bin/*.exe")
+file(INSTALL ${BINARY_TOOLS} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/qt5)
+file(REMOVE ${BINARY_TOOLS})
+file(GLOB BINARY_TOOLS "${CURRENT_PACKAGES_DIR}/debug/bin/*.exe")
+file(INSTALL ${BINARY_TOOLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/tools/qt5)
+file(REMOVE ${BINARY_TOOLS})
+
+file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/share/cmake)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
+
+file(GLOB RELEASE_DLLS "${CURRENT_PACKAGES_DIR}/lib/*.dll")
+file(GLOB DEBUG_DLLS "${CURRENT_PACKAGES_DIR}/debug/lib/*.dll")
+file(REMOVE ${RELEASE_DLLS} ${DEBUG_DLLS})
+
+file(INSTALL ${SOURCE_PATH}/LICENSE.LGPLv3 DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5xmlpatterns RENAME copyright) \ No newline at end of file