diff options
| author | Maxim Kulyk <mxx888777@gmail.com> | 2019-05-20 03:17:40 +0300 |
|---|---|---|
| committer | Griffin Downs <35574547+grdowns@users.noreply.github.com> | 2019-05-19 17:17:40 -0700 |
| commit | 3480a13ff057a86775560b6db47ce488801b49ef (patch) | |
| tree | 3701efe6cbb12131479814d2610c40f5b791db87 | |
| parent | 030e74940cc40db2415700e87e3b2c8aeeee8108 (diff) | |
| download | vcpkg-3480a13ff057a86775560b6db47ce488801b49ef.tar.gz vcpkg-3480a13ff057a86775560b6db47ce488801b49ef.zip | |
[blend2d] add port (#6110)
- port version `beta_2019-04-30`
- same versioning as in asmjit pakage with addition of `beta_` prefix
| -rw-r--r-- | ports/blend2d/CONTROL | 10 | ||||
| -rw-r--r-- | ports/blend2d/portfile.cmake | 60 |
2 files changed, 70 insertions, 0 deletions
diff --git a/ports/blend2d/CONTROL b/ports/blend2d/CONTROL new file mode 100644 index 000000000..ef22b5264 --- /dev/null +++ b/ports/blend2d/CONTROL @@ -0,0 +1,10 @@ +Source: blend2d +Version: beta_2019-04-30 +Description: Beta 2D Vector Graphics Powered by a JIT Compiler +Default-Features: jit, logging + +Feature: jit +Description: asmjit is used to jit compile pipelines + +Feature: logging +Description: enables logging diff --git a/ports/blend2d/portfile.cmake b/ports/blend2d/portfile.cmake new file mode 100644 index 000000000..c23c90afd --- /dev/null +++ b/ports/blend2d/portfile.cmake @@ -0,0 +1,60 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO blend2d/blend2d + REF 69141350b5a654f328c8529ae301aa1e6bad5342 + SHA512 d9bdd234f443c0ef8793dba1a76cc567bab3f9cf32d835d9e285f7ad946a56e0bc03eab30f61bbce51318e18a74ecfcfc965ac94e1ff6cef21e9b3ccc6a42120 + HEAD_REF master +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BLEND2D_BUILD_STATIC) + +if(NOT ("jit" IN_LIST FEATURES)) + set(BLEND2D_BUILD_NO_JIT TRUE) +endif() +if(NOT ("logging" IN_LIST FEATURES)) + set(BLEND2D_BUILD_NO_LOGGING TRUE) +endif() + + +if(NOT BLEND2D_BUILD_NO_JIT) + vcpkg_from_github( + OUT_SOURCE_PATH ASMJIT_SOURCE_PATH + REPO asmjit/asmjit + REF f4e685cef003c40ad0d348d0c9eb2a1fe63d8521 + SHA512 77981fc32e746fc88f5707b4a8e8557283261b2657248f0d4900f47bd500de4efe47619a53f32413ea3c6f116e084cac6fdb48b6b92d75e824585d94c785d2b1 + HEAD_REF next-wip + ) + + file(REMOVE_RECURSE ${SOURCE_PATH}/3rdparty/asmjit) + + get_filename_component(ASMJIT_SOURCE_DIR_NAME ${ASMJIT_SOURCE_PATH} NAME) + file(COPY ${ASMJIT_SOURCE_PATH} DESTINATION ${SOURCE_PATH}/3rdparty) + file(RENAME ${SOURCE_PATH}/3rdparty/${ASMJIT_SOURCE_DIR_NAME} ${SOURCE_PATH}/3rdparty/asmjit) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBLEND2D_BUILD_STATIC=${BLEND2D_BUILD_STATIC} + -DBLEND2D_BUILD_NO_JIT=${BLEND2D_BUILD_NO_JIT} + -DBLEND2D_BUILD_NO_LOGGING=${BLEND2D_BUILD_NO_LOGGING} +) + + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + + +if(BLEND2D_BUILD_STATIC) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + + + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/blend2d RENAME copyright) |
