Attached is a diff to update telephony/py-phonenumbers port from 8.9.6
to latest 8.10.4 version.
I didn't pay much attention to this port existing earlier, so I merged
parts of my port into this.
The patch in diff is required since 8.10.2; I've forwarded it to the
upstream maintainer (David) and he should be merging it into the next
release soon.
--
<3
Index: Makefile
===================================================================
RCS file: /cvs/ports/telephony/py-phonenumbers/Makefile,v
retrieving revision 1.1.1.1
diff -u -p -u -p -r1.1.1.1 Makefile
--- Makefile 16 Nov 2018 08:48:52 -0000 1.1.1.1
+++ Makefile 4 Feb 2019 17:05:29 -0000
@@ -1,13 +1,14 @@
# $OpenBSD: Makefile,v 1.1.1.1 2018/11/16 08:48:52 jca Exp $
-COMMENT = port of Google's libphonenumber library
-#'
+COMMENT = international phone numbers handling library
-MODPY_EGG_VERSION = 8.9.16
-DISTNAME = phonenumbers-${MODPY_EGG_VERSION}
-PKGNAME = py-${DISTNAME}
+MODPY_EGG_VERSION = 8.10.4
+DISTNAME = phonenumbers-${MODPY_EGG_VERSION}
+PKGNAME = py-${DISTNAME}
-CATEGORIES = telephony devel
+CATEGORIES = telephony devel
+
+HOMEPAGE = https://github.com/daviddrysdale/python-phonenumbers
# Apache 2.0
PERMIT_PACKAGE_CDROM = Yes
@@ -16,7 +17,7 @@ MODULES = lang/python
MODPY_PI = Yes
MODPY_SETUPTOOLS = Yes
-FLAVORS = python3
+FLAVORS = python3
FLAVOR ?=
.include <bsd.port.mk>
Index: patches/patch-setup_py
===================================================================
RCS file: patches/patch-setup_py
diff -N patches/patch-setup_py
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-setup_py 4 Feb 2019 17:05:29 -0000
@@ -0,0 +1,39 @@
+$OpenBSD$
+
+From 9008606f7ef341167ae106da52b65c0166a67e0a Mon Sep 17 00:00:00 2001
+From: "Juuso \"Linda\" Lapinlampi" <[email protected]>
+Date: Mon, 4 Feb 2019 13:06:21 +0000
+Subject: [PATCH] setup.py: Read README.md as a UTF-8 file
+
+open()'s encoding is platform-dependent. Building from source would fail
+on OpenBSD (FTBFS), where the encoding defaults to ascii and not UTF-8.
+
+Fixup to commit ef5608d9a3d0.
+---
+ python/setup.py | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+---
+Forwarded: yes
+
+---
+Index: setup.py
+--- setup.py.orig
++++ setup.py
+@@ -16,6 +16,7 @@
+ # limitations under the License.
+
+ import distutils.core
++import io
+ import sys
+ # Importing setuptools adds some features like "setup.py test", but
+ # it's optional so swallow the error if it's not there.
+@@ -44,7 +45,7 @@ if not lite:
+ except ImportError:
+ lite = True
+
+-with open("README.md", "r") as readme:
++with io.open("README.md", mode="r", encoding="utf-8") as readme:
+ long_description = readme.read()
+
+ # Various parameters depend on whether we are the lite package or not