diff options
| author | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
|---|---|---|
| committer | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
| commit | 54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch) | |
| tree | d915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/qscintilla | |
Diffstat (limited to 'vcpkg/ports/qscintilla')
| -rw-r--r-- | vcpkg/ports/qscintilla/fix-static.patch | 29 | ||||
| -rw-r--r-- | vcpkg/ports/qscintilla/portfile.cmake | 55 | ||||
| -rw-r--r-- | vcpkg/ports/qscintilla/unofficial-qscintilla-config.cmake | 37 | ||||
| -rw-r--r-- | vcpkg/ports/qscintilla/vcpkg.json | 20 |
4 files changed, 141 insertions, 0 deletions
diff --git a/vcpkg/ports/qscintilla/fix-static.patch b/vcpkg/ports/qscintilla/fix-static.patch new file mode 100644 index 0000000..ab1cf54 --- /dev/null +++ b/vcpkg/ports/qscintilla/fix-static.patch @@ -0,0 +1,29 @@ +diff --git a/src/qscintilla.pro b/src/qscintilla.pro +index 8d0acd2..2246442 100644 +--- a/src/qscintilla.pro ++++ b/src/qscintilla.pro +@@ -37,13 +37,13 @@ CONFIG(debug, debug|release) { + TARGET = qscintilla2_qt$${QT_MAJOR_VERSION} + } + +-macx:!CONFIG(staticlib) { ++macx:!CONFIG(static) { + QMAKE_POST_LINK += install_name_tool -id @rpath/$(TARGET1) $(TARGET) + } + + INCLUDEPATH += . ../scintilla/include ../scintilla/lexlib ../scintilla/src + +-!CONFIG(staticlib) { ++!CONFIG(static) { + DEFINES += QSCINTILLA_MAKE_DLL + + # Comment this in to build a dynamic library supporting multiple +@@ -86,7 +86,7 @@ qsci.files = ../qsci + INSTALLS += qsci + + features.path = $$[QT_HOST_DATA]/mkspecs/features +-CONFIG(staticlib) { ++CONFIG(static) { + features.files = $$PWD/features_staticlib/qscintilla2.prf + } else { + features.files = $$PWD/features/qscintilla2.prf diff --git a/vcpkg/ports/qscintilla/portfile.cmake b/vcpkg/ports/qscintilla/portfile.cmake new file mode 100644 index 0000000..3044654 --- /dev/null +++ b/vcpkg/ports/qscintilla/portfile.cmake @@ -0,0 +1,55 @@ +vcpkg_download_distfile(ARCHIVE + URLS "https://www.riverbankcomputing.com/static/Downloads/QScintilla/${VERSION}/QScintilla_src-${VERSION}.tar.gz" + FILENAME "QScintilla-${VERSION}.tar.gz" + SHA512 19e2f9e0a14947501c575018df368d24eb7f8c74e74faa5246db36415bf28dc0beee507ed0e73107c02b36a99bbaf55f0ef3349f479d2332e1b92b2c4a32788a +) + +vcpkg_extract_source_archive( + SOURCE_PATH + ARCHIVE ${ARCHIVE} + PATCHES + fix-static.patch +) + +vcpkg_find_acquire_program(PYTHON3) + +# Add python3 to path +get_filename_component(PYTHON3_PATH ${PYTHON3} DIRECTORY) +vcpkg_add_to_path(${PYTHON3_PATH}) + +vcpkg_qmake_configure( + SOURCE_PATH "${SOURCE_PATH}/src" + QMAKE_OPTIONS + "CONFIG-=hide_symbols" + "DEFINES+=SCI_NAMESPACE" +) +vcpkg_qmake_install() + +file(GLOB DLLS "${CURRENT_PACKAGES_DIR}/lib/*.dll") +if(DLLS) + file(COPY ${DLLS} DESTINATION "${CURRENT_PACKAGES_DIR}/bin") + file(REMOVE ${DLLS}) +endif() + +file(GLOB DEBUG_DLLS "${CURRENT_PACKAGES_DIR}/debug/lib/*.dll") +if(DEBUG_DLLS) + file(COPY ${DEBUG_DLLS} DESTINATION "${CURRENT_PACKAGES_DIR}/debug/bin") + file(REMOVE ${DEBUG_DLLS}) +endif() + +file(GLOB HEADER_FILES ${SOURCE_PATH}/src/Qsci/*) +file(COPY ${HEADER_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include/Qsci) + +if (VCPKG_TARGET_IS_WINDOWS AND (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)) + vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/Qsci/qsciglobal.h + "#if defined(QSCINTILLA_DLL)" + "#if 1" + ) +endif() + +vcpkg_copy_pdbs() + +file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/unofficial-qscintilla-config.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/unofficial-${PORT}") + +# Handle copyright +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") diff --git a/vcpkg/ports/qscintilla/unofficial-qscintilla-config.cmake b/vcpkg/ports/qscintilla/unofficial-qscintilla-config.cmake new file mode 100644 index 0000000..111ed87 --- /dev/null +++ b/vcpkg/ports/qscintilla/unofficial-qscintilla-config.cmake @@ -0,0 +1,37 @@ +if(NOT TARGET unofficial::qscintilla::qscintilla)
+ include(CMakeFindDependencyMacro)
+ find_dependency(Qt6Widgets CONFIG)
+ if(NOT IOS)
+ find_dependency(Qt6PrintSupport CONFIG)
+ endif()
+
+ add_library(unofficial::qscintilla::qscintilla UNKNOWN IMPORTED)
+ get_filename_component(z_vcpkg_qscintilla_root "${CMAKE_CURRENT_LIST_FILE}" PATH)
+ get_filename_component(z_vcpkg_qscintilla_root "${z_vcpkg_qscintilla_root}" PATH)
+ get_filename_component(z_vcpkg_qscintilla_root "${z_vcpkg_qscintilla_root}" PATH)
+
+ set_target_properties(unofficial::qscintilla::qscintilla PROPERTIES
+ INTERFACE_INCLUDE_DIRECTORIES "${z_vcpkg_qscintilla_root}/include"
+ INTERFACE_LINK_LIBRARIES Qt6::Widgets
+ )
+
+ if(NOT IOS)
+ set_property(TARGET unofficial::qscintilla::qscintilla APPEND PROPERTY INTERFACE_LINK_LIBRARIES Qt6::PrintSupport)
+ endif()
+
+ find_library(Z_VCPKG_QSCINTILLA_LIBRARY_RELEASE NAMES libqscintilla2_qt6 qscintilla2_qt6 PATHS "${z_vcpkg_qscintilla_root}/lib" NO_DEFAULT_PATH)
+ if(EXISTS "${Z_VCPKG_QSCINTILLA_LIBRARY_RELEASE}")
+ set_property(TARGET unofficial::qscintilla::qscintilla APPEND PROPERTY IMPORTED_CONFIGURATIONS "Release")
+ set_target_properties(unofficial::qscintilla::qscintilla PROPERTIES
+ IMPORTED_LOCATION_RELEASE "${Z_VCPKG_QSCINTILLA_LIBRARY_RELEASE}")
+ endif()
+
+ find_library(Z_VCPKG_QSCINTILLA_LIBRARY_DEBUG NAMES libqscintilla2_qt6 qscintilla2_qt6d libqscintilla2_qt6_debug PATHS "${z_vcpkg_qscintilla_root}/debug/lib" NO_DEFAULT_PATH)
+ if(EXISTS "${Z_VCPKG_QSCINTILLA_LIBRARY_DEBUG}")
+ set_property(TARGET unofficial::qscintilla::qscintilla APPEND PROPERTY IMPORTED_CONFIGURATIONS "Debug")
+ set_target_properties(unofficial::qscintilla::qscintilla PROPERTIES
+ IMPORTED_LOCATION_DEBUG "${Z_VCPKG_QSCINTILLA_LIBRARY_DEBUG}")
+ endif()
+
+ unset(z_vcpkg_qscintilla_root)
+endif()
diff --git a/vcpkg/ports/qscintilla/vcpkg.json b/vcpkg/ports/qscintilla/vcpkg.json new file mode 100644 index 0000000..37db884 --- /dev/null +++ b/vcpkg/ports/qscintilla/vcpkg.json @@ -0,0 +1,20 @@ +{ + "name": "qscintilla", + "version": "2.14.1", + "port-version": 1, + "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) and without QtDesigner plugin)", + "homepage": "https://www.riverbankcomputing.com/software/qscintilla", + "license": "GPL-3.0-or-later", + "supports": "!xbox", + "dependencies": [ + { + "name": "qtbase", + "default-features": false + }, + { + "name": "vcpkg-qmake", + "host": true, + "default-features": false + } + ] +} |