Skip to content

Commit

Permalink
[snappy] Fix hash and switch to vcpkg_cmake_* (microsoft#21054)
Browse files Browse the repository at this point in the history
  • Loading branch information
Osyotr authored Nov 5, 2021
1 parent 1f9385f commit 8831ef2
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 12 deletions.
19 changes: 9 additions & 10 deletions ports/snappy/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,21 @@ vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO google/snappy
REF 1.1.9
SHA512 F1F8A90F5F7F23310423574B1D8C9ACB84C66EA620F3999D1060395205E5760883476837ABA02F0AA913AF60819E34C625D8308C18A5D7A9C4E190F35968B024
SHA512 f1f8a90f5f7f23310423574b1d8c9acb84c66ea620f3999d1060395205e5760883476837aba02f0aa913af60819e34c625d8308c18a5d7a9c4e190f35968b024
HEAD_REF master
)

vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DSNAPPY_BUILD_TESTS=OFF
-DSNAPPY_BUILD_BENCHMARKS=OFF
-DCMAKE_DEBUG_POSTFIX=d)
-DCMAKE_DEBUG_POSTFIX=d
)

vcpkg_install_cmake()
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/Snappy)
vcpkg_cmake_install()
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/Snappy)
vcpkg_copy_pdbs()

file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/snappy)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/snappy/COPYING ${CURRENT_PACKAGES_DIR}/share/snappy/copyright)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
13 changes: 12 additions & 1 deletion ports/snappy/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
{
"name": "snappy",
"version": "1.1.9",
"port-version": 1,
"description": "A fast compressor/decompressor.",
"homepage": "https://github.com/google/snappy"
"homepage": "https://github.com/google/snappy",
"dependencies": [
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
]
}
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -6270,7 +6270,7 @@
},
"snappy": {
"baseline": "1.1.9",
"port-version": 0
"port-version": 1
},
"sndfile": {
"baseline": "0",
Expand Down
5 changes: 5 additions & 0 deletions versions/s-/snappy.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "c92c17d378451a07e9cc974fa31893d1cae61b66",
"version": "1.1.9",
"port-version": 1
},
{
"git-tree": "ca2180e16528c28e8afe86ce0d7cf0e8a053f273",
"version": "1.1.9",
Expand Down

0 comments on commit 8831ef2

Please sign in to comment.