diff mbox series

[meta-python] python3-pocketsphinx: upgrade 0.1.15 -> 5.0.1

Message ID 20230724200813.346001-1-tgamblin@baylibre.com
State New
Headers show
Series [meta-python] python3-pocketsphinx: upgrade 0.1.15 -> 5.0.1 | expand

Commit Message

Trevor Gamblin July 24, 2023, 8:08 p.m. UTC
pocketsphinx now requires the skbuild module. It has changed versioning
style, explaining the large jump in version numbers. The LICENSE
actually has changed to include parts from other projects, which are
either BSD-2-Clause or MIT.

Also adopt the fix_cythonized_sources function (inspired by the pandas
recipe) to fix some QA warnings:

WARNING: python3-pocketsphinx-5.0.1-r0 do_package_qa: QA Issue: File /usr/lib/python3.11/site-packages/pocketsphinx/_pocketsphinx.cpython-311-x86_64-linux-gnu.so in package python3-pocketsphinx contains reference to TMPDIR [buildpaths]
WARNING: python3-pocketsphinx-5.0.1-r0 do_package_qa: QA Issue: File /usr/src/debug/python3-pocketsphinx/5.0.1-r0/_skbuild/linux-x86_64-3.11/cmake-build/cython/_pocketsphinx.c in package python3-pocketsphinx-src contains reference to TMPDIR [buildpaths]

Changelog: https://github.com/cmusphinx/pocketsphinx/releases

Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
---
 .../python/python3-pocketsphinx_0.1.15.bb     | 14 -----------
 .../python/python3-pocketsphinx_5.0.1.bb      | 24 +++++++++++++++++++
 2 files changed, 24 insertions(+), 14 deletions(-)
 delete mode 100644 meta-python/recipes-devtools/python/python3-pocketsphinx_0.1.15.bb
 create mode 100644 meta-python/recipes-devtools/python/python3-pocketsphinx_5.0.1.bb
diff mbox series

Patch

diff --git a/meta-python/recipes-devtools/python/python3-pocketsphinx_0.1.15.bb b/meta-python/recipes-devtools/python/python3-pocketsphinx_0.1.15.bb
deleted file mode 100644
index f7ffd9d268..0000000000
--- a/meta-python/recipes-devtools/python/python3-pocketsphinx_0.1.15.bb
+++ /dev/null
@@ -1,14 +0,0 @@ 
-SUMMARY = "This package provides a python interface to CMU Sphinxbase and Pocketsphinx libraries created with SWIG and Setuptools."
-DESCRIPTION = "Python interface to CMU Sphinxbase and Pocketsphinx libraries"
-HOMEPAGE = "https://github.com/bambocher/pocketsphinx-python"
-SECTION = "devel/python"
-LICENSE = "BSD-2-Clause"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=826ebda787eb48e78aec2624f9faba72"
-
-SRC_URI[md5sum] = "94d008eebea16acb60a9ffe614575dee"
-SRC_URI[sha256sum] = "34d290745c7dbe6fa2cac9815b5c19d10f393e528ecd70e779c21ebc448f9b63"
-
-inherit pypi setuptools3 features_check
-
-DEPENDS += "swig-native pulseaudio"
-REQUIRED_DISTRO_FEATURES += "pulseaudio"
diff --git a/meta-python/recipes-devtools/python/python3-pocketsphinx_5.0.1.bb b/meta-python/recipes-devtools/python/python3-pocketsphinx_5.0.1.bb
new file mode 100644
index 0000000000..c6bd978d24
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-pocketsphinx_5.0.1.bb
@@ -0,0 +1,24 @@ 
+SUMMARY = "This package provides a python interface to CMU Sphinxbase and Pocketsphinx libraries created with SWIG and Setuptools."
+DESCRIPTION = "Python interface to CMU Sphinxbase and Pocketsphinx libraries"
+HOMEPAGE = "https://github.com/bambocher/pocketsphinx-python"
+SECTION = "devel/python"
+LICENSE = "BSD-2-Clause & MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=c4d720cdc9c6953091f65e8b01524bb4"
+
+SRC_URI[md5sum] = "fdd1227fb750f087f0636f8c222cbbb9"
+SRC_URI[sha256sum] = "cadfe42cf1596399ff1a6818ad75970c658e567c7250d67e758b29444facede9"
+
+inherit pypi setuptools3 features_check
+
+DEPENDS += "swig-native pulseaudio python3-scikit-build-native"
+REQUIRED_DISTRO_FEATURES += "pulseaudio"
+
+PACKAGESPLITFUNCS =+ "fix_cythonized_sources"
+
+fix_cythonized_sources() {
+        for f in `grep -l -r -e '\/* Generated by Cython.*/$' ${PKGD}/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}`; do
+                if [ -e $f ]; then
+                        sed -i -e 's#${RECIPE_SYSROOT_NATIVE}##g' $f
+                fi
+        done
+}