diff options
author | markd <markd@pkgsrc.org> | 2019-12-22 20:40:50 +0000 |
---|---|---|
committer | markd <markd@pkgsrc.org> | 2019-12-22 20:40:50 +0000 |
commit | 77381dcfc55d3490b5893bf98b350a98d1e01d9e (patch) | |
tree | 8648fb320c2b37f72cb2414eeac2d86bf5b3a901 /devel/meld | |
parent | b578c7c0634d8eaef319208dbd70d82f317fdbea (diff) | |
download | pkgsrc-77381dcfc55d3490b5893bf98b350a98d1e01d9e.tar.gz |
meld: fix build with python3.8
Diffstat (limited to 'devel/meld')
-rw-r--r-- | devel/meld/Makefile | 5 | ||||
-rw-r--r-- | devel/meld/distinfo | 3 | ||||
-rw-r--r-- | devel/meld/patches/patch-meld_build_helpers.py | 50 |
3 files changed, 55 insertions, 3 deletions
diff --git a/devel/meld/Makefile b/devel/meld/Makefile index d83c6b21df4..295ade2c456 100644 --- a/devel/meld/Makefile +++ b/devel/meld/Makefile @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.95 2019/07/21 22:24:38 wiz Exp $ +# $NetBSD: Makefile,v 1.96 2019/12/22 20:40:50 markd Exp $ DISTNAME= meld-3.20.1 -PKGREVISION= 2 +PKGREVISION= 3 CATEGORIES= devel MASTER_SITES= ${MASTER_SITE_GNOME:=sources/meld/${PKGVERSION_NOREV:R}/} EXTRACT_SUFX= .tar.xz @@ -12,6 +12,7 @@ COMMENT= Visual diff and merge tool (GTK3 version) LICENSE= gnu-gpl-v2 BUILD_DEPENDS+= itstool-[0-9]*:../../textproc/itstool +BUILD_DEPENDS+= ${PYPKGPREFIX}-distro-[0-9]*:../../devel/py-distro DEPENDS+= ${PYPKGPREFIX}-gobject3>=3.8:../../devel/py-gobject3 DEPENDS+= gsettings-desktop-schemas-[0-9]*:../../sysutils/gsettings-desktop-schemas DEPENDS+= dconf-[0-9]*:../../devel/dconf diff --git a/devel/meld/distinfo b/devel/meld/distinfo index 4945fdca46c..fd6420ab444 100644 --- a/devel/meld/distinfo +++ b/devel/meld/distinfo @@ -1,6 +1,7 @@ -$NetBSD: distinfo,v 1.58 2019/04/04 10:02:23 wiz Exp $ +$NetBSD: distinfo,v 1.59 2019/12/22 20:40:50 markd Exp $ SHA1 (meld-3.20.1.tar.xz) = f2cf7e9b3a9f7a5fb9553e3ab262a8984e6bbb90 RMD160 (meld-3.20.1.tar.xz) = 6e9bddbb0a99536f4bae04bd31109f0ea50af39a SHA512 (meld-3.20.1.tar.xz) = cd21f298dc1da6eb08261599b9270989c837e0923d5cf5cfdad227dd7f256ac5f53ac903939ebef90ea6cd684c7355ce9482648057284f4ce44f1c7101959c1f Size (meld-3.20.1.tar.xz) = 594812 bytes +SHA1 (patch-meld_build_helpers.py) = a2b572c15acda866173bdb09366e72b05d5fc48f diff --git a/devel/meld/patches/patch-meld_build_helpers.py b/devel/meld/patches/patch-meld_build_helpers.py new file mode 100644 index 00000000000..972ee237b11 --- /dev/null +++ b/devel/meld/patches/patch-meld_build_helpers.py @@ -0,0 +1,50 @@ +$NetBSD: patch-meld_build_helpers.py,v 1.1 2019/12/22 20:40:51 markd Exp $ + +commit 7862ee014ecb85b2a7fe409f8b147b1ddb6e657e +Update build helpers for Python 3.8 compatibility + +--- meld/build_helpers.py.orig 2019-03-30 21:54:28.000000000 +0000 ++++ meld/build_helpers.py +@@ -31,6 +31,15 @@ import platform + import sys + from distutils.log import info + ++try: ++ import distro ++except ImportError: ++ python_version = tuple(int(x) for x in platform.python_version_tuple()) ++ if python_version >= (3, 8): ++ print( ++ 'Missing build requirement "distro" Python module; ' ++ 'install paths may be incorrect', file=sys.stderr) ++ + + def has_help(self): + return "build_help" in self.distribution.cmdclass and os.name != 'nt' +@@ -378,11 +387,21 @@ class install(distutils.command.install. + + def finalize_options(self): + special_cases = ('debian', 'ubuntu', 'linuxmint') +- if (platform.system() == 'Linux' and +- platform.linux_distribution()[0].lower() in special_cases): +- # Maintain an explicit install-layout, but use deb by default +- specified_layout = getattr(self, 'install_layout', None) +- self.install_layout = specified_layout or 'deb' ++ if platform.system() == 'Linux': ++ # linux_distribution has been removed in Python 3.8; we require ++ # the third-party distro package for future handling. ++ try: ++ distribution = platform.linux_distribution()[0].lower() ++ except AttributeError: ++ try: ++ distribution = distro.id() ++ except NameError: ++ distribution = 'unknown' ++ ++ if distribution in special_cases: ++ # Maintain an explicit install-layout, but use deb by default ++ specified_layout = getattr(self, 'install_layout', None) ++ self.install_layout = specified_layout or 'deb' + + distutils.command.install.install.finalize_options(self) + |