git: 5d0cb089ec7f - main - devel/py-awscrt: Add py-awscrt 0.13.14

From: Po-Chuan Hsieh <sunpoet_at_FreeBSD.org>
Date: Mon, 18 Jul 2022 12:40:59 UTC
The branch main has been updated by sunpoet:

URL: https://cgit.FreeBSD.org/ports/commit/?id=5d0cb089ec7f8ba10c5757fc8356adb5bbf01584

commit 5d0cb089ec7f8ba10c5757fc8356adb5bbf01584
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2022-07-18 12:39:46 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2022-07-18 12:39:46 +0000

    devel/py-awscrt: Add py-awscrt 0.13.14
    
    Python 3 bindings for the AWS Common Runtime
    
    WWW: https://github.com/awslabs/aws-crt-python
---
 devel/Makefile                                     |  1 +
 devel/py-awscrt/Makefile                           | 25 ++++++++++++++++++++++
 devel/py-awscrt/distinfo                           |  3 +++
 ...tch-crt-aws-c-common-source-posix-system_info.c | 12 +++++++++++
 devel/py-awscrt/files/patch-setup.py               | 11 ++++++++++
 devel/py-awscrt/pkg-descr                          |  3 +++
 6 files changed, 55 insertions(+)

diff --git a/devel/Makefile b/devel/Makefile
index c31ba5007a4e..5d6f22da5307 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -4145,6 +4145,7 @@
     SUBDIR += py-aws-requests-auth
     SUBDIR += py-aws-sam-translator
     SUBDIR += py-aws-xray-sdk
+    SUBDIR += py-awscrt
     SUBDIR += py-azure-appconfiguration
     SUBDIR += py-azure-batch
     SUBDIR += py-azure-core
diff --git a/devel/py-awscrt/Makefile b/devel/py-awscrt/Makefile
new file mode 100644
index 000000000000..59d728f2d806
--- /dev/null
+++ b/devel/py-awscrt/Makefile
@@ -0,0 +1,25 @@
+# Created by: Po-Chuan Hsieh <sunpoet@FreeBSD.org>
+
+PORTNAME=	awscrt
+PORTVERSION=	0.13.14
+CATEGORIES=	devel python
+MASTER_SITES=	CHEESESHOP
+PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER=	sunpoet@FreeBSD.org
+COMMENT=	Common runtime for AWS Python projects
+
+LICENSE=	APACHE20
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+BUILD_DEPENDS=	cmake:devel/cmake
+
+USES=		python:3.6+
+USE_PYTHON=	autoplist concurrent distutils
+
+CFLAGS+=	-D__BSD_VISIBLE
+
+post-install:
+	${FIND} ${STAGEDIR}${PYTHON_SITELIBDIR} -name '*.so' -exec ${STRIP_CMD} {} +
+
+.include <bsd.port.mk>
diff --git a/devel/py-awscrt/distinfo b/devel/py-awscrt/distinfo
new file mode 100644
index 000000000000..d925bb26de06
--- /dev/null
+++ b/devel/py-awscrt/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1657835401
+SHA256 (awscrt-0.13.14.tar.gz) = 2b6c74529dc7ea4216718796bd57a07750a44e3abc46833400e9b4497e6eeb04
+SIZE (awscrt-0.13.14.tar.gz) = 19952268
diff --git a/devel/py-awscrt/files/patch-crt-aws-c-common-source-posix-system_info.c b/devel/py-awscrt/files/patch-crt-aws-c-common-source-posix-system_info.c
new file mode 100644
index 000000000000..3b39a1fa73e5
--- /dev/null
+++ b/devel/py-awscrt/files/patch-crt-aws-c-common-source-posix-system_info.c
@@ -0,0 +1,12 @@
+--- crt/aws-c-common/source/posix/system_info.c.orig	2022-07-12 00:42:37 UTC
++++ crt/aws-c-common/source/posix/system_info.c
+@@ -15,7 +15,9 @@
+ #endif
+ 
+ #if defined(__linux__) || defined(__unix__)
++#    if !defined(__FreeBSD__)
+ #    include <sys/sysinfo.h>
++#    endif
+ #    include <sys/types.h>
+ #endif
+ 
diff --git a/devel/py-awscrt/files/patch-setup.py b/devel/py-awscrt/files/patch-setup.py
new file mode 100644
index 000000000000..e125afb0616f
--- /dev/null
+++ b/devel/py-awscrt/files/patch-setup.py
@@ -0,0 +1,11 @@
+--- setup.py.orig	2022-07-12 00:42:43 UTC
++++ setup.py
+@@ -315,7 +315,7 @@ def awscrt_ext():
+ 
+     if distutils.ccompiler.get_default_compiler() != 'msvc':
+         extra_compile_args += ['-Wextra', '-Werror', '-Wno-strict-aliasing', '-std=gnu99']
+-        extra_link_args += ['-Wl,-fatal_warnings']
++        extra_link_args += ['-Wl,-fatal-warnings']
+ 
+     return setuptools.Extension(
+         '_awscrt',
diff --git a/devel/py-awscrt/pkg-descr b/devel/py-awscrt/pkg-descr
new file mode 100644
index 000000000000..2f7b23e7c40e
--- /dev/null
+++ b/devel/py-awscrt/pkg-descr
@@ -0,0 +1,3 @@
+Python 3 bindings for the AWS Common Runtime
+
+WWW: https://github.com/awslabs/aws-crt-python