Skip to content

Commit

Permalink
Add woff2 v1.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
donny-dont committed Jul 1, 2020
1 parent 0fc6e01 commit d7ec854
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 0 deletions.
1 change: 1 addition & 0 deletions .drone.star
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ def build_config(triplet):
'libwebp',
'openjpeg',
'sqlite3',
'woff2',
'pixman',
'cairo',
'libpsl',
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
| [libwebp](https://github.com/webmproject/libwebp) | 1.1.0 | 01-06-2020 |
| [openjpeg](https://www.openjpeg.org/) | 2.3.1 | 04-02-2019 |
| [sqlite](http://sqlite.org) | 3.32.3 | 06-18-2020 |
| [woff2](https://github.com/google/woff2) | 1.0.2 | 11-13-2017 |
| [freetype](https://www.freetype.org) | 2.10.2 | 05-09-2020 |
| [harbuzz](https://www.freedesktop.org/wiki/Software/HarfBuzz) | 2.6.8 | 06-22-2020 |
| [pixman](http://www.pixman.org) | 0.40.0 | 04-19-2020 |
Expand Down
1 change: 1 addition & 0 deletions WindowsRequirements.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"libwebp",
"openjpeg",
"sqlite3",
"woff2",
"pixman",
"cairo",
"libpsl"
Expand Down
4 changes: 4 additions & 0 deletions ports/woff2/CONTROL
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Source: woff2
Version: 1.0.2
Build-Depends: brotli
Description: WOFF2 font compression reference code
41 changes: 41 additions & 0 deletions ports/woff2/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
include(vcpkg_common_functions)

set(VERSION 1.0.2)

# The woff2 library does not support shared libraries
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)

# Get archive
vcpkg_download_distfile(ARCHIVE
URLS "https://github.com/google/woff2/archive/v${VERSION}.zip"
FILENAME "woff2-${VERSION}.zip"
SHA512 4cb38d1daabe40cbede843c9338338590f1eed6843ba97f646a5abf8d64e814c5854561a8197157eeb267e252e316f67bef230afe4a2846cc734e0fdbd77de7e
)

# Extract archive
vcpkg_extract_source_archive_ex(
OUT_SOURCE_PATH SOURCE_PATH
ARCHIVE ${ARCHIVE}
REF ${VERSION}
PATCHES ${PATCHES}
)

# Run CMake build
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
)

vcpkg_install_cmake()
vcpkg_copy_pdbs()

# Copy tools
file(COPY ${CURRENT_PACKAGES_DIR}/bin/ DESTINATION ${CURRENT_PACKAGES_DIR}/tools/woff2)
vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/woff2)

# Prepare distribution
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/woff2 RENAME copyright)
file(WRITE ${CURRENT_PACKAGES_DIR}/share/woff2/version ${VERSION})

0 comments on commit d7ec854

Please sign in to comment.