git: 115a7844a2ef - main - multimedia/svt-av1-psy: add new port

From: Jan Beich <jbeich_at_FreeBSD.org>
Date: Sat, 11 May 2024 20:37:28 UTC
The branch main has been updated by jbeich:

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

commit 115a7844a2efd39144738269eb3abaddda843fc8
Author:     Jan Beich <jbeich@FreeBSD.org>
AuthorDate: 2024-05-11 20:01:42 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2024-05-11 20:36:39 +0000

    multimedia/svt-av1-psy: add new port
    
    SVT-AV1-PSY is the Scalable Video Technology for AV1 (SVT-AV1 Encoder
    and Decoder) with perceptual enhancements for psychovisually optimal
    AV1 encoding. The goal is to create the best encoding implementation
    for perceptual quality with AV1.
    
    https://github.com/gianni-rosato/svt-av1-psy
---
 multimedia/Makefile                |  1 +
 multimedia/svt-av1-psy/Makefile    | 35 +++++++++++++++++++++++++++++++++++
 multimedia/svt-av1-psy/distinfo    |  3 +++
 multimedia/svt-av1-psy/pkg-descr   |  4 ++++
 multimedia/svt-av1-psy/pkg-message | 13 +++++++++++++
 multimedia/svt-av1-psy/pkg-plist   | 18 ++++++++++++++++++
 multimedia/svt-av1/Makefile        |  2 ++
 7 files changed, 76 insertions(+)

diff --git a/multimedia/Makefile b/multimedia/Makefile
index da60b6a44a16..dae3725b18f8 100644
--- a/multimedia/Makefile
+++ b/multimedia/Makefile
@@ -348,6 +348,7 @@
     SUBDIR += subtitleoffsetmodifier
     SUBDIR += subtools
     SUBDIR += svt-av1
+    SUBDIR += svt-av1-psy
     SUBDIR += svt-hevc
     SUBDIR += svt-vp9
     SUBDIR += syncplay
diff --git a/multimedia/svt-av1-psy/Makefile b/multimedia/svt-av1-psy/Makefile
new file mode 100644
index 000000000000..e3f44c82b3ad
--- /dev/null
+++ b/multimedia/svt-av1-psy/Makefile
@@ -0,0 +1,35 @@
+PORTNAME=	svt-av1-psy
+DISTVERSIONPREFIX=	v
+DISTVERSION=	2.0.0-A
+CATEGORIES=	multimedia
+
+MAINTAINER=	jbeich@FreeBSD.org
+COMMENT=	Scalable AV1 encoder with psychovisually enhancements
+WWW=		https://github.com/gianni-rosato/svt-av1-psy
+
+LICENSE=	BSD2CLAUSE BSD3CLAUSE MIT
+LICENSE_COMB=	multi
+LICENSE_FILE_BSD2CLAUSE=	${WRKSRC}/LICENSE-BSD2.md
+LICENSE_FILE_BSD3CLAUSE=	${WRKSRC}/LICENSE.md
+LICENSE_FILE_MIT=		${WRKSRC}/third_party/safestringlib/LICENSE
+
+BUILD_DEPENDS=	${BUILD_DEPENDS_${ARCH}}
+BUILD_DEPENDS_amd64=	nasm:devel/nasm
+
+USES=		cmake compiler:c11
+USE_GITHUB=	yes
+USE_LDCONFIG=	yes
+GH_ACCOUNT=	gianni-rosato
+CMAKE_ON=	ENABLE_NASM
+CMAKE_OFF=	NATIVE
+
+CONFLICTS_INSTALL=	svt-av1 # bin/SvtAv1EncApp
+
+OPTIONS_DEFINE=	LTO
+OPTIONS_DEFAULT=LTO
+OPTIONS_EXCLUDE_riscv64=	LTO # bug 262871
+
+LTO_CMAKE_BOOL=		CMAKE_INTERPROCEDURAL_OPTIMIZATION
+LTO_CMAKE_ON=		-DCMAKE_POLICY_DEFAULT_CMP0069:STRING=NEW
+
+.include <bsd.port.mk>
diff --git a/multimedia/svt-av1-psy/distinfo b/multimedia/svt-av1-psy/distinfo
new file mode 100644
index 000000000000..e0398db8f319
--- /dev/null
+++ b/multimedia/svt-av1-psy/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1715457702
+SHA256 (gianni-rosato-svt-av1-psy-v2.0.0-A_GH0.tar.gz) = df7b1b835e8f858b0462689d6ca430034dd2482bd48c0cca1d3ab4664b80aa60
+SIZE (gianni-rosato-svt-av1-psy-v2.0.0-A_GH0.tar.gz) = 7920416
diff --git a/multimedia/svt-av1-psy/pkg-descr b/multimedia/svt-av1-psy/pkg-descr
new file mode 100644
index 000000000000..cad027fb31fb
--- /dev/null
+++ b/multimedia/svt-av1-psy/pkg-descr
@@ -0,0 +1,4 @@
+SVT-AV1-PSY is the Scalable Video Technology for AV1 (SVT-AV1 Encoder
+and Decoder) with perceptual enhancements for psychovisually optimal
+AV1 encoding. The goal is to create the best encoding implementation
+for perceptual quality with AV1.
diff --git a/multimedia/svt-av1-psy/pkg-message b/multimedia/svt-av1-psy/pkg-message
new file mode 100644
index 000000000000..b39af2610a69
--- /dev/null
+++ b/multimedia/svt-av1-psy/pkg-message
@@ -0,0 +1,13 @@
+[
+{ type: install
+  message: <<EOM
+SVT-AV1-PSY is ABI compatible with SVT-AV1, so if the versions match
+it's possible to switch without rebuilding consumers like FFmpeg:
+
+  $ pkg set -n svt-av1:svt-av1-psy
+  $ pkg set -o multimedia/svt-av1:multimedia/svt-av1-psy
+  $ pkg upgrade -f svt-av1-psy
+  $ pkg lock svt-av1-psy
+EOM
+}
+]
diff --git a/multimedia/svt-av1-psy/pkg-plist b/multimedia/svt-av1-psy/pkg-plist
new file mode 100644
index 000000000000..9a3cbdc08712
--- /dev/null
+++ b/multimedia/svt-av1-psy/pkg-plist
@@ -0,0 +1,18 @@
+bin/SvtAv1DecApp
+bin/SvtAv1EncApp
+include/svt-av1/EbDebugMacros.h
+include/svt-av1/EbSvtAv1.h
+include/svt-av1/EbSvtAv1Dec.h
+include/svt-av1/EbSvtAv1Enc.h
+include/svt-av1/EbSvtAv1ErrorCodes.h
+include/svt-av1/EbSvtAv1ExtFrameBuf.h
+include/svt-av1/EbSvtAv1Formats.h
+include/svt-av1/EbSvtAv1Metadata.h
+lib/libSvtAv1Dec.so
+lib/libSvtAv1Dec.so.0
+lib/libSvtAv1Dec.so.0.8.7
+lib/libSvtAv1Enc.so
+lib/libSvtAv1Enc.so.2
+lib/libSvtAv1Enc.so.2.0.0
+libdata/pkgconfig/SvtAv1Dec.pc
+libdata/pkgconfig/SvtAv1Enc.pc
diff --git a/multimedia/svt-av1/Makefile b/multimedia/svt-av1/Makefile
index e730798cc3a5..29a6b574fd8c 100644
--- a/multimedia/svt-av1/Makefile
+++ b/multimedia/svt-av1/Makefile
@@ -24,6 +24,8 @@ GL_PROJECT=	SVT-AV1
 CMAKE_ON=	ENABLE_NASM
 CMAKE_OFF=	NATIVE
 
+CONFLICTS_INSTALL=	svt-av1-psy # bin/SvtAv1EncApp
+
 OPTIONS_DEFINE=	LTO
 OPTIONS_DEFAULT=LTO
 OPTIONS_EXCLUDE_riscv64=	LTO # bug 262871