From 73134f9af43b68c2df466fe3d8f3efc20755a23f Mon Sep 17 00:00:00 2001 From: pravic Date: Wed, 19 Apr 2017 00:03:31 +0300 Subject: [sciter] Add Sciter 4.x package. --- ports/sciter/CONTROL | 4 +++ ports/sciter/portfile.cmake | 65 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 69 insertions(+) create mode 100644 ports/sciter/CONTROL create mode 100644 ports/sciter/portfile.cmake diff --git a/ports/sciter/CONTROL b/ports/sciter/CONTROL new file mode 100644 index 000000000..7ba210748 --- /dev/null +++ b/ports/sciter/CONTROL @@ -0,0 +1,4 @@ +Source: sciter +Version: 4.0.0.7 +Description: Sciter is an embeddable HTML/CSS/scripting engine. +Maintainer: ehysta@gmail.com diff --git a/ports/sciter/portfile.cmake b/ports/sciter/portfile.cmake new file mode 100644 index 000000000..2f0c6b030 --- /dev/null +++ b/ports/sciter/portfile.cmake @@ -0,0 +1,65 @@ +#header-only library +include(vcpkg_common_functions) + +set(VCPKG_POLICY_DLLS_WITHOUT_LIBS enabled) + +set(SCITER_VERSION 4.0.0.7) +set(SCITER_REVISION 7ce5faadcea7ddcbf116fde6f8a9c837ca32ae69) +set(SCITER_SHA 47a65647fdfb24f27c790f996467f85ce2be8c13a8b7a8ced5e9b75eff210f2c3fe635653892cd5aae82482f0a1206188bdbbbb54b52176eea6e98c46080aeed) +set(SCITER_SRC ${CURRENT_BUILDTREES_DIR}/src/sciter-sdk-${SCITER_REVISION}) + +if(VCPKG_TARGET_ARCHITECTURE STREQUAL x64) + set(SCITER_ARCH 64) +elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL x86) + set(SCITER_ARCH 32) +endif() + +# unpack +vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/c-smile/sciter-sdk/archive/${SCITER_REVISION}.zip" + FILENAME "sciter-sdk-${SCITER_VERSION}.zip" + SHA512 ${SCITER_SHA} +) +vcpkg_extract_source_archive(${ARCHIVE}) + +# include +file(INSTALL ${SCITER_SRC}/include/ DESTINATION ${CURRENT_PACKAGES_DIR}/include/sciter + FILES_MATCHING + PATTERN "sciter-gtk-main.cpp" EXCLUDE + PATTERN "sciter-osx-main.mm" EXCLUDE + PATTERN "*.cpp" + PATTERN "*.h" + PATTERN "*.hpp" + ) + +set(SCITER_SHARE ${CURRENT_PACKAGES_DIR}/share/sciter) + +# license +file(COPY ${SCITER_SRC}/logfile.htm DESTINATION ${SCITER_SHARE}) +file(COPY ${SCITER_SRC}/license.htm DESTINATION ${SCITER_SHARE}) +file(RENAME ${SCITER_SHARE}/license.htm ${SCITER_SHARE}/copyright) + +# samples & widgets +file(COPY ${SCITER_SRC}/samples DESTINATION ${SCITER_SHARE}) +file(COPY ${SCITER_SRC}/widgets DESTINATION ${SCITER_SHARE}) + +# tools +file(INSTALL ${SCITER_SRC}/bin/packfolder.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools) +file(INSTALL ${SCITER_SRC}/bin/tiscript.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools) + +file(INSTALL ${SCITER_SRC}/bin/${SCITER_ARCH}/sciter.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools) +file(INSTALL ${SCITER_SRC}/bin/${SCITER_ARCH}/inspector.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + file(INSTALL ${SCITER_SRC}/bin/${SCITER_ARCH}/sciter.dll DESTINATION ${CURRENT_PACKAGES_DIR}/tools) +endif() + +# bin +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + file(INSTALL ${SCITER_SRC}/bin/${SCITER_ARCH}/sciter.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + file(INSTALL ${SCITER_SRC}/bin/${SCITER_ARCH}/sciter.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + file(INSTALL ${SCITER_SRC}/bin/${SCITER_ARCH}/tiscript-sqlite.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + file(INSTALL ${SCITER_SRC}/bin/${SCITER_ARCH}/tiscript-sqlite.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) +else() + message(WARNING "Sciter requires sciter.dll to run. Download it manually or install dynamic package.") +endif() -- cgit v1.2.3 From 8155559263f8e04d5f951953f4be0468850a7f5b Mon Sep 17 00:00:00 2001 From: pravic Date: Sun, 7 May 2017 00:38:22 +0300 Subject: [sciter] Update to 4.0.0.9 --- ports/sciter/CONTROL | 4 ++-- ports/sciter/portfile.cmake | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ports/sciter/CONTROL b/ports/sciter/CONTROL index 7ba210748..0dd3795ab 100644 --- a/ports/sciter/CONTROL +++ b/ports/sciter/CONTROL @@ -1,4 +1,4 @@ Source: sciter -Version: 4.0.0.7 +Version: 4.0.0.9 Description: Sciter is an embeddable HTML/CSS/scripting engine. -Maintainer: ehysta@gmail.com +Maintainer: andrew.fedoniouk@gmail.com, ehysta@gmail.com diff --git a/ports/sciter/portfile.cmake b/ports/sciter/portfile.cmake index 2f0c6b030..c8a8becde 100644 --- a/ports/sciter/portfile.cmake +++ b/ports/sciter/portfile.cmake @@ -3,9 +3,9 @@ include(vcpkg_common_functions) set(VCPKG_POLICY_DLLS_WITHOUT_LIBS enabled) -set(SCITER_VERSION 4.0.0.7) -set(SCITER_REVISION 7ce5faadcea7ddcbf116fde6f8a9c837ca32ae69) -set(SCITER_SHA 47a65647fdfb24f27c790f996467f85ce2be8c13a8b7a8ced5e9b75eff210f2c3fe635653892cd5aae82482f0a1206188bdbbbb54b52176eea6e98c46080aeed) +set(SCITER_VERSION 4.0.0.9) +set(SCITER_REVISION 43565156c373f9635cc491551b870a948d4d6f37) +set(SCITER_SHA 8d3a37caa2daa0a9ff1f2bfe89f0d5d67c2e9da8de70d971748a4fc6369b7c81e1e2ae97e577d6c8835f2872b1f284db7ee6c255c99bc54752aa3e7c82d81efc) set(SCITER_SRC ${CURRENT_BUILDTREES_DIR}/src/sciter-sdk-${SCITER_REVISION}) if(VCPKG_TARGET_ARCHITECTURE STREQUAL x64) -- cgit v1.2.3 From 1ce540b52f262576d9a0d8163c7522e224a2851e Mon Sep 17 00:00:00 2001 From: pravic Date: Thu, 11 May 2017 21:33:52 +0300 Subject: [sciter] Apply fixes according to review of #1077. --- ports/sciter/0001_patch_stdafx.patch | 12 ++++++++ ports/sciter/CONTROL | 2 +- ports/sciter/portfile.cmake | 58 +++++++++++++++++++++--------------- 3 files changed, 47 insertions(+), 25 deletions(-) create mode 100644 ports/sciter/0001_patch_stdafx.patch diff --git a/ports/sciter/0001_patch_stdafx.patch b/ports/sciter/0001_patch_stdafx.patch new file mode 100644 index 000000000..b4a85d5d3 --- /dev/null +++ b/ports/sciter/0001_patch_stdafx.patch @@ -0,0 +1,12 @@ +diff --git a/include/sciter-win-main.cpp b/include/sciter-win-main.cpp +index 9f2699e..104b70a 100644 +--- a/include/sciter-win-main.cpp ++++ b/include/sciter-win-main.cpp +@@ -1,4 +1,6 @@ +-#include "stdafx.h" ++// It is better to disable stdafx.h by default. ++// And enable it explicitly via /Fstdafx.h compiler option (C/C++ - Advanced - Force Include File). ++// #include "stdafx.h" + + #include + diff --git a/ports/sciter/CONTROL b/ports/sciter/CONTROL index 0dd3795ab..ba9d888a5 100644 --- a/ports/sciter/CONTROL +++ b/ports/sciter/CONTROL @@ -1,4 +1,4 @@ Source: sciter -Version: 4.0.0.9 +Version: 4.0.0.9-1 Description: Sciter is an embeddable HTML/CSS/scripting engine. Maintainer: andrew.fedoniouk@gmail.com, ehysta@gmail.com diff --git a/ports/sciter/portfile.cmake b/ports/sciter/portfile.cmake index c8a8becde..01542219f 100644 --- a/ports/sciter/portfile.cmake +++ b/ports/sciter/portfile.cmake @@ -1,38 +1,49 @@ -#header-only library +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + message(WARNING "Warning: Sciter requires sciter.dll to run. Download it manually or install dynamic package.") +endif() + include(vcpkg_common_functions) +# header-only library set(VCPKG_POLICY_DLLS_WITHOUT_LIBS enabled) set(SCITER_VERSION 4.0.0.9) set(SCITER_REVISION 43565156c373f9635cc491551b870a948d4d6f37) -set(SCITER_SHA 8d3a37caa2daa0a9ff1f2bfe89f0d5d67c2e9da8de70d971748a4fc6369b7c81e1e2ae97e577d6c8835f2872b1f284db7ee6c255c99bc54752aa3e7c82d81efc) +set(SCITER_SHA 6c50822c46784a8b2114973dffa8ec4041c69f84303507fdcde425dbac8d698dd6241a209cdc0ae0663751ed0f78d92f7b0c26794417f374978bfb3e33bf004c) set(SCITER_SRC ${CURRENT_BUILDTREES_DIR}/src/sciter-sdk-${SCITER_REVISION}) if(VCPKG_TARGET_ARCHITECTURE STREQUAL x64) - set(SCITER_ARCH 64) + set(SCITER_ARCH 64) elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL x86) - set(SCITER_ARCH 32) + set(SCITER_ARCH 32) endif() -# unpack -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/c-smile/sciter-sdk/archive/${SCITER_REVISION}.zip" - FILENAME "sciter-sdk-${SCITER_VERSION}.zip" +# check out +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO c-smile/sciter-sdk + REF ${SCITER_REVISION} SHA512 ${SCITER_SHA} ) -vcpkg_extract_source_archive(${ARCHIVE}) -# include +# disable stdafx.h +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES ${CMAKE_CURRENT_LIST_DIR}/0001_patch_stdafx.patch +) + +# install include directory file(INSTALL ${SCITER_SRC}/include/ DESTINATION ${CURRENT_PACKAGES_DIR}/include/sciter - FILES_MATCHING - PATTERN "sciter-gtk-main.cpp" EXCLUDE - PATTERN "sciter-osx-main.mm" EXCLUDE - PATTERN "*.cpp" - PATTERN "*.h" - PATTERN "*.hpp" - ) + FILES_MATCHING + PATTERN "sciter-gtk-main.cpp" EXCLUDE + PATTERN "sciter-osx-main.mm" EXCLUDE + PATTERN "*.cpp" + PATTERN "*.h" + PATTERN "*.hpp" +) set(SCITER_SHARE ${CURRENT_PACKAGES_DIR}/share/sciter) +set(SCITER_TOOLS ${CURRENT_PACKAGES_DIR}/tools/sciter) # license file(COPY ${SCITER_SRC}/logfile.htm DESTINATION ${SCITER_SHARE}) @@ -44,14 +55,15 @@ file(COPY ${SCITER_SRC}/samples DESTINATION ${SCITER_SHARE}) file(COPY ${SCITER_SRC}/widgets DESTINATION ${SCITER_SHARE}) # tools -file(INSTALL ${SCITER_SRC}/bin/packfolder.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools) -file(INSTALL ${SCITER_SRC}/bin/tiscript.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools) +file(INSTALL ${SCITER_SRC}/bin/packfolder.exe DESTINATION ${SCITER_TOOLS}) +file(INSTALL ${SCITER_SRC}/bin/tiscript.exe DESTINATION ${SCITER_TOOLS}) -file(INSTALL ${SCITER_SRC}/bin/${SCITER_ARCH}/sciter.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools) -file(INSTALL ${SCITER_SRC}/bin/${SCITER_ARCH}/inspector.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools) +file(INSTALL ${SCITER_SRC}/bin/${SCITER_ARCH}/sciter.exe DESTINATION ${SCITER_TOOLS}) +file(INSTALL ${SCITER_SRC}/bin/${SCITER_ARCH}/inspector.exe DESTINATION ${SCITER_TOOLS}) if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - file(INSTALL ${SCITER_SRC}/bin/${SCITER_ARCH}/sciter.dll DESTINATION ${CURRENT_PACKAGES_DIR}/tools) + # DLLs should not be present in a static build + file(INSTALL ${SCITER_SRC}/bin/${SCITER_ARCH}/sciter.dll DESTINATION ${SCITER_TOOLS}) endif() # bin @@ -60,6 +72,4 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) file(INSTALL ${SCITER_SRC}/bin/${SCITER_ARCH}/sciter.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) file(INSTALL ${SCITER_SRC}/bin/${SCITER_ARCH}/tiscript-sqlite.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin) file(INSTALL ${SCITER_SRC}/bin/${SCITER_ARCH}/tiscript-sqlite.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) -else() - message(WARNING "Sciter requires sciter.dll to run. Download it manually or install dynamic package.") endif() -- cgit v1.2.3