git: 33430a73003c - main - multimedia/onevpl: move python module to standard place

From: Jan Beich <jbeich_at_FreeBSD.org>
Date: Mon, 15 Nov 2021 13:03:02 UTC
The branch main has been updated by jbeich:

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

commit 33430a73003c3fdd110c64094caae5918c85de22
Author:     Jan Beich <jbeich@FreeBSD.org>
AuthorDate: 2021-11-15 13:00:22 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2021-11-15 13:00:55 +0000

    multimedia/onevpl: move python module to standard place
    
    Traceback (most recent call last):
      File "/usr/local/share/oneVPL/examples/preview/python/hello-vpp-py/hello-vpp.py", line 21, in <module>
        import pyvpl
    ModuleNotFoundError: No module named 'pyvpl'
---
 multimedia/onevpl/Makefile  | 2 ++
 multimedia/onevpl/pkg-plist | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/multimedia/onevpl/Makefile b/multimedia/onevpl/Makefile
index f390a2b5aa1f..e3911ac2ea58 100644
--- a/multimedia/onevpl/Makefile
+++ b/multimedia/onevpl/Makefile
@@ -31,6 +31,8 @@ PYTHON_BUILD_DEPENDS=	pybind11>0:devel/pybind11
 PYTHON_CMAKE_BOOL=	BUILD_PYTHON_BINDING
 
 post-patch:
+	@${REINPLACE_CMD} -e 's/python/&${PYTHON_VER}/' \
+		${WRKSRC}/preview/python/binding/CMakeLists.txt
 	@${REINPLACE_CMD} -e '/pkgconfig/s,FULL_LIBDIR},PREFIX}/libdata,' \
 		${WRKSRC}/dispatcher/CMakeLists.txt
 	@${REINPLACE_CMD} -e 's,/usr,${PREFIX},' \
diff --git a/multimedia/onevpl/pkg-plist b/multimedia/onevpl/pkg-plist
index 5e90b23839fa..6acf53c668ee 100644
--- a/multimedia/onevpl/pkg-plist
+++ b/multimedia/onevpl/pkg-plist
@@ -51,7 +51,7 @@ lib/libvpl.so
 lib/libvpl.so.2
 lib/libvpl.so.2.5
 lib/oneVPL/libvpl_wayland.so
-%%PYTHON%%lib/python/pyvpl%%PYTHON_EXT_SUFFIX%%.so
+%%PYTHON%%%%PYTHON_LIBDIR%%/pyvpl%%PYTHON_EXT_SUFFIX%%.so
 libdata/pkgconfig/vpl.pc
 %%DATADIR%%/env/vars.sh
 %%DATADIR%%/examples/content/cars_128x96.h265