From 420605b86cd8ea7fbefb7598e8af4783871f4641 Mon Sep 17 00:00:00 2001 From: sthen Date: Wed, 30 Nov 2022 09:14:58 +0000 Subject: [PATCH] uodate to py3-stemmer-2.2.0, use system libstemmer rather than bundled --- textproc/py-stemmer/Makefile | 6 ++--- textproc/py-stemmer/distinfo | 4 ++-- textproc/py-stemmer/patches/patch-setup_py | 28 ++++++++++++++++++++++ 3 files changed, 33 insertions(+), 5 deletions(-) create mode 100644 textproc/py-stemmer/patches/patch-setup_py diff --git a/textproc/py-stemmer/Makefile b/textproc/py-stemmer/Makefile index 207d6066493..5395da55563 100644 --- a/textproc/py-stemmer/Makefile +++ b/textproc/py-stemmer/Makefile @@ -1,16 +1,15 @@ COMMENT = snowball stemming algorithms, for information retrieval -MODPY_EGG_VERSION = 2.0.1 +MODPY_EGG_VERSION = 2.2.0 DISTNAME = PyStemmer-${MODPY_EGG_VERSION} PKGNAME = py-stemmer-${MODPY_EGG_VERSION} -REVISION = 1 CATEGORIES = textproc # MIT/BSD PERMIT_PACKAGE = Yes -WANTLIB += ${MODPY_WANTLIB} pthread +WANTLIB += stemmer MODULES = lang/python @@ -21,5 +20,6 @@ FLAVORS = python3 FLAVOR = python3 BUILD_DEPENDS = lang/cython${MODPY_FLAVOR} +LIB_DEPENDS = textproc/libstemmer .include diff --git a/textproc/py-stemmer/distinfo b/textproc/py-stemmer/distinfo index 03baee05f76..11ce3118290 100644 --- a/textproc/py-stemmer/distinfo +++ b/textproc/py-stemmer/distinfo @@ -1,2 +1,2 @@ -SHA256 (PyStemmer-2.0.1.tar.gz) = m4HDUwLx0qWtlGW4WYbbJGmQ25PZfT6PEpJp7XECeI4= -SIZE (PyStemmer-2.0.1.tar.gz) = 559329 +SHA256 (PyStemmer-2.2.0.tar.gz) = 4hcbkbhrscap3d8J6Mhn5Ij4vWm94H0EEKNc3O4NhXw= +SIZE (PyStemmer-2.2.0.tar.gz) = 698714 diff --git a/textproc/py-stemmer/patches/patch-setup_py b/textproc/py-stemmer/patches/patch-setup_py new file mode 100644 index 00000000000..e2b78b45a2f --- /dev/null +++ b/textproc/py-stemmer/patches/patch-setup_py @@ -0,0 +1,28 @@ +Index: setup.py +--- setup.py.orig ++++ setup.py +@@ -110,11 +110,6 @@ class LibrarySourceCode: + expected_sha256=checksum or self.DEFAULT_CHECKSUM) + + +-LIBRARY_SOURCE_CODE = LibrarySourceCode() +-if not LIBRARY_SOURCE_CODE.is_present_on_disk(): +- LIBRARY_SOURCE_CODE.download() +- +- + class BootstrapCommand(Command): + description = 'Download libstemmer_c dependency' + user_options = [ +@@ -196,9 +191,9 @@ setup(name='PyStemmer', + ext_modules=[ + Extension( + 'Stemmer', +- ['src/Stemmer.pyx'] + list(LIBRARY_SOURCE_CODE.source_code_paths()), +- include_dirs=LIBRARY_SOURCE_CODE.include_directories ++ ['src/Stemmer.pyx'], ++ include_dirs=['/usr/local/include'], ++ libraries=['stemmer'] + ) + ], +- cmdclass={'bootstrap': BootstrapCommand} + )