aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeekingMeaning <meaningseeking@protonmail.com>2020-01-13 15:31:57 -0800
committernicole mazzuca <mazzucan@outlook.com>2020-01-13 15:31:57 -0800
commit5c0b7b55771fe4b40d3f4b7a8069b1c71022490e (patch)
treeea5f86b74326262ae54a9d58911bd1ef2cdcf9b8
parente5f7e0b9ad16a91c7a4320f2d51c46cff3a1a0d7 (diff)
downloadvcpkg-5c0b7b55771fe4b40d3f4b7a8069b1c71022490e.tar.gz
vcpkg-5c0b7b55771fe4b40d3f4b7a8069b1c71022490e.zip
[tfhe] Fix Mac support (#9649)
* [tfhe] Fix Mac support Co-authored-by: Nicole Mazzuca <mazzucan@outlook.com>
-rw-r--r--ports/tfhe/CONTROL4
-rw-r--r--ports/tfhe/mac-fix.patch13
-rw-r--r--ports/tfhe/portfile.cmake4
-rw-r--r--scripts/ci.baseline.txt1
4 files changed, 18 insertions, 4 deletions
diff --git a/ports/tfhe/CONTROL b/ports/tfhe/CONTROL
index 434694396..514e5fbee 100644
--- a/ports/tfhe/CONTROL
+++ b/ports/tfhe/CONTROL
@@ -1,4 +1,4 @@
Source: tfhe
-Version: 1.0.1
+Version: 1.0.1-1
Homepage: https://github.com/tfhe/tfhe
-Description: TFHE is open-source software distributed under the terms of the Apache 2.0 license. \ No newline at end of file
+Description: TFHE is open-source software distributed under the terms of the Apache 2.0 license.
diff --git a/ports/tfhe/mac-fix.patch b/ports/tfhe/mac-fix.patch
new file mode 100644
index 000000000..20161feb5
--- /dev/null
+++ b/ports/tfhe/mac-fix.patch
@@ -0,0 +1,13 @@
+diff --git a/src/libtfhe/fft_processors/nayuki/fft_processor_nayuki.cpp b/src/libtfhe/fft_processors/nayuki/fft_processor_nayuki.cpp
+index 26de3f0..422c7f6 100644
+--- a/src/libtfhe/fft_processors/nayuki/fft_processor_nayuki.cpp
++++ b/src/libtfhe/fft_processors/nayuki/fft_processor_nayuki.cpp
+@@ -12,7 +12,7 @@ FFT_Processor_nayuki::FFT_Processor_nayuki(const int N): _2N(2*N),N(N),Ns2(N/2)
+ tables_reverse = fft_init_reverse(_2N);
+ omegaxminus1 = (cplx*) malloc(sizeof(cplx) * _2N);
+ for (int x=0; x<_2N; x++) {
+- omegaxminus1[x]=cos(x*M_PI/N)-1. + sin(x*M_PI/N) * 1i;
++ omegaxminus1[x]=cplx(cos(x*M_PI/N)-1., sin(x*M_PI/N)); // instead of cos(x*M_PI/N)-1. + sin(x*M_PI/N) * 1i
+ //exp(i.x.pi/N)-1
+ }
+ }
diff --git a/ports/tfhe/portfile.cmake b/ports/tfhe/portfile.cmake
index 7a40d0ace..aa98703eb 100644
--- a/ports/tfhe/portfile.cmake
+++ b/ports/tfhe/portfile.cmake
@@ -1,4 +1,4 @@
-vcpkg_fail_port_install(MESSAGE "${PORT} currently only supports Linux" ON_TARGET "Windows" "osx")
+vcpkg_fail_port_install(MESSAGE "${PORT} currently only supports Unix" ON_TARGET "Windows")
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
@@ -6,6 +6,8 @@ vcpkg_from_github(
REF v1.0.1
SHA512 1d625eb00bf6a36fd86cfad8e1763d7030dd73d68f2422d1678f51352708e9275f0ce69c23fb0d9fec30fba00e1ca4a3df29fb4fc6dfe3b7f16e0d350aa7f170
HEAD_REF master
+ PATCHES
+ mac-fix.patch
)
vcpkg_configure_cmake(
diff --git a/scripts/ci.baseline.txt b/scripts/ci.baseline.txt
index c0386b701..28981aedd 100644
--- a/scripts/ci.baseline.txt
+++ b/scripts/ci.baseline.txt
@@ -1636,7 +1636,6 @@ tfhe:x64-windows-static=fail
tfhe:x64-uwp=fail
tfhe:arm64-windows=fail
tfhe:arm-uwp=fail
-tfhe:x64-osx=fail
theia:arm64-windows = skip
theia:arm-uwp = skip
theia:x64-uwp = skip