git: 830b84f55520 - main - security/liboqs: fix build on powerpc64le

From: Piotr Kubaj <pkubaj_at_FreeBSD.org>
Date: Wed, 13 Oct 2021 10:50:37 UTC
The branch main has been updated by pkubaj:

URL: https://cgit.FreeBSD.org/ports/commit/?id=830b84f555208585fd2be1d1e60968b33fe73e62

commit 830b84f555208585fd2be1d1e60968b33fe73e62
Author:     Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2021-10-13 10:48:35 +0000
Commit:     Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2021-10-13 10:48:35 +0000

    security/liboqs: fix build on powerpc64le
    
    1. Add FreeBSD's name for 64-bit POWER little endian,
    2. Don't use -Werror:
    /wrkdirs/usr/ports/security/liboqs/work/liboqs-0.7.0/tests/ds_benchmark.h:142:45: error: implicit conversion from 'long' to 'double' may lose precision [-Werror,-Wimplicit-int-float-conversion]
            return (uint64_t)(time.tv_sec * 1e9 + time.tv_nsec);
---
 security/liboqs/files/patch-.CMake_compiler__opts.cmake | 10 ++++++++++
 security/liboqs/files/patch-CMakeLists.txt              | 10 ++++++++++
 2 files changed, 20 insertions(+)

diff --git a/security/liboqs/files/patch-.CMake_compiler__opts.cmake b/security/liboqs/files/patch-.CMake_compiler__opts.cmake
new file mode 100644
index 000000000000..2b1086e3967e
--- /dev/null
+++ b/security/liboqs/files/patch-.CMake_compiler__opts.cmake
@@ -0,0 +1,10 @@
+--- .CMake/compiler_opts.cmake.orig	2021-10-13 10:39:00 UTC
++++ .CMake/compiler_opts.cmake
+@@ -51,7 +51,6 @@ if(CMAKE_C_COMPILER_ID MATCHES "Clang|GNU")
+ endif()
+ 
+ if(CMAKE_C_COMPILER_ID MATCHES "Clang")
+-    add_compile_options(-Werror)
+     add_compile_options(-Wall)
+     add_compile_options(-Wextra)
+     add_compile_options(-Wpedantic)
diff --git a/security/liboqs/files/patch-CMakeLists.txt b/security/liboqs/files/patch-CMakeLists.txt
new file mode 100644
index 000000000000..d38d606ded76
--- /dev/null
+++ b/security/liboqs/files/patch-CMakeLists.txt
@@ -0,0 +1,10 @@
+--- CMakeLists.txt.orig	2021-10-13 10:15:47 UTC
++++ CMakeLists.txt
+@@ -54,6 +54,7 @@ elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "armel|armhf|arm
+         set(OQS_DIST_ARM32v7_BUILD ON)
+     endif()
+ elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "ppc64le")
++elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "(ppc64le|powerpc64le)")
+     set(ARCH "ppc64le")
+     set(ARCH_PPC64LE ON)
+     if(${OQS_DIST_BUILD})