git: d019f0aa2d49 - main - devel/py-filemagic: Change MASTER_SITES from GitHub to CHEESESHOP

From: Po-Chuan Hsieh <sunpoet_at_FreeBSD.org>
Date: Fri, 13 May 2022 11:45:41 UTC
The branch main has been updated by sunpoet:

URL: https://cgit.FreeBSD.org/ports/commit/?id=d019f0aa2d492856225a54cc7b242401614ac134

commit d019f0aa2d492856225a54cc7b242401614ac134
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2022-05-13 11:30:44 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2022-05-13 11:39:27 +0000

    devel/py-filemagic: Change MASTER_SITES from GitHub to CHEESESHOP
    
    - Add NO_ARCH
    - Clean up Makefile
    - Remove outdated patch
    - Update do-test:
    - Update pkg-descr
    - Update WWW
---
 devel/py-filemagic/Makefile                 | 24 +++++++++---------------
 devel/py-filemagic/distinfo                 |  5 +++--
 devel/py-filemagic/files/patch-magic_api.py | 11 -----------
 devel/py-filemagic/pkg-descr                | 20 ++++++++++----------
 4 files changed, 22 insertions(+), 38 deletions(-)

diff --git a/devel/py-filemagic/Makefile b/devel/py-filemagic/Makefile
index 9eee494a8cc4..f443dcb36ea9 100644
--- a/devel/py-filemagic/Makefile
+++ b/devel/py-filemagic/Makefile
@@ -3,6 +3,7 @@
 PORTNAME=	filemagic
 PORTVERSION=	1.6
 CATEGORIES=	devel python
+MASTER_SITES=	CHEESESHOP
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
 
 MAINTAINER=	sunpoet@FreeBSD.org
@@ -11,23 +12,16 @@ COMMENT=	Python API for libmagic, the library behind the Unix file command
 LICENSE=	APACHE20
 LICENSE_FILE=	${WRKSRC}/LICENSE
 
-TEST_DEPENDS=	${PYTHON_PKGNAMEPREFIX}mock>0:devel/py-mock@${PY_FLAVOR}
-
-OPTIONS_DEFINE=	TESTS
-
-TESTS_DESC=		Install test suite requirements
-TESTS_BUILD_DEPENDS=	${TEST_DEPENDS}
+TEST_DEPENDS=	${PYTHON_PKGNAMEPREFIX}mock>=0:devel/py-mock@${PY_FLAVOR}
 
 USES=		python:3.6+
-USE_GITHUB=	yes
-USE_PYTHON=	autoplist distutils
-
-GH_ACCOUNT=	aliles
-GH_TAGNAME=	b24df9f
+USE_PYTHON=	autoplist concurrent distutils
 
-.include <bsd.port.pre.mk>
+NO_ARCH=	yes
 
-regression-test: build
-	@cd ${WRKSRC} && ${PYTHON_CMD} ${PYDISTUTILS_SETUP} test
+do-test:
+	${MKDIR} ${WRKSRC}/tests/magic
+	${FETCH_CMD} -o ${WRKSRC}/tests/magic/python https://github.com/aliles/filemagic/raw/master/tests/magic/python
+	cd ${WRKSRC} && ${SETENV} PYTHONPATH=${STAGEDIR}${PYTHON_SITELIBDIR} ${PYTHON_CMD} tests/test_magic.py
 
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/devel/py-filemagic/distinfo b/devel/py-filemagic/distinfo
index f6de404b037d..d87efec4e6b3 100644
--- a/devel/py-filemagic/distinfo
+++ b/devel/py-filemagic/distinfo
@@ -1,2 +1,3 @@
-SHA256 (aliles-filemagic-1.6-b24df9f_GH0.tar.gz) = 776304a453ac4f284e3f94037350a0ab9d21ca093e2e0de8193d6f5c3d5587eb
-SIZE (aliles-filemagic-1.6-b24df9f_GH0.tar.gz) = 16819
+TIMESTAMP = 1652122635
+SHA256 (filemagic-1.6.tar.gz) = e684359ef40820fe406f0ebc5bf8a78f89717bdb7fed688af68082d991d6dbf3
+SIZE (filemagic-1.6.tar.gz) = 16754
diff --git a/devel/py-filemagic/files/patch-magic_api.py b/devel/py-filemagic/files/patch-magic_api.py
deleted file mode 100644
index e7b0dbe82a52..000000000000
--- a/devel/py-filemagic/files/patch-magic_api.py
+++ /dev/null
@@ -1,11 +0,0 @@
---- magic/api.py.orig	2014-12-23 03:21:58 UTC
-+++ magic/api.py
-@@ -9,7 +9,7 @@ import ctypes
- import platform
- import warnings
- 
--libname = ctypes.util.find_library('magic')
-+libname = ctypes.util.find_library('magic') or ctypes.util.find_library('magic1')
- if not libname:
-     if platform.system() == 'SunOS':
-         libname = 'libmagic.so'
diff --git a/devel/py-filemagic/pkg-descr b/devel/py-filemagic/pkg-descr
index db57d4841144..6c60645015fe 100644
--- a/devel/py-filemagic/pkg-descr
+++ b/devel/py-filemagic/pkg-descr
@@ -1,14 +1,14 @@
 filemagic provides a Python API for libmagic, the library behind Unix file
-command. It enables the Python developer to easilty test for file types from
-the extensive identification library that is shipped with libmagic.
+command. It enables the Python developer to easilty test for file types from the
+extensive identification library that is shipped with libmagic.
 
 Features:
+- Simple, Python API.
+- Identifies named files or strings.
+- Return a textual description, mime type or mime encoding.
+- Provide custom magic files to customize file detection.
+- Support for both Python2 and Python3.
+- Support for both CPython and PyPy.
 
-  * Simple, Python API
-  * Identifies named files or strings
-  * Return a textual description, mime type or mime encoding
-  * Provide custom magic files to customize file detection
-  * Support for both Python2 and Python3
-  * Support for both CPython and PyPy
-
-WWW: https://filemagic.readthedocs.org
+WWW: https://filemagic.readthedocs.io/en/latest/
+WWW: https://github.com/aliles/filemagic