Skip to content

Commit

Permalink
[seal] update to <4.0.0> (microsoft#27952)
Browse files Browse the repository at this point in the history
* [seal] update to <4.0.0>

* update version

* fix find_package

* update version

* add license

* update version
  • Loading branch information
JonLiu1993 authored Nov 22, 2022
1 parent 11a9d85 commit 35cff4f
Show file tree
Hide file tree
Showing 9 changed files with 50 additions and 10 deletions.
13 changes: 13 additions & 0 deletions ports/apsi/fix-find_package.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3a7854d..b1a5f51 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -117,7 +117,7 @@ set(APSI_INCLUDES_INSTALL_DIR ${CMAKE_INSTALL_INCLUDEDIR}/APSI-${APSI_VERSION_MA
# find_package might throw a FATAL_ERROR before"xxx: not found", e.g. with vcpkg.cmake.

# Microsoft SEAL
-find_package(SEAL 3.7 QUIET REQUIRED)
+find_package(SEAL CONFIG REQUIRED)
if(NOT SEAL_FOUND)
message(FATAL_ERROR "Microsoft SEAL: not found")
else()
4 changes: 3 additions & 1 deletion ports/apsi/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ vcpkg_from_github(
REF ba71aeb28a9f21e4ad59c45aa88232b099ce0b87 #0.8.2
SHA512 810bcbe0afa3d1c9d299a85bc4266135bdf9adc33bfc754c59731f6cfa6a89d449fb134cef34c4614742bd50e9f8f3916e5b64998dcea69883ca27b7da3c5f04
HEAD_REF main
PATCHES
fix-find_package.patch
)

vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
Expand All @@ -22,7 +24,7 @@ if (NOT HOST_TRIPLET STREQUAL TARGET_TRIPLET)
endif()

vcpkg_cmake_configure(
SOURCE_PATH ${SOURCE_PATH}
SOURCE_PATH "${SOURCE_PATH}"
DISABLE_PARALLEL_CONFIGURE
OPTIONS
"-DAPSI_BUILD_TESTS=OFF"
Expand Down
1 change: 1 addition & 0 deletions ports/apsi/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "apsi",
"version-semver": "0.8.2",
"port-version": 1,
"description": "APSI is a research library for asymmetric private set intersection.",
"homepage": "https://github.com/microsoft/APSI",
"license": "MIT",
Expand Down
13 changes: 13 additions & 0 deletions ports/seal/fix-find_package.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9fa65cb..c3651c6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -223,7 +223,7 @@ if(SEAL_USE_INTEL_HEXL)
message(STATUS "Intel HEXL: download ...")
seal_fetch_thirdparty_content(ExternalIntelHEXL)
else()
- find_package(HEXL 1.2.3)
+ find_package(HEXL CONFIG REQUIRED)
if (NOT TARGET HEXL::hexl)
message(FATAL_ERROR "Intel HEXL: not found")
endif()
9 changes: 5 additions & 4 deletions ports/seal/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO microsoft/SEAL
REF 79234726053c45eede688400aa219fdec0810bd8
SHA512 634ad75d70f04cce220bfa9f6d13e8ddb293e8403ebd195e2c8b522b751a1a268021feea7843038037ed6d1b354b2e470ad565966a117613cf5371073afda9a4
REF a0fc0b732f44fa5242593ab488c8b2b3076a5f76 #v4.0.0
SHA512 74c2f9ddbcdd93795185be8ccffda1b34fd75cb4f7458804a7faa97b6a8ce244c7b2ba9e1d918e685bf4dbde1ffc7be05232b3237acb6e3e54d822516633c837
HEAD_REF main
PATCHES
gsl.patch
shared-zstd.patch
fix-find_package.patch
)

vcpkg_replace_string(
Expand All @@ -28,7 +29,7 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
)

vcpkg_cmake_configure(
SOURCE_PATH ${SOURCE_PATH}
SOURCE_PATH "${SOURCE_PATH}"
DISABLE_PARALLEL_CONFIGURE
OPTIONS
"-DSEAL_BUILD_DEPS=OFF"
Expand All @@ -40,7 +41,7 @@ vcpkg_cmake_configure(

vcpkg_cmake_install()

vcpkg_cmake_config_fixup(PACKAGE_NAME "SEAL" CONFIG_PATH "lib/cmake/SEAL-3.7")
vcpkg_cmake_config_fixup(PACKAGE_NAME "SEAL" CONFIG_PATH "lib/cmake/SEAL-4.0")

vcpkg_fixup_pkgconfig()

Expand Down
4 changes: 2 additions & 2 deletions ports/seal/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "seal",
"version-semver": "3.7.2",
"port-version": 3,
"version": "4.0.0",
"description": "Microsoft SEAL is an easy-to-use and powerful homomorphic encryption library.",
"homepage": "https://github.com/microsoft/SEAL",
"license": "MIT",
"dependencies": [
{
"name": "vcpkg-cmake",
Expand Down
5 changes: 5 additions & 0 deletions versions/a-/apsi.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "b217158e7c8e8626bbb455182a980db7295c085d",
"version-semver": "0.8.2",
"port-version": 1
},
{
"git-tree": "cbe91971ef248ba844e254d91cbd73ad10fbe131",
"version-semver": "0.8.2",
Expand Down
6 changes: 3 additions & 3 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@
},
"apsi": {
"baseline": "0.8.2",
"port-version": 0
"port-version": 1
},
"arb": {
"baseline": "2.21.1",
Expand Down Expand Up @@ -6825,8 +6825,8 @@
"port-version": 6
},
"seal": {
"baseline": "3.7.2",
"port-version": 3
"baseline": "4.0.0",
"port-version": 0
},
"secp256k1": {
"baseline": "2022-07-11",
Expand Down
5 changes: 5 additions & 0 deletions versions/s-/seal.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "ca4941679f80617e492ff747df3ca704af624583",
"version": "4.0.0",
"port-version": 0
},
{
"git-tree": "323502a09f055a964f6b501aed82701570b96cba",
"version-semver": "3.7.2",
Expand Down

0 comments on commit 35cff4f

Please sign in to comment.