Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 9 Aug 2020 12:16:56 +0000 (UTC)
From:      Piotr Kubaj <pkubaj@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r544563 - in head/devel/py-grpcio: . files
Message-ID:  <202008091216.079CGuId071486@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pkubaj
Date: Sun Aug  9 12:16:56 2020
New Revision: 544563
URL: https://svnweb.freebsd.org/changeset/ports/544563

Log:
  devel/py-grpcio: fix build on powerpc(64)
  
  Some mingling with headers is required to build abseil properly.
  
  BoringSSL doesn't support powerpc and powerpc64 at all, only powerpc64le (ppc64le) is supported, so use system OpenSSL. BoringSSL is used because ALPN support is required, but it was implemented back in OpenSSL 1.0.2, which even stable/11 branch has. There's no need to use external SSL library at all.
  
  Bump PORTREVISION because of package change.
  
  PR:		248550
  Approved by:	vanilla (maintainer)
  MFH:		2020Q3 (fix build blanket)

Added:
  head/devel/py-grpcio/files/patch-third__party_abseil-cpp_absl_base_internal_unscaledcycleclock.cc   (contents, props changed)
Modified:
  head/devel/py-grpcio/Makefile

Modified: head/devel/py-grpcio/Makefile
==============================================================================
--- head/devel/py-grpcio/Makefile	Sun Aug  9 10:53:11 2020	(r544562)
+++ head/devel/py-grpcio/Makefile	Sun Aug  9 12:16:56 2020	(r544563)
@@ -3,6 +3,7 @@
 
 PORTNAME=	grpcio
 PORTVERSION=	1.31.0
+PORTREVISION=	1
 CATEGORIES=	devel python
 MASTER_SITES=	CHEESESHOP
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
@@ -20,11 +21,9 @@ LIB_DEPENDS=	libcares.so:dns/c-ares
 
 USES=		compiler:c++11-lib localbase:ldflags python:3.5+
 USE_PYTHON=	autoplist distutils
-MAKE_ENV+=	GRPC_PYTHON_BUILD_SYSTEM_ZLIB=true \
+MAKE_ENV+=	GRPC_PYTHON_BUILD_SYSTEM_OPENSSL=true \
+		GRPC_PYTHON_BUILD_SYSTEM_ZLIB=true \
 		GRPC_PYTHON_BUILD_SYSTEM_CARES=true
-CFLAGS+=	-Ithird_party/boringssl/include
-CFLAGS_powerpc64=	-maltivec -mvsx
-CFLAGS_powerpc=	-maltivec
 LDFLAGS+=	-lcares
 
 post-install:

Added: head/devel/py-grpcio/files/patch-third__party_abseil-cpp_absl_base_internal_unscaledcycleclock.cc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/py-grpcio/files/patch-third__party_abseil-cpp_absl_base_internal_unscaledcycleclock.cc	Sun Aug  9 12:16:56 2020	(r544563)
@@ -0,0 +1,14 @@
+--- third_party/abseil-cpp/absl/base/internal/unscaledcycleclock.cc.orig	2020-08-08 21:50:49 UTC
++++ third_party/abseil-cpp/absl/base/internal/unscaledcycleclock.cc
+@@ -24,8 +24,10 @@
+ #ifdef __GLIBC__
+ #include <sys/platform/ppc.h>
+ #elif defined(__FreeBSD__)
+-#include <sys/sysctl.h>
++#include "absl/base/call_once.h"
+ #include <sys/types.h>
++#include <sys/sysctl.h>
++#include <threads.h>
+ #endif
+ #endif
+ 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202008091216.079CGuId071486>