[qt5] Reduce duplication in modular build by extracting qt5modularscripts

This commit is contained in:
Robert Schumacher 2017-11-20 17:07:03 -08:00
parent 875bb9a661
commit eec26f68fc
60 changed files with 261 additions and 3354 deletions

4
ports/qt5/CONTROL Normal file
View File

@ -0,0 +1,4 @@
Source: qt5
Version: 5.9.2-1
Description: Qt5 Application Framework
Build-Depends: qt5base, qt5charts, qt5datavis3d, qt5declarative, qt5gamepad, qt5imageformats, qt5multimedia, qt5scxml, qt5serial, qt5speech, qt5svg, qt5tools, qt5virtualkeyboard, qt5websockets, qt53d, qt5winextras, qt5xmlpatterns

1
ports/qt5/portfile.cmake Normal file
View File

@ -0,0 +1 @@
SET(VCPKG_POLICY_EMPTY_PACKAGE enabled)

View File

@ -1,4 +1,4 @@
Source: qt53d
Version: 5.9.2-0
Description: Qt5 3d Module - Functionality for near-realtime simulation systems with support for 2D and 3D rendering
Build-Depends: qt5base
Build-Depends: qt5modularscripts, qt5base

View File

@ -1,157 +1,5 @@
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()
include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake)
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 "qt3d-5.9.2")
set(ARCHIVE_NAME "qt3d-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 1c7dbd4e557cdd183ec6e929aae5727ce2ffcb519517942b588594bb81a78cb3d732cde4dae58085a70ec2968a8c2443eae96536125c25938222ff7c89f4f9a2
)
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")
#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(PYTHON3)
get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY)
set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}")
set(_path "$ENV{PATH}")
#Configure debug
vcpkg_configure_qmake_debug(
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
)
#First generate the makefiles so we can modify them
vcpkg_build_qmake_debug(TARGETS sub-src-qmake_all)
#Store debug makefiles path
file(GLOB_RECURSE DEBUG_MAKEFILES ${DEBUG_DIR}/*Makefile*)
#Fix path to Qt5QmlDevTools
foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES})
vcpkg_replace_string(${DEBUG_MAKEFILE} "vcpkg\\installed\\${TARGET_TRIPLET}\\lib\\Qt5QmlDevToolsd.lib" "vcpkg\\installed\\${TARGET_TRIPLET}\\debug\\lib\\Qt5QmlDevToolsd.lib")
endforeach()
#Build debug
vcpkg_build_qmake_debug()
#Configure release
vcpkg_configure_qmake_release(
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
)
#First generate the makefiles so we can modify them
vcpkg_build_qmake_release(TARGETS sub-src-qmake_all)
#Store release makefile path
file(GLOB_RECURSE RELEASE_MAKEFILES ${RELEASE_DIR}/*Makefile*)
#Build release
vcpkg_build_qmake_release()
#Fix the cmake files if they exist
if(EXISTS ${RELEASE_DIR}/lib/cmake)
vcpkg_execute_required_process(
COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py
WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake
LOGNAME fix-cmake
)
endif()
#Set the correct install directory to packages
foreach(RELEASE_MAKEFILE ${RELEASE_MAKEFILES})
vcpkg_replace_string(${RELEASE_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}")
endforeach()
foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES})
vcpkg_replace_string(${DEBUG_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}")
endforeach()
#Install the module files
vcpkg_build_qmake_debug(TARGETS install)
vcpkg_build_qmake_release(TARGETS install)
#Reset the path to the baseline
set(ENV{PATH} "${_path}")
#Remove extra 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)
#Check if there are any libs left over; if not - delete the directory
file(GLOB RELEASE_LIBS ${CURRENT_PACKAGES_DIR}/lib/*)
if(NOT RELEASE_LIBS)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib)
endif()
endif()
if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
#Check if there are any libs left over; if not - delete the directory
file(GLOB DEBUG_LIBS ${CURRENT_PACKAGES_DIR}/lib/*)
if(NOT DEBUG_LIBS)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib)
endif()
endif()
#Move release and debug dlls to the correct directory
file(GLOB RELEASE_DLLS ${CURRENT_PACKAGES_DIR}/tools/qt5/*.dll)
file(GLOB DEBUG_DLLS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*.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/qt5/*)
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 ${DEBUG_DLLS})
#Check if there are any binaries left over; if not - delete the directory
file(GLOB DEBUG_BINS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*)
if(NOT DEBUG_BINS)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/tools)
endif()
endif()
#If there are no include files in the module - create an empty one to stop vcpkg from complaining
if(NOT EXISTS ${CURRENT_PACKAGES_DIR}/include)
file(WRITE ${CURRENT_PACKAGES_DIR}/include/.empty_${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")
endif()
file(INSTALL ${LICENSE_PATH} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/ RENAME copyright)
qt_modular_library(qt3d 1c7dbd4e557cdd183ec6e929aae5727ce2ffcb519517942b588594bb81a78cb3d732cde4dae58085a70ec2968a8c2443eae96536125c25938222ff7c89f4f9a2)

View File

@ -33,7 +33,7 @@ function(configure_qt)
-datadir ${CURRENT_PACKAGES_DIR}/share/qt5/debug
-plugindir ${CURRENT_PACKAGES_DIR}/debug/plugins
-qmldir ${CURRENT_PACKAGES_DIR}/debug/qml
-headerdir ${CURRENT_PACKAGES_DIR}/share/qt5/debug/include
-headerdir ${CURRENT_PACKAGES_DIR}/include
-I ${CURRENT_INSTALLED_DIR}/include
-L ${CURRENT_INSTALLED_DIR}/debug/lib
-platform ${PLATFORM}

View File

@ -77,13 +77,9 @@ 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})
set(QT_DEBUG_PREFIX_PATH ${CURRENT_INSTALLED_DIR})
set(QT_RELEASE_PREFIX_PATH ${CURRENT_INSTALLED_DIR})
configure_file(${CMAKE_CURRENT_LIST_DIR}/qt_debug.conf ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/qt.conf)
configure_file(${CMAKE_CURRENT_LIST_DIR}/qt_release.conf ${CURRENT_PACKAGES_DIR}/tools/qt5/qt.conf)
file(COPY ${CMAKE_CURRENT_LIST_DIR}/qt_debug.conf ${CMAKE_CURRENT_LIST_DIR}/qt_release.conf DESTINATION ${CURRENT_PACKAGES_DIR}/tools/qt5)
vcpkg_execute_required_process(
COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py
@ -92,5 +88,6 @@ vcpkg_execute_required_process(
)
vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT})
vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/qt5)
file(INSTALL ${SOURCE_PATH}/LICENSE.LGPLv3 DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5base RENAME copyright)
file(INSTALL ${SOURCE_PATH}/LICENSE.LGPLv3 DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5base RENAME copyright)

View File

@ -1,7 +1,7 @@
[Paths]
Prefix = ${QT_DEBUG_PREFIX_PATH}
Documentation = share/qt5/debug/doc
Headers = share/qt5/debug/include
Prefix = ${CURRENT_INSTALLED_DIR}
Documentation = share/qt5/doc
Headers = include
Libraries = debug/lib
Binaries = debug/tools/qt5
LibraryExecutables = debug/tools/qt5

View File

@ -1,5 +1,5 @@
[Paths]
Prefix = ${QT_RELEASE_PREFIX_PATH}
Prefix = ${CURRENT_INSTALLED_DIR}
Documentation = share/qt5/doc
Headers = include
Libraries = lib

View File

@ -1,4 +1,4 @@
Source: qt5charts
Version: 5.9.2-0
Description: Qt5 Charts Module - UI components for displaying charts, driven by static or dynamic data models
Build-Depends: qt5base
Build-Depends: qt5modularscripts, qt5base

View File

@ -1,57 +0,0 @@
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()

View File

@ -1,157 +1,5 @@
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()
include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake)
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 "qtcharts-5.9.2")
set(ARCHIVE_NAME "qtcharts-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 297547b565dd71b05237bb05ecc1abf1a774a4909668417e78bd65e805c1e47a456a5a06898fe06d4c4614118e4129e19893d4c77598667a9354ab969307a293
)
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")
#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(PYTHON3)
get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY)
set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}")
set(_path "$ENV{PATH}")
#Configure debug
vcpkg_configure_qmake_debug(
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
)
#First generate the makefiles so we can modify them
vcpkg_build_qmake_debug(TARGETS sub-src-qmake_all)
#Store debug makefiles path
file(GLOB_RECURSE DEBUG_MAKEFILES ${DEBUG_DIR}/*Makefile*)
#Fix path to Qt5QmlDevTools
foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES})
vcpkg_replace_string(${DEBUG_MAKEFILE} "vcpkg\\installed\\${TARGET_TRIPLET}\\lib\\Qt5QmlDevToolsd.lib" "vcpkg\\installed\\${TARGET_TRIPLET}\\debug\\lib\\Qt5QmlDevToolsd.lib")
endforeach()
#Build debug
vcpkg_build_qmake_debug()
#Configure release
vcpkg_configure_qmake_release(
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
)
#First generate the makefiles so we can modify them
vcpkg_build_qmake_release(TARGETS sub-src-qmake_all)
#Store release makefile path
file(GLOB_RECURSE RELEASE_MAKEFILES ${RELEASE_DIR}/*Makefile*)
#Build release
vcpkg_build_qmake_release()
#Fix the cmake files if they exist
if(EXISTS ${RELEASE_DIR}/lib/cmake)
vcpkg_execute_required_process(
COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py
WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake
LOGNAME fix-cmake
)
endif()
#Set the correct install directory to packages
foreach(RELEASE_MAKEFILE ${RELEASE_MAKEFILES})
vcpkg_replace_string(${RELEASE_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}")
endforeach()
foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES})
vcpkg_replace_string(${DEBUG_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}")
endforeach()
#Install the module files
vcpkg_build_qmake_debug(TARGETS install)
vcpkg_build_qmake_release(TARGETS install)
#Reset the path to the baseline
set(ENV{PATH} "${_path}")
#Remove extra 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)
#Check if there are any libs left over; if not - delete the directory
file(GLOB RELEASE_LIBS ${CURRENT_PACKAGES_DIR}/lib/*)
if(NOT RELEASE_LIBS)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib)
endif()
endif()
if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
#Check if there are any libs left over; if not - delete the directory
file(GLOB DEBUG_LIBS ${CURRENT_PACKAGES_DIR}/lib/*)
if(NOT DEBUG_LIBS)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib)
endif()
endif()
#Move release and debug dlls to the correct directory
file(GLOB RELEASE_DLLS ${CURRENT_PACKAGES_DIR}/tools/qt5/*.dll)
file(GLOB DEBUG_DLLS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*.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/qt5/*)
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 ${DEBUG_DLLS})
#Check if there are any binaries left over; if not - delete the directory
file(GLOB DEBUG_BINS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*)
if(NOT DEBUG_BINS)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/tools)
endif()
endif()
#If there are no include files in the module - create an empty one to stop vcpkg from complaining
if(NOT EXISTS ${CURRENT_PACKAGES_DIR}/include)
file(WRITE ${CURRENT_PACKAGES_DIR}/include/.empty_${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")
endif()
file(INSTALL ${LICENSE_PATH} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/ RENAME copyright)
qt_modular_library(qtcharts 297547b565dd71b05237bb05ecc1abf1a774a4909668417e78bd65e805c1e47a456a5a06898fe06d4c4614118e4129e19893d4c77598667a9354ab969307a293)

View File

@ -1,4 +1,4 @@
Source: qt5datavisualization3d
Source: qt5datavis3d
Version: 5.9.2-0
Description: Qt5 Data Visualization 3d Module - UI Components for creating 3D data visualizations
Build-Depends: qt5base
Build-Depends: qt5modularscripts, qt5base

View File

@ -0,0 +1,5 @@
include(vcpkg_common_functions)
include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake)
qt_modular_library(qtdatavis3d 5f173401ba2f0ebb4bbb1ff65053f1ece44a97a8bf1d9fc8d81540709c588e140c533d5f317d6a9109d538e38aa742d42bf00906f63d433811bc1c8526788dc3)

View File

@ -1,57 +0,0 @@
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()

View File

@ -1,157 +0,0 @@
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")
#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(PYTHON3)
get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY)
set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}")
set(_path "$ENV{PATH}")
#Configure debug
vcpkg_configure_qmake_debug(
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
)
#First generate the makefiles so we can modify them
vcpkg_build_qmake_debug(TARGETS sub-src-qmake_all)
#Store debug makefiles path
file(GLOB_RECURSE DEBUG_MAKEFILES ${DEBUG_DIR}/*Makefile*)
#Fix path to Qt5QmlDevTools
foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES})
vcpkg_replace_string(${DEBUG_MAKEFILE} "vcpkg\\installed\\${TARGET_TRIPLET}\\lib\\Qt5QmlDevToolsd.lib" "vcpkg\\installed\\${TARGET_TRIPLET}\\debug\\lib\\Qt5QmlDevToolsd.lib")
endforeach()
#Build debug
vcpkg_build_qmake_debug()
#Configure release
vcpkg_configure_qmake_release(
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
)
#First generate the makefiles so we can modify them
vcpkg_build_qmake_release(TARGETS sub-src-qmake_all)
#Store release makefile path
file(GLOB_RECURSE RELEASE_MAKEFILES ${RELEASE_DIR}/*Makefile*)
#Build release
vcpkg_build_qmake_release()
#Fix the cmake files if they exist
if(EXISTS ${RELEASE_DIR}/lib/cmake)
vcpkg_execute_required_process(
COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py
WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake
LOGNAME fix-cmake
)
endif()
#Set the correct install directory to packages
foreach(RELEASE_MAKEFILE ${RELEASE_MAKEFILES})
vcpkg_replace_string(${RELEASE_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}")
endforeach()
foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES})
vcpkg_replace_string(${DEBUG_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}")
endforeach()
#Install the module files
vcpkg_build_qmake_debug(TARGETS install)
vcpkg_build_qmake_release(TARGETS install)
#Reset the path to the baseline
set(ENV{PATH} "${_path}")
#Remove extra 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)
#Check if there are any libs left over; if not - delete the directory
file(GLOB RELEASE_LIBS ${CURRENT_PACKAGES_DIR}/lib/*)
if(NOT RELEASE_LIBS)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib)
endif()
endif()
if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
#Check if there are any libs left over; if not - delete the directory
file(GLOB DEBUG_LIBS ${CURRENT_PACKAGES_DIR}/lib/*)
if(NOT DEBUG_LIBS)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib)
endif()
endif()
#Move release and debug dlls to the correct directory
file(GLOB RELEASE_DLLS ${CURRENT_PACKAGES_DIR}/tools/qt5/*.dll)
file(GLOB DEBUG_DLLS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*.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/qt5/*)
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 ${DEBUG_DLLS})
#Check if there are any binaries left over; if not - delete the directory
file(GLOB DEBUG_BINS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*)
if(NOT DEBUG_BINS)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/tools)
endif()
endif()
#If there are no include files in the module - create an empty one to stop vcpkg from complaining
if(NOT EXISTS ${CURRENT_PACKAGES_DIR}/include)
file(WRITE ${CURRENT_PACKAGES_DIR}/include/.empty_${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")
endif()
file(INSTALL ${LICENSE_PATH} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/ RENAME copyright)

View File

@ -1,4 +1,4 @@
Source: qt5declarative
Version: 5.9.2-0
Description: Qt5 Declarative (Quick 2) Module. Includes QtQuick, QtQuickParticles, QtQuickWidgets, QtQml, and QtPacketProtocol.
Build-Depends: qt5base
Build-Depends: qt5modularscripts, qt5base

View File

@ -1,57 +0,0 @@
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()

View File

@ -1,160 +1,5 @@
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()
include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake)
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 "qtdeclarative-5.9.2")
set(ARCHIVE_NAME "qtdeclarative-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 49b8b50932b73ea39da14ac3425044193dfd64eabceadba379aa01cf2fc141177f9870c387caf1cf93ce09e8b197828a54b8d9fcefc4d9cdf400a6c6dd9a9e90
)
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")
#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(PYTHON3)
get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY)
set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}")
set(_path "$ENV{PATH}")
#Configure debug
vcpkg_configure_qmake_debug(
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
)
#First generate the makefiles so we can modify them
vcpkg_build_qmake_debug(TARGETS sub-src-qmake_all)
#Store debug makefiles path
file(GLOB_RECURSE DEBUG_MAKEFILES ${DEBUG_DIR}/*Makefile*)
#Fix path to Qt5QmlDevTools
foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES})
vcpkg_replace_string(${DEBUG_MAKEFILE} "vcpkg\\installed\\${TARGET_TRIPLET}\\lib\\Qt5QmlDevToolsd.lib" "vcpkg\\installed\\${TARGET_TRIPLET}\\debug\\lib\\Qt5QmlDevToolsd.lib")
endforeach()
#Build debug
vcpkg_build_qmake_debug()
#Configure release
vcpkg_configure_qmake_release(
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
)
#First generate the makefiles so we can modify them
vcpkg_build_qmake_release(TARGETS sub-src-qmake_all)
#Store release makefile path
file(GLOB_RECURSE RELEASE_MAKEFILES ${RELEASE_DIR}/*Makefile*)
#Build release
vcpkg_build_qmake_release()
#Fix the cmake files if they exist
if(EXISTS ${RELEASE_DIR}/lib/cmake)
vcpkg_execute_required_process(
COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py
WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake
LOGNAME fix-cmake
)
endif()
#Set the correct install directory to packages
foreach(RELEASE_MAKEFILE ${RELEASE_MAKEFILES})
vcpkg_replace_string(${RELEASE_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}")
endforeach()
foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES})
vcpkg_replace_string(${DEBUG_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}")
endforeach()
#Install the module files
vcpkg_build_qmake_debug(TARGETS install)
vcpkg_build_qmake_release(TARGETS install)
#Reset the path to the baseline
set(ENV{PATH} "${_path}")
#Remove extra 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)
#Check if there are any libs left over; if not - delete the directory
file(GLOB RELEASE_LIBS ${CURRENT_PACKAGES_DIR}/lib/*)
if(NOT RELEASE_LIBS)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib)
endif()
endif()
if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
#Check if there are any libs left over; if not - delete the directory
file(GLOB DEBUG_LIBS ${CURRENT_PACKAGES_DIR}/lib/*)
if(NOT DEBUG_LIBS)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib)
endif()
endif()
#Move release and debug dlls to the correct directory
file(GLOB RELEASE_DLLS ${CURRENT_PACKAGES_DIR}/tools/qt5/*.dll)
file(GLOB DEBUG_DLLS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*.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/qt5/*)
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 ${DEBUG_DLLS})
#Check if there are any binaries left over; if not - delete the directory
file(GLOB DEBUG_BINS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*)
if(NOT DEBUG_BINS)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/tools)
endif()
endif()
#If there are no include files in the module - create an empty one to stop vcpkg from complaining
if(NOT EXISTS ${CURRENT_PACKAGES_DIR}/include)
file(WRITE ${CURRENT_PACKAGES_DIR}/include/.empty_${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")
endif()
file(INSTALL ${LICENSE_PATH} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/ RENAME copyright)
#Fix incorrectly placed file(s)
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/Qt5QmlDevToolsd.lib ${CURRENT_PACKAGES_DIR}/debug/lib/Qt5QmlDevToolsd.lib)
qt_modular_library(qtdeclarative 49b8b50932b73ea39da14ac3425044193dfd64eabceadba379aa01cf2fc141177f9870c387caf1cf93ce09e8b197828a54b8d9fcefc4d9cdf400a6c6dd9a9e90)

View File

@ -1,4 +1,4 @@
Source: qt5gamepad
Version: 5.9.2-0
Description: Qt5 Gamepad Module - Enables Qt applications to support the use of gamepad hardware
Build-Depends: qt5base
Build-Depends: qt5modularscripts, qt5base

View File

@ -1,57 +0,0 @@
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()

View File

@ -1,157 +1,5 @@
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()
include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake)
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 "qtgamepad-5.9.2")
set(ARCHIVE_NAME "qtgamepad-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 398d6ff0268460358584a4ea8ba0588881970dcc1dff6c5aa91d1630065ba112c86d7a1fe96dceb8ff301b350aef7f74ad1ee6212048a4cdfb26ff5d944d6222
)
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")
#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(PYTHON3)
get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY)
set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}")
set(_path "$ENV{PATH}")
#Configure debug
vcpkg_configure_qmake_debug(
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
)
#First generate the makefiles so we can modify them
vcpkg_build_qmake_debug(TARGETS sub-src-qmake_all)
#Store debug makefiles path
file(GLOB_RECURSE DEBUG_MAKEFILES ${DEBUG_DIR}/*Makefile*)
#Fix path to Qt5QmlDevTools
foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES})
vcpkg_replace_string(${DEBUG_MAKEFILE} "vcpkg\\installed\\${TARGET_TRIPLET}\\lib\\Qt5QmlDevToolsd.lib" "vcpkg\\installed\\${TARGET_TRIPLET}\\debug\\lib\\Qt5QmlDevToolsd.lib")
endforeach()
#Build debug
vcpkg_build_qmake_debug()
#Configure release
vcpkg_configure_qmake_release(
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
)
#First generate the makefiles so we can modify them
vcpkg_build_qmake_release(TARGETS sub-src-qmake_all)
#Store release makefile path
file(GLOB_RECURSE RELEASE_MAKEFILES ${RELEASE_DIR}/*Makefile*)
#Build release
vcpkg_build_qmake_release()
#Fix the cmake files if they exist
if(EXISTS ${RELEASE_DIR}/lib/cmake)
vcpkg_execute_required_process(
COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py
WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake
LOGNAME fix-cmake
)
endif()
#Set the correct install directory to packages
foreach(RELEASE_MAKEFILE ${RELEASE_MAKEFILES})
vcpkg_replace_string(${RELEASE_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}")
endforeach()
foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES})
vcpkg_replace_string(${DEBUG_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}")
endforeach()
#Install the module files
vcpkg_build_qmake_debug(TARGETS install)
vcpkg_build_qmake_release(TARGETS install)
#Reset the path to the baseline
set(ENV{PATH} "${_path}")
#Remove extra 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)
#Check if there are any libs left over; if not - delete the directory
file(GLOB RELEASE_LIBS ${CURRENT_PACKAGES_DIR}/lib/*)
if(NOT RELEASE_LIBS)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib)
endif()
endif()
if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
#Check if there are any libs left over; if not - delete the directory
file(GLOB DEBUG_LIBS ${CURRENT_PACKAGES_DIR}/lib/*)
if(NOT DEBUG_LIBS)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib)
endif()
endif()
#Move release and debug dlls to the correct directory
file(GLOB RELEASE_DLLS ${CURRENT_PACKAGES_DIR}/tools/qt5/*.dll)
file(GLOB DEBUG_DLLS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*.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/qt5/*)
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 ${DEBUG_DLLS})
#Check if there are any binaries left over; if not - delete the directory
file(GLOB DEBUG_BINS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*)
if(NOT DEBUG_BINS)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/tools)
endif()
endif()
#If there are no include files in the module - create an empty one to stop vcpkg from complaining
if(NOT EXISTS ${CURRENT_PACKAGES_DIR}/include)
file(WRITE ${CURRENT_PACKAGES_DIR}/include/.empty_${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")
endif()
file(INSTALL ${LICENSE_PATH} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/ RENAME copyright)
qt_modular_library(qtgamepad 398d6ff0268460358584a4ea8ba0588881970dcc1dff6c5aa91d1630065ba112c86d7a1fe96dceb8ff301b350aef7f74ad1ee6212048a4cdfb26ff5d944d6222)

View File

@ -1,4 +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
Build-Depends: qt5modularscripts, qt5base

View File

@ -1,57 +0,0 @@
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()

View File

@ -1,157 +1,7 @@
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()
include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake)
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
message(FATAL_ERROR "Qt5 doesn't currently support static builds. Please use a dynamic triplet instead.")
endif()
qt_modular_library(qtimageformats 5f1b93c0e5fffa4c2c063d14c12ad97114a452b16814ca9ac45f00ec36308a09770b3b4d137cb5d19bd3aa3a6f576724084df5d0dad75236d49868af9243c9d2)
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")
#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(PYTHON3)
get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY)
set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}")
set(_path "$ENV{PATH}")
#Configure debug
vcpkg_configure_qmake_debug(
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
)
#First generate the makefiles so we can modify them
vcpkg_build_qmake_debug(TARGETS sub-src-qmake_all)
#Store debug makefiles path
file(GLOB_RECURSE DEBUG_MAKEFILES ${DEBUG_DIR}/*Makefile*)
#Fix path to Qt5QmlDevTools
foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES})
vcpkg_replace_string(${DEBUG_MAKEFILE} "vcpkg\\installed\\${TARGET_TRIPLET}\\lib\\Qt5QmlDevToolsd.lib" "vcpkg\\installed\\${TARGET_TRIPLET}\\debug\\lib\\Qt5QmlDevToolsd.lib")
endforeach()
#Build debug
vcpkg_build_qmake_debug()
#Configure release
vcpkg_configure_qmake_release(
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
)
#First generate the makefiles so we can modify them
vcpkg_build_qmake_release(TARGETS sub-src-qmake_all)
#Store release makefile path
file(GLOB_RECURSE RELEASE_MAKEFILES ${RELEASE_DIR}/*Makefile*)
#Build release
vcpkg_build_qmake_release()
#Fix the cmake files if they exist
if(EXISTS ${RELEASE_DIR}/lib/cmake)
vcpkg_execute_required_process(
COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py
WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake
LOGNAME fix-cmake
)
endif()
#Set the correct install directory to packages
foreach(RELEASE_MAKEFILE ${RELEASE_MAKEFILES})
vcpkg_replace_string(${RELEASE_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}")
endforeach()
foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES})
vcpkg_replace_string(${DEBUG_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}")
endforeach()
#Install the module files
vcpkg_build_qmake_debug(TARGETS install)
vcpkg_build_qmake_release(TARGETS install)
#Reset the path to the baseline
set(ENV{PATH} "${_path}")
#Remove extra 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)
#Check if there are any libs left over; if not - delete the directory
file(GLOB RELEASE_LIBS ${CURRENT_PACKAGES_DIR}/lib/*)
if(NOT RELEASE_LIBS)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib)
endif()
endif()
if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
#Check if there are any libs left over; if not - delete the directory
file(GLOB DEBUG_LIBS ${CURRENT_PACKAGES_DIR}/lib/*)
if(NOT DEBUG_LIBS)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib)
endif()
endif()
#Move release and debug dlls to the correct directory
file(GLOB RELEASE_DLLS ${CURRENT_PACKAGES_DIR}/tools/qt5/*.dll)
file(GLOB DEBUG_DLLS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*.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/qt5/*)
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 ${DEBUG_DLLS})
#Check if there are any binaries left over; if not - delete the directory
file(GLOB DEBUG_BINS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*)
if(NOT DEBUG_BINS)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/tools)
endif()
endif()
#If there are no include files in the module - create an empty one to stop vcpkg from complaining
if(NOT EXISTS ${CURRENT_PACKAGES_DIR}/include)
file(WRITE ${CURRENT_PACKAGES_DIR}/include/.empty_${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")
endif()
file(INSTALL ${LICENSE_PATH} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/ RENAME copyright)
set(VCPKG_POLICY_EMPTY_PACKAGE enabled)

View File

@ -0,0 +1,3 @@
Source: qt5modularscripts
Version: 0
Description: Vcpkg helpers to package qt5 modules

View File

@ -0,0 +1,9 @@
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)

View File

@ -0,0 +1,174 @@
set(_qt5base_port_dir "${CMAKE_CURRENT_LIST_DIR}")
function(qt_modular_library NAME HASH)
string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH)
if(BUILDTREES_PATH_LENGTH GREATER 45)
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()
set(SRCDIR_NAME "${NAME}-5.9.2")
set(ARCHIVE_NAME "${NAME}-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 ${HASH}
)
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")
#Store build paths
set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg")
set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel")
file(REMOVE_RECURSE "${DEBUG_DIR}" "${RELEASE_DIR}")
#Find Python and add it to the path
vcpkg_find_acquire_program(PYTHON3)
get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY)
set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}")
#Configure debug
vcpkg_configure_qmake_debug(
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
)
#First generate the makefiles so we can modify them
vcpkg_build_qmake_debug(TARGETS qmake_all)
#Store debug makefiles path
file(GLOB_RECURSE DEBUG_MAKEFILES ${DEBUG_DIR}/*Makefile*)
foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES})
file(READ "${DEBUG_MAKEFILE}" _contents)
string(REPLACE "zlib.lib" "zlibd.lib" _contents "${_contents}")
string(REPLACE "vcpkg\\installed\\${TARGET_TRIPLET}\\lib" "vcpkg\\installed\\${TARGET_TRIPLET}\\debug\\lib" _contents "${_contents}")
file(WRITE "${DEBUG_MAKEFILE}" "${_contents}")
endforeach()
#Build debug
vcpkg_build_qmake_debug()
#Configure release
vcpkg_configure_qmake_release(
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
)
#First generate the makefiles so we can modify them
vcpkg_build_qmake_release(TARGETS qmake_all)
#Store release makefile path
file(GLOB_RECURSE RELEASE_MAKEFILES ${RELEASE_DIR}/*Makefile*)
#Build release
vcpkg_build_qmake_release()
#Fix the cmake files if they exist
if(EXISTS ${RELEASE_DIR}/lib/cmake)
vcpkg_execute_required_process(
COMMAND ${PYTHON3} ${_qt5base_port_dir}/fixcmake.py
WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake
LOGNAME fix-cmake
)
endif()
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}" NATIVE_INSTALLED_DIR)
file(TO_NATIVE_PATH "${CURRENT_PACKAGES_DIR}" NATIVE_PACKAGES_DIR)
string(SUBSTRING "${NATIVE_INSTALLED_DIR}" 2 -1 INSTALLED_DIR_WITHOUT_DRIVE)
string(SUBSTRING "${NATIVE_PACKAGES_DIR}" 2 -1 PACKAGES_DIR_WITHOUT_DRIVE)
#Set the correct install directory to packages
foreach(MAKEFILE ${RELEASE_MAKEFILES} ${DEBUG_MAKEFILES})
vcpkg_replace_string(${MAKEFILE} "(INSTALL_ROOT)${INSTALLED_DIR_WITHOUT_DRIVE}" "(INSTALL_ROOT)${PACKAGES_DIR_WITHOUT_DRIVE}")
endforeach()
#Install the module files
vcpkg_build_qmake_debug(TARGETS install)
vcpkg_build_qmake_release(TARGETS install)
#Remove extra 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()
if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
endif()
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})
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 ${DEBUG_DLLS})
#Check if there are any binaries left over; if not - delete the directory
# file(GLOB DEBUG_BINS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*)
# if(NOT DEBUG_BINS)
# file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/tools)
# endif()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/tools)
endif()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/qt5/debug/include)
# file(GLOB DEBUG_LIBS "${CURRENT_PACKAGES_DIR}/debug/lib/*.lib")
# if(EXISTS ${CURRENT_PACKAGES_DIR}/bin)
# make_directory(${CURRENT_PACKAGES_DIR}/debug/bin)
# foreach(DEBUG_LIB ${DEBUG_LIBS})
# get_filename_component(DEBUG_STEM "${DEBUG_LIB}" NAME_WE)
# file(RENAME ${CURRENT_PACKAGES_DIR}/bin/${DEBUG_STEM}.dll ${CURRENT_PACKAGES_DIR}/debug/bin/${DEBUG_STEM}.dll)
# endforeach()
# endif()
vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT})
#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")
endif()
file(INSTALL ${LICENSE_PATH} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
endfunction()

View File

@ -1,4 +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
Build-Depends: qt5modularscripts, qt5base, qt5declarative

View File

@ -1,57 +0,0 @@
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()

View File

@ -1,157 +1,5 @@
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()
include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake)
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")
#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(PYTHON3)
get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY)
set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}")
set(_path "$ENV{PATH}")
#Configure debug
vcpkg_configure_qmake_debug(
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
)
#First generate the makefiles so we can modify them
vcpkg_build_qmake_debug(TARGETS sub-src-qmake_all)
#Store debug makefiles path
file(GLOB_RECURSE DEBUG_MAKEFILES ${DEBUG_DIR}/*Makefile*)
#Fix path to Qt5QmlDevTools
foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES})
vcpkg_replace_string(${DEBUG_MAKEFILE} "vcpkg\\installed\\${TARGET_TRIPLET}\\lib\\Qt5QmlDevToolsd.lib" "vcpkg\\installed\\${TARGET_TRIPLET}\\debug\\lib\\Qt5QmlDevToolsd.lib")
endforeach()
#Build debug
vcpkg_build_qmake_debug()
#Configure release
vcpkg_configure_qmake_release(
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
)
#First generate the makefiles so we can modify them
vcpkg_build_qmake_release(TARGETS sub-src-qmake_all)
#Store release makefile path
file(GLOB_RECURSE RELEASE_MAKEFILES ${RELEASE_DIR}/*Makefile*)
#Build release
vcpkg_build_qmake_release()
#Fix the cmake files if they exist
if(EXISTS ${RELEASE_DIR}/lib/cmake)
vcpkg_execute_required_process(
COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py
WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake
LOGNAME fix-cmake
)
endif()
#Set the correct install directory to packages
foreach(RELEASE_MAKEFILE ${RELEASE_MAKEFILES})
vcpkg_replace_string(${RELEASE_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}")
endforeach()
foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES})
vcpkg_replace_string(${DEBUG_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}")
endforeach()
#Install the module files
vcpkg_build_qmake_debug(TARGETS install)
vcpkg_build_qmake_release(TARGETS install)
#Reset the path to the baseline
set(ENV{PATH} "${_path}")
#Remove extra 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)
#Check if there are any libs left over; if not - delete the directory
file(GLOB RELEASE_LIBS ${CURRENT_PACKAGES_DIR}/lib/*)
if(NOT RELEASE_LIBS)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib)
endif()
endif()
if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
#Check if there are any libs left over; if not - delete the directory
file(GLOB DEBUG_LIBS ${CURRENT_PACKAGES_DIR}/lib/*)
if(NOT DEBUG_LIBS)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib)
endif()
endif()
#Move release and debug dlls to the correct directory
file(GLOB RELEASE_DLLS ${CURRENT_PACKAGES_DIR}/tools/qt5/*.dll)
file(GLOB DEBUG_DLLS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*.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/qt5/*)
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 ${DEBUG_DLLS})
#Check if there are any binaries left over; if not - delete the directory
file(GLOB DEBUG_BINS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*)
if(NOT DEBUG_BINS)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/tools)
endif()
endif()
#If there are no include files in the module - create an empty one to stop vcpkg from complaining
if(NOT EXISTS ${CURRENT_PACKAGES_DIR}/include)
file(WRITE ${CURRENT_PACKAGES_DIR}/include/.empty_${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")
endif()
file(INSTALL ${LICENSE_PATH} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/ RENAME copyright)
qt_modular_library(qtmultimedia b9fab874706440e97185475bfd0ad769c23d5ddbff5086cc0da9783777e81ed8140fb06fa0e7536ebfb67f2c9db39e1b9f3c2241834e74a9e1fb6ffd5cb7af11)

View File

@ -1,4 +1,4 @@
Source: qt5scxml
Version: 5.9.2-0
Description: Qt5 SCXML Module - Provides classes and tools for creating state machines from SCXML files and embedding them in applications
Build-Depends: qt5base
Build-Depends: qt5modularscripts, qt5base, qt5declarative

View File

@ -1,57 +0,0 @@
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()

View File

@ -1,157 +1,5 @@
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()
include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake)
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 "qtscxml-5.9.2")
set(ARCHIVE_NAME "qtscxml-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 c33db992ab456e5dd8b9be65c5619c503048106bbb1839b0930f2d4df36eed0780dfa1fc2912d7758aa72195269e59cbe8826cbaa414c2f339ca66c565809c88
)
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")
#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(PYTHON3)
get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY)
set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}")
set(_path "$ENV{PATH}")
#Configure debug
vcpkg_configure_qmake_debug(
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
)
#First generate the makefiles so we can modify them
vcpkg_build_qmake_debug(TARGETS sub-src-qmake_all)
#Store debug makefiles path
file(GLOB_RECURSE DEBUG_MAKEFILES ${DEBUG_DIR}/*Makefile*)
#Fix path to Qt5QmlDevTools
foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES})
vcpkg_replace_string(${DEBUG_MAKEFILE} "vcpkg\\installed\\${TARGET_TRIPLET}\\lib\\Qt5QmlDevToolsd.lib" "vcpkg\\installed\\${TARGET_TRIPLET}\\debug\\lib\\Qt5QmlDevToolsd.lib")
endforeach()
#Build debug
vcpkg_build_qmake_debug()
#Configure release
vcpkg_configure_qmake_release(
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
)
#First generate the makefiles so we can modify them
vcpkg_build_qmake_release(TARGETS sub-src-qmake_all)
#Store release makefile path
file(GLOB_RECURSE RELEASE_MAKEFILES ${RELEASE_DIR}/*Makefile*)
#Build release
vcpkg_build_qmake_release()
#Fix the cmake files if they exist
if(EXISTS ${RELEASE_DIR}/lib/cmake)
vcpkg_execute_required_process(
COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py
WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake
LOGNAME fix-cmake
)
endif()
#Set the correct install directory to packages
foreach(RELEASE_MAKEFILE ${RELEASE_MAKEFILES})
vcpkg_replace_string(${RELEASE_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}")
endforeach()
foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES})
vcpkg_replace_string(${DEBUG_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}")
endforeach()
#Install the module files
vcpkg_build_qmake_debug(TARGETS install)
vcpkg_build_qmake_release(TARGETS install)
#Reset the path to the baseline
set(ENV{PATH} "${_path}")
#Remove extra 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)
#Check if there are any libs left over; if not - delete the directory
file(GLOB RELEASE_LIBS ${CURRENT_PACKAGES_DIR}/lib/*)
if(NOT RELEASE_LIBS)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib)
endif()
endif()
if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
#Check if there are any libs left over; if not - delete the directory
file(GLOB DEBUG_LIBS ${CURRENT_PACKAGES_DIR}/lib/*)
if(NOT DEBUG_LIBS)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib)
endif()
endif()
#Move release and debug dlls to the correct directory
file(GLOB RELEASE_DLLS ${CURRENT_PACKAGES_DIR}/tools/qt5/*.dll)
file(GLOB DEBUG_DLLS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*.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/qt5/*)
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 ${DEBUG_DLLS})
#Check if there are any binaries left over; if not - delete the directory
file(GLOB DEBUG_BINS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*)
if(NOT DEBUG_BINS)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/tools)
endif()
endif()
#If there are no include files in the module - create an empty one to stop vcpkg from complaining
if(NOT EXISTS ${CURRENT_PACKAGES_DIR}/include)
file(WRITE ${CURRENT_PACKAGES_DIR}/include/.empty_${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")
endif()
file(INSTALL ${LICENSE_PATH} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/ RENAME copyright)
qt_modular_library(qtscxml c33db992ab456e5dd8b9be65c5619c503048106bbb1839b0930f2d4df36eed0780dfa1fc2912d7758aa72195269e59cbe8826cbaa414c2f339ca66c565809c88)

View File

@ -1,4 +1,4 @@
Source: qt5serial
Version: 5.9.2-0
Description: Qt5 Serial Port - provides access to hardware and virtual serial ports
Build-Depends: qt5base
Build-Depends: qt5modularscripts, qt5base

View File

@ -1,57 +0,0 @@
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()

View File

@ -1,157 +1,5 @@
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()
include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake)
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 "qtserial-5.9.2")
set(ARCHIVE_NAME "qtserialport-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 cc8899c1ae2ed9fd8cf1c213ab7efaec12b3b16836006fdbf74cb7ea457705505a13e82c2f2873ee9426ae66473ec42259f4e728de64576ee44420f116cc433d
)
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")
#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(PYTHON3)
get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY)
set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}")
set(_path "$ENV{PATH}")
#Configure debug
vcpkg_configure_qmake_debug(
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
)
#First generate the makefiles so we can modify them
vcpkg_build_qmake_debug(TARGETS sub-src-qmake_all)
#Store debug makefiles path
file(GLOB_RECURSE DEBUG_MAKEFILES ${DEBUG_DIR}/*Makefile*)
#Fix path to Qt5QmlDevTools
foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES})
vcpkg_replace_string(${DEBUG_MAKEFILE} "vcpkg\\installed\\${TARGET_TRIPLET}\\lib\\Qt5QmlDevToolsd.lib" "vcpkg\\installed\\${TARGET_TRIPLET}\\debug\\lib\\Qt5QmlDevToolsd.lib")
endforeach()
#Build debug
vcpkg_build_qmake_debug()
#Configure release
vcpkg_configure_qmake_release(
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
)
#First generate the makefiles so we can modify them
vcpkg_build_qmake_release(TARGETS sub-src-qmake_all)
#Store release makefile path
file(GLOB_RECURSE RELEASE_MAKEFILES ${RELEASE_DIR}/*Makefile*)
#Build release
vcpkg_build_qmake_release()
#Fix the cmake files if they exist
if(EXISTS ${RELEASE_DIR}/lib/cmake)
vcpkg_execute_required_process(
COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py
WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake
LOGNAME fix-cmake
)
endif()
#Set the correct install directory to packages
foreach(RELEASE_MAKEFILE ${RELEASE_MAKEFILES})
vcpkg_replace_string(${RELEASE_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}")
endforeach()
foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES})
vcpkg_replace_string(${DEBUG_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}")
endforeach()
#Install the module files
vcpkg_build_qmake_debug(TARGETS install)
vcpkg_build_qmake_release(TARGETS install)
#Reset the path to the baseline
set(ENV{PATH} "${_path}")
#Remove extra 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)
#Check if there are any libs left over; if not - delete the directory
file(GLOB RELEASE_LIBS ${CURRENT_PACKAGES_DIR}/lib/*)
if(NOT RELEASE_LIBS)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib)
endif()
endif()
if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
#Check if there are any libs left over; if not - delete the directory
file(GLOB DEBUG_LIBS ${CURRENT_PACKAGES_DIR}/lib/*)
if(NOT DEBUG_LIBS)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib)
endif()
endif()
#Move release and debug dlls to the correct directory
file(GLOB RELEASE_DLLS ${CURRENT_PACKAGES_DIR}/tools/qt5/*.dll)
file(GLOB DEBUG_DLLS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*.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/qt5/*)
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 ${DEBUG_DLLS})
#Check if there are any binaries left over; if not - delete the directory
file(GLOB DEBUG_BINS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*)
if(NOT DEBUG_BINS)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/tools)
endif()
endif()
#If there are no include files in the module - create an empty one to stop vcpkg from complaining
if(NOT EXISTS ${CURRENT_PACKAGES_DIR}/include)
file(WRITE ${CURRENT_PACKAGES_DIR}/include/.empty_${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")
endif()
file(INSTALL ${LICENSE_PATH} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/ RENAME copyright)
qt_modular_library(qtserialport cc8899c1ae2ed9fd8cf1c213ab7efaec12b3b16836006fdbf74cb7ea457705505a13e82c2f2873ee9426ae66473ec42259f4e728de64576ee44420f116cc433d)

View File

@ -1,4 +1,4 @@
Source: qt5speech
Version: 5.9.2-0
Description: Qt5 Speech Module
Build-Depends: qt5base, atlmfc
Build-Depends: qt5modularscripts, qt5base, atlmfc

View File

@ -1,57 +0,0 @@
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()

View File

@ -1,157 +1,5 @@
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()
include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake)
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 "qtspeech-5.9.2")
set(ARCHIVE_NAME "qtspeech-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 8213ad13d33732fee3fc5b5e408b870970a3003d461be24195222e1d1209210039d1d0cd2f3c537a0db62629fb297d88b33ed4734ecb6c8d74f5406a87e7e0c0
)
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")
#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(PYTHON3)
get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY)
set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}")
set(_path "$ENV{PATH}")
#Configure debug
vcpkg_configure_qmake_debug(
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
)
#First generate the makefiles so we can modify them
vcpkg_build_qmake_debug(TARGETS sub-src-qmake_all)
#Store debug makefiles path
file(GLOB_RECURSE DEBUG_MAKEFILES ${DEBUG_DIR}/*Makefile*)
#Fix path to Qt5QmlDevTools
foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES})
vcpkg_replace_string(${DEBUG_MAKEFILE} "vcpkg\\installed\\${TARGET_TRIPLET}\\lib\\Qt5QmlDevToolsd.lib" "vcpkg\\installed\\${TARGET_TRIPLET}\\debug\\lib\\Qt5QmlDevToolsd.lib")
endforeach()
#Build debug
vcpkg_build_qmake_debug()
#Configure release
vcpkg_configure_qmake_release(
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
)
#First generate the makefiles so we can modify them
vcpkg_build_qmake_release(TARGETS sub-src-qmake_all)
#Store release makefile path
file(GLOB_RECURSE RELEASE_MAKEFILES ${RELEASE_DIR}/*Makefile*)
#Build release
vcpkg_build_qmake_release()
#Fix the cmake files if they exist
if(EXISTS ${RELEASE_DIR}/lib/cmake)
vcpkg_execute_required_process(
COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py
WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake
LOGNAME fix-cmake
)
endif()
#Set the correct install directory to packages
foreach(RELEASE_MAKEFILE ${RELEASE_MAKEFILES})
vcpkg_replace_string(${RELEASE_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}")
endforeach()
foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES})
vcpkg_replace_string(${DEBUG_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}")
endforeach()
#Install the module files
vcpkg_build_qmake_debug(TARGETS install)
vcpkg_build_qmake_release(TARGETS install)
#Reset the path to the baseline
set(ENV{PATH} "${_path}")
#Remove extra 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)
#Check if there are any libs left over; if not - delete the directory
file(GLOB RELEASE_LIBS ${CURRENT_PACKAGES_DIR}/lib/*)
if(NOT RELEASE_LIBS)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib)
endif()
endif()
if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
#Check if there are any libs left over; if not - delete the directory
file(GLOB DEBUG_LIBS ${CURRENT_PACKAGES_DIR}/lib/*)
if(NOT DEBUG_LIBS)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib)
endif()
endif()
#Move release and debug dlls to the correct directory
file(GLOB RELEASE_DLLS ${CURRENT_PACKAGES_DIR}/tools/qt5/*.dll)
file(GLOB DEBUG_DLLS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*.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/qt5/*)
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 ${DEBUG_DLLS})
#Check if there are any binaries left over; if not - delete the directory
file(GLOB DEBUG_BINS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*)
if(NOT DEBUG_BINS)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/tools)
endif()
endif()
#If there are no include files in the module - create an empty one to stop vcpkg from complaining
if(NOT EXISTS ${CURRENT_PACKAGES_DIR}/include)
file(WRITE ${CURRENT_PACKAGES_DIR}/include/.empty_${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")
endif()
file(INSTALL ${LICENSE_PATH} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/ RENAME copyright)
qt_modular_library(qtspeech 8213ad13d33732fee3fc5b5e408b870970a3003d461be24195222e1d1209210039d1d0cd2f3c537a0db62629fb297d88b33ed4734ecb6c8d74f5406a87e7e0c0)

View File

@ -1,4 +1,4 @@
Source: qt5svg
Version: 5.9.2-0
Description: Qt5 SVG Module - provides classes for displaying the contents of SVG files
Build-Depends: qt5base
Build-Depends: qt5modularscripts, qt5base

View File

@ -1,57 +0,0 @@
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()

View File

@ -1,157 +1,5 @@
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()
include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake)
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 "qtsvg-5.9.2")
set(ARCHIVE_NAME "qtsvg-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 c21c5a12fa10ff9f91deda88c99c995ee2138bdffa21c793b0c42f25155f01f87ede5206624b9d82713649f8cf1cfdb95f1d5b7e792de62f3848d3a9ec665fdd
)
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")
#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(PYTHON3)
get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY)
set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}")
set(_path "$ENV{PATH}")
#Configure debug
vcpkg_configure_qmake_debug(
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
)
#First generate the makefiles so we can modify them
vcpkg_build_qmake_debug(TARGETS sub-src-qmake_all)
#Store debug makefiles path
file(GLOB_RECURSE DEBUG_MAKEFILES ${DEBUG_DIR}/*Makefile*)
#Fix path to Qt5QmlDevTools
foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES})
vcpkg_replace_string(${DEBUG_MAKEFILE} "vcpkg\\installed\\${TARGET_TRIPLET}\\lib\\Qt5QmlDevToolsd.lib" "vcpkg\\installed\\${TARGET_TRIPLET}\\debug\\lib\\Qt5QmlDevToolsd.lib")
endforeach()
#Build debug
vcpkg_build_qmake_debug()
#Configure release
vcpkg_configure_qmake_release(
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
)
#First generate the makefiles so we can modify them
vcpkg_build_qmake_release(TARGETS sub-src-qmake_all)
#Store release makefile path
file(GLOB_RECURSE RELEASE_MAKEFILES ${RELEASE_DIR}/*Makefile*)
#Build release
vcpkg_build_qmake_release()
#Fix the cmake files if they exist
if(EXISTS ${RELEASE_DIR}/lib/cmake)
vcpkg_execute_required_process(
COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py
WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake
LOGNAME fix-cmake
)
endif()
#Set the correct install directory to packages
foreach(RELEASE_MAKEFILE ${RELEASE_MAKEFILES})
vcpkg_replace_string(${RELEASE_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}")
endforeach()
foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES})
vcpkg_replace_string(${DEBUG_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}")
endforeach()
#Install the module files
vcpkg_build_qmake_debug(TARGETS install)
vcpkg_build_qmake_release(TARGETS install)
#Reset the path to the baseline
set(ENV{PATH} "${_path}")
#Remove extra 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)
#Check if there are any libs left over; if not - delete the directory
file(GLOB RELEASE_LIBS ${CURRENT_PACKAGES_DIR}/lib/*)
if(NOT RELEASE_LIBS)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib)
endif()
endif()
if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
#Check if there are any libs left over; if not - delete the directory
file(GLOB DEBUG_LIBS ${CURRENT_PACKAGES_DIR}/lib/*)
if(NOT DEBUG_LIBS)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib)
endif()
endif()
#Move release and debug dlls to the correct directory
file(GLOB RELEASE_DLLS ${CURRENT_PACKAGES_DIR}/tools/qt5/*.dll)
file(GLOB DEBUG_DLLS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*.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/qt5/*)
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 ${DEBUG_DLLS})
#Check if there are any binaries left over; if not - delete the directory
file(GLOB DEBUG_BINS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*)
if(NOT DEBUG_BINS)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/tools)
endif()
endif()
#If there are no include files in the module - create an empty one to stop vcpkg from complaining
if(NOT EXISTS ${CURRENT_PACKAGES_DIR}/include)
file(WRITE ${CURRENT_PACKAGES_DIR}/include/.empty_${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")
endif()
file(INSTALL ${LICENSE_PATH} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/ RENAME copyright)
qt_modular_library(qtsvg c21c5a12fa10ff9f91deda88c99c995ee2138bdffa21c793b0c42f25155f01f87ede5206624b9d82713649f8cf1cfdb95f1d5b7e792de62f3848d3a9ec665fdd)

View File

@ -1,4 +1,4 @@
Source: qt5tools
Version: 5.9.2-0
Description: Qt5 Tools Module; Includes deployment tools and helpers, Qt Designer, Assistant, and other applications
Build-Depends: qt5base, qt5declarative
Build-Depends: qt5modularscripts, qt5base, qt5declarative

View File

@ -1,57 +0,0 @@
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()

View File

@ -1,157 +1,5 @@
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()
include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake)
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 "qttools-5.9.2")
set(ARCHIVE_NAME "qttools-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 afce063e167de96dfa264cfd27dc8d80c23ef091a30f4f8119575cae83f39716c3b332427630b340f518b82d6396cca1893f28e00f3c667ba201d7e4fc2aefe1
)
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")
#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(PYTHON3)
get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY)
set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}")
set(_path "$ENV{PATH}")
#Configure debug
vcpkg_configure_qmake_debug(
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
)
#First generate the makefiles so we can modify them
vcpkg_build_qmake_debug(TARGETS sub-src-qmake_all)
#Store debug makefiles path
file(GLOB_RECURSE DEBUG_MAKEFILES ${DEBUG_DIR}/*Makefile*)
#Fix path to Qt5QmlDevTools
foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES})
vcpkg_replace_string(${DEBUG_MAKEFILE} "vcpkg\\installed\\${TARGET_TRIPLET}\\lib\\Qt5QmlDevToolsd.lib" "vcpkg\\installed\\${TARGET_TRIPLET}\\debug\\lib\\Qt5QmlDevToolsd.lib")
endforeach()
#Build debug
vcpkg_build_qmake_debug()
#Configure release
vcpkg_configure_qmake_release(
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
)
#First generate the makefiles so we can modify them
vcpkg_build_qmake_release(TARGETS sub-src-qmake_all)
#Store release makefile path
file(GLOB_RECURSE RELEASE_MAKEFILES ${RELEASE_DIR}/*Makefile*)
#Build release
vcpkg_build_qmake_release()
#Fix the cmake files if they exist
if(EXISTS ${RELEASE_DIR}/lib/cmake)
vcpkg_execute_required_process(
COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py
WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake
LOGNAME fix-cmake
)
endif()
#Set the correct install directory to packages
foreach(RELEASE_MAKEFILE ${RELEASE_MAKEFILES})
vcpkg_replace_string(${RELEASE_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}")
endforeach()
foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES})
vcpkg_replace_string(${DEBUG_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}")
endforeach()
#Install the module files
vcpkg_build_qmake_debug(TARGETS install)
vcpkg_build_qmake_release(TARGETS install)
#Reset the path to the baseline
set(ENV{PATH} "${_path}")
#Remove extra 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)
#Check if there are any libs left over; if not - delete the directory
file(GLOB RELEASE_LIBS ${CURRENT_PACKAGES_DIR}/lib/*)
if(NOT RELEASE_LIBS)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib)
endif()
endif()
if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
#Check if there are any libs left over; if not - delete the directory
file(GLOB DEBUG_LIBS ${CURRENT_PACKAGES_DIR}/lib/*)
if(NOT DEBUG_LIBS)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib)
endif()
endif()
#Move release and debug dlls to the correct directory
file(GLOB RELEASE_DLLS ${CURRENT_PACKAGES_DIR}/tools/qt5/*.dll)
file(GLOB DEBUG_DLLS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*.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/qt5/*)
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 ${DEBUG_DLLS})
#Check if there are any binaries left over; if not - delete the directory
file(GLOB DEBUG_BINS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*)
if(NOT DEBUG_BINS)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/tools)
endif()
endif()
#If there are no include files in the module - create an empty one to stop vcpkg from complaining
if(NOT EXISTS ${CURRENT_PACKAGES_DIR}/include)
file(WRITE ${CURRENT_PACKAGES_DIR}/include/.empty_${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")
endif()
file(INSTALL ${LICENSE_PATH} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/ RENAME copyright)
qt_modular_library(qttools afce063e167de96dfa264cfd27dc8d80c23ef091a30f4f8119575cae83f39716c3b332427630b340f518b82d6396cca1893f28e00f3c667ba201d7e4fc2aefe1)

View File

@ -1,4 +1,4 @@
Source: qt5virtualkeyboard
Version: 5.9.2-0
Description: Qt5 Virtual Keyboard Module - A framework for implementing different input methods. Supports localized keyboard layouts and custom visual themes
Build-Depends: qt5base
Build-Depends: qt5modularscripts, qt5base

View File

@ -1,57 +0,0 @@
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()

View File

@ -1,157 +1,7 @@
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()
include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake)
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
message(FATAL_ERROR "Qt5 doesn't currently support static builds. Please use a dynamic triplet instead.")
endif()
qt_modular_library(qtvirtualkeyboard f8c39b789e877e60389ee9aab4a5c17e6018093f72fc57f526ce2584183135206306d4d5a7c7551a6de45969aa6f55444bb39f4ea3324cdf10611533f0bc2b22)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR})
set(SRCDIR_NAME "qtvirtualkeyboard-5.9.2")
set(ARCHIVE_NAME "qtvirtualkeyboard-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 f8c39b789e877e60389ee9aab4a5c17e6018093f72fc57f526ce2584183135206306d4d5a7c7551a6de45969aa6f55444bb39f4ea3324cdf10611533f0bc2b22
)
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")
#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(PYTHON3)
get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY)
set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}")
set(_path "$ENV{PATH}")
#Configure debug
vcpkg_configure_qmake_debug(
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
)
#First generate the makefiles so we can modify them
vcpkg_build_qmake_debug(TARGETS sub-src-qmake_all)
#Store debug makefiles path
file(GLOB_RECURSE DEBUG_MAKEFILES ${DEBUG_DIR}/*Makefile*)
#Fix path to Qt5QmlDevTools
foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES})
vcpkg_replace_string(${DEBUG_MAKEFILE} "vcpkg\\installed\\${TARGET_TRIPLET}\\lib\\Qt5QmlDevToolsd.lib" "vcpkg\\installed\\${TARGET_TRIPLET}\\debug\\lib\\Qt5QmlDevToolsd.lib")
endforeach()
#Build debug
vcpkg_build_qmake_debug()
#Configure release
vcpkg_configure_qmake_release(
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
)
#First generate the makefiles so we can modify them
vcpkg_build_qmake_release(TARGETS sub-src-qmake_all)
#Store release makefile path
file(GLOB_RECURSE RELEASE_MAKEFILES ${RELEASE_DIR}/*Makefile*)
#Build release
vcpkg_build_qmake_release()
#Fix the cmake files if they exist
if(EXISTS ${RELEASE_DIR}/lib/cmake)
vcpkg_execute_required_process(
COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py
WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake
LOGNAME fix-cmake
)
endif()
#Set the correct install directory to packages
foreach(RELEASE_MAKEFILE ${RELEASE_MAKEFILES})
vcpkg_replace_string(${RELEASE_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}")
endforeach()
foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES})
vcpkg_replace_string(${DEBUG_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}")
endforeach()
#Install the module files
vcpkg_build_qmake_debug(TARGETS install)
vcpkg_build_qmake_release(TARGETS install)
#Reset the path to the baseline
set(ENV{PATH} "${_path}")
#Remove extra 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)
#Check if there are any libs left over; if not - delete the directory
file(GLOB RELEASE_LIBS ${CURRENT_PACKAGES_DIR}/lib/*)
if(NOT RELEASE_LIBS)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib)
endif()
endif()
if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
#Check if there are any libs left over; if not - delete the directory
file(GLOB DEBUG_LIBS ${CURRENT_PACKAGES_DIR}/lib/*)
if(NOT DEBUG_LIBS)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib)
endif()
endif()
#Move release and debug dlls to the correct directory
file(GLOB RELEASE_DLLS ${CURRENT_PACKAGES_DIR}/tools/qt5/*.dll)
file(GLOB DEBUG_DLLS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*.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/qt5/*)
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 ${DEBUG_DLLS})
#Check if there are any binaries left over; if not - delete the directory
file(GLOB DEBUG_BINS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*)
if(NOT DEBUG_BINS)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/tools)
endif()
endif()
#If there are no include files in the module - create an empty one to stop vcpkg from complaining
if(NOT EXISTS ${CURRENT_PACKAGES_DIR}/include)
file(WRITE ${CURRENT_PACKAGES_DIR}/include/.empty_${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")
endif()
file(INSTALL ${LICENSE_PATH} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/ RENAME copyright)
set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled)

View File

@ -1,4 +1,4 @@
Source: qt5websockets
Version: 5.9.2-0
Description: Qt5 Web Sockets Module - provides WebSocket communication compliant with RFC 6455
Build-Depends: qt5base
Build-Depends: qt5modularscripts, qt5base

View File

@ -1,57 +0,0 @@
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()

View File

@ -1,157 +1,5 @@
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()
include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake)
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 "qtwebsockets-5.9.2")
set(ARCHIVE_NAME "qtwebsockets-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 9330d6806251bc77d4c2a497a31b1b0e42a1e6bfe3ea7c00cee123052e9e1f9080e33cf4dfcd6ee6e4732c62f41257a77ec25ad607528f4e8ebe61ccaee3e159
)
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")
#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(PYTHON3)
get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY)
set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}")
set(_path "$ENV{PATH}")
#Configure debug
vcpkg_configure_qmake_debug(
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
)
#First generate the makefiles so we can modify them
vcpkg_build_qmake_debug(TARGETS sub-src-qmake_all)
#Store debug makefiles path
file(GLOB_RECURSE DEBUG_MAKEFILES ${DEBUG_DIR}/*Makefile*)
#Fix path to Qt5QmlDevTools
foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES})
vcpkg_replace_string(${DEBUG_MAKEFILE} "vcpkg\\installed\\${TARGET_TRIPLET}\\lib\\Qt5QmlDevToolsd.lib" "vcpkg\\installed\\${TARGET_TRIPLET}\\debug\\lib\\Qt5QmlDevToolsd.lib")
endforeach()
#Build debug
vcpkg_build_qmake_debug()
#Configure release
vcpkg_configure_qmake_release(
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
)
#First generate the makefiles so we can modify them
vcpkg_build_qmake_release(TARGETS sub-src-qmake_all)
#Store release makefile path
file(GLOB_RECURSE RELEASE_MAKEFILES ${RELEASE_DIR}/*Makefile*)
#Build release
vcpkg_build_qmake_release()
#Fix the cmake files if they exist
if(EXISTS ${RELEASE_DIR}/lib/cmake)
vcpkg_execute_required_process(
COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py
WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake
LOGNAME fix-cmake
)
endif()
#Set the correct install directory to packages
foreach(RELEASE_MAKEFILE ${RELEASE_MAKEFILES})
vcpkg_replace_string(${RELEASE_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}")
endforeach()
foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES})
vcpkg_replace_string(${DEBUG_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}")
endforeach()
#Install the module files
vcpkg_build_qmake_debug(TARGETS install)
vcpkg_build_qmake_release(TARGETS install)
#Reset the path to the baseline
set(ENV{PATH} "${_path}")
#Remove extra 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)
#Check if there are any libs left over; if not - delete the directory
file(GLOB RELEASE_LIBS ${CURRENT_PACKAGES_DIR}/lib/*)
if(NOT RELEASE_LIBS)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib)
endif()
endif()
if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
#Check if there are any libs left over; if not - delete the directory
file(GLOB DEBUG_LIBS ${CURRENT_PACKAGES_DIR}/lib/*)
if(NOT DEBUG_LIBS)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib)
endif()
endif()
#Move release and debug dlls to the correct directory
file(GLOB RELEASE_DLLS ${CURRENT_PACKAGES_DIR}/tools/qt5/*.dll)
file(GLOB DEBUG_DLLS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*.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/qt5/*)
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 ${DEBUG_DLLS})
#Check if there are any binaries left over; if not - delete the directory
file(GLOB DEBUG_BINS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*)
if(NOT DEBUG_BINS)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/tools)
endif()
endif()
#If there are no include files in the module - create an empty one to stop vcpkg from complaining
if(NOT EXISTS ${CURRENT_PACKAGES_DIR}/include)
file(WRITE ${CURRENT_PACKAGES_DIR}/include/.empty_${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")
endif()
file(INSTALL ${LICENSE_PATH} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/ RENAME copyright)
qt_modular_library(qtwebsockets 9330d6806251bc77d4c2a497a31b1b0e42a1e6bfe3ea7c00cee123052e9e1f9080e33cf4dfcd6ee6e4732c62f41257a77ec25ad607528f4e8ebe61ccaee3e159)

View File

@ -1,4 +1,4 @@
Source: qt5winextras
Version: 5.9.2-0
Description: Qt5 Windows Extras Module. Provides platform-specific APIs for Windows.
Build-Depends: qt5base, atlmfc
Build-Depends: qt5modularscripts, qt5base, atlmfc

View File

@ -1,57 +0,0 @@
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()

View File

@ -1,157 +1,5 @@
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()
include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake)
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 "qtwinextras-5.9.2")
set(ARCHIVE_NAME "qtwinextras-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 dbfb89833cc291fade8e9fe2ad9c7b7a78c2032de8dcbca1049d637f829811b99e1852ae39ca73a6eac2960df168765bee28023bb723e69c87e2f3bb50b7ef02
)
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")
#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(PYTHON3)
get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY)
set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}")
set(_path "$ENV{PATH}")
#Configure debug
vcpkg_configure_qmake_debug(
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
)
#First generate the makefiles so we can modify them
vcpkg_build_qmake_debug(TARGETS sub-src-qmake_all)
#Store debug makefiles path
file(GLOB_RECURSE DEBUG_MAKEFILES ${DEBUG_DIR}/*Makefile*)
#Fix path to Qt5QmlDevTools
foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES})
vcpkg_replace_string(${DEBUG_MAKEFILE} "vcpkg\\installed\\${TARGET_TRIPLET}\\lib\\Qt5QmlDevToolsd.lib" "vcpkg\\installed\\${TARGET_TRIPLET}\\debug\\lib\\Qt5QmlDevToolsd.lib")
endforeach()
#Build debug
vcpkg_build_qmake_debug()
#Configure release
vcpkg_configure_qmake_release(
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
)
#First generate the makefiles so we can modify them
vcpkg_build_qmake_release(TARGETS sub-src-qmake_all)
#Store release makefile path
file(GLOB_RECURSE RELEASE_MAKEFILES ${RELEASE_DIR}/*Makefile*)
#Build release
vcpkg_build_qmake_release()
#Fix the cmake files if they exist
if(EXISTS ${RELEASE_DIR}/lib/cmake)
vcpkg_execute_required_process(
COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py
WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake
LOGNAME fix-cmake
)
endif()
#Set the correct install directory to packages
foreach(RELEASE_MAKEFILE ${RELEASE_MAKEFILES})
vcpkg_replace_string(${RELEASE_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}")
endforeach()
foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES})
vcpkg_replace_string(${DEBUG_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}")
endforeach()
#Install the module files
vcpkg_build_qmake_debug(TARGETS install)
vcpkg_build_qmake_release(TARGETS install)
#Reset the path to the baseline
set(ENV{PATH} "${_path}")
#Remove extra 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)
#Check if there are any libs left over; if not - delete the directory
file(GLOB RELEASE_LIBS ${CURRENT_PACKAGES_DIR}/lib/*)
if(NOT RELEASE_LIBS)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib)
endif()
endif()
if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
#Check if there are any libs left over; if not - delete the directory
file(GLOB DEBUG_LIBS ${CURRENT_PACKAGES_DIR}/lib/*)
if(NOT DEBUG_LIBS)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib)
endif()
endif()
#Move release and debug dlls to the correct directory
file(GLOB RELEASE_DLLS ${CURRENT_PACKAGES_DIR}/tools/qt5/*.dll)
file(GLOB DEBUG_DLLS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*.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/qt5/*)
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 ${DEBUG_DLLS})
#Check if there are any binaries left over; if not - delete the directory
file(GLOB DEBUG_BINS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*)
if(NOT DEBUG_BINS)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/tools)
endif()
endif()
#If there are no include files in the module - create an empty one to stop vcpkg from complaining
if(NOT EXISTS ${CURRENT_PACKAGES_DIR}/include)
file(WRITE ${CURRENT_PACKAGES_DIR}/include/.empty_${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")
endif()
file(INSTALL ${LICENSE_PATH} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/ RENAME copyright)
qt_modular_library(qtwinextras dbfb89833cc291fade8e9fe2ad9c7b7a78c2032de8dcbca1049d637f829811b99e1852ae39ca73a6eac2960df168765bee28023bb723e69c87e2f3bb50b7ef02)

View File

@ -1,4 +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
Build-Depends: qt5modularscripts, qt5base

View File

@ -1,57 +0,0 @@
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()

View File

@ -1,157 +1,5 @@
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()
include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake)
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")
#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(PYTHON3)
get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY)
set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}")
set(_path "$ENV{PATH}")
#Configure debug
vcpkg_configure_qmake_debug(
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
)
#First generate the makefiles so we can modify them
vcpkg_build_qmake_debug(TARGETS sub-src-qmake_all)
#Store debug makefiles path
file(GLOB_RECURSE DEBUG_MAKEFILES ${DEBUG_DIR}/*Makefile*)
#Fix path to Qt5QmlDevTools
foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES})
vcpkg_replace_string(${DEBUG_MAKEFILE} "vcpkg\\installed\\${TARGET_TRIPLET}\\lib\\Qt5QmlDevToolsd.lib" "vcpkg\\installed\\${TARGET_TRIPLET}\\debug\\lib\\Qt5QmlDevToolsd.lib")
endforeach()
#Build debug
vcpkg_build_qmake_debug()
#Configure release
vcpkg_configure_qmake_release(
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
)
#First generate the makefiles so we can modify them
vcpkg_build_qmake_release(TARGETS sub-src-qmake_all)
#Store release makefile path
file(GLOB_RECURSE RELEASE_MAKEFILES ${RELEASE_DIR}/*Makefile*)
#Build release
vcpkg_build_qmake_release()
#Fix the cmake files if they exist
if(EXISTS ${RELEASE_DIR}/lib/cmake)
vcpkg_execute_required_process(
COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py
WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake
LOGNAME fix-cmake
)
endif()
#Set the correct install directory to packages
foreach(RELEASE_MAKEFILE ${RELEASE_MAKEFILES})
vcpkg_replace_string(${RELEASE_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}")
endforeach()
foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES})
vcpkg_replace_string(${DEBUG_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}")
endforeach()
#Install the module files
vcpkg_build_qmake_debug(TARGETS install)
vcpkg_build_qmake_release(TARGETS install)
#Reset the path to the baseline
set(ENV{PATH} "${_path}")
#Remove extra 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)
#Check if there are any libs left over; if not - delete the directory
file(GLOB RELEASE_LIBS ${CURRENT_PACKAGES_DIR}/lib/*)
if(NOT RELEASE_LIBS)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib)
endif()
endif()
if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
#Check if there are any libs left over; if not - delete the directory
file(GLOB DEBUG_LIBS ${CURRENT_PACKAGES_DIR}/lib/*)
if(NOT DEBUG_LIBS)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib)
endif()
endif()
#Move release and debug dlls to the correct directory
file(GLOB RELEASE_DLLS ${CURRENT_PACKAGES_DIR}/tools/qt5/*.dll)
file(GLOB DEBUG_DLLS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*.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/qt5/*)
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 ${DEBUG_DLLS})
#Check if there are any binaries left over; if not - delete the directory
file(GLOB DEBUG_BINS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*)
if(NOT DEBUG_BINS)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/tools)
endif()
endif()
#If there are no include files in the module - create an empty one to stop vcpkg from complaining
if(NOT EXISTS ${CURRENT_PACKAGES_DIR}/include)
file(WRITE ${CURRENT_PACKAGES_DIR}/include/.empty_${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")
endif()
file(INSTALL ${LICENSE_PATH} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/ RENAME copyright)
qt_modular_library(qtxmlpatterns c14dbd97988473ba73b4e21352c5560278aa4dbfdf2be1d12e9119c0b5dbe8a0e4eff9a682052024a01bb21dcf52d40ba00da98947901fb91518af92a225da83)

View File

@ -21,7 +21,7 @@ function(vcpkg_configure_qmake_debug)
cmake_parse_arguments(_csc "" "SOURCE_PATH" "OPTIONS" ${ARGN})
# Find qmake exectuable
find_program(QMAKE_COMMAND NAMES qmake.exe PATHS ${CURRENT_INSTALLED_DIR}/debug/tools/qt5)
find_program(QMAKE_COMMAND NAMES qmake.exe PATHS ${CURRENT_INSTALLED_DIR}/tools/qt5)
if(NOT QMAKE_COMMAND)
message(FATAL_ERROR "vcpkg_configure_qmake: unable to find qmake.")
@ -30,10 +30,12 @@ function(vcpkg_configure_qmake_debug)
# Cleanup build directories
file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg)
configure_file(${CURRENT_INSTALLED_DIR}/tools/qt5/qt_debug.conf ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/qt.conf)
message(STATUS "Configuring ${TARGET_TRIPLET}-dbg")
file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg)
vcpkg_execute_required_process(
COMMAND ${QMAKE_COMMAND} CONFIG-=release CONFIG+=debug ${_csc_OPTIONS} -d ${_csc_SOURCE_PATH}
COMMAND ${QMAKE_COMMAND} CONFIG-=release CONFIG+=debug ${_csc_OPTIONS} -d ${_csc_SOURCE_PATH} -qtconf "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/qt.conf"
WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg
LOGNAME config-${TARGET_TRIPLET}-dbg
)

View File

@ -22,6 +22,7 @@ function(vcpkg_configure_qmake_release)
# Find qmake exectuable
find_program(QMAKE_COMMAND NAMES qmake.exe PATHS ${CURRENT_INSTALLED_DIR}/tools/qt5)
if(NOT QMAKE_COMMAND)
message(FATAL_ERROR "vcpkg_configure_qmake: unable to find qmake.")
endif()
@ -29,10 +30,12 @@ function(vcpkg_configure_qmake_release)
# Cleanup build directories
file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel)
configure_file(${CURRENT_INSTALLED_DIR}/tools/qt5/qt_release.conf ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/qt.conf)
message(STATUS "Configuring ${TARGET_TRIPLET}-rel")
file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel)
vcpkg_execute_required_process(
COMMAND ${QMAKE_COMMAND} CONFIG-=debug CONFIG+=release ${_csc_OPTIONS} -d ${_csc_SOURCE_PATH}
COMMAND ${QMAKE_COMMAND} CONFIG-=debug CONFIG+=release ${_csc_OPTIONS} -d ${_csc_SOURCE_PATH} -qtconf "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/qt.conf"
WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel
LOGNAME config-${TARGET_TRIPLET}-rel
)