aboutsummaryrefslogtreecommitdiff
path: root/ports
diff options
context:
space:
mode:
authorBarath Kannan <barathsotd@gmail.com>2017-10-16 00:40:25 +1100
committerBarath Kannan <barathsotd@gmail.com>2017-10-16 00:40:25 +1100
commit459ac9f2e17340e10e3cb8a66f956c59541d5fdd (patch)
tree119d70b6b91a21e109c51e3d89d48b14905671e6 /ports
parent2a94ee4c62ad8b3468ae10fa5c0f02dc92e0c1be (diff)
downloadvcpkg-459ac9f2e17340e10e3cb8a66f956c59541d5fdd.tar.gz
vcpkg-459ac9f2e17340e10e3cb8a66f956c59541d5fdd.zip
qt5tools package
Diffstat (limited to 'ports')
-rw-r--r--ports/qt5base/portfile.cmake2
-rw-r--r--ports/qt5tools/CONTROL4
-rw-r--r--ports/qt5tools/portfile.cmake51
3 files changed, 56 insertions, 1 deletions
diff --git a/ports/qt5base/portfile.cmake b/ports/qt5base/portfile.cmake
index 9e2efeac7..359c81990 100644
--- a/ports/qt5base/portfile.cmake
+++ b/ports/qt5base/portfile.cmake
@@ -15,7 +15,7 @@ list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR})
include(configure_qt)
include(install_qt)
-set(SRCDIR_NAME "qt-5.9.2")
+set(SRCDIR_NAME "qtbase-5.9.2")
set(ARCHIVE_NAME "qtbase-opensource-src-5.9.2")
set(ARCHIVE_EXTENSION ".tar.xz")
diff --git a/ports/qt5tools/CONTROL b/ports/qt5tools/CONTROL
new file mode 100644
index 000000000..7bdb5c1db
--- /dev/null
+++ b/ports/qt5tools/CONTROL
@@ -0,0 +1,4 @@
+Source: qt5tools
+Version: 5.9.2-0
+Description: Qt5 tools
+Build-Depends: qt5base
diff --git a/ports/qt5tools/portfile.cmake b/ports/qt5tools/portfile.cmake
new file mode 100644
index 000000000..6d01d6333
--- /dev/null
+++ b/ports/qt5tools/portfile.cmake
@@ -0,0 +1,51 @@
+include(vcpkg_common_functions)
+
+string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH)
+if(BUILDTREES_PATH_LENGTH GREATER 27)
+ 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 "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")
+
+#Clean up build directories
+file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET})
+
+vcpkg_configure_qmake(
+ SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
+ OPTIONS "CONFIG+=release"
+)
+
+vcpkg_build_qmake()
+
+file(GLOB BINARY_TOOLS "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/bin/*.exe")
+file(INSTALL ${BINARY_TOOLS} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/qt5)
+file(REMOVE ${BINARY_TOOLS})
+
+file(INSTALL ${SOURCE_PATH}/LICENSE.LGPL3 DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5tools RENAME copyright)
+
+#touch an empty include file - qt tools does not create any and this is an error in vcpkg
+file(WRITE ${CURRENT_PACKAGES_DIR}/include/.empty) \ No newline at end of file