Mon Jul 3 20:57:52 2023 UTC ()
Pullup ticket #6773 - requested by gdt
textproc/py-rapidfuzz: i386 build fix

Revisions pulled up:
- textproc/py-rapidfuzz/Makefile                                1.12

---
   Module Name:	pkgsrc
   Committed By:	gdt
   Date:		Mon Jul  3 13:54:32 UTC 2023

   Modified Files:
   	pkgsrc/textproc/py-rapidfuzz: Makefile

   Log Message:
   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"


(bsiegert)
diff -r1.10.2.2 -r1.10.2.3 pkgsrc/textproc/py-rapidfuzz/Makefile

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

--- pkgsrc/textproc/py-rapidfuzz/Makefile 2023/07/03 13:53:33 1.10.2.2
+++ pkgsrc/textproc/py-rapidfuzz/Makefile 2023/07/03 20:57:52 1.10.2.3
@@ -1,37 +1,39 @@ @@ -1,37 +1,39 @@
1# $NetBSD: Makefile,v 1.10.2.2 2023/07/03 13:53:33 gdt Exp $ 1# $NetBSD: Makefile,v 1.10.2.3 2023/07/03 20:57:52 bsiegert 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 20PYTHON_VERSIONS_INCOMPATIBLE= 27
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"