aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbagong <rs@bagong.de>2017-06-20 02:08:48 +0200
committerbagong <rs@bagong.de>2017-06-20 02:08:48 +0200
commitef4a0ced9bc25abd28dbde47fabf90252cf632a9 (patch)
treefecae13ee3e456656537daf316e4073963a12eff
parent34c08e2b15777c86c5aaacfee5f04eed986c62da (diff)
downloadvcpkg-ef4a0ced9bc25abd28dbde47fabf90252cf632a9.tar.gz
vcpkg-ef4a0ced9bc25abd28dbde47fabf90252cf632a9.zip
Add port qscintilla
-rw-r--r--ports/qscintilla/CONTROL4
-rw-r--r--ports/qscintilla/portfile.cmake67
2 files changed, 71 insertions, 0 deletions
diff --git a/ports/qscintilla/CONTROL b/ports/qscintilla/CONTROL
new file mode 100644
index 000000000..bcdde0e37
--- /dev/null
+++ b/ports/qscintilla/CONTROL
@@ -0,0 +1,4 @@
+Source: qscintilla
+Version: 2.10
+Description: QScintilla is a port to Qt of the Scintilla editing component. Features syntax highlighting, code-completion and much more (Barebone build without python bindings (missing dependeny PyQt))
+Build-Depends: qt5
diff --git a/ports/qscintilla/portfile.cmake b/ports/qscintilla/portfile.cmake
new file mode 100644
index 000000000..ba5a13ac2
--- /dev/null
+++ b/ports/qscintilla/portfile.cmake
@@ -0,0 +1,67 @@
+# Common Ambient Variables:
+# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT}
+# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET}
+# CURRENT_PORT DIR = ${VCPKG_ROOT_DIR}\ports\${PORT}
+# PORT = current port name (zlib, etc)
+# TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc)
+# VCPKG_CRT_LINKAGE = C runtime linkage type (static, dynamic)
+# VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic)
+# VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg>
+# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm)
+#
+
+include(vcpkg_common_functions)
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/QScintilla_gpl-2.10)
+vcpkg_download_distfile(ARCHIVE
+ URLS "https://sourceforge.net/projects/pyqt/files/QScintilla2/QScintilla-2.10/QScintilla_gpl-2.10.zip"
+ FILENAME "QScintilla_gpl-2.10.zip"
+ SHA512 7c580cfee03af1056f530af756a0ff9cc2396a5419fa23aecc66a6bc8809a4fb154788956220bb0b068a5c214d571c053271c3906d6d541196fbbf7c6dbec917
+)
+vcpkg_extract_source_archive(${ARCHIVE})
+
+vcpkg_find_acquire_program(PYTHON3)
+
+# Add python3 to path
+SET(ENV{PATH} "${DOWNLOADS}/tools/python;$ENV{PATH}")
+
+vcpkg_configure_qmake(
+ SOURCE_PATH "${SOURCE_PATH}/Qt4Qt5"
+ OPTIONS
+ CONFIG+=build_all
+ CONFIG-=hide_symbols
+)
+
+vcpkg_build_qmake()
+
+# Install following vcpkg conventions (following qwt portfile)
+set(BUILD_DIR ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET})
+
+file(GLOB HEADER_FILES ${SOURCE_PATH}/include/*)
+file(INSTALL ${HEADER_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include/qscintilla)
+
+file(INSTALL
+ ${BUILD_DIR}/release/qscintilla2_qt5.lib
+ DESTINATION ${CURRENT_PACKAGES_DIR}/lib
+)
+
+file(INSTALL
+ ${BUILD_DIR}/debug/qscintilla2_qt5.lib
+ DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib
+)
+
+if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
+ file(INSTALL
+ ${BUILD_DIR}/release/qscintilla2_qt5.dll
+ DESTINATION ${CURRENT_PACKAGES_DIR}/bin
+ )
+
+ file(INSTALL
+ ${BUILD_DIR}/debug/qscintilla2_qt5.dll
+ ${BUILD_DIR}/debug/qscintilla2_qt5.pdb
+ DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin
+ )
+endif()
+
+# Handle copyright
+file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/qscintilla)
+file(RENAME ${CURRENT_PACKAGES_DIR}/share/qscintilla/LICENSE ${CURRENT_PACKAGES_DIR}/share/qscintilla/copyright)