pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/sysutils/py-magic Make sysutils/py-magic work in a chr...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/db0862128411
branches:  trunk
changeset: 440237:db0862128411
user:      js <js%pkgsrc.org@localhost>
date:      Sun Oct 04 18:15:43 2020 +0000

description:
Make sysutils/py-magic work in a chroot on NetBSD

diffstat:

 sysutils/py-magic/Makefile               |   3 ++-
 sysutils/py-magic/distinfo               |   3 ++-
 sysutils/py-magic/patches/patch-magic.py |  15 +++++++++++++++
 3 files changed, 19 insertions(+), 2 deletions(-)

diffs (44 lines):

diff -r e2b743818bff -r db0862128411 sysutils/py-magic/Makefile
--- a/sysutils/py-magic/Makefile        Sun Oct 04 17:30:51 2020 +0000
+++ b/sysutils/py-magic/Makefile        Sun Oct 04 18:15:43 2020 +0000
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.8 2020/05/08 13:57:19 adam Exp $
+# $NetBSD: Makefile,v 1.9 2020/10/04 18:15:43 js Exp $
 
 DISTNAME=      python-magic-0.4.18
 PKGNAME=       ${DISTNAME:S/python/${PYPKGPREFIX}/1}
+PKGREVISION=   1
 CATEGORIES=    sysutils python
 MASTER_SITES=  ${MASTER_SITE_PYPI:=p/python-magic/}
 
diff -r e2b743818bff -r db0862128411 sysutils/py-magic/distinfo
--- a/sysutils/py-magic/distinfo        Sun Oct 04 17:30:51 2020 +0000
+++ b/sysutils/py-magic/distinfo        Sun Oct 04 18:15:43 2020 +0000
@@ -1,6 +1,7 @@
-$NetBSD: distinfo,v 1.5 2020/05/08 13:57:19 adam Exp $
+$NetBSD: distinfo,v 1.6 2020/10/04 18:15:43 js Exp $
 
 SHA1 (python-magic-0.4.18.tar.gz) = b48c84ef096baaf10b4f7cb3792ef8328c946c81
 RMD160 (python-magic-0.4.18.tar.gz) = 54bd572566e60eec7e8b2652ecc6d287ff300d56
 SHA512 (python-magic-0.4.18.tar.gz) = 18c4d75bc762d44f42c44bb52b999930ea570d2dd11d7cb840807e372806dc14164e1b3ea0acb23ccd692177a1a683d4537b01675bc57f06334bcc0f40520e6c
 Size (python-magic-0.4.18.tar.gz) = 11442 bytes
+SHA1 (patch-magic.py) = 54dd70103feb8278601f7dc00731a4f2c6e25f1d
diff -r e2b743818bff -r db0862128411 sysutils/py-magic/patches/patch-magic.py
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/py-magic/patches/patch-magic.py  Sun Oct 04 18:15:43 2020 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-magic.py,v 1.1 2020/10/04 18:15:43 js Exp $
+
+--- magic.py.orig      2020-05-06 02:14:40.000000000 +0000
++++ magic.py
+@@ -187,8 +187,10 @@ if not libmagic or not libmagic._name:
+                        'win32': windows_dlls,
+                        'cygwin': windows_dlls,
+                        'linux': ['libmagic.so.1'],  # fallback for some Linuxes (e.g. Alpine) where library search does not work # flake8:noqa
++                       'netbsd': ['libmagic.so.6.0'],  # fallback for running in chroot
+                       }
+     platform = 'linux' if sys.platform.startswith('linux') else sys.platform
++    platform = 'netbsd' if sys.platform.startswith('netbsd') else sys.platform
+     for dll in platform_to_lib.get(platform, []):
+         try:
+             libmagic = ctypes.CDLL(dll)



Home | Main Index | Thread Index | Old Index