Mon Jul 3 13:54:32 2023 UTC ()
textprox/py-rapidfuzz: Exclude i386 from avx2 PLIST conditional

This package had untested code to expect three files that are
avx2-only when building on i386, but those files don't actually get
built.  This is almost certainly because not all i486-and-up CPUs have
avx2 instructions.

Resolves failure to package on NetBSD 9 i386 using
  cpu0: "Intel(R) Core(TM)2 Duo CPU     T8100  @ 2.10GHz"


(gdt)
diff -r1.11 -r1.12 pkgsrc/textproc/py-rapidfuzz/Makefile

cvs diff -r1.11 -r1.12 pkgsrc/textproc/py-rapidfuzz/Makefile (expand / switch to unified diff)

--- pkgsrc/textproc/py-rapidfuzz/Makefile 2023/07/01 08:37:42 1.11
+++ pkgsrc/textproc/py-rapidfuzz/Makefile 2023/07/03 13:54:32 1.12
@@ -1,37 +1,39 @@ @@ -1,37 +1,39 @@
1# $NetBSD: Makefile,v 1.11 2023/07/01 08:37:42 wiz Exp $ 1# $NetBSD: Makefile,v 1.12 2023/07/03 13:54:32 gdt Exp $
2 2
3DISTNAME= rapidfuzz-3.1.1 3DISTNAME= rapidfuzz-3.1.1
4PKGNAME= ${PYPKGPREFIX}-${DISTNAME} 4PKGNAME= ${PYPKGPREFIX}-${DISTNAME}
5CATEGORIES= textproc python 5CATEGORIES= textproc python
6MASTER_SITES= ${MASTER_SITE_PYPI:=r/rapidfuzz/} 6MASTER_SITES= ${MASTER_SITE_PYPI:=r/rapidfuzz/}
7 7
8MAINTAINER= pkgsrc-users@NetBSD.org 8MAINTAINER= pkgsrc-users@NetBSD.org
9HOMEPAGE= https://github.com/maxbachmann/RapidFuzz 9HOMEPAGE= https://github.com/maxbachmann/RapidFuzz
10COMMENT= Rapid fuzzy string matching 10COMMENT= Rapid fuzzy string matching
11LICENSE= mit 11LICENSE= mit
12 12
13TOOL_DEPENDS+= ${PYPKGPREFIX}-scikit-build>=0.17.0:../../devel/py-scikit-build 13TOOL_DEPENDS+= ${PYPKGPREFIX}-scikit-build>=0.17.0:../../devel/py-scikit-build
14TOOL_DEPENDS+= cmake-[0-9]*:../../devel/cmake 14TOOL_DEPENDS+= cmake-[0-9]*:../../devel/cmake
15TEST_DEPENDS+= ${PYPKGPREFIX}-test>=7.1:../../devel/py-test 15TEST_DEPENDS+= ${PYPKGPREFIX}-test>=7.1:../../devel/py-test
16# optional dependency, but not optional for testing 16# optional dependency, but not optional for testing
17TEST_DEPENDS+= ${PYPKGPREFIX}-numpy>=0:../../math/py-numpy 17TEST_DEPENDS+= ${PYPKGPREFIX}-numpy>=0:../../math/py-numpy
18TEST_DEPENDS+= ${PYPKGPREFIX}-hypothesis>=0:../../devel/py-hypothesis 18TEST_DEPENDS+= ${PYPKGPREFIX}-hypothesis>=0:../../devel/py-hypothesis
19 19
20PYTHON_VERSIONS_INCOMPATIBLE= 27 37 38 20PYTHON_VERSIONS_INCOMPATIBLE= 27 37 38
21 21
22PLIST_SUBST+= PYTHON_VERSION=${_PYTHON_VERSION} 22PLIST_SUBST+= PYTHON_VERSION=${_PYTHON_VERSION}
23PLIST_VARS+= avx2 23PLIST_VARS+= avx2
24.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64" 24# Only x86_64 is guaranteed to have avx2; while some i386 CPUs do, our
 25# build target does not.
 26.if ${MACHINE_ARCH} == "x86_64"
25PLIST.avx2= yes 27PLIST.avx2= yes
26.endif 28.endif
27 29
28USE_LANGUAGES= c c++17 30USE_LANGUAGES= c c++17
29GCC_REQD+= 10 31GCC_REQD+= 10
30 32
31BUILDLINK_TRANSFORM.SunOS+= rm:-fno-fat-lto-objects 33BUILDLINK_TRANSFORM.SunOS+= rm:-fno-fat-lto-objects
32 34
33# needs 'make install' 35# needs 'make install'
34do-test: 36do-test:
35 cd ${WRKSRC} && ${SETENV} ${TEST_ENV} pytest-${PYVERSSUFFIX} tests 37 cd ${WRKSRC} && ${SETENV} ${TEST_ENV} pytest-${PYVERSSUFFIX} tests
36 38
37.include "../../lang/python/egg.mk" 39.include "../../lang/python/egg.mk"