mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-18 09:53:01 +08:00
qt5 modules: gamepad, scxml, virtual keyboard, websockets
This commit is contained in:
parent
938a8fe401
commit
6b83925dd6
4
ports/qt5gamepad/CONTROL
Normal file
4
ports/qt5gamepad/CONTROL
Normal file
@ -0,0 +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
|
57
ports/qt5gamepad/fixcmake.py
Normal file
57
ports/qt5gamepad/fixcmake.py
Normal file
@ -0,0 +1,57 @@
|
||||
import os
|
||||
import re
|
||||
from glob import glob
|
||||
|
||||
files = [y for x in os.walk('.') for y in glob(os.path.join(x[0], '*.cmake'))]
|
||||
|
||||
for f in files:
|
||||
openedfile = open(f, "r")
|
||||
builder = ""
|
||||
dllpattern = re.compile("_install_prefix}/bin/Qt5.*d.dll")
|
||||
libpattern = re.compile("_install_prefix}/lib/Qt5.*d.lib")
|
||||
exepattern = re.compile("_install_prefix}/bin/[a-z]+.exe")
|
||||
tooldllpattern = re.compile("_install_prefix}/tools/qt5/Qt5.*d.dll")
|
||||
for line in openedfile:
|
||||
if "_install_prefix}/tools/qt5/${LIB_LOCATION}" in line:
|
||||
builder += " if (${Configuration} STREQUAL \"RELEASE\")"
|
||||
builder += "\n " + line.replace("/tools/qt5/", "/bin/")
|
||||
builder += " else()"
|
||||
builder += "\n " + line.replace("/tools/qt5/", "/debug/bin/")
|
||||
builder += " endif()\n"
|
||||
elif "_install_prefix}/bin/${LIB_LOCATION}" in line:
|
||||
builder += " if (${Configuration} STREQUAL \"RELEASE\")"
|
||||
builder += "\n " + line
|
||||
builder += " else()"
|
||||
builder += "\n " + line.replace("/bin/", "/debug/bin/")
|
||||
builder += " endif()\n"
|
||||
elif "_install_prefix}/lib/${LIB_LOCATION}" in line:
|
||||
builder += " if (${Configuration} STREQUAL \"RELEASE\")"
|
||||
builder += "\n " + line
|
||||
builder += " else()"
|
||||
builder += "\n " + line.replace("/lib/", "/debug/lib/")
|
||||
builder += " endif()\n"
|
||||
elif "_install_prefix}/lib/${IMPLIB_LOCATION}" in line:
|
||||
builder += " if (${Configuration} STREQUAL \"RELEASE\")"
|
||||
builder += "\n " + line
|
||||
builder += " else()"
|
||||
builder += "\n " + line.replace("/lib/", "/debug/lib/")
|
||||
builder += " endif()\n"
|
||||
elif "_install_prefix}/plugins/${PLUGIN_LOCATION}" in line:
|
||||
builder += " if (${Configuration} STREQUAL \"RELEASE\")"
|
||||
builder += "\n " + line
|
||||
builder += " else()"
|
||||
builder += "\n " + line.replace("/plugins/", "/debug/plugins/")
|
||||
builder += " endif()\n"
|
||||
elif dllpattern.search(line) != None:
|
||||
builder += line.replace("/bin/", "/debug/bin/")
|
||||
elif libpattern.search(line) != None:
|
||||
builder += line.replace("/lib/", "/debug/lib/")
|
||||
elif tooldllpattern.search(line) != None:
|
||||
builder += line.replace("/tools/qt5/", "/debug/bin/")
|
||||
elif exepattern.search(line) != None:
|
||||
builder += line.replace("/bin/", "/tools/qt5/")
|
||||
else:
|
||||
builder += line
|
||||
new_file = open(f, "w")
|
||||
new_file.write(builder)
|
||||
new_file.close()
|
81
ports/qt5gamepad/portfile.cmake
Normal file
81
ports/qt5gamepad/portfile.cmake
Normal file
@ -0,0 +1,81 @@
|
||||
include(vcpkg_common_functions)
|
||||
|
||||
string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH)
|
||||
if(BUILDTREES_PATH_LENGTH GREATER 37)
|
||||
message(WARNING "Qt5's buildsystem uses very long paths and may fail on your system.\n"
|
||||
"We recommend moving vcpkg to a short path such as 'C:\\src\\vcpkg' or using the subst command."
|
||||
)
|
||||
endif()
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
||||
message(FATAL_ERROR "Qt5 doesn't currently support static builds. Please use a dynamic triplet instead.")
|
||||
endif()
|
||||
|
||||
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR})
|
||||
|
||||
set(SRCDIR_NAME "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")
|
||||
|
||||
vcpkg_configure_qmake_debug(
|
||||
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
|
||||
)
|
||||
|
||||
vcpkg_build_qmake_debug()
|
||||
|
||||
vcpkg_configure_qmake_release(
|
||||
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
|
||||
)
|
||||
|
||||
vcpkg_build_qmake_release()
|
||||
|
||||
vcpkg_find_acquire_program(PYTHON3)
|
||||
get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY)
|
||||
set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}")
|
||||
set(_path "$ENV{PATH}")
|
||||
|
||||
set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg")
|
||||
set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel")
|
||||
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py
|
||||
WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake
|
||||
LOGNAME fix-cmake
|
||||
)
|
||||
|
||||
set(ENV{PATH} "${_path}")
|
||||
|
||||
file(INSTALL ${DEBUG_DIR}/bin DESTINATION ${CURRENT_PACKAGES_DIR}/debug)
|
||||
file(INSTALL ${DEBUG_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug)
|
||||
file(INSTALL ${DEBUG_DIR}/plugins DESTINATION ${CURRENT_PACKAGES_DIR}/debug)
|
||||
file(INSTALL ${DEBUG_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug)
|
||||
file(INSTALL ${DEBUG_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug)
|
||||
|
||||
file(INSTALL ${RELEASE_DIR}/bin DESTINATION ${CURRENT_PACKAGES_DIR})
|
||||
file(INSTALL ${RELEASE_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR})
|
||||
file(INSTALL ${RELEASE_DIR}/plugins DESTINATION ${CURRENT_PACKAGES_DIR})
|
||||
file(INSTALL ${RELEASE_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR})
|
||||
file(INSTALL ${RELEASE_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5)
|
||||
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/share/cmake)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
|
||||
|
||||
file(GLOB RELEASE_DLLS "${CURRENT_PACKAGES_DIR}/lib/*.dll")
|
||||
file(GLOB DEBUG_DLLS "${CURRENT_PACKAGES_DIR}/debug/lib/*.dll")
|
||||
file(REMOVE ${RELEASE_DLLS} ${DEBUG_DLLS})
|
||||
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE.LGPLv3 DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5gamepad RENAME copyright)
|
@ -68,6 +68,6 @@ file(INSTALL ${RELEASE_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt
|
||||
file(INSTALL ${RELEASE_DIR}/lib/cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share)
|
||||
|
||||
#Create an empty include file so that vcpkg doesn't complain
|
||||
file(WRITE ${CURRENT_PACKAGES_DIR}/include/.empty "")
|
||||
file(WRITE ${CURRENT_PACKAGES_DIR}/include/.empty_qt5imageformats "")
|
||||
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE.LGPLv3 DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5imageformats RENAME copyright)
|
4
ports/qt5scxml/CONTROL
Normal file
4
ports/qt5scxml/CONTROL
Normal file
@ -0,0 +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
|
57
ports/qt5scxml/fixcmake.py
Normal file
57
ports/qt5scxml/fixcmake.py
Normal file
@ -0,0 +1,57 @@
|
||||
import os
|
||||
import re
|
||||
from glob import glob
|
||||
|
||||
files = [y for x in os.walk('.') for y in glob(os.path.join(x[0], '*.cmake'))]
|
||||
|
||||
for f in files:
|
||||
openedfile = open(f, "r")
|
||||
builder = ""
|
||||
dllpattern = re.compile("_install_prefix}/bin/Qt5.*d.dll")
|
||||
libpattern = re.compile("_install_prefix}/lib/Qt5.*d.lib")
|
||||
exepattern = re.compile("_install_prefix}/bin/[a-z]+.exe")
|
||||
tooldllpattern = re.compile("_install_prefix}/tools/qt5/Qt5.*d.dll")
|
||||
for line in openedfile:
|
||||
if "_install_prefix}/tools/qt5/${LIB_LOCATION}" in line:
|
||||
builder += " if (${Configuration} STREQUAL \"RELEASE\")"
|
||||
builder += "\n " + line.replace("/tools/qt5/", "/bin/")
|
||||
builder += " else()"
|
||||
builder += "\n " + line.replace("/tools/qt5/", "/debug/bin/")
|
||||
builder += " endif()\n"
|
||||
elif "_install_prefix}/bin/${LIB_LOCATION}" in line:
|
||||
builder += " if (${Configuration} STREQUAL \"RELEASE\")"
|
||||
builder += "\n " + line
|
||||
builder += " else()"
|
||||
builder += "\n " + line.replace("/bin/", "/debug/bin/")
|
||||
builder += " endif()\n"
|
||||
elif "_install_prefix}/lib/${LIB_LOCATION}" in line:
|
||||
builder += " if (${Configuration} STREQUAL \"RELEASE\")"
|
||||
builder += "\n " + line
|
||||
builder += " else()"
|
||||
builder += "\n " + line.replace("/lib/", "/debug/lib/")
|
||||
builder += " endif()\n"
|
||||
elif "_install_prefix}/lib/${IMPLIB_LOCATION}" in line:
|
||||
builder += " if (${Configuration} STREQUAL \"RELEASE\")"
|
||||
builder += "\n " + line
|
||||
builder += " else()"
|
||||
builder += "\n " + line.replace("/lib/", "/debug/lib/")
|
||||
builder += " endif()\n"
|
||||
elif "_install_prefix}/plugins/${PLUGIN_LOCATION}" in line:
|
||||
builder += " if (${Configuration} STREQUAL \"RELEASE\")"
|
||||
builder += "\n " + line
|
||||
builder += " else()"
|
||||
builder += "\n " + line.replace("/plugins/", "/debug/plugins/")
|
||||
builder += " endif()\n"
|
||||
elif dllpattern.search(line) != None:
|
||||
builder += line.replace("/bin/", "/debug/bin/")
|
||||
elif libpattern.search(line) != None:
|
||||
builder += line.replace("/lib/", "/debug/lib/")
|
||||
elif tooldllpattern.search(line) != None:
|
||||
builder += line.replace("/tools/qt5/", "/debug/bin/")
|
||||
elif exepattern.search(line) != None:
|
||||
builder += line.replace("/bin/", "/tools/qt5/")
|
||||
else:
|
||||
builder += line
|
||||
new_file = open(f, "w")
|
||||
new_file.write(builder)
|
||||
new_file.close()
|
86
ports/qt5scxml/portfile.cmake
Normal file
86
ports/qt5scxml/portfile.cmake
Normal file
@ -0,0 +1,86 @@
|
||||
include(vcpkg_common_functions)
|
||||
|
||||
string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH)
|
||||
if(BUILDTREES_PATH_LENGTH GREATER 37)
|
||||
message(WARNING "Qt5's buildsystem uses very long paths and may fail on your system.\n"
|
||||
"We recommend moving vcpkg to a short path such as 'C:\\src\\vcpkg' or using the subst command."
|
||||
)
|
||||
endif()
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
||||
message(FATAL_ERROR "Qt5 doesn't currently support static builds. Please use a dynamic triplet instead.")
|
||||
endif()
|
||||
|
||||
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR})
|
||||
|
||||
set(SRCDIR_NAME "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")
|
||||
|
||||
vcpkg_configure_qmake_debug(
|
||||
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
|
||||
)
|
||||
|
||||
vcpkg_build_qmake_debug()
|
||||
|
||||
vcpkg_configure_qmake_release(
|
||||
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
|
||||
)
|
||||
|
||||
vcpkg_build_qmake_release()
|
||||
|
||||
vcpkg_find_acquire_program(PYTHON3)
|
||||
get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY)
|
||||
set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}")
|
||||
set(_path "$ENV{PATH}")
|
||||
|
||||
set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg")
|
||||
set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel")
|
||||
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py
|
||||
WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake
|
||||
LOGNAME fix-cmake
|
||||
)
|
||||
|
||||
set(ENV{PATH} "${_path}")
|
||||
|
||||
file(GLOB BINARY_TOOLS "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/bin/*.exe")
|
||||
file(INSTALL ${BINARY_TOOLS} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/qt5)
|
||||
file(REMOVE ${BINARY_TOOLS})
|
||||
file(GLOB BINARY_TOOLS "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/bin/*.exe")
|
||||
file(INSTALL ${BINARY_TOOLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/tools/qt5)
|
||||
file(REMOVE ${BINARY_TOOLS})
|
||||
|
||||
file(INSTALL ${DEBUG_DIR}/bin DESTINATION ${CURRENT_PACKAGES_DIR}/debug)
|
||||
file(INSTALL ${DEBUG_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug)
|
||||
file(INSTALL ${DEBUG_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug)
|
||||
file(INSTALL ${DEBUG_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug)
|
||||
|
||||
file(INSTALL ${RELEASE_DIR}/bin DESTINATION ${CURRENT_PACKAGES_DIR})
|
||||
file(INSTALL ${RELEASE_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR})
|
||||
file(INSTALL ${RELEASE_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR})
|
||||
file(INSTALL ${RELEASE_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5)
|
||||
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/share/cmake)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
|
||||
|
||||
file(GLOB RELEASE_DLLS "${CURRENT_PACKAGES_DIR}/lib/*.dll")
|
||||
file(GLOB DEBUG_DLLS "${CURRENT_PACKAGES_DIR}/debug/lib/*.dll")
|
||||
file(REMOVE ${RELEASE_DLLS} ${DEBUG_DLLS})
|
||||
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE.LGPL3 DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5scxml RENAME copyright)
|
4
ports/qt5virtualkeyboard/CONTROL
Normal file
4
ports/qt5virtualkeyboard/CONTROL
Normal file
@ -0,0 +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
|
57
ports/qt5virtualkeyboard/fixcmake.py
Normal file
57
ports/qt5virtualkeyboard/fixcmake.py
Normal file
@ -0,0 +1,57 @@
|
||||
import os
|
||||
import re
|
||||
from glob import glob
|
||||
|
||||
files = [y for x in os.walk('.') for y in glob(os.path.join(x[0], '*.cmake'))]
|
||||
|
||||
for f in files:
|
||||
openedfile = open(f, "r")
|
||||
builder = ""
|
||||
dllpattern = re.compile("_install_prefix}/bin/Qt5.*d.dll")
|
||||
libpattern = re.compile("_install_prefix}/lib/Qt5.*d.lib")
|
||||
exepattern = re.compile("_install_prefix}/bin/[a-z]+.exe")
|
||||
tooldllpattern = re.compile("_install_prefix}/tools/qt5/Qt5.*d.dll")
|
||||
for line in openedfile:
|
||||
if "_install_prefix}/tools/qt5/${LIB_LOCATION}" in line:
|
||||
builder += " if (${Configuration} STREQUAL \"RELEASE\")"
|
||||
builder += "\n " + line.replace("/tools/qt5/", "/bin/")
|
||||
builder += " else()"
|
||||
builder += "\n " + line.replace("/tools/qt5/", "/debug/bin/")
|
||||
builder += " endif()\n"
|
||||
elif "_install_prefix}/bin/${LIB_LOCATION}" in line:
|
||||
builder += " if (${Configuration} STREQUAL \"RELEASE\")"
|
||||
builder += "\n " + line
|
||||
builder += " else()"
|
||||
builder += "\n " + line.replace("/bin/", "/debug/bin/")
|
||||
builder += " endif()\n"
|
||||
elif "_install_prefix}/lib/${LIB_LOCATION}" in line:
|
||||
builder += " if (${Configuration} STREQUAL \"RELEASE\")"
|
||||
builder += "\n " + line
|
||||
builder += " else()"
|
||||
builder += "\n " + line.replace("/lib/", "/debug/lib/")
|
||||
builder += " endif()\n"
|
||||
elif "_install_prefix}/lib/${IMPLIB_LOCATION}" in line:
|
||||
builder += " if (${Configuration} STREQUAL \"RELEASE\")"
|
||||
builder += "\n " + line
|
||||
builder += " else()"
|
||||
builder += "\n " + line.replace("/lib/", "/debug/lib/")
|
||||
builder += " endif()\n"
|
||||
elif "_install_prefix}/plugins/${PLUGIN_LOCATION}" in line:
|
||||
builder += " if (${Configuration} STREQUAL \"RELEASE\")"
|
||||
builder += "\n " + line
|
||||
builder += " else()"
|
||||
builder += "\n " + line.replace("/plugins/", "/debug/plugins/")
|
||||
builder += " endif()\n"
|
||||
elif dllpattern.search(line) != None:
|
||||
builder += line.replace("/bin/", "/debug/bin/")
|
||||
elif libpattern.search(line) != None:
|
||||
builder += line.replace("/lib/", "/debug/lib/")
|
||||
elif tooldllpattern.search(line) != None:
|
||||
builder += line.replace("/tools/qt5/", "/debug/bin/")
|
||||
elif exepattern.search(line) != None:
|
||||
builder += line.replace("/bin/", "/tools/qt5/")
|
||||
else:
|
||||
builder += line
|
||||
new_file = open(f, "w")
|
||||
new_file.write(builder)
|
||||
new_file.close()
|
73
ports/qt5virtualkeyboard/portfile.cmake
Normal file
73
ports/qt5virtualkeyboard/portfile.cmake
Normal file
@ -0,0 +1,73 @@
|
||||
include(vcpkg_common_functions)
|
||||
|
||||
string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH)
|
||||
if(BUILDTREES_PATH_LENGTH GREATER 37)
|
||||
message(WARNING "Qt5's buildsystem uses very long paths and may fail on your system.\n"
|
||||
"We recommend moving vcpkg to a short path such as 'C:\\src\\vcpkg' or using the subst command."
|
||||
)
|
||||
endif()
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
||||
message(FATAL_ERROR "Qt5 doesn't currently support static builds. Please use a dynamic triplet instead.")
|
||||
endif()
|
||||
|
||||
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR})
|
||||
|
||||
set(SRCDIR_NAME "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")
|
||||
|
||||
vcpkg_configure_qmake_debug(
|
||||
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
|
||||
)
|
||||
|
||||
vcpkg_build_qmake_debug()
|
||||
|
||||
vcpkg_configure_qmake_release(
|
||||
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
|
||||
)
|
||||
|
||||
vcpkg_build_qmake_release()
|
||||
|
||||
vcpkg_find_acquire_program(PYTHON3)
|
||||
get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY)
|
||||
set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}")
|
||||
set(_path "$ENV{PATH}")
|
||||
|
||||
set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg")
|
||||
set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel")
|
||||
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py
|
||||
WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake
|
||||
LOGNAME fix-cmake
|
||||
)
|
||||
|
||||
set(ENV{PATH} "${_path}")
|
||||
|
||||
file(INSTALL ${DEBUG_DIR}/plugins DESTINATION ${CURRENT_PACKAGES_DIR}/debug)
|
||||
file(INSTALL ${DEBUG_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug)
|
||||
|
||||
file(INSTALL ${RELEASE_DIR}/plugins DESTINATION ${CURRENT_PACKAGES_DIR})
|
||||
file(INSTALL ${RELEASE_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5)
|
||||
|
||||
file(INSTALL ${RELEASE_DIR}/lib/cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share)
|
||||
|
||||
#Create an empty include file so that vcpkg doesn't complain
|
||||
file(WRITE ${CURRENT_PACKAGES_DIR}/include/.empty_qt5virtualkeyboard "")
|
||||
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE.GPL3 DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5virtualkeyboard RENAME copyright)
|
4
ports/qt5websockets/CONTROL
Normal file
4
ports/qt5websockets/CONTROL
Normal file
@ -0,0 +1,4 @@
|
||||
Source: qt5websockets
|
||||
Version: 5.9.2-0
|
||||
Description: Qt5 Web Sockets Module - provides WebSocket communication compliant with RFC 6455
|
||||
Build-Depends: qt5base
|
57
ports/qt5websockets/fixcmake.py
Normal file
57
ports/qt5websockets/fixcmake.py
Normal file
@ -0,0 +1,57 @@
|
||||
import os
|
||||
import re
|
||||
from glob import glob
|
||||
|
||||
files = [y for x in os.walk('.') for y in glob(os.path.join(x[0], '*.cmake'))]
|
||||
|
||||
for f in files:
|
||||
openedfile = open(f, "r")
|
||||
builder = ""
|
||||
dllpattern = re.compile("_install_prefix}/bin/Qt5.*d.dll")
|
||||
libpattern = re.compile("_install_prefix}/lib/Qt5.*d.lib")
|
||||
exepattern = re.compile("_install_prefix}/bin/[a-z]+.exe")
|
||||
tooldllpattern = re.compile("_install_prefix}/tools/qt5/Qt5.*d.dll")
|
||||
for line in openedfile:
|
||||
if "_install_prefix}/tools/qt5/${LIB_LOCATION}" in line:
|
||||
builder += " if (${Configuration} STREQUAL \"RELEASE\")"
|
||||
builder += "\n " + line.replace("/tools/qt5/", "/bin/")
|
||||
builder += " else()"
|
||||
builder += "\n " + line.replace("/tools/qt5/", "/debug/bin/")
|
||||
builder += " endif()\n"
|
||||
elif "_install_prefix}/bin/${LIB_LOCATION}" in line:
|
||||
builder += " if (${Configuration} STREQUAL \"RELEASE\")"
|
||||
builder += "\n " + line
|
||||
builder += " else()"
|
||||
builder += "\n " + line.replace("/bin/", "/debug/bin/")
|
||||
builder += " endif()\n"
|
||||
elif "_install_prefix}/lib/${LIB_LOCATION}" in line:
|
||||
builder += " if (${Configuration} STREQUAL \"RELEASE\")"
|
||||
builder += "\n " + line
|
||||
builder += " else()"
|
||||
builder += "\n " + line.replace("/lib/", "/debug/lib/")
|
||||
builder += " endif()\n"
|
||||
elif "_install_prefix}/lib/${IMPLIB_LOCATION}" in line:
|
||||
builder += " if (${Configuration} STREQUAL \"RELEASE\")"
|
||||
builder += "\n " + line
|
||||
builder += " else()"
|
||||
builder += "\n " + line.replace("/lib/", "/debug/lib/")
|
||||
builder += " endif()\n"
|
||||
elif "_install_prefix}/plugins/${PLUGIN_LOCATION}" in line:
|
||||
builder += " if (${Configuration} STREQUAL \"RELEASE\")"
|
||||
builder += "\n " + line
|
||||
builder += " else()"
|
||||
builder += "\n " + line.replace("/plugins/", "/debug/plugins/")
|
||||
builder += " endif()\n"
|
||||
elif dllpattern.search(line) != None:
|
||||
builder += line.replace("/bin/", "/debug/bin/")
|
||||
elif libpattern.search(line) != None:
|
||||
builder += line.replace("/lib/", "/debug/lib/")
|
||||
elif tooldllpattern.search(line) != None:
|
||||
builder += line.replace("/tools/qt5/", "/debug/bin/")
|
||||
elif exepattern.search(line) != None:
|
||||
builder += line.replace("/bin/", "/tools/qt5/")
|
||||
else:
|
||||
builder += line
|
||||
new_file = open(f, "w")
|
||||
new_file.write(builder)
|
||||
new_file.close()
|
79
ports/qt5websockets/portfile.cmake
Normal file
79
ports/qt5websockets/portfile.cmake
Normal file
@ -0,0 +1,79 @@
|
||||
include(vcpkg_common_functions)
|
||||
|
||||
string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH)
|
||||
if(BUILDTREES_PATH_LENGTH GREATER 37)
|
||||
message(WARNING "Qt5's buildsystem uses very long paths and may fail on your system.\n"
|
||||
"We recommend moving vcpkg to a short path such as 'C:\\src\\vcpkg' or using the subst command."
|
||||
)
|
||||
endif()
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
||||
message(FATAL_ERROR "Qt5 doesn't currently support static builds. Please use a dynamic triplet instead.")
|
||||
endif()
|
||||
|
||||
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR})
|
||||
|
||||
set(SRCDIR_NAME "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")
|
||||
|
||||
vcpkg_configure_qmake_debug(
|
||||
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
|
||||
)
|
||||
|
||||
vcpkg_build_qmake_debug()
|
||||
|
||||
vcpkg_configure_qmake_release(
|
||||
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
|
||||
)
|
||||
|
||||
vcpkg_build_qmake_release()
|
||||
|
||||
vcpkg_find_acquire_program(PYTHON3)
|
||||
get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY)
|
||||
set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}")
|
||||
set(_path "$ENV{PATH}")
|
||||
|
||||
set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg")
|
||||
set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel")
|
||||
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py
|
||||
WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake
|
||||
LOGNAME fix-cmake
|
||||
)
|
||||
|
||||
set(ENV{PATH} "${_path}")
|
||||
|
||||
file(INSTALL ${DEBUG_DIR}/bin DESTINATION ${CURRENT_PACKAGES_DIR}/debug)
|
||||
file(INSTALL ${DEBUG_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug)
|
||||
file(INSTALL ${DEBUG_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug)
|
||||
file(INSTALL ${DEBUG_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug)
|
||||
|
||||
file(INSTALL ${RELEASE_DIR}/bin DESTINATION ${CURRENT_PACKAGES_DIR})
|
||||
file(INSTALL ${RELEASE_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR})
|
||||
file(INSTALL ${RELEASE_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR})
|
||||
file(INSTALL ${RELEASE_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5)
|
||||
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/share/cmake)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
|
||||
|
||||
file(GLOB RELEASE_DLLS "${CURRENT_PACKAGES_DIR}/lib/*.dll")
|
||||
file(GLOB DEBUG_DLLS "${CURRENT_PACKAGES_DIR}/debug/lib/*.dll")
|
||||
file(REMOVE ${RELEASE_DLLS} ${DEBUG_DLLS})
|
||||
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE.LGPL3 DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5websockets RENAME copyright)
|
Loading…
Reference in New Issue
Block a user