diff options
| author | Maurice Kalinowski <mauricek@users.noreply.github.com> | 2019-03-22 09:08:50 +0100 |
|---|---|---|
| committer | Phil Christensen <philc@microsoft.com> | 2019-03-22 01:08:50 -0700 |
| commit | 3d2db597ce17afc9308c515ef0ce3de7ddf2ffe1 (patch) | |
| tree | de0f9344431d31b37df1ef11dfddac5a7cdca361 | |
| parent | 8b4a607c328d100ac9892e2cbcfb9a4b0cf44c10 (diff) | |
| download | vcpkg-3d2db597ce17afc9308c515ef0ce3de7ddf2ffe1.tar.gz vcpkg-3d2db597ce17afc9308c515ef0ce3de7ddf2ffe1.zip | |
[qt5-mqtt] new port Qtmqtt (#5736) (#5737)
* [qt5-modularscripts] Split build steps
When building modules not available from the vendor download side, the
build process stays the same. Create two functions, one for accessing
the sources, the other for compilation.
* [qtmqtt] Add new port (#5736)
| -rw-r--r-- | ports/qt5-modularscripts/CONTROL | 2 | ||||
| -rw-r--r-- | ports/qt5-modularscripts/qt_modular_library.cmake | 10 | ||||
| -rw-r--r-- | ports/qt5-mqtt/CONTROL | 5 | ||||
| -rw-r--r-- | ports/qt5-mqtt/portfile.cmake | 21 | ||||
| -rw-r--r-- | ports/qt5/CONTROL | 2 |
5 files changed, 37 insertions, 3 deletions
diff --git a/ports/qt5-modularscripts/CONTROL b/ports/qt5-modularscripts/CONTROL index eedb58432..f8e6f4894 100644 --- a/ports/qt5-modularscripts/CONTROL +++ b/ports/qt5-modularscripts/CONTROL @@ -1,3 +1,3 @@ Source: qt5-modularscripts -Version: 2019-02-02 +Version: 2019-03-21 Description: Vcpkg helpers to package qt5 modules diff --git a/ports/qt5-modularscripts/qt_modular_library.cmake b/ports/qt5-modularscripts/qt_modular_library.cmake index fc3ebdef0..9f6d23fa1 100644 --- a/ports/qt5-modularscripts/qt_modular_library.cmake +++ b/ports/qt5-modularscripts/qt_modular_library.cmake @@ -1,6 +1,6 @@ set(_qt5base_port_dir "${CMAKE_CURRENT_LIST_DIR}") -function(qt_modular_library NAME HASH) +function(qt_modular_fetch_library NAME HASH TARGET_SOURCE_PATH) 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" @@ -23,6 +23,10 @@ function(qt_modular_library NAME HASH) REF ${FULL_VERSION} ) + set(${TARGET_SOURCE_PATH} ${SOURCE_PATH} PARENT_SCOPE) +endfunction() + +function(qt_modular_build_library SOURCE_PATH) # This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings set(ENV{_CL_} "/utf-8") @@ -139,5 +143,9 @@ function(qt_modular_library NAME HASH) set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPL3-EXCEPT") endif() file(INSTALL ${LICENSE_PATH} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +endfunction() +function(qt_modular_library NAME HASH) + qt_modular_fetch_library(${NAME} ${HASH} TARGET_SOURCE_PATH) + qt_modular_build_library(${TARGET_SOURCE_PATH}) endfunction() diff --git a/ports/qt5-mqtt/CONTROL b/ports/qt5-mqtt/CONTROL new file mode 100644 index 000000000..0b99078fb --- /dev/null +++ b/ports/qt5-mqtt/CONTROL @@ -0,0 +1,5 @@ +Source: qt5-mqtt
+Version: 5.12.1
+Description: Qt5 MQTT module.
+Build-Depends: qt5-modularscripts, qt5-base
+
diff --git a/ports/qt5-mqtt/portfile.cmake b/ports/qt5-mqtt/portfile.cmake new file mode 100644 index 000000000..8c797abb0 --- /dev/null +++ b/ports/qt5-mqtt/portfile.cmake @@ -0,0 +1,21 @@ +include(vcpkg_common_functions)
+
+include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake)
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO qt/qtmqtt
+ REF v5.12.1
+ SHA512 c6f4000a032caaf5224ca6fe2442f22eddc26e3e53cc101885c717b706156cada716e45ff92d267928b87e1e5ceae5e81694f4b7c289d9836e75f27fd012de42
+ HEAD_REF dev
+)
+
+# Qt module builds from a git repository require a .git entry to invoke syncqt
+file(WRITE "${SOURCE_PATH}/.git" "repocontent")
+
+# syncqt is a PERL script
+vcpkg_find_acquire_program(PERL)
+get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY)
+set(ENV{PATH} "${PERL_EXE_PATH};$ENV{PATH}")
+
+qt_modular_build_library(${SOURCE_PATH})
diff --git a/ports/qt5/CONTROL b/ports/qt5/CONTROL index 6b4b9129b..05a908146 100644 --- a/ports/qt5/CONTROL +++ b/ports/qt5/CONTROL @@ -1,4 +1,4 @@ Source: qt5 Version: 5.12.1-1 Description: Qt5 Application Framework -Build-Depends: qt5-3d, qt5-activeqt, qt5-base, qt5-charts, qt5-datavis3d, qt5-declarative, qt5-gamepad, qt5-graphicaleffects, qt5-imageformats, qt5-location, qt5-multimedia, qt5-networkauth, qt5-purchasing, qt5-quickcontrols, qt5-quickcontrols2, qt5-script, qt5-scxml, qt5-sensors, qt5-serialport, qt5-speech, qt5-svg, qt5-tools, qt5-virtualkeyboard, qt5-webchannel, qt5-websockets, qt5-winextras, qt5-xmlpatterns +Build-Depends: qt5-3d, qt5-activeqt, qt5-base, qt5-charts, qt5-datavis3d, qt5-declarative, qt5-gamepad, qt5-graphicaleffects, qt5-imageformats, qt5-location, qt5-multimedia, qt5-mqtt, qt5-networkauth, qt5-purchasing, qt5-quickcontrols, qt5-quickcontrols2, qt5-script, qt5-scxml, qt5-sensors, qt5-serialport, qt5-speech, qt5-svg, qt5-tools, qt5-virtualkeyboard, qt5-webchannel, qt5-websockets, qt5-winextras, qt5-xmlpatterns |
