From ac85ec3ac700f2ca01d25c98dfcfc3125ecf9866 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 23 Oct 2018 19:59:24 -0700 Subject: [PATCH] [scintilla] Update to 4.1.2 --- ports/scintilla/CONTROL | 2 +- ports/scintilla/portfile.cmake | 67 +++++++++------------------------- 2 files changed, 18 insertions(+), 51 deletions(-) diff --git a/ports/scintilla/CONTROL b/ports/scintilla/CONTROL index 7cf89dfd213a0e..8f1b2f38c0c0d3 100644 --- a/ports/scintilla/CONTROL +++ b/ports/scintilla/CONTROL @@ -1,3 +1,3 @@ Source: scintilla -Version: 4.0.3 +Version: 4.1.2 Description: A free source code editing component for Win32, GTK+, and OS X diff --git a/ports/scintilla/portfile.cmake b/ports/scintilla/portfile.cmake index ecf554abdf444b..aad39a8dc2b9f3 100644 --- a/ports/scintilla/portfile.cmake +++ b/ports/scintilla/portfile.cmake @@ -1,55 +1,22 @@ -if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - message(FATAL_ERROR "scintilla only supports dynamic linkage") -endif() -if(VCPKG_CRT_LINKAGE STREQUAL "static") - message(FATAL_ERROR "scintilla only supports dynamic crt") -endif() - include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/scintilla) -vcpkg_download_distfile(ARCHIVE - URLS "http://www.scintilla.org/scintilla403.zip" - FILENAME "scintilla403.zip" - SHA512 51704651e99a6b51afff9957676afcf71fa1cc289c1713402c6e50c44a12ec956d5216751ebbbe6f251a23fa8c974510e7c9f37cb66f25f69c30e500e426baad -) -file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}) -vcpkg_extract_source_archive(${ARCHIVE} ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}) -if(TRIPLET_SYSTEM_ARCH MATCHES "x86") - set(BUILD_ARCH "Win32") -else() - set(BUILD_ARCH ${TRIPLET_SYSTEM_ARCH}) -endif() +vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY ONLY_DYNAMIC_CRT) -vcpkg_build_msbuild( - PROJECT_PATH ${SOURCE_PATH}/Win32/SciLexer.vcxproj - PLATFORM ${MSBUILD_PLATFORM} +vcpkg_download_distfile(ARCHIVE + URLS "http://www.scintilla.org/scintilla412.zip" + FILENAME "scintilla412.zip" + SHA512 10e24a2def5b3104b0f2eec473c53edb0a0cc19fbbef261e460a77415ec68ff83f9ee20c76cda7987627708c1d4ead5f964d4d5a98929d8256280bfa9bd0cddc +) +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + REF 4.1.2 ) -# Handle headers -file(INSTALL ${SOURCE_PATH}/include/ILexer.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) -file(INSTALL ${SOURCE_PATH}/include/Sci_Position.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) -file(INSTALL ${SOURCE_PATH}/include/SciLexer.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) -file(INSTALL ${SOURCE_PATH}/include/Scintilla.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) - -# Handle libraries -if(BUILD_ARCH STREQUAL "Win32") - set(BUILD_DIR_DEBUG "/Debug") - set(BUILD_DIR_RELEASE "/Release") -else() - set(BUILD_DIR_DEBUG "${BUILD_ARCH}/Debug") - set(BUILD_DIR_RELEASE "${BUILD_ARCH}/Release") -endif() - -file(INSTALL ${SOURCE_PATH}/win32/${BUILD_DIR_RELEASE}/SciLexer.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin) -file(INSTALL ${SOURCE_PATH}/win32/${BUILD_DIR_DEBUG}/SciLexer.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) -file(INSTALL ${SOURCE_PATH}/win32/${BUILD_DIR_RELEASE}/SciLexer.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib) -file(INSTALL ${SOURCE_PATH}/win32/${BUILD_DIR_DEBUG}/SciLexer.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) - -# Handle PDBs - -file(INSTALL ${SOURCE_PATH}/win32/${BUILD_DIR_RELEASE}/SciLexer.pdb DESTINATION ${CURRENT_PACKAGES_DIR}/bin) -file(INSTALL ${SOURCE_PATH}/win32/${BUILD_DIR_DEBUG}/SciLexer.pdb DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) - -# Handle copyright -file(INSTALL ${SOURCE_PATH}/License.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/scintilla RENAME copyright) +vcpkg_install_msbuild( + SOURCE_PATH ${SOURCE_PATH} + PROJECT_SUBPATH Win32/SciLexer.vcxproj + INCLUDES_SUBPATH include + LICENSE_SUBPATH License.txt + ALLOW_ROOT_INCLUDES +)