git: 34d92a692855 - main - security/s2n: Update to 1.1.2

From: Danilo Egea Gondolfo <danilo_at_FreeBSD.org>
Date: Mon, 25 Oct 2021 14:09:28 UTC
The branch main has been updated by danilo:

URL: https://cgit.FreeBSD.org/ports/commit/?id=34d92a6928553c6b2be6e8b34450f62e36d1402e

commit 34d92a6928553c6b2be6e8b34450f62e36d1402e
Author:     Danilo Egea Gondolfo <danilo@FreeBSD.org>
AuthorDate: 2021-10-23 12:35:58 +0000
Commit:     Danilo Egea Gondolfo <danilo@FreeBSD.org>
CommitDate: 2021-10-25 14:04:49 +0000

    security/s2n: Update to 1.1.2
    
    - Update WWW
---
 security/s2n/Makefile                            |  5 +++--
 security/s2n/distinfo                            |  6 +++---
 security/s2n/files/patch-CMakeLists.txt          | 11 -----------
 security/s2n/files/patch-bin_s2nc.c              | 10 ++++++++++
 security/s2n/files/patch-bin_s2nd.c              | 10 ++++++++++
 security/s2n/files/patch-utils_s2n__asn1__time.c | 11 +++++++++++
 security/s2n/pkg-descr                           |  2 +-
 security/s2n/pkg-plist                           |  3 ++-
 8 files changed, 40 insertions(+), 18 deletions(-)

diff --git a/security/s2n/Makefile b/security/s2n/Makefile
index 6f558d412e73..e6dc7c3de7a4 100644
--- a/security/s2n/Makefile
+++ b/security/s2n/Makefile
@@ -1,7 +1,7 @@
 # Created by: Danilo Egea Gondolfo <danilo@FreeBSD.org>
 
 PORTNAME=	s2n
-PORTVERSION=	0.10.23
+PORTVERSION=	1.1.2
 DISTVERSIONPREFIX=	v
 PORTEPOCH=	1
 CATEGORIES=	security
@@ -14,7 +14,8 @@ LICENSE=	APACHE20
 USES=		cmake ssl
 
 USE_GITHUB=	yes
-GH_ACCOUNT=	awslabs
+GH_ACCOUNT=	aws
+GH_PROJECT=	s2n-tls
 
 OPTIONS_DEFINE=	DOCS EXAMPLES TEST
 
diff --git a/security/s2n/distinfo b/security/s2n/distinfo
index 2d967bd8da99..10456aafbbb3 100644
--- a/security/s2n/distinfo
+++ b/security/s2n/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1609762871
-SHA256 (awslabs-s2n-v0.10.23_GH0.tar.gz) = 0f752e384cfa929da3dcd8f6223b2fe262f937e7cc771ac4c824cd4b33849dd5
-SIZE (awslabs-s2n-v0.10.23_GH0.tar.gz) = 6188649
+TIMESTAMP = 1634841045
+SHA256 (aws-s2n-tls-v1.1.2_GH0.tar.gz) = 91b5940ff345482cfd582a4c6d04950a9788f70ac3e383af41ac1eeee0441d1e
+SIZE (aws-s2n-tls-v1.1.2_GH0.tar.gz) = 7387552
diff --git a/security/s2n/files/patch-CMakeLists.txt b/security/s2n/files/patch-CMakeLists.txt
deleted file mode 100644
index 399e74eb7fbc..000000000000
--- a/security/s2n/files/patch-CMakeLists.txt
+++ /dev/null
@@ -1,11 +0,0 @@
---- CMakeLists.txt.orig	2021-01-05 11:46:44 UTC
-+++ CMakeLists.txt
-@@ -177,7 +177,7 @@ set(CMAKE_C_FLAGS_DEBUGOPT "")
- 
- target_compile_options(${PROJECT_NAME} PRIVATE -pedantic -std=gnu99 -Wall -Werror -Wimplicit -Wunused -Wcomment -Wchar-subscripts
-         -Wuninitialized -Wshadow -Wcast-qual -Wcast-align -Wwrite-strings -Wno-deprecated-declarations -Wno-unknown-pragmas -Wformat-security
--        -Wno-missing-braces -fvisibility=hidden -DS2N_EXPORTS)
-+        -Wno-missing-braces -DS2N_EXPORTS)
- 
- if(S2N_NO_PQ)
-     target_compile_options(${PROJECT_NAME} PUBLIC -DS2N_NO_PQ)
diff --git a/security/s2n/files/patch-bin_s2nc.c b/security/s2n/files/patch-bin_s2nc.c
new file mode 100644
index 000000000000..ee470cd8636b
--- /dev/null
+++ b/security/s2n/files/patch-bin_s2nc.c
@@ -0,0 +1,10 @@
+--- bin/s2nc.c.orig	2021-10-21 18:41:25 UTC
++++ bin/s2nc.c
+@@ -14,6 +14,7 @@
+  */
+ 
+ #include <sys/param.h>
++#include <sys/socket.h>
+ #include <netdb.h>
+ 
+ #include <unistd.h>
diff --git a/security/s2n/files/patch-bin_s2nd.c b/security/s2n/files/patch-bin_s2nd.c
new file mode 100644
index 000000000000..4fb149a57dfd
--- /dev/null
+++ b/security/s2n/files/patch-bin_s2nd.c
@@ -0,0 +1,10 @@
+--- bin/s2nd.c.orig	2021-10-21 18:40:56 UTC
++++ bin/s2nd.c
+@@ -15,6 +15,7 @@
+ 
+ #include <sys/stat.h>
+ #include <sys/mman.h>
++#include <sys/socket.h>
+ #include <netdb.h>
+ #include <signal.h>
+ #include <unistd.h>
diff --git a/security/s2n/files/patch-utils_s2n__asn1__time.c b/security/s2n/files/patch-utils_s2n__asn1__time.c
new file mode 100644
index 000000000000..d419b0b40a23
--- /dev/null
+++ b/security/s2n/files/patch-utils_s2n__asn1__time.c
@@ -0,0 +1,11 @@
+--- utils/s2n_asn1_time.c.orig	2021-10-21 18:40:29 UTC
++++ utils/s2n_asn1_time.c
+@@ -47,7 +47,7 @@ typedef enum parser_state {
+ 
+ static inline long get_gmt_offset(struct tm *t) {
+     /* See: https://sourceware.org/git/?p=glibc.git;a=blob;f=include/features.h;h=ba272078cf2263ec88e039fda7524c136a4a7953;hb=HEAD */
+-#if defined(__USE_MISC) || defined(__ANDROID__) || defined(ANDROID) || (defined(__APPLE__) && defined(__MACH__))
++#if defined(__USE_MISC) || defined(__ANDROID__) || defined(ANDROID) || (defined(__APPLE__) && defined(__MACH__)) || defined(__FreeBSD__)
+     return t->tm_gmtoff;
+ #else
+     return t->__tm_gmtoff;
diff --git a/security/s2n/pkg-descr b/security/s2n/pkg-descr
index 5ad9e96db4cf..1cb8643017eb 100644
--- a/security/s2n/pkg-descr
+++ b/security/s2n/pkg-descr
@@ -2,4 +2,4 @@ s2n is a C99 implementation of the TLS/SSL protocols that
 is designed to be simple, small, fast, and with security as
 a priority. It is released and licensed under the Apache Software License 2.0.
 
-WWW: https://github.com/awslabs/s2n
+WWW: https://github.com/aws/s2n-tls
diff --git a/security/s2n/pkg-plist b/security/s2n/pkg-plist
index ef33dc4a4b45..aeab0d2a3ef6 100644
--- a/security/s2n/pkg-plist
+++ b/security/s2n/pkg-plist
@@ -3,11 +3,12 @@ lib/libs2n.so
 lib/libs2n.so.0
 lib/s2n/cmake/modules/FindLibCrypto.cmake
 lib/s2n/cmake/s2n-config.cmake
-lib/s2n/cmake/shared/s2n-targets-release.cmake
+lib/s2n/cmake/shared/s2n-targets-%%CMAKE_BUILD_TYPE%%.cmake
 lib/s2n/cmake/shared/s2n-targets.cmake
 %%PORTDOCS%%%%DOCSDIR%%/BINDINGS.md
 %%PORTDOCS%%%%DOCSDIR%%/DEVELOPMENT-GUIDE.md
 %%PORTDOCS%%%%DOCSDIR%%/READING-LIST.md
+%%PORTDOCS%%%%DOCSDIR%%/SAFETY-MACROS.md
 %%PORTDOCS%%%%DOCSDIR%%/STATE-MACHINE.md
 %%PORTDOCS%%%%DOCSDIR%%/USAGE-GUIDE.md
 %%PORTDOCS%%%%DOCSDIR%%/images/s2n-logo-final.pdf