aboutsummaryrefslogtreecommitdiff
path: root/ports/qt5-modularscripts
diff options
context:
space:
mode:
authorAlexander Neumann <30894796+Neumann-A@users.noreply.github.com>2019-09-12 19:07:22 +0200
committerPhil Christensen <philc@microsoft.com>2019-09-12 10:07:21 -0700
commit96f4487c77fbf08518a9ee665612927c97ce8ebd (patch)
treea7b610226f798bda208a6459f26afa9922fb5dde /ports/qt5-modularscripts
parentecfc714b9adbdf8bf6b394dd6b46d9c56ca993ea (diff)
downloadvcpkg-96f4487c77fbf08518a9ee665612927c97ce8ebd.tar.gz
vcpkg-96f4487c77fbf08518a9ee665612927c97ce8ebd.zip
[Qt] Update to 5.12.4 (#7667)
* update to 5.12.4 * removed port qt5-modularscripts and split it functionality into more functions into qt5-base * added qt_port_hashes.cmake for simpler upgrade. * added optional VCPKG_QT_HOST_MKSPEC and VCPKG_QT_TARGET_MKSPEC to select QTs build mkspecs from a triplet * qt_<config>.conf are now copied from the build dir instead from the port dir * fixed freetype dependencies. * cleanup of vcpkg_qmake scripts. No strange/unclear replacements anymore. * introduced vcpkg_buildpath_length_warning * changed directory layout of the qt5 installation executables and mkspecs a bit.
Diffstat (limited to 'ports/qt5-modularscripts')
-rw-r--r--ports/qt5-modularscripts/CONTROL4
-rw-r--r--ports/qt5-modularscripts/fixcmake.py66
-rw-r--r--ports/qt5-modularscripts/portfile.cmake10
-rw-r--r--ports/qt5-modularscripts/qt_modular_library.cmake166
4 files changed, 3 insertions, 243 deletions
diff --git a/ports/qt5-modularscripts/CONTROL b/ports/qt5-modularscripts/CONTROL
index a3751b61b..cff6939e6 100644
--- a/ports/qt5-modularscripts/CONTROL
+++ b/ports/qt5-modularscripts/CONTROL
@@ -1,3 +1,3 @@
Source: qt5-modularscripts
-Version: 2019-04-30-1
-Description: Vcpkg helpers to package qt5 modules
+Version: deprecated
+Description: now part of qt5-base, formerly vcpkg helpers to package qt5 modules \ No newline at end of file
diff --git a/ports/qt5-modularscripts/fixcmake.py b/ports/qt5-modularscripts/fixcmake.py
deleted file mode 100644
index 83a40ec6c..000000000
--- a/ports/qt5-modularscripts/fixcmake.py
+++ /dev/null
@@ -1,66 +0,0 @@
-import os
-import re
-import sys
-from glob import glob
-
-port="qt5"
-if len(sys.argv) > 1:
- port=sys.argv[1]
-
-files = [y for x in os.walk('.') for y in glob(os.path.join(x[0], '*.cmake'))]
-tooldir="/tools/"+port+"/"
-
-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")
- toolexepattern = re.compile("_install_prefix}/tools/qt5/[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/", tooldir)
- elif toolexepattern.search(line) != None:
- builder += line.replace("/tools/qt5/",tooldir)
- else:
- builder += line
- new_file = open(f, "w")
- new_file.write(builder)
- new_file.close()
diff --git a/ports/qt5-modularscripts/portfile.cmake b/ports/qt5-modularscripts/portfile.cmake
index e7149adfc..0015715fb 100644
--- a/ports/qt5-modularscripts/portfile.cmake
+++ b/ports/qt5-modularscripts/portfile.cmake
@@ -1,9 +1 @@
-file(COPY
- ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py
- ${CMAKE_CURRENT_LIST_DIR}/qt_modular_library.cmake
- DESTINATION
- ${CURRENT_PACKAGES_DIR}/share/qt5modularscripts
-)
-file(WRITE ${CURRENT_PACKAGES_DIR}/share/qt5modularscripts/copyright "")
-
-set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
+set(VCPKG_POLICY_EMPTY_PACKAGE enabled) \ No newline at end of file
diff --git a/ports/qt5-modularscripts/qt_modular_library.cmake b/ports/qt5-modularscripts/qt_modular_library.cmake
deleted file mode 100644
index e58d0bf91..000000000
--- a/ports/qt5-modularscripts/qt_modular_library.cmake
+++ /dev/null
@@ -1,166 +0,0 @@
-set(_qt5base_port_dir "${CMAKE_CURRENT_LIST_DIR}")
-
-function(qt_modular_fetch_library NAME HASH TARGET_SOURCE_PATH)
- string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH)
- if(BUILDTREES_PATH_LENGTH GREATER 37 AND CMAKE_HOST_WIN32)
- message(WARNING "${PORT}'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()
-
- set(MAJOR_MINOR 5.12)
- set(FULL_VERSION ${MAJOR_MINOR}.3)
- set(ARCHIVE_NAME "${NAME}-everywhere-src-${FULL_VERSION}.tar.xz")
-
- vcpkg_download_distfile(ARCHIVE_FILE
- URLS "http://download.qt.io/official_releases/qt/${MAJOR_MINOR}/${FULL_VERSION}/submodules/${ARCHIVE_NAME}"
- FILENAME ${ARCHIVE_NAME}
- SHA512 ${HASH}
- )
- vcpkg_extract_source_archive_ex(
- OUT_SOURCE_PATH SOURCE_PATH
- ARCHIVE "${ARCHIVE_FILE}"
- REF ${FULL_VERSION}
- )
-
- set(${TARGET_SOURCE_PATH} ${SOURCE_PATH} PARENT_SCOPE)
-endfunction()
-
-function(qt_modular_build_library SOURCE_PATH)
- # This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings
- set(ENV{_CL_} "/utf-8")
-
- #Store build paths
- set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg")
- set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel")
-
- #Find Python and add it to the path
- vcpkg_find_acquire_program(PYTHON2)
- get_filename_component(PYTHON2_EXE_PATH ${PYTHON2} DIRECTORY)
- vcpkg_add_to_path("${PYTHON2_EXE_PATH}")
-
- file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}" NATIVE_INSTALLED_DIR)
- file(TO_NATIVE_PATH "${CURRENT_PACKAGES_DIR}" NATIVE_PACKAGES_DIR)
-
- if(WIN32)
- string(SUBSTRING "${NATIVE_INSTALLED_DIR}" 2 -1 INSTALLED_DIR_WITHOUT_DRIVE)
- string(SUBSTRING "${NATIVE_PACKAGES_DIR}" 2 -1 PACKAGES_DIR_WITHOUT_DRIVE)
- else()
- set(INSTALLED_DIR_WITHOUT_DRIVE ${NATIVE_INSTALLED_DIR})
- set(PACKAGES_DIR_WITHOUT_DRIVE ${NATIVE_PACKAGES_DIR})
- endif()
-
- #Configure debug+release
- vcpkg_configure_qmake(SOURCE_PATH ${SOURCE_PATH})
- #Build debug+release
- if (CMAKE_HOST_WIN32)
- vcpkg_build_qmake()
- else()
- vcpkg_build_qmake(SKIP_MAKEFILES)
- endif()
-
- #Fix the cmake files if they exist
- if(EXISTS ${RELEASE_DIR}/lib/cmake)
- vcpkg_execute_required_process(
- COMMAND ${PYTHON2} ${_qt5base_port_dir}/fixcmake.py ${PORT}
- WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake
- LOGNAME fix-cmake
- )
- endif()
-
- file(GLOB_RECURSE MAKEFILES ${DEBUG_DIR}/*Makefile* ${RELEASE_DIR}/*Makefile*)
-
- foreach(MAKEFILE ${MAKEFILES})
- file(READ "${MAKEFILE}" _contents)
- #Set the correct install directory to packages
- string(REPLACE "(INSTALL_ROOT)${INSTALLED_DIR_WITHOUT_DRIVE}" "(INSTALL_ROOT)${PACKAGES_DIR_WITHOUT_DRIVE}" _contents "${_contents}")
- file(WRITE "${MAKEFILE}" "${_contents}")
- endforeach()
-
- #Install the module files
- vcpkg_build_qmake(TARGETS install SKIP_MAKEFILES BUILD_LOGNAME install)
-
- #Install cmake files
- if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/cmake)
- file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share)
- file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/share/cmake)
- endif()
- #Remove extra cmake files
- if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
- file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
- endif()
-
- file(GLOB_RECURSE PRL_FILES "${CURRENT_PACKAGES_DIR}/lib/*.prl" "${CURRENT_PACKAGES_DIR}/debug/lib/*.prl")
- if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
- file(TO_CMAKE_PATH "${CURRENT_INSTALLED_DIR}/lib" CMAKE_RELEASE_LIB_PATH)
- endif()
- if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
- file(TO_CMAKE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib" CMAKE_DEBUG_LIB_PATH)
- endif()
- foreach(PRL_FILE IN LISTS PRL_FILES)
- file(READ "${PRL_FILE}" _contents)
- string(REPLACE "${CMAKE_RELEASE_LIB_PATH}" "\$\$[QT_INSTALL_LIBS]" _contents "${_contents}")
- string(REPLACE "${CMAKE_DEBUG_LIB_PATH}" "\$\$[QT_INSTALL_LIBS]" _contents "${_contents}")
- file(WRITE "${PRL_FILE}" "${_contents}")
- endforeach()
-
- file(GLOB RELEASE_LIBS "${CURRENT_PACKAGES_DIR}/lib/*")
- if(NOT RELEASE_LIBS)
- file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib)
- endif()
- file(GLOB DEBUG_FILES "${CURRENT_PACKAGES_DIR}/debug/lib/*")
- if(NOT DEBUG_FILES)
- file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib)
- endif()
-
- #Move release and debug dlls to the correct directory
- if(EXISTS ${CURRENT_PACKAGES_DIR}/tools/qt5)
- file(RENAME ${CURRENT_PACKAGES_DIR}/tools/qt5 ${CURRENT_PACKAGES_DIR}/tools/${PORT})
- endif()
- if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5)
- file(RENAME ${CURRENT_PACKAGES_DIR}/debug/tools/qt5 ${CURRENT_PACKAGES_DIR}/debug/tools/${PORT})
- endif()
-
- file(GLOB RELEASE_DLLS ${CURRENT_PACKAGES_DIR}/tools/${PORT}/*.dll)
- file(GLOB DEBUG_DLLS ${CURRENT_PACKAGES_DIR}/debug/tools/${PORT}/*.dll)
- if (RELEASE_DLLS)
- file(INSTALL ${RELEASE_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin)
- file(REMOVE ${RELEASE_DLLS})
- #Check if there are any binaries left over; if not - delete the directory
- file(GLOB RELEASE_BINS ${CURRENT_PACKAGES_DIR}/tools/${PORT}/*)
- if(NOT RELEASE_BINS)
- file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/tools)
- endif()
- endif()
- if(DEBUG_DLLS)
- file(INSTALL ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin)
- file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/tools)
- endif()
-
- if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
- file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/qt5/debug/include)
- endif()
-
- if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
- vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT})
- endif()
-
- #Find the relevant license file and install it
- if(EXISTS "${SOURCE_PATH}/LICENSE.LGPLv3")
- set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPLv3")
- elseif(EXISTS "${SOURCE_PATH}/LICENSE.LGPL3")
- set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPL3")
- elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPLv3")
- set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPLv3")
- elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPL3")
- set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPL3")
- elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPL3-EXCEPT")
- set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPL3-EXCEPT")
- endif()
- file(INSTALL ${LICENSE_PATH} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
-endfunction()
-
-function(qt_modular_library NAME HASH)
- qt_modular_fetch_library(${NAME} ${HASH} TARGET_SOURCE_PATH)
- qt_modular_build_library(${TARGET_SOURCE_PATH})
-endfunction()