pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/devel/meld meld: fix build with python3.8
details: https://anonhg.NetBSD.org/pkgsrc/rev/6a7725b1f71b
branches: trunk
changeset: 406468:6a7725b1f71b
user: markd <markd%pkgsrc.org@localhost>
date: Sun Dec 22 20:40:50 2019 +0000
description:
meld: fix build with python3.8
diffstat:
devel/meld/Makefile | 5 +-
devel/meld/distinfo | 3 +-
devel/meld/patches/patch-meld_build_helpers.py | 50 ++++++++++++++++++++++++++
3 files changed, 55 insertions(+), 3 deletions(-)
diffs (87 lines):
diff -r dc7b4751275c -r 6a7725b1f71b devel/meld/Makefile
--- a/devel/meld/Makefile Sun Dec 22 17:06:39 2019 +0000
+++ b/devel/meld/Makefile Sun Dec 22 20:40:50 2019 +0000
@@ -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 @@
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 -r dc7b4751275c -r 6a7725b1f71b devel/meld/distinfo
--- a/devel/meld/distinfo Sun Dec 22 17:06:39 2019 +0000
+++ b/devel/meld/distinfo Sun Dec 22 20:40:50 2019 +0000
@@ -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 -r dc7b4751275c -r 6a7725b1f71b devel/meld/patches/patch-meld_build_helpers.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/meld/patches/patch-meld_build_helpers.py Sun Dec 22 20:40:50 2019 +0000
@@ -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)
+
Home |
Main Index |
Thread Index |
Old Index