git: e73efedf4ddb - main - multimedia/libvpl-tools: New port: Intel Video Processing Library Tools

Hiroki Tagato <[email protected]>
Newsgroups gmane.os.freebsd.devel.cvs.ports
Message-ID <[email protected]>
The branch main has been updated by tagattie:

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

commit e73efedf4ddbc82b6ded7720a176923e65d2a989
Author:     Hiroki Tagato <[email protected]>
AuthorDate: 2026-08-17 05:21:42 +0000
Commit:     Hiroki Tagato <[email protected]>
CommitDate: 2026-08-17 05:21:42 +0000

    multimedia/libvpl-tools: New port: Intel Video Processing Library Tools
    
    Intel Video Processing Library (Intel VPL) tools provide access to hardware
    accelerated video decode, encode, and processing capabilities on Intel GPU
    from the command line.
    
    The tools require the Intel VPL base library and a runtime library installed.
    Current runtime implementations:
    
    - Intel VPL GPU Runtime for use on Intel Iris Xe graphics and newner
    - Intel Media SDK for use on legacy Intel graphic
    
    WWW: https://www.intel.com/content/www/us/en/developer/tools/vpl/overview.html
    
    PR:             297308
    Reported by:    Yuichiro NAITO <[email protected]> (new maintainer)
---
 multimedia/Makefile                                |  1 +
 multimedia/libvpl-tools/Makefile                   | 43 ++++++++++++++++++++++
 multimedia/libvpl-tools/distinfo                   |  3 ++
 multimedia/libvpl-tools/files/patch-CMakeLists.txt | 11 ++++++
 ...tools_cli_system__analyzer_system__analyzer.cpp | 11 ++++++
 ...ch-tools_cli_val-surface-sharing_src_encode.cpp | 38 +++++++++++++++++++
 ...atch-tools_cli_val-surface-sharing_src_encode.h | 11 ++++++
 ...atch-tools_cli_val-surface-sharing_src_util.cpp | 11 ++++++
 .../patch-tools_cli_val-surface-sharing_src_util.h | 11 ++++++
 ...patch-tools_cli_val-surface-sharing_src_vpp.cpp | 20 ++++++++++
 .../patch-tools_cli_vpl-import-export_src_util.h   | 11 ++++++
 ...atch-tools_legacy_sample__common_CMakeLists.txt | 20 ++++++++++
 ...ch-tools_legacy_sample__common_src_gtkutils.cpp | 11 ++++++
 ..._legacy_sample__common_src_vm_thread__linux.cpp | 19 ++++++++++
 multimedia/libvpl-tools/pkg-descr                  |  9 +++++
 multimedia/libvpl-tools/pkg-plist                  | 12 ++++++
 16 files changed, 242 insertions(+)

diff --git a/multimedia/Makefile b/multimedia/Makefile
index 1646fd0dda9f..6f41b14bb2e9 100644
--- a/multimedia/Makefile
+++ b/multimedia/Makefile
@@ -194,6 +194,7 @@
     SUBDIR += libvdpau-va-gl
     SUBDIR += libvlcpp
     SUBDIR += libvpl
+    SUBDIR += libvpl-tools
     SUBDIR += libvpx
     SUBDIR += libwebm
     SUBDIR += libx264
diff --git a/multimedia/libvpl-tools/Makefile b/multimedia/libvpl-tools/Makefile
new file mode 100644
index 000000000000..006c39057ee2
--- /dev/null
+++ b/multimedia/libvpl-tools/Makefile
@@ -0,0 +1,43 @@
+PORTNAME=	libvpl-tools
+DISTVERSIONPREFIX=	v
+DISTVERSION=	1.6.0
+CATEGORIES=	multimedia
+
+MAINTAINER=	[email protected]
+COMMENT=	Intel Video Processing Library Tools
+WWW=		https://www.intel.com/content/www/us/en/developer/tools/vpl/overview.html
+
+LICENSE=	MIT
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+ONLY_FOR_ARCHS=	amd64
+ONLY_FOR_ARCHS_REASON=	only Intel GPUs on x86 are supported
+
+BUILD_DEPENDS=	wayland-protocols>0:graphics/wayland-protocols
+# libgtkmm-4.0.so and libgtk-4.so are listed here instead of using
+# USE_GNOME to avoid an extraneous dependency on libatk-1.0.so,
+# which is not used in this port.
+LIB_DEPENDS=	libva.so:multimedia/libva \
+		libvpl.so:multimedia/libvpl \
+		libdrm.so:graphics/libdrm \
+		libgraphene-1.0.so:graphics/graphene \
+		libvulkan.so:graphics/vulkan-loader \
+		libepoxy.so:graphics/libepoxy \
+		libwayland-client.so:graphics/wayland \
+		libgtkmm-4.0.so:x11-toolkits/gtkmm40 \
+		libgtk-4.so:x11-toolkits/gtk40
+
+USES=		cmake:testing compiler:c++17-lang localbase:ldflags pkgconfig \
+		xorg gl gnome gettext-runtime
+USE_CXXSTD=	c++17
+USE_GITHUB=	yes
+GH_ACCOUNT=	intel
+USE_GL=		opengl
+USE_GNOME=	glib20 gdkpixbuf pango cairo cairomm11 pangomm24
+USE_LDCONFIG=	yes
+USE_XORG=	x11 xcb
+
+CMAKE_TESTING_ON=	BUILD_TESTS
+DATADIR=	${PREFIX}/share/vpl
+
+.include <bsd.port.mk>
diff --git a/multimedia/libvpl-tools/distinfo b/multimedia/libvpl-tools/distinfo
new file mode 100644
index 000000000000..97925be6ebce
--- /dev/null
+++ b/multimedia/libvpl-tools/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1784771234
+SHA256 (intel-libvpl-tools-v1.6.0_GH0.tar.gz) = 3f8e86ff6f7264a4f5bfa396ba3e4700a6cbd1e69840e33ee0838872dcf9e1e6
+SIZE (intel-libvpl-tools-v1.6.0_GH0.tar.gz) = 1307938
diff --git a/multimedia/libvpl-tools/files/patch-CMakeLists.txt b/multimedia/libvpl-tools/files/patch-CMakeLists.txt
new file mode 100644
index 000000000000..cc0de9643c57
--- /dev/null
+++ b/multimedia/libvpl-tools/files/patch-CMakeLists.txt
@@ -0,0 +1,11 @@
+--- CMakeLists.txt.orig	2026-06-25 23:06:43 UTC
++++ CMakeLists.txt
+@@ -206,7 +206,7 @@ endif()
+   message(
+     STATUS "  USE_MSVC_STATIC_RUNTIME         : ${USE_MSVC_STATIC_RUNTIME}")
+ endif()
+-if(CMAKE_SYSTEM_NAME MATCHES Linux)
++if(UNIX AND NOT APPLE)
+   message(STATUS "  ENABLE_VA                       : ${ENABLE_VA}")
+   message(STATUS "  ENABLE_DRM                      : ${ENABLE_DRM}")
+   message(STATUS "  ENABLE_WAYLAND                  : ${ENABLE_WAYLAND}")
diff --git a/multimedia/libvpl-tools/files/patch-tools_cli_system__analyzer_system__analyzer.cpp b/multimedia/libvpl-tools/files/patch-tools_cli_system__analyzer_system__analyzer.cpp
new file mode 100644
index 000000000000..9777728d8628
--- /dev/null
+++ b/multimedia/libvpl-tools/files/patch-tools_cli_system__analyzer_system__analyzer.cpp
@@ -0,0 +1,11 @@
+--- tools/cli/system_analyzer/system_analyzer.cpp.orig	2026-06-25 23:06:43 UTC
++++ tools/cli/system_analyzer/system_analyzer.cpp
+@@ -14,7 +14,7 @@
+ #include <vector>
+ #include "vpl/mfx.h"
+
+-#ifdef __linux__
++#ifdef __unix__
+     #include <fcntl.h>
+     #include <stdlib.h>
+     #include <unistd.h>
diff --git a/multimedia/libvpl-tools/files/patch-tools_cli_val-surface-sharing_src_encode.cpp b/multimedia/libvpl-tools/files/patch-tools_cli_val-surface-sharing_src_encode.cpp
new file mode 100644
index 000000000000..52e2a419e512
--- /dev/null
+++ b/multimedia/libvpl-tools/files/patch-tools_cli_val-surface-sharing_src_encode.cpp
@@ -0,0 +1,38 @@
+--- tools/cli/val-surface-sharing/src/encode.cpp.orig	2026-06-25 23:06:43 UTC
++++ tools/cli/val-surface-sharing/src/encode.cpp
+@@ -238,7 +238,7 @@ mfxStatus CEncodeTest::ProcessStreamEncode() {
+
+     std::vector<mfxU8> bsInput(surfaceSize, 0);
+
+-#ifdef __linux__
++#ifdef __unix__
+     VASurfaceID vaSurfaceID;
+ #endif
+
+@@ -368,7 +368,7 @@ mfxStatus CEncodeTest::ProcessStreamEncode() {
+                                               &m_fileInfo.bitstream,
+                                               &syncp);
+
+-#ifdef __linux__
++#ifdef __unix__
+         if (m_pOpts->surfaceMode != SURFACE_MODE_SHARED)
+ #endif
+         {
+@@ -388,7 +388,7 @@ mfxStatus CEncodeTest::ProcessStreamEncode() {
+                             WriteEncodedStream(m_fileInfo.bitstream, m_fileInfo.outfile);
+                             frameNum++;
+                         }
+-#ifdef __linux__
++#ifdef __unix__
+                         if (sts != MFX_WRN_IN_EXECUTION) {
+                             if (m_pOpts->surfaceMode == SURFACE_MODE_SHARED)
+                                 ReleaseFreeSurfaces();
+@@ -447,7 +447,7 @@ mfxStatus CEncodeTest::Run() {
+     return MFX_ERR_NONE;
+ }
+
+-#ifdef __linux__
++#ifdef __unix__
+ void CEncodeTest::ReleaseFreeSurfaces() {
+     std::list<ImportedVASurfaceWrapper> surfaces_to_delete;
+
diff --git a/multimedia/libvpl-tools/files/patch-tools_cli_val-surface-sharing_src_encode.h b/multimedia/libvpl-tools/files/patch-tools_cli_val-surface-sharing_src_encode.h
new file mode 100644
index 000000000000..f21d7d9c261b
--- /dev/null
+++ b/multimedia/libvpl-tools/files/patch-tools_cli_val-surface-sharing_src_encode.h
@@ -0,0 +1,11 @@
+--- tools/cli/val-surface-sharing/src/encode.h.orig	2026-06-25 23:06:43 UTC
++++ tools/cli/val-surface-sharing/src/encode.h
+@@ -47,7 +47,7 @@ class CEncodeTest : public CTest { (private)
+     mfxStatus CreateVPLSession();
+     mfxStatus ProcessStreamEncode();
+
+-#ifdef __linux__
++#ifdef __unix__
+
+     struct ImportedVASurfaceWrapper {
+         mfxFrameSurface1 *m_imported_mfx_surface;
diff --git a/multimedia/libvpl-tools/files/patch-tools_cli_val-surface-sharing_src_util.cpp b/multimedia/libvpl-tools/files/patch-tools_cli_val-surface-sharing_src_util.cpp
new file mode 100644
index 000000000000..c1e80242ff24
--- /dev/null
+++ b/multimedia/libvpl-tools/files/patch-tools_cli_val-surface-sharing_src_util.cpp
@@ -0,0 +1,11 @@
+--- tools/cli/val-surface-sharing/src/util.cpp.orig	2026-07-23 01:58:41 UTC
++++ tools/cli/val-surface-sharing/src/util.cpp
+@@ -445,7 +445,7 @@ mfxStatus GetAdaptersInfo(Options *opts, bool bPrint)
+         if (dev->Version.Version >= MFX_STRUCT_VERSION(1, 1)) {
+             mfxMediaAdapterType eMA = (mfxMediaAdapterType)dev->MediaAdapterType;
+             if (eMA != MFX_MEDIA_UNKNOWN) {
+-#ifdef __linux__
++#ifdef __unix__
+                 mfxExtendedDeviceId *idescDevice = nullptr;
+                 sts                              = MFXEnumImplementations(loader,
+                                              i,
diff --git a/multimedia/libvpl-tools/files/patch-tools_cli_val-surface-sharing_src_util.h b/multimedia/libvpl-tools/files/patch-tools_cli_val-surface-sharing_src_util.h
new file mode 100644
index 000000000000..1281be360eee
--- /dev/null
+++ b/multimedia/libvpl-tools/files/patch-tools_cli_val-surface-sharing_src_util.h
@@ -0,0 +1,11 @@
+--- tools/cli/val-surface-sharing/src/util.h.orig	2026-06-25 23:06:43 UTC
++++ tools/cli/val-surface-sharing/src/util.h
+@@ -23,7 +23,7 @@
+     #include <windows.h>
+     #include <windowsx.h>
+
+-#elif defined __linux__
++#elif defined __unix__
+
+     #include <fcntl.h>
+     #include <unistd.h>
diff --git a/multimedia/libvpl-tools/files/patch-tools_cli_val-surface-sharing_src_vpp.cpp b/multimedia/libvpl-tools/files/patch-tools_cli_val-surface-sharing_src_vpp.cpp
new file mode 100644
index 000000000000..1249e49c43b5
--- /dev/null
+++ b/multimedia/libvpl-tools/files/patch-tools_cli_val-surface-sharing_src_vpp.cpp
@@ -0,0 +1,20 @@
+--- tools/cli/val-surface-sharing/src/vpp.cpp.orig	2026-06-25 23:06:43 UTC
++++ tools/cli/val-surface-sharing/src/vpp.cpp
+@@ -251,7 +251,7 @@ mfxStatus CVPPTest::ProcessStreamVPP() {
+
+     std::vector<mfxU8> bsInput(surfaceSize, 0);
+
+-#ifdef __linux__
++#ifdef __unix__
+     VASurfaceID vaSurfaceID;
+ #endif
+
+@@ -479,7 +479,7 @@ mfxStatus CVPPTest::ProcessStreamVPP() {
+                                    "Could not release vpp output surface",
+                                    sts);
+
+-#ifdef __linux__
++#ifdef __unix__
+                             if (!m_pOpts->bNoSSA && !isDraining &&
+                                 m_pOpts->surfaceComponent != MFX_SURFACE_COMPONENT_VPP_OUTPUT) {
+                                 VAStatus vaSts =
diff --git a/multimedia/libvpl-tools/files/patch-tools_cli_vpl-import-export_src_util.h b/multimedia/libvpl-tools/files/patch-tools_cli_vpl-import-export_src_util.h
new file mode 100644
index 000000000000..6d43f8e211bb
--- /dev/null
+++ b/multimedia/libvpl-tools/files/patch-tools_cli_vpl-import-export_src_util.h
@@ -0,0 +1,11 @@
+--- tools/cli/vpl-import-export/src/util.h.orig	2026-06-25 23:06:43 UTC
++++ tools/cli/vpl-import-export/src/util.h
+@@ -24,7 +24,7 @@
+ #include <windows.h>
+ #include <windowsx.h>
+
+-#elif defined __linux__
++#elif defined __unix__
+
+ #include <fcntl.h>
+ #include <unistd.h>
diff --git a/multimedia/libvpl-tools/files/patch-tools_legacy_sample__common_CMakeLists.txt b/multimedia/libvpl-tools/files/patch-tools_legacy_sample__common_CMakeLists.txt
new file mode 100644
index 000000000000..12e4c15f2d29
--- /dev/null
+++ b/multimedia/libvpl-tools/files/patch-tools_legacy_sample__common_CMakeLists.txt
@@ -0,0 +1,20 @@
+--- tools/legacy/sample_common/CMakeLists.txt.orig	2026-06-25 23:06:43 UTC
++++ tools/legacy/sample_common/CMakeLists.txt
+@@ -4,7 +4,7 @@ set(TOOLS_DEFAULT ON)
+ # SPDX-License-Identifier: MIT
+ # ##############################################################################
+ set(TOOLS_DEFAULT ON)
+-if(CMAKE_SYSTEM_NAME MATCHES Linux)
++if(UNIX AND NOT APPLE)
+   # Check dependencies up-front so we can set option defaults
+   find_package(PkgConfig REQUIRED)
+   # note: pkg-config version for libva is *API* version
+@@ -189,7 +189,7 @@ endif()
+   target_compile_definitions(${TARGET} PUBLIC -DONEVPL_EXPERIMENTAL)
+ endif()
+
+-if(CMAKE_SYSTEM_NAME MATCHES Linux)
++if(UNIX AND NOT APPLE)
+   target_compile_definitions(${TARGET} PUBLIC LINUX64)
+
+   if(NOT ENABLE_VA)
diff --git a/multimedia/libvpl-tools/files/patch-tools_legacy_sample__common_src_gtkutils.cpp b/multimedia/libvpl-tools/files/patch-tools_legacy_sample__common_src_gtkutils.cpp
new file mode 100644
index 000000000000..c0eb8ffaa22d
--- /dev/null
+++ b/multimedia/libvpl-tools/files/patch-tools_legacy_sample__common_src_gtkutils.cpp
@@ -0,0 +1,11 @@
+--- tools/legacy/sample_common/src/gtkutils.cpp.orig	2026-06-25 23:06:43 UTC
++++ tools/legacy/sample_common/src/gtkutils.cpp
+@@ -5,7 +5,7 @@
+   ############################################################################*/
+ #if defined(LIBVA_GTK4_SUPPORT)
+     #include "gtkutils.h"
+-    #include <drm/drm_fourcc.h>
++    #include <libdrm/drm_fourcc.h>
+     #include <gdk/wayland/gdkwayland.h>
+     #include <gdk/x11/gdkx.h>
+     #include <gtk/gtk.h>
diff --git a/multimedia/libvpl-tools/files/patch-tools_legacy_sample__common_src_vm_thread__linux.cpp b/multimedia/libvpl-tools/files/patch-tools_legacy_sample__common_src_vm_thread__linux.cpp
new file mode 100644
index 000000000000..58556ed06a23
--- /dev/null
+++ b/multimedia/libvpl-tools/files/patch-tools_legacy_sample__common_src_vm_thread__linux.cpp
@@ -0,0 +1,19 @@
+--- tools/legacy/sample_common/src/vm/thread_linux.cpp.orig	2026-06-25 23:06:43 UTC
++++ tools/legacy/sample_common/src/vm/thread_linux.cpp
+@@ -283,12 +283,16 @@ mfxStatus msdk_thread_get_schedtype(const char* str, m
+     else if (msdk_match(str, "other")) {
+         type = SCHED_OTHER;
+     }
++#ifdef SCHED_BATCH
+     else if (msdk_match(str, "batch")) {
+         type = SCHED_BATCH;
+     }
++#endif
++#ifdef SCHED_IDLE
+     else if (msdk_match(str, "idle")) {
+         type = SCHED_IDLE;
+     }
++#endif
+     else {
+         return MFX_ERR_UNSUPPORTED;
+     }
diff --git a/multimedia/libvpl-tools/pkg-descr b/multimedia/libvpl-tools/pkg-descr
new file mode 100644
index 000000000000..83548cc86c19
--- /dev/null
+++ b/multimedia/libvpl-tools/pkg-descr
@@ -0,0 +1,9 @@
+Intel Video Processing Library (Intel VPL) tools provide access to hardwa
+re accelerated video decode, encode, and processing capabilities on Intel GPU
+from the command line.
+
+The tools require the Intel VPL base library and a runtime library installe.
+Current runtime implementations:
+
+- Intel VPL GPU Runtime for use on Intel Iris Xe graphics and newner
+- Intel Media SDK for use on legacy Intel graphic
diff --git a/multimedia/libvpl-tools/pkg-plist b/multimedia/libvpl-tools/pkg-plist
new file mode 100644
index 000000000000..6f435c85a218
--- /dev/null
+++ b/multimedia/libvpl-tools/pkg-plist
@@ -0,0 +1,12 @@
+bin/sample_decode
+bin/sample_encode
+bin/sample_multi_transcode
+bin/sample_vpp
+bin/system_analyzer
+bin/val-surface-sharing
+bin/vpl-import-export
+bin/vpl-inspect
+lib/vpl-tools/libvpl_wayland.so
+lib/vpl-tools/libvpl_wayland.so.1.0.0
+%%DATADIR%%-tools/licensing/license.txt
+%%DATADIR%%-tools/licensing/third-party-programs.txt
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.