Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] libavif: enable encoding support
@ 2023-02-25  3:44 oreo639
  2023-02-25  3:45 ` [PR PATCH] [Updated] " oreo639
                   ` (22 more replies)
  0 siblings, 23 replies; 24+ messages in thread
From: oreo639 @ 2023-02-25  3:44 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1329 bytes --]

There is a new pull request by oreo639 against master on the void-packages repository

https://github.com/oreo639/void-packages rav1e
https://github.com/void-linux/void-packages/pull/42438

libavif: enable encoding support
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

Allows tests to pass for https://github.com/void-linux/void-packages/pull/42426

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/42438.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-rav1e-42438.patch --]
[-- Type: text/x-diff, Size: 4881 bytes --]

From 8a421e4b9de3b8212a04822cad2eff7df7842381 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 24 Feb 2023 19:34:16 -0800
Subject: [PATCH 1/3] New package: cargo-c-0.9.14_1

---
 srcpkgs/cargo-c/template | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
 create mode 100644 srcpkgs/cargo-c/template

diff --git a/srcpkgs/cargo-c/template b/srcpkgs/cargo-c/template
new file mode 100644
index 000000000000..23654f700fa0
--- /dev/null
+++ b/srcpkgs/cargo-c/template
@@ -0,0 +1,16 @@
+# Template file for 'rav1e'
+pkgname=cargo-c
+version=0.9.14
+revision=1
+build_style=cargo
+hostmakedepends="pkg-config"
+makedepends="openssl-devel"
+short_desc="Build and install C-compatible rust libraries"
+maintainer="oreo639 <oreo6391@gmail.com>"
+license="MIT"
+homepage="https://crates.io/crates/cargo-c"
+distfiles="https://github.com/lu-zero/cargo-c/archive/v${version}.tar.gz
+ https://github.com/lu-zero/cargo-c/releases/download/v${version}/Cargo.lock"
+checksum="d79c12eae1460803a1ce8b440ae213dc4df63a6f2bf39ebd49eea1d7a008bec6
+ 4680619247db0fa7068e05e2cbf032dd2ed008bc43867a4078ebdfd21604119a"
+skip_extraction="Cargo.lock"

From 606877b7d84d6864ac53708d6a7bc2cede65dc00 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 24 Feb 2023 19:35:15 -0800
Subject: [PATCH 2/3] New package: rav1e-0.6.3_1

---
 common/shlibs          |  1 +
 srcpkgs/rav1e-devel    |  1 +
 srcpkgs/rav1e/template | 32 ++++++++++++++++++++++++++++++++
 3 files changed, 34 insertions(+)
 create mode 120000 srcpkgs/rav1e-devel
 create mode 100644 srcpkgs/rav1e/template

diff --git a/common/shlibs b/common/shlibs
index 538ff08ce5ff..304ab12ecb0c 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3567,6 +3567,7 @@ libcsfml-system.so.2.5 CSFML-2.5_1
 libcsfml-network.so.2.5 CSFML-2.5_1
 libtokyocabinet.so.9 tokyocabinet-1.4.48_1
 libdav1d.so.6 libdav1d6-1.0.0_1
+librav1e.so.0 rav1e-0.6.3_1
 libdqlite.so.0 dqlite-0.2.1_1
 libwoff2common.so.1.0.2 libwoff2common1.0.2-1.0.2_1
 libwoff2enc.so.1.0.2 libwoff2enc1.0.2-1.0.2_1
diff --git a/srcpkgs/rav1e-devel b/srcpkgs/rav1e-devel
new file mode 120000
index 000000000000..c810b6809ce8
--- /dev/null
+++ b/srcpkgs/rav1e-devel
@@ -0,0 +1 @@
+rav1e
\ No newline at end of file
diff --git a/srcpkgs/rav1e/template b/srcpkgs/rav1e/template
new file mode 100644
index 000000000000..feff2e2d5b07
--- /dev/null
+++ b/srcpkgs/rav1e/template
@@ -0,0 +1,32 @@
+# Template file for 'rav1e'
+pkgname=rav1e
+version=0.6.3
+revision=1
+build_style=cargo
+hostmakedepends="nasm cargo-c"
+short_desc="Fastest and safest AV1 encoder"
+maintainer="oreo639 <oreo6391@gmail.com>"
+license="BSD-2-Clause"
+homepage="https://crates.io/crates/rav1e"
+distfiles="https://static.crates.io/crates/rav1e/rav1e-${version}.crate"
+checksum=277898094f0d03c6a609e491324102daf5080e71c06b4b25e5acf8b89d26c945
+
+post_build() {
+	cargo auditable cbuild --release --target ${RUST_TARGET} \
+		--destdir="${DESTDIR}" --prefix="/usr" ${configure_args}
+}
+
+post_install() {
+	cargo auditable cinstall --release --target ${RUST_TARGET} \
+		--destdir="${DESTDIR}" --prefix="/usr" --offline --locked ${configure_args}
+}
+
+rav1e-devel_package() {
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove "usr/lib/*.so"
+		vmove usr/lib/pkgconfig
+		vmove usr/include
+	}
+}

From c80175ee92c533c3b83c34117020068f7c495bd7 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 24 Feb 2023 19:36:06 -0800
Subject: [PATCH 3/3] libavif: enable encoding support

---
 srcpkgs/libavif/template | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/libavif/template b/srcpkgs/libavif/template
index 7a00dba5b3e5..2a02d5c10308 100644
--- a/srcpkgs/libavif/template
+++ b/srcpkgs/libavif/template
@@ -1,13 +1,14 @@
 # Template file for 'libavif'
 pkgname=libavif
 version=0.11.1
-revision=1
+revision=2
 build_style=cmake
 configure_args="-DAVIF_BUILD_APPS=ON -DAVIF_BUILD_GDK_PIXBUF=ON
- -DAVIF_CODEC_DAV1D=ON"
+ -DAVIF_CODEC_DAV1D=ON -DAVIF_CODEC_RAV1E=ON -DAVIF_CODEC_AOM=ON"
 hostmakedepends="gdk-pixbuf-devel pkg-config"
 makedepends="gdk-pixbuf-devel libdav1d-devel
- libjpeg-turbo-devel libpng-devel zlib-devel"
+ libjpeg-turbo-devel libpng-devel zlib-devel
+ libaom-devel rav1e-devel"
 short_desc="Library for encoding and decoding .avif files"
 maintainer="Leah Neukirchen <leah@vuxu.org>"
 license="BSD-2-Clause"
@@ -16,6 +17,11 @@ changelog="https://github.com/AOMediaCodec/libavif/blob/main/CHANGELOG.md"
 distfiles="https://github.com/AOMediaCodec/libavif/archive/refs/tags/v${version}.tar.gz"
 checksum=0eb49965562a0e5e5de58389650d434cff32af84c34185b6c9b7b2fccae06d4e
 
+if [ "$XBPS_TARGET_WORDSIZE" != "32" ]; then
+	configure_args+=" -DAVIF_CODEC_SVT=1"
+	makedepends+=" libsvt-av1-devel"
+fi
+
 post_install() {
 	vlicense LICENSE
 }

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PR PATCH] [Updated] libavif: enable encoding support
  2023-02-25  3:44 [PR PATCH] libavif: enable encoding support oreo639
@ 2023-02-25  3:45 ` oreo639
  2023-02-25  3:57 ` oreo639
                   ` (21 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: oreo639 @ 2023-02-25  3:45 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1334 bytes --]

There is an updated pull request by oreo639 against master on the void-packages repository

https://github.com/oreo639/void-packages rav1e
https://github.com/void-linux/void-packages/pull/42438

libavif: enable encoding support
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

Allows tests to pass for https://github.com/void-linux/void-packages/pull/42426

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/42438.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-rav1e-42438.patch --]
[-- Type: text/x-diff, Size: 4881 bytes --]

From 8a421e4b9de3b8212a04822cad2eff7df7842381 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 24 Feb 2023 19:34:16 -0800
Subject: [PATCH 1/3] New package: cargo-c-0.9.14_1

---
 srcpkgs/cargo-c/template | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
 create mode 100644 srcpkgs/cargo-c/template

diff --git a/srcpkgs/cargo-c/template b/srcpkgs/cargo-c/template
new file mode 100644
index 000000000000..23654f700fa0
--- /dev/null
+++ b/srcpkgs/cargo-c/template
@@ -0,0 +1,16 @@
+# Template file for 'rav1e'
+pkgname=cargo-c
+version=0.9.14
+revision=1
+build_style=cargo
+hostmakedepends="pkg-config"
+makedepends="openssl-devel"
+short_desc="Build and install C-compatible rust libraries"
+maintainer="oreo639 <oreo6391@gmail.com>"
+license="MIT"
+homepage="https://crates.io/crates/cargo-c"
+distfiles="https://github.com/lu-zero/cargo-c/archive/v${version}.tar.gz
+ https://github.com/lu-zero/cargo-c/releases/download/v${version}/Cargo.lock"
+checksum="d79c12eae1460803a1ce8b440ae213dc4df63a6f2bf39ebd49eea1d7a008bec6
+ 4680619247db0fa7068e05e2cbf032dd2ed008bc43867a4078ebdfd21604119a"
+skip_extraction="Cargo.lock"

From 606877b7d84d6864ac53708d6a7bc2cede65dc00 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 24 Feb 2023 19:35:15 -0800
Subject: [PATCH 2/3] New package: rav1e-0.6.3_1

---
 common/shlibs          |  1 +
 srcpkgs/rav1e-devel    |  1 +
 srcpkgs/rav1e/template | 32 ++++++++++++++++++++++++++++++++
 3 files changed, 34 insertions(+)
 create mode 120000 srcpkgs/rav1e-devel
 create mode 100644 srcpkgs/rav1e/template

diff --git a/common/shlibs b/common/shlibs
index 538ff08ce5ff..304ab12ecb0c 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3567,6 +3567,7 @@ libcsfml-system.so.2.5 CSFML-2.5_1
 libcsfml-network.so.2.5 CSFML-2.5_1
 libtokyocabinet.so.9 tokyocabinet-1.4.48_1
 libdav1d.so.6 libdav1d6-1.0.0_1
+librav1e.so.0 rav1e-0.6.3_1
 libdqlite.so.0 dqlite-0.2.1_1
 libwoff2common.so.1.0.2 libwoff2common1.0.2-1.0.2_1
 libwoff2enc.so.1.0.2 libwoff2enc1.0.2-1.0.2_1
diff --git a/srcpkgs/rav1e-devel b/srcpkgs/rav1e-devel
new file mode 120000
index 000000000000..c810b6809ce8
--- /dev/null
+++ b/srcpkgs/rav1e-devel
@@ -0,0 +1 @@
+rav1e
\ No newline at end of file
diff --git a/srcpkgs/rav1e/template b/srcpkgs/rav1e/template
new file mode 100644
index 000000000000..feff2e2d5b07
--- /dev/null
+++ b/srcpkgs/rav1e/template
@@ -0,0 +1,32 @@
+# Template file for 'rav1e'
+pkgname=rav1e
+version=0.6.3
+revision=1
+build_style=cargo
+hostmakedepends="nasm cargo-c"
+short_desc="Fastest and safest AV1 encoder"
+maintainer="oreo639 <oreo6391@gmail.com>"
+license="BSD-2-Clause"
+homepage="https://crates.io/crates/rav1e"
+distfiles="https://static.crates.io/crates/rav1e/rav1e-${version}.crate"
+checksum=277898094f0d03c6a609e491324102daf5080e71c06b4b25e5acf8b89d26c945
+
+post_build() {
+	cargo auditable cbuild --release --target ${RUST_TARGET} \
+		--destdir="${DESTDIR}" --prefix="/usr" ${configure_args}
+}
+
+post_install() {
+	cargo auditable cinstall --release --target ${RUST_TARGET} \
+		--destdir="${DESTDIR}" --prefix="/usr" --offline --locked ${configure_args}
+}
+
+rav1e-devel_package() {
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove "usr/lib/*.so"
+		vmove usr/lib/pkgconfig
+		vmove usr/include
+	}
+}

From c53e608d98291ffe35fdab64d9ef102e5cafed81 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 24 Feb 2023 19:36:06 -0800
Subject: [PATCH 3/3] libavif: enable encoding support

---
 srcpkgs/libavif/template | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/libavif/template b/srcpkgs/libavif/template
index 7a00dba5b3e5..35637693bb9f 100644
--- a/srcpkgs/libavif/template
+++ b/srcpkgs/libavif/template
@@ -1,13 +1,14 @@
 # Template file for 'libavif'
 pkgname=libavif
 version=0.11.1
-revision=1
+revision=2
 build_style=cmake
 configure_args="-DAVIF_BUILD_APPS=ON -DAVIF_BUILD_GDK_PIXBUF=ON
- -DAVIF_CODEC_DAV1D=ON"
+ -DAVIF_CODEC_DAV1D=ON -DAVIF_CODEC_AOM=ON -DAVIF_CODEC_RAV1E=ON"
 hostmakedepends="gdk-pixbuf-devel pkg-config"
 makedepends="gdk-pixbuf-devel libdav1d-devel
- libjpeg-turbo-devel libpng-devel zlib-devel"
+ libjpeg-turbo-devel libpng-devel zlib-devel
+ libaom-devel rav1e-devel"
 short_desc="Library for encoding and decoding .avif files"
 maintainer="Leah Neukirchen <leah@vuxu.org>"
 license="BSD-2-Clause"
@@ -16,6 +17,11 @@ changelog="https://github.com/AOMediaCodec/libavif/blob/main/CHANGELOG.md"
 distfiles="https://github.com/AOMediaCodec/libavif/archive/refs/tags/v${version}.tar.gz"
 checksum=0eb49965562a0e5e5de58389650d434cff32af84c34185b6c9b7b2fccae06d4e
 
+if [ "$XBPS_TARGET_WORDSIZE" != "32" ]; then
+	configure_args+=" -DAVIF_CODEC_SVT=1"
+	makedepends+=" libsvt-av1-devel"
+fi
+
 post_install() {
 	vlicense LICENSE
 }

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PR PATCH] [Updated] libavif: enable encoding support
  2023-02-25  3:44 [PR PATCH] libavif: enable encoding support oreo639
  2023-02-25  3:45 ` [PR PATCH] [Updated] " oreo639
@ 2023-02-25  3:57 ` oreo639
  2023-02-25  4:51 ` lemmi
                   ` (20 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: oreo639 @ 2023-02-25  3:57 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1334 bytes --]

There is an updated pull request by oreo639 against master on the void-packages repository

https://github.com/oreo639/void-packages rav1e
https://github.com/void-linux/void-packages/pull/42438

libavif: enable encoding support
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

Allows tests to pass for https://github.com/void-linux/void-packages/pull/42426

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/42438.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-rav1e-42438.patch --]
[-- Type: text/x-diff, Size: 4952 bytes --]

From 3d0254a747bd5c8a6f99842f3fc17fd85fc56b1b Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 24 Feb 2023 19:34:16 -0800
Subject: [PATCH 1/3] New package: cargo-c-0.9.14_1

---
 srcpkgs/cargo-c/template | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
 create mode 100644 srcpkgs/cargo-c/template

diff --git a/srcpkgs/cargo-c/template b/srcpkgs/cargo-c/template
new file mode 100644
index 000000000000..823540132af8
--- /dev/null
+++ b/srcpkgs/cargo-c/template
@@ -0,0 +1,20 @@
+# Template file for 'cargo-c'
+pkgname=cargo-c
+version=0.9.14
+revision=1
+build_style=cargo
+hostmakedepends="pkg-config"
+makedepends="openssl-devel"
+short_desc="Build and install C-compatible rust libraries"
+maintainer="oreo639 <oreo6391@gmail.com>"
+license="MIT"
+homepage="https://crates.io/crates/cargo-c"
+distfiles="https://github.com/lu-zero/cargo-c/archive/v${version}.tar.gz
+ https://github.com/lu-zero/cargo-c/releases/download/v${version}/Cargo.lock"
+checksum="d79c12eae1460803a1ce8b440ae213dc4df63a6f2bf39ebd49eea1d7a008bec6
+ 4680619247db0fa7068e05e2cbf032dd2ed008bc43867a4078ebdfd21604119a"
+skip_extraction="Cargo.lock"
+
+post_install() {
+	vlicense LICENSE
+}

From 5df517cc7a0e4edea8ebe816fd5329026659f651 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 24 Feb 2023 19:35:15 -0800
Subject: [PATCH 2/3] New package: rav1e-0.6.3_1

---
 common/shlibs          |  1 +
 srcpkgs/rav1e-devel    |  1 +
 srcpkgs/rav1e/template | 34 ++++++++++++++++++++++++++++++++++
 3 files changed, 36 insertions(+)
 create mode 120000 srcpkgs/rav1e-devel
 create mode 100644 srcpkgs/rav1e/template

diff --git a/common/shlibs b/common/shlibs
index 538ff08ce5ff..304ab12ecb0c 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3567,6 +3567,7 @@ libcsfml-system.so.2.5 CSFML-2.5_1
 libcsfml-network.so.2.5 CSFML-2.5_1
 libtokyocabinet.so.9 tokyocabinet-1.4.48_1
 libdav1d.so.6 libdav1d6-1.0.0_1
+librav1e.so.0 rav1e-0.6.3_1
 libdqlite.so.0 dqlite-0.2.1_1
 libwoff2common.so.1.0.2 libwoff2common1.0.2-1.0.2_1
 libwoff2enc.so.1.0.2 libwoff2enc1.0.2-1.0.2_1
diff --git a/srcpkgs/rav1e-devel b/srcpkgs/rav1e-devel
new file mode 120000
index 000000000000..c810b6809ce8
--- /dev/null
+++ b/srcpkgs/rav1e-devel
@@ -0,0 +1 @@
+rav1e
\ No newline at end of file
diff --git a/srcpkgs/rav1e/template b/srcpkgs/rav1e/template
new file mode 100644
index 000000000000..50d95d322532
--- /dev/null
+++ b/srcpkgs/rav1e/template
@@ -0,0 +1,34 @@
+# Template file for 'rav1e'
+pkgname=rav1e
+version=0.6.3
+revision=1
+build_style=cargo
+hostmakedepends="nasm cargo-c"
+short_desc="Fastest and safest AV1 encoder"
+maintainer="oreo639 <oreo6391@gmail.com>"
+license="BSD-2-Clause"
+homepage="https://crates.io/crates/rav1e"
+distfiles="https://static.crates.io/crates/rav1e/rav1e-${version}.crate"
+checksum=277898094f0d03c6a609e491324102daf5080e71c06b4b25e5acf8b89d26c945
+
+post_build() {
+	cargo auditable cbuild --release --target ${RUST_TARGET} \
+		--destdir="${DESTDIR}" --prefix="/usr" ${configure_args}
+}
+
+post_install() {
+	cargo auditable cinstall --release --target ${RUST_TARGET} \
+		--destdir="${DESTDIR}" --prefix="/usr" --offline --locked ${configure_args}
+
+	vlicense LICENSE
+}
+
+rav1e-devel_package() {
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove "usr/lib/*.so"
+		vmove usr/lib/pkgconfig
+		vmove usr/include
+	}
+}

From 65f2c24fcd6ef94b5994f2a4d225d28b81961040 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 24 Feb 2023 19:36:06 -0800
Subject: [PATCH 3/3] libavif: enable encoding support

---
 srcpkgs/libavif/template | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/libavif/template b/srcpkgs/libavif/template
index 7a00dba5b3e5..35637693bb9f 100644
--- a/srcpkgs/libavif/template
+++ b/srcpkgs/libavif/template
@@ -1,13 +1,14 @@
 # Template file for 'libavif'
 pkgname=libavif
 version=0.11.1
-revision=1
+revision=2
 build_style=cmake
 configure_args="-DAVIF_BUILD_APPS=ON -DAVIF_BUILD_GDK_PIXBUF=ON
- -DAVIF_CODEC_DAV1D=ON"
+ -DAVIF_CODEC_DAV1D=ON -DAVIF_CODEC_AOM=ON -DAVIF_CODEC_RAV1E=ON"
 hostmakedepends="gdk-pixbuf-devel pkg-config"
 makedepends="gdk-pixbuf-devel libdav1d-devel
- libjpeg-turbo-devel libpng-devel zlib-devel"
+ libjpeg-turbo-devel libpng-devel zlib-devel
+ libaom-devel rav1e-devel"
 short_desc="Library for encoding and decoding .avif files"
 maintainer="Leah Neukirchen <leah@vuxu.org>"
 license="BSD-2-Clause"
@@ -16,6 +17,11 @@ changelog="https://github.com/AOMediaCodec/libavif/blob/main/CHANGELOG.md"
 distfiles="https://github.com/AOMediaCodec/libavif/archive/refs/tags/v${version}.tar.gz"
 checksum=0eb49965562a0e5e5de58389650d434cff32af84c34185b6c9b7b2fccae06d4e
 
+if [ "$XBPS_TARGET_WORDSIZE" != "32" ]; then
+	configure_args+=" -DAVIF_CODEC_SVT=1"
+	makedepends+=" libsvt-av1-devel"
+fi
+
 post_install() {
 	vlicense LICENSE
 }

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: libavif: enable encoding support
  2023-02-25  3:44 [PR PATCH] libavif: enable encoding support oreo639
  2023-02-25  3:45 ` [PR PATCH] [Updated] " oreo639
  2023-02-25  3:57 ` oreo639
@ 2023-02-25  4:51 ` lemmi
  2023-02-25  5:26 ` oreo639
                   ` (19 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: lemmi @ 2023-02-25  4:51 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 916 bytes --]

New comment by lemmi on void-packages repository

https://github.com/void-linux/void-packages/pull/42438#issuecomment-1444992456

Comment:
Oh, so that was missing for `darktable` be able to export to `avif`. But I was wondering whether multiple encoders need to be enabled. I just glanced at the cmake file and didn't actually try and see what happens if only a single encoder is available:
```
-- Checking for module 'rav1e'
--   Found rav1e, version 0.6.3
-- Found rav1e: /usr/lib/librav1e.so (found version "0.6.3")
-- libavif: Codec enabled: rav1e (encode)
-- Checking for module 'SvtAv1Enc'
--   Found SvtAv1Enc, version 1.4.1
-- Found svt: /usr/lib/libSvtAv1Enc.so (found version "1.4.1")
-- libavif: Codec enabled: svt (encode)
-- Checking for module 'aom'
--   Found aom, version 3.5.0
-- Found aom: /usr/lib/libaom.so (found version "3.5.0")
-- libavif: Codec enabled: aom (encode/decode)
```

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: libavif: enable encoding support
  2023-02-25  3:44 [PR PATCH] libavif: enable encoding support oreo639
                   ` (2 preceding siblings ...)
  2023-02-25  4:51 ` lemmi
@ 2023-02-25  5:26 ` oreo639
  2023-02-25  5:26 ` oreo639
                   ` (18 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: oreo639 @ 2023-02-25  5:26 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 624 bytes --]

New comment by oreo639 on void-packages repository

https://github.com/void-linux/void-packages/pull/42438#issuecomment-1444999291

Comment:
You can specify the encoder you want to use (although it can fallback to other plugins).
https://github.com/AOMediaCodec/libavif/blob/647c3c208cf152395d777c1bf7240d2ecf7df5a9/include/avif/avif.h#L707-L715

For example, the kimageformats test fails if you don't provide libaom since ra1ve and libsvt-av1 provide a different binary output.

libaom is the most important since it is necessary for lossless, rav1e and libsvt-av1 are faster allow people to use them through libavif.

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: libavif: enable encoding support
  2023-02-25  3:44 [PR PATCH] libavif: enable encoding support oreo639
                   ` (3 preceding siblings ...)
  2023-02-25  5:26 ` oreo639
@ 2023-02-25  5:26 ` oreo639
  2023-02-25  5:27 ` oreo639
                   ` (17 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: oreo639 @ 2023-02-25  5:26 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 653 bytes --]

New comment by oreo639 on void-packages repository

https://github.com/void-linux/void-packages/pull/42438#issuecomment-1444999291

Comment:
You can specify the encoder you want to use (although it can fallback to other plugins).
https://github.com/AOMediaCodec/libavif/blob/647c3c208cf152395d777c1bf7240d2ecf7df5a9/include/avif/avif.h#L707-L715

For example, the kimageformats test fails if you don't provide libaom since ra1ve and libsvt-av1 provide a different binary output (and don't support lossless).

libaom is the most important since it is necessary for lossless, rav1e and libsvt-av1 are faster allow people to use them through libavif.

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: libavif: enable encoding support
  2023-02-25  3:44 [PR PATCH] libavif: enable encoding support oreo639
                   ` (4 preceding siblings ...)
  2023-02-25  5:26 ` oreo639
@ 2023-02-25  5:27 ` oreo639
  2023-02-25  5:28 ` oreo639
                   ` (16 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: oreo639 @ 2023-02-25  5:27 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 671 bytes --]

New comment by oreo639 on void-packages repository

https://github.com/void-linux/void-packages/pull/42438#issuecomment-1444999291

Comment:
You can specify the encoder you want to use (although it can fallback to other plugins).
https://github.com/AOMediaCodec/libavif/blob/647c3c208cf152395d777c1bf7240d2ecf7df5a9/include/avif/avif.h#L707-L715

For example, the kimageformats test fails if you don't provide libaom since ra1ve and libsvt-av1 provide a different binary output (and don't support lossless).

libaom is the most important since it is necessary for lossless, rav1e and libsvt-av1 are faster and enabling them allow people to use them through libavif.

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: libavif: enable encoding support
  2023-02-25  3:44 [PR PATCH] libavif: enable encoding support oreo639
                   ` (5 preceding siblings ...)
  2023-02-25  5:27 ` oreo639
@ 2023-02-25  5:28 ` oreo639
  2023-02-25  5:30 ` oreo639
                   ` (15 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: oreo639 @ 2023-02-25  5:28 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 672 bytes --]

New comment by oreo639 on void-packages repository

https://github.com/void-linux/void-packages/pull/42438#issuecomment-1444999291

Comment:
You can specify the encoder you want to use (although it can fallback to other encoders).
https://github.com/AOMediaCodec/libavif/blob/647c3c208cf152395d777c1bf7240d2ecf7df5a9/include/avif/avif.h#L707-L715

For example, the kimageformats test fails if you don't provide libaom since ra1ve and libsvt-av1 provide a different binary output (and don't support lossless).

libaom is the most important since it is necessary for lossless, rav1e and libsvt-av1 are faster and enabling them allow people to use them through libavif.

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: libavif: enable encoding support
  2023-02-25  3:44 [PR PATCH] libavif: enable encoding support oreo639
                   ` (6 preceding siblings ...)
  2023-02-25  5:28 ` oreo639
@ 2023-02-25  5:30 ` oreo639
  2023-02-25  5:30 ` oreo639
                   ` (14 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: oreo639 @ 2023-02-25  5:30 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 653 bytes --]

New comment by oreo639 on void-packages repository

https://github.com/void-linux/void-packages/pull/42438#issuecomment-1444999291

Comment:
You can specify the encoder you want to use (although it can fallback to other encoders).
https://github.com/AOMediaCodec/libavif/blob/647c3c208cf152395d777c1bf7240d2ecf7df5a9/include/avif/avif.h#L707-L715

For example, the kimageformats test expect libaom and fail when comparing the image binary output to what is expected if aom is not provided.

libaom is the most important since it is necessary for lossless, rav1e and libsvt-av1 are faster and enabling them allow people to use them through libavif.

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: libavif: enable encoding support
  2023-02-25  3:44 [PR PATCH] libavif: enable encoding support oreo639
                   ` (7 preceding siblings ...)
  2023-02-25  5:30 ` oreo639
@ 2023-02-25  5:30 ` oreo639
  2023-02-25  5:34 ` oreo639
                   ` (13 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: oreo639 @ 2023-02-25  5:30 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 654 bytes --]

New comment by oreo639 on void-packages repository

https://github.com/void-linux/void-packages/pull/42438#issuecomment-1444999291

Comment:
You can specify the encoder you want to use (although it can fallback to other encoders).
https://github.com/AOMediaCodec/libavif/blob/647c3c208cf152395d777c1bf7240d2ecf7df5a9/include/avif/avif.h#L707-L715

For example, the kimageformats test expect libaom and fail when comparing the image binary output to what is expected if aom is not provided.

libaom is the most important since it is necessary for lossless, rav1e and libsvt-av1 are faster and enabling them allows people to use them through libavif.

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: libavif: enable encoding support
  2023-02-25  3:44 [PR PATCH] libavif: enable encoding support oreo639
                   ` (8 preceding siblings ...)
  2023-02-25  5:30 ` oreo639
@ 2023-02-25  5:34 ` oreo639
  2023-02-25  5:34 ` oreo639
                   ` (12 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: oreo639 @ 2023-02-25  5:34 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 609 bytes --]

New comment by oreo639 on void-packages repository

https://github.com/void-linux/void-packages/pull/42438#issuecomment-1444999291

Comment:
You can specify the encoder you want to use.
https://github.com/AOMediaCodec/libavif/blob/647c3c208cf152395d777c1bf7240d2ecf7df5a9/include/avif/avif.h#L707-L715

For example, the kimageformats test expect libaom and fail when comparing the image binary output to what is expected if aom is not provided.

libaom is the most important since it is necessary for lossless, rav1e and libsvt-av1 are faster and enabling them allows people to use them through libavif.

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: libavif: enable encoding support
  2023-02-25  3:44 [PR PATCH] libavif: enable encoding support oreo639
                   ` (9 preceding siblings ...)
  2023-02-25  5:34 ` oreo639
@ 2023-02-25  5:34 ` oreo639
  2023-02-25  5:36 ` oreo639
                   ` (11 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: oreo639 @ 2023-02-25  5:34 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 723 bytes --]

New comment by oreo639 on void-packages repository

https://github.com/void-linux/void-packages/pull/42438#issuecomment-1444999291

Comment:
You can specify the encoder you want to use:
https://github.com/AOMediaCodec/libavif/blob/647c3c208cf152395d777c1bf7240d2ecf7df5a9/include/avif/avif.h#L707-L715

https://github.com/AOMediaCodec/libavif/blob/f4a963865bab5edf004b670f2c9defe389087545/apps/avifenc.c#L757-L769

For example, the kimageformats test expect libaom and fail when comparing the image binary output to what is expected if aom is not provided.

libaom is the most important since it is necessary for lossless, rav1e and libsvt-av1 are faster and enabling them allows people to use them through libavif.

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: libavif: enable encoding support
  2023-02-25  3:44 [PR PATCH] libavif: enable encoding support oreo639
                   ` (10 preceding siblings ...)
  2023-02-25  5:34 ` oreo639
@ 2023-02-25  5:36 ` oreo639
  2023-02-25  5:46 ` [PR PATCH] [Updated] " oreo639
                   ` (10 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: oreo639 @ 2023-02-25  5:36 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 725 bytes --]

New comment by oreo639 on void-packages repository

https://github.com/void-linux/void-packages/pull/42438#issuecomment-1444999291

Comment:
You can specify the encoder you want to use:
https://github.com/AOMediaCodec/libavif/blob/647c3c208cf152395d777c1bf7240d2ecf7df5a9/include/avif/avif.h#L707-L715

https://github.com/AOMediaCodec/libavif/blob/f4a963865bab5edf004b670f2c9defe389087545/apps/avifenc.c#L1286-L1300

For example, the kimageformats test expect libaom and fail when comparing the image binary output to what is expected if aom is not provided.

libaom is the most important since it is necessary for lossless, rav1e and libsvt-av1 are faster and enabling them allows people to use them through libavif.

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PR PATCH] [Updated] libavif: enable encoding support
  2023-02-25  3:44 [PR PATCH] libavif: enable encoding support oreo639
                   ` (11 preceding siblings ...)
  2023-02-25  5:36 ` oreo639
@ 2023-02-25  5:46 ` oreo639
  2023-02-25  6:54 ` lemmi
                   ` (9 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: oreo639 @ 2023-02-25  5:46 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1334 bytes --]

There is an updated pull request by oreo639 against master on the void-packages repository

https://github.com/oreo639/void-packages rav1e
https://github.com/void-linux/void-packages/pull/42438

libavif: enable encoding support
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

Allows tests to pass for https://github.com/void-linux/void-packages/pull/42426

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/42438.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-rav1e-42438.patch --]
[-- Type: text/x-diff, Size: 5268 bytes --]

From 3d0254a747bd5c8a6f99842f3fc17fd85fc56b1b Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 24 Feb 2023 19:34:16 -0800
Subject: [PATCH 1/3] New package: cargo-c-0.9.14_1

---
 srcpkgs/cargo-c/template | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
 create mode 100644 srcpkgs/cargo-c/template

diff --git a/srcpkgs/cargo-c/template b/srcpkgs/cargo-c/template
new file mode 100644
index 000000000000..823540132af8
--- /dev/null
+++ b/srcpkgs/cargo-c/template
@@ -0,0 +1,20 @@
+# Template file for 'cargo-c'
+pkgname=cargo-c
+version=0.9.14
+revision=1
+build_style=cargo
+hostmakedepends="pkg-config"
+makedepends="openssl-devel"
+short_desc="Build and install C-compatible rust libraries"
+maintainer="oreo639 <oreo6391@gmail.com>"
+license="MIT"
+homepage="https://crates.io/crates/cargo-c"
+distfiles="https://github.com/lu-zero/cargo-c/archive/v${version}.tar.gz
+ https://github.com/lu-zero/cargo-c/releases/download/v${version}/Cargo.lock"
+checksum="d79c12eae1460803a1ce8b440ae213dc4df63a6f2bf39ebd49eea1d7a008bec6
+ 4680619247db0fa7068e05e2cbf032dd2ed008bc43867a4078ebdfd21604119a"
+skip_extraction="Cargo.lock"
+
+post_install() {
+	vlicense LICENSE
+}

From 8f4c629d8638652ef42612c5a07c95db1074fef4 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 24 Feb 2023 19:35:15 -0800
Subject: [PATCH 2/3] New package: rav1e-0.6.3_1

---
 common/shlibs          |  1 +
 srcpkgs/rav1e-devel    |  1 +
 srcpkgs/rav1e/template | 42 ++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 44 insertions(+)
 create mode 120000 srcpkgs/rav1e-devel
 create mode 100644 srcpkgs/rav1e/template

diff --git a/common/shlibs b/common/shlibs
index 538ff08ce5ff..304ab12ecb0c 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3567,6 +3567,7 @@ libcsfml-system.so.2.5 CSFML-2.5_1
 libcsfml-network.so.2.5 CSFML-2.5_1
 libtokyocabinet.so.9 tokyocabinet-1.4.48_1
 libdav1d.so.6 libdav1d6-1.0.0_1
+librav1e.so.0 rav1e-0.6.3_1
 libdqlite.so.0 dqlite-0.2.1_1
 libwoff2common.so.1.0.2 libwoff2common1.0.2-1.0.2_1
 libwoff2enc.so.1.0.2 libwoff2enc1.0.2-1.0.2_1
diff --git a/srcpkgs/rav1e-devel b/srcpkgs/rav1e-devel
new file mode 120000
index 000000000000..c810b6809ce8
--- /dev/null
+++ b/srcpkgs/rav1e-devel
@@ -0,0 +1 @@
+rav1e
\ No newline at end of file
diff --git a/srcpkgs/rav1e/template b/srcpkgs/rav1e/template
new file mode 100644
index 000000000000..e4589a60170e
--- /dev/null
+++ b/srcpkgs/rav1e/template
@@ -0,0 +1,42 @@
+# Template file for 'rav1e'
+pkgname=rav1e
+version=0.6.3
+revision=1
+build_style=cargo
+hostmakedepends="nasm cargo-c"
+short_desc="Fastest and safest AV1 encoder"
+maintainer="oreo639 <oreo6391@gmail.com>"
+license="BSD-2-Clause"
+homepage="https://crates.io/crates/rav1e"
+distfiles="https://static.crates.io/crates/rav1e/rav1e-${version}.crate"
+checksum=277898094f0d03c6a609e491324102daf5080e71c06b4b25e5acf8b89d26c945
+
+if [ "$XBPS_TARGET_MACHINE" = "i686" ]; then
+	# error: ran out of registers during register allocation
+	# LLVM ERROR: Cannot emit physreg copy instruction
+	make_check=no # Tests fail to compile
+fi
+
+post_build() {
+	cargo auditable cbuild --release --target ${RUST_TARGET} \
+		--library-type cdylib --library-type staticlib \
+		--destdir="${DESTDIR}" --prefix="/usr" ${configure_args}
+}
+
+post_install() {
+	cargo auditable cinstall --release --target ${RUST_TARGET} \
+		--library-type cdylib --library-type staticlib \
+		--destdir="${DESTDIR}" --prefix="/usr" --offline --locked ${configure_args}
+
+	vlicense LICENSE
+}
+
+rav1e-devel_package() {
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove "usr/lib/*.so"
+		vmove usr/lib/pkgconfig
+		vmove usr/include
+	}
+}

From c667f3dfa2c23b55166451bc5eb7cbcc8b41e202 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 24 Feb 2023 19:36:06 -0800
Subject: [PATCH 3/3] libavif: enable encoding support

---
 srcpkgs/libavif/template | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/libavif/template b/srcpkgs/libavif/template
index 7a00dba5b3e5..35637693bb9f 100644
--- a/srcpkgs/libavif/template
+++ b/srcpkgs/libavif/template
@@ -1,13 +1,14 @@
 # Template file for 'libavif'
 pkgname=libavif
 version=0.11.1
-revision=1
+revision=2
 build_style=cmake
 configure_args="-DAVIF_BUILD_APPS=ON -DAVIF_BUILD_GDK_PIXBUF=ON
- -DAVIF_CODEC_DAV1D=ON"
+ -DAVIF_CODEC_DAV1D=ON -DAVIF_CODEC_AOM=ON -DAVIF_CODEC_RAV1E=ON"
 hostmakedepends="gdk-pixbuf-devel pkg-config"
 makedepends="gdk-pixbuf-devel libdav1d-devel
- libjpeg-turbo-devel libpng-devel zlib-devel"
+ libjpeg-turbo-devel libpng-devel zlib-devel
+ libaom-devel rav1e-devel"
 short_desc="Library for encoding and decoding .avif files"
 maintainer="Leah Neukirchen <leah@vuxu.org>"
 license="BSD-2-Clause"
@@ -16,6 +17,11 @@ changelog="https://github.com/AOMediaCodec/libavif/blob/main/CHANGELOG.md"
 distfiles="https://github.com/AOMediaCodec/libavif/archive/refs/tags/v${version}.tar.gz"
 checksum=0eb49965562a0e5e5de58389650d434cff32af84c34185b6c9b7b2fccae06d4e
 
+if [ "$XBPS_TARGET_WORDSIZE" != "32" ]; then
+	configure_args+=" -DAVIF_CODEC_SVT=1"
+	makedepends+=" libsvt-av1-devel"
+fi
+
 post_install() {
 	vlicense LICENSE
 }

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: libavif: enable encoding support
  2023-02-25  3:44 [PR PATCH] libavif: enable encoding support oreo639
                   ` (12 preceding siblings ...)
  2023-02-25  5:46 ` [PR PATCH] [Updated] " oreo639
@ 2023-02-25  6:54 ` lemmi
  2023-02-25  7:06 ` oreo639
                   ` (8 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: lemmi @ 2023-02-25  6:54 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 563 bytes --]

New comment by lemmi on void-packages repository

https://github.com/void-linux/void-packages/pull/42438#issuecomment-1445014300

Comment:
`darktable` takes a ridiculous amount of time (several minutes) to export an image. I used `avifenc` to see what's up and the `libaom` codec seemed to perform ok, while the `rav1e` also took considerably longer with default settings. Wasn't able to test `svt`, since it only works on `yuv420`.
So, I'm still not sure what the value of the other codecs is, but I'm happy I can enable the `avif` format once this is merged. 

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: libavif: enable encoding support
  2023-02-25  3:44 [PR PATCH] libavif: enable encoding support oreo639
                   ` (13 preceding siblings ...)
  2023-02-25  6:54 ` lemmi
@ 2023-02-25  7:06 ` oreo639
  2023-02-25  7:14 ` oreo639
                   ` (7 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: oreo639 @ 2023-02-25  7:06 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 705 bytes --]

New comment by oreo639 on void-packages repository

https://github.com/void-linux/void-packages/pull/42438#issuecomment-1444999291

Comment:
You can specify the encoder you want to use:
https://github.com/AOMediaCodec/libavif/blob/647c3c208cf152395d777c1bf7240d2ecf7df5a9/include/avif/avif.h#L707-L715

https://github.com/AOMediaCodec/libavif/blob/f4a963865bab5edf004b670f2c9defe389087545/apps/avifenc.c#L1286-L1300

For example, the kimageformats test expect libaom and fail when comparing the image binary output to what is expected if aom is not provided.

libaom is the most important since it is necessary for lossless, enabling rav1e and libsvt-av1 allows people to use them through libavif.

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: libavif: enable encoding support
  2023-02-25  3:44 [PR PATCH] libavif: enable encoding support oreo639
                   ` (14 preceding siblings ...)
  2023-02-25  7:06 ` oreo639
@ 2023-02-25  7:14 ` oreo639
  2023-02-25  7:14 ` oreo639
                   ` (6 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: oreo639 @ 2023-02-25  7:14 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 202 bytes --]

New comment by oreo639 on void-packages repository

https://github.com/void-linux/void-packages/pull/42438#issuecomment-1445017854

Comment:
Actually you are right, rav1e is slower than libaom. My bad.

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: libavif: enable encoding support
  2023-02-25  3:44 [PR PATCH] libavif: enable encoding support oreo639
                   ` (15 preceding siblings ...)
  2023-02-25  7:14 ` oreo639
@ 2023-02-25  7:14 ` oreo639
  2023-02-25  7:14 ` oreo639
                   ` (5 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: oreo639 @ 2023-02-25  7:14 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 193 bytes --]

New comment by oreo639 on void-packages repository

https://github.com/void-linux/void-packages/pull/42438#issuecomment-1445017854

Comment:
You are right, rav1e is slower than libaom. My bad.

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: libavif: enable encoding support
  2023-02-25  3:44 [PR PATCH] libavif: enable encoding support oreo639
                   ` (16 preceding siblings ...)
  2023-02-25  7:14 ` oreo639
@ 2023-02-25  7:14 ` oreo639
  2023-02-25  7:52 ` oreo639
                   ` (4 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: oreo639 @ 2023-02-25  7:14 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 203 bytes --]

New comment by oreo639 on void-packages repository

https://github.com/void-linux/void-packages/pull/42438#issuecomment-1445017854

Comment:
You are right, rav1e is generally slower than libaom. My bad.

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: libavif: enable encoding support
  2023-02-25  3:44 [PR PATCH] libavif: enable encoding support oreo639
                   ` (17 preceding siblings ...)
  2023-02-25  7:14 ` oreo639
@ 2023-02-25  7:52 ` oreo639
  2023-04-03  2:39 ` [PR PATCH] [Updated] " oreo639
                   ` (3 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: oreo639 @ 2023-02-25  7:52 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 193 bytes --]

New comment by oreo639 on void-packages repository

https://github.com/void-linux/void-packages/pull/42438#issuecomment-1445017854

Comment:
You are right, rav1e is slower than libaom. My bad.

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PR PATCH] [Updated] libavif: enable encoding support
  2023-02-25  3:44 [PR PATCH] libavif: enable encoding support oreo639
                   ` (18 preceding siblings ...)
  2023-02-25  7:52 ` oreo639
@ 2023-04-03  2:39 ` oreo639
  2023-04-03  8:22 ` oreo639
                   ` (2 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: oreo639 @ 2023-04-03  2:39 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1334 bytes --]

There is an updated pull request by oreo639 against master on the void-packages repository

https://github.com/oreo639/void-packages rav1e
https://github.com/void-linux/void-packages/pull/42438

libavif: enable encoding support
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

Allows tests to pass for https://github.com/void-linux/void-packages/pull/42426

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/42438.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-rav1e-42438.patch --]
[-- Type: text/x-diff, Size: 5268 bytes --]

From 47a589c2d426e60408aecd8f9c31c874e88d959d Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 24 Feb 2023 19:34:16 -0800
Subject: [PATCH 1/3] New package: cargo-c-0.9.14_1

---
 srcpkgs/cargo-c/template | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
 create mode 100644 srcpkgs/cargo-c/template

diff --git a/srcpkgs/cargo-c/template b/srcpkgs/cargo-c/template
new file mode 100644
index 000000000000..461ac18cc1e8
--- /dev/null
+++ b/srcpkgs/cargo-c/template
@@ -0,0 +1,20 @@
+# Template file for 'cargo-c'
+pkgname=cargo-c
+version=0.9.17
+revision=1
+build_style=cargo
+hostmakedepends="pkg-config"
+makedepends="openssl-devel"
+short_desc="Build and install C-compatible rust libraries"
+maintainer="oreo639 <oreo6391@gmail.com>"
+license="MIT"
+homepage="https://crates.io/crates/cargo-c"
+distfiles="https://github.com/lu-zero/cargo-c/archive/v${version}.tar.gz
+ https://github.com/lu-zero/cargo-c/releases/download/v${version}/Cargo.lock"
+checksum="95fcf50505516dfa6a941e666d1388810da9d7a9e1c623c09068faef5d50b3b9
+ 53a6340faee4ae1c56ca8a61087908b0fccce0352a070de404bcce05d20f369a"
+skip_extraction="Cargo.lock"
+
+post_install() {
+	vlicense LICENSE
+}

From dab4ebcac84604471c365374fb90a0a90c141dc6 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 24 Feb 2023 19:35:15 -0800
Subject: [PATCH 2/3] New package: rav1e-0.6.3_1

---
 common/shlibs          |  1 +
 srcpkgs/rav1e-devel    |  1 +
 srcpkgs/rav1e/template | 42 ++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 44 insertions(+)
 create mode 120000 srcpkgs/rav1e-devel
 create mode 100644 srcpkgs/rav1e/template

diff --git a/common/shlibs b/common/shlibs
index ddd0a3266a36..1acd0c7ad7c6 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3572,6 +3572,7 @@ libcsfml-system.so.2.5 CSFML-2.5_1
 libcsfml-network.so.2.5 CSFML-2.5_1
 libtokyocabinet.so.9 tokyocabinet-1.4.48_1
 libdav1d.so.6 libdav1d6-1.0.0_1
+librav1e.so.0 rav1e-0.6.3_1
 libdqlite.so.0 dqlite-0.2.1_1
 libwoff2common.so.1.0.2 libwoff2common1.0.2-1.0.2_1
 libwoff2enc.so.1.0.2 libwoff2enc1.0.2-1.0.2_1
diff --git a/srcpkgs/rav1e-devel b/srcpkgs/rav1e-devel
new file mode 120000
index 000000000000..c810b6809ce8
--- /dev/null
+++ b/srcpkgs/rav1e-devel
@@ -0,0 +1 @@
+rav1e
\ No newline at end of file
diff --git a/srcpkgs/rav1e/template b/srcpkgs/rav1e/template
new file mode 100644
index 000000000000..e4589a60170e
--- /dev/null
+++ b/srcpkgs/rav1e/template
@@ -0,0 +1,42 @@
+# Template file for 'rav1e'
+pkgname=rav1e
+version=0.6.3
+revision=1
+build_style=cargo
+hostmakedepends="nasm cargo-c"
+short_desc="Fastest and safest AV1 encoder"
+maintainer="oreo639 <oreo6391@gmail.com>"
+license="BSD-2-Clause"
+homepage="https://crates.io/crates/rav1e"
+distfiles="https://static.crates.io/crates/rav1e/rav1e-${version}.crate"
+checksum=277898094f0d03c6a609e491324102daf5080e71c06b4b25e5acf8b89d26c945
+
+if [ "$XBPS_TARGET_MACHINE" = "i686" ]; then
+	# error: ran out of registers during register allocation
+	# LLVM ERROR: Cannot emit physreg copy instruction
+	make_check=no # Tests fail to compile
+fi
+
+post_build() {
+	cargo auditable cbuild --release --target ${RUST_TARGET} \
+		--library-type cdylib --library-type staticlib \
+		--destdir="${DESTDIR}" --prefix="/usr" ${configure_args}
+}
+
+post_install() {
+	cargo auditable cinstall --release --target ${RUST_TARGET} \
+		--library-type cdylib --library-type staticlib \
+		--destdir="${DESTDIR}" --prefix="/usr" --offline --locked ${configure_args}
+
+	vlicense LICENSE
+}
+
+rav1e-devel_package() {
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove "usr/lib/*.so"
+		vmove usr/lib/pkgconfig
+		vmove usr/include
+	}
+}

From a51aad36a5d79db5cbb6fc26dbe389bfc2e01cbb Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 24 Feb 2023 19:36:06 -0800
Subject: [PATCH 3/3] libavif: enable encoding support

---
 srcpkgs/libavif/template | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/libavif/template b/srcpkgs/libavif/template
index 7a00dba5b3e5..35637693bb9f 100644
--- a/srcpkgs/libavif/template
+++ b/srcpkgs/libavif/template
@@ -1,13 +1,14 @@
 # Template file for 'libavif'
 pkgname=libavif
 version=0.11.1
-revision=1
+revision=2
 build_style=cmake
 configure_args="-DAVIF_BUILD_APPS=ON -DAVIF_BUILD_GDK_PIXBUF=ON
- -DAVIF_CODEC_DAV1D=ON"
+ -DAVIF_CODEC_DAV1D=ON -DAVIF_CODEC_AOM=ON -DAVIF_CODEC_RAV1E=ON"
 hostmakedepends="gdk-pixbuf-devel pkg-config"
 makedepends="gdk-pixbuf-devel libdav1d-devel
- libjpeg-turbo-devel libpng-devel zlib-devel"
+ libjpeg-turbo-devel libpng-devel zlib-devel
+ libaom-devel rav1e-devel"
 short_desc="Library for encoding and decoding .avif files"
 maintainer="Leah Neukirchen <leah@vuxu.org>"
 license="BSD-2-Clause"
@@ -16,6 +17,11 @@ changelog="https://github.com/AOMediaCodec/libavif/blob/main/CHANGELOG.md"
 distfiles="https://github.com/AOMediaCodec/libavif/archive/refs/tags/v${version}.tar.gz"
 checksum=0eb49965562a0e5e5de58389650d434cff32af84c34185b6c9b7b2fccae06d4e
 
+if [ "$XBPS_TARGET_WORDSIZE" != "32" ]; then
+	configure_args+=" -DAVIF_CODEC_SVT=1"
+	makedepends+=" libsvt-av1-devel"
+fi
+
 post_install() {
 	vlicense LICENSE
 }

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PR PATCH] [Updated] libavif: enable encoding support
  2023-02-25  3:44 [PR PATCH] libavif: enable encoding support oreo639
                   ` (19 preceding siblings ...)
  2023-04-03  2:39 ` [PR PATCH] [Updated] " oreo639
@ 2023-04-03  8:22 ` oreo639
  2023-04-03  8:24 ` oreo639
  2023-04-06  5:22 ` [PR PATCH] [Merged]: " lemmi
  22 siblings, 0 replies; 24+ messages in thread
From: oreo639 @ 2023-04-03  8:22 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1334 bytes --]

There is an updated pull request by oreo639 against master on the void-packages repository

https://github.com/oreo639/void-packages rav1e
https://github.com/void-linux/void-packages/pull/42438

libavif: enable encoding support
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

Allows tests to pass for https://github.com/void-linux/void-packages/pull/42426

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/42438.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-rav1e-42438.patch --]
[-- Type: text/x-diff, Size: 5670 bytes --]

From 47a589c2d426e60408aecd8f9c31c874e88d959d Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 24 Feb 2023 19:34:16 -0800
Subject: [PATCH 1/3] New package: cargo-c-0.9.14_1

---
 srcpkgs/cargo-c/template | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
 create mode 100644 srcpkgs/cargo-c/template

diff --git a/srcpkgs/cargo-c/template b/srcpkgs/cargo-c/template
new file mode 100644
index 000000000000..461ac18cc1e8
--- /dev/null
+++ b/srcpkgs/cargo-c/template
@@ -0,0 +1,20 @@
+# Template file for 'cargo-c'
+pkgname=cargo-c
+version=0.9.17
+revision=1
+build_style=cargo
+hostmakedepends="pkg-config"
+makedepends="openssl-devel"
+short_desc="Build and install C-compatible rust libraries"
+maintainer="oreo639 <oreo6391@gmail.com>"
+license="MIT"
+homepage="https://crates.io/crates/cargo-c"
+distfiles="https://github.com/lu-zero/cargo-c/archive/v${version}.tar.gz
+ https://github.com/lu-zero/cargo-c/releases/download/v${version}/Cargo.lock"
+checksum="95fcf50505516dfa6a941e666d1388810da9d7a9e1c623c09068faef5d50b3b9
+ 53a6340faee4ae1c56ca8a61087908b0fccce0352a070de404bcce05d20f369a"
+skip_extraction="Cargo.lock"
+
+post_install() {
+	vlicense LICENSE
+}

From dab4ebcac84604471c365374fb90a0a90c141dc6 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 24 Feb 2023 19:35:15 -0800
Subject: [PATCH 2/3] New package: rav1e-0.6.3_1

---
 common/shlibs          |  1 +
 srcpkgs/rav1e-devel    |  1 +
 srcpkgs/rav1e/template | 42 ++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 44 insertions(+)
 create mode 120000 srcpkgs/rav1e-devel
 create mode 100644 srcpkgs/rav1e/template

diff --git a/common/shlibs b/common/shlibs
index ddd0a3266a36..1acd0c7ad7c6 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3572,6 +3572,7 @@ libcsfml-system.so.2.5 CSFML-2.5_1
 libcsfml-network.so.2.5 CSFML-2.5_1
 libtokyocabinet.so.9 tokyocabinet-1.4.48_1
 libdav1d.so.6 libdav1d6-1.0.0_1
+librav1e.so.0 rav1e-0.6.3_1
 libdqlite.so.0 dqlite-0.2.1_1
 libwoff2common.so.1.0.2 libwoff2common1.0.2-1.0.2_1
 libwoff2enc.so.1.0.2 libwoff2enc1.0.2-1.0.2_1
diff --git a/srcpkgs/rav1e-devel b/srcpkgs/rav1e-devel
new file mode 120000
index 000000000000..c810b6809ce8
--- /dev/null
+++ b/srcpkgs/rav1e-devel
@@ -0,0 +1 @@
+rav1e
\ No newline at end of file
diff --git a/srcpkgs/rav1e/template b/srcpkgs/rav1e/template
new file mode 100644
index 000000000000..e4589a60170e
--- /dev/null
+++ b/srcpkgs/rav1e/template
@@ -0,0 +1,42 @@
+# Template file for 'rav1e'
+pkgname=rav1e
+version=0.6.3
+revision=1
+build_style=cargo
+hostmakedepends="nasm cargo-c"
+short_desc="Fastest and safest AV1 encoder"
+maintainer="oreo639 <oreo6391@gmail.com>"
+license="BSD-2-Clause"
+homepage="https://crates.io/crates/rav1e"
+distfiles="https://static.crates.io/crates/rav1e/rav1e-${version}.crate"
+checksum=277898094f0d03c6a609e491324102daf5080e71c06b4b25e5acf8b89d26c945
+
+if [ "$XBPS_TARGET_MACHINE" = "i686" ]; then
+	# error: ran out of registers during register allocation
+	# LLVM ERROR: Cannot emit physreg copy instruction
+	make_check=no # Tests fail to compile
+fi
+
+post_build() {
+	cargo auditable cbuild --release --target ${RUST_TARGET} \
+		--library-type cdylib --library-type staticlib \
+		--destdir="${DESTDIR}" --prefix="/usr" ${configure_args}
+}
+
+post_install() {
+	cargo auditable cinstall --release --target ${RUST_TARGET} \
+		--library-type cdylib --library-type staticlib \
+		--destdir="${DESTDIR}" --prefix="/usr" --offline --locked ${configure_args}
+
+	vlicense LICENSE
+}
+
+rav1e-devel_package() {
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove "usr/lib/*.so"
+		vmove usr/lib/pkgconfig
+		vmove usr/include
+	}
+}

From c9455839b1fa8e3a33f01b967b9627d88bd807cd Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 24 Feb 2023 19:36:06 -0800
Subject: [PATCH 3/3] libavif: enable encoding support

---
 srcpkgs/libavif/template | 22 ++++++++++++++++++----
 1 file changed, 18 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/libavif/template b/srcpkgs/libavif/template
index 7a00dba5b3e5..2d719eee6b43 100644
--- a/srcpkgs/libavif/template
+++ b/srcpkgs/libavif/template
@@ -1,13 +1,16 @@
 # Template file for 'libavif'
 pkgname=libavif
 version=0.11.1
-revision=1
+revision=2
 build_style=cmake
 configure_args="-DAVIF_BUILD_APPS=ON -DAVIF_BUILD_GDK_PIXBUF=ON
- -DAVIF_CODEC_DAV1D=ON"
+ -DAVIF_CODEC_AOM=ON $(vopt_bool dav1d AVIF_CODEC_DAV1D) $(vopt_bool rav1e AVIF_CODEC_RAV1E)
+ $(vopt_bool svt AVIF_CODEC_SVT)"
 hostmakedepends="gdk-pixbuf-devel pkg-config"
-makedepends="gdk-pixbuf-devel libdav1d-devel
- libjpeg-turbo-devel libpng-devel zlib-devel"
+makedepends="gdk-pixbuf-devel libaom-devel
+ libjpeg-turbo-devel libpng-devel zlib-devel
+  $(vopt_if dav1d "libdav1d-devel") $(vopt_if rav1e "rav1e-devel")
+  $(vopt_if svt "libsvt-av1-devel")"
 short_desc="Library for encoding and decoding .avif files"
 maintainer="Leah Neukirchen <leah@vuxu.org>"
 license="BSD-2-Clause"
@@ -16,6 +19,17 @@ changelog="https://github.com/AOMediaCodec/libavif/blob/main/CHANGELOG.md"
 distfiles="https://github.com/AOMediaCodec/libavif/archive/refs/tags/v${version}.tar.gz"
 checksum=0eb49965562a0e5e5de58389650d434cff32af84c34185b6c9b7b2fccae06d4e
 
+build_options="dav1d rav1e svt"
+build_options_default="dav1d rav1e"
+
+desc_option_dav1d="Enable support for DAV1D decoder"
+desc_option_rav1e="Enable support for RAV1E encoder"
+desc_option_svt="Enable support for SVT-AV1 encoder (64-bit only)"
+
+if [ "$XBPS_TARGET_WORDSIZE" != "32" ]; then
+	build_options_default+=" svt"
+fi
+
 post_install() {
 	vlicense LICENSE
 }

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PR PATCH] [Updated] libavif: enable encoding support
  2023-02-25  3:44 [PR PATCH] libavif: enable encoding support oreo639
                   ` (20 preceding siblings ...)
  2023-04-03  8:22 ` oreo639
@ 2023-04-03  8:24 ` oreo639
  2023-04-06  5:22 ` [PR PATCH] [Merged]: " lemmi
  22 siblings, 0 replies; 24+ messages in thread
From: oreo639 @ 2023-04-03  8:24 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1334 bytes --]

There is an updated pull request by oreo639 against master on the void-packages repository

https://github.com/oreo639/void-packages rav1e
https://github.com/void-linux/void-packages/pull/42438

libavif: enable encoding support
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

Allows tests to pass for https://github.com/void-linux/void-packages/pull/42426

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/42438.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-rav1e-42438.patch --]
[-- Type: text/x-diff, Size: 5668 bytes --]

From 47a589c2d426e60408aecd8f9c31c874e88d959d Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 24 Feb 2023 19:34:16 -0800
Subject: [PATCH 1/3] New package: cargo-c-0.9.14_1

---
 srcpkgs/cargo-c/template | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
 create mode 100644 srcpkgs/cargo-c/template

diff --git a/srcpkgs/cargo-c/template b/srcpkgs/cargo-c/template
new file mode 100644
index 000000000000..461ac18cc1e8
--- /dev/null
+++ b/srcpkgs/cargo-c/template
@@ -0,0 +1,20 @@
+# Template file for 'cargo-c'
+pkgname=cargo-c
+version=0.9.17
+revision=1
+build_style=cargo
+hostmakedepends="pkg-config"
+makedepends="openssl-devel"
+short_desc="Build and install C-compatible rust libraries"
+maintainer="oreo639 <oreo6391@gmail.com>"
+license="MIT"
+homepage="https://crates.io/crates/cargo-c"
+distfiles="https://github.com/lu-zero/cargo-c/archive/v${version}.tar.gz
+ https://github.com/lu-zero/cargo-c/releases/download/v${version}/Cargo.lock"
+checksum="95fcf50505516dfa6a941e666d1388810da9d7a9e1c623c09068faef5d50b3b9
+ 53a6340faee4ae1c56ca8a61087908b0fccce0352a070de404bcce05d20f369a"
+skip_extraction="Cargo.lock"
+
+post_install() {
+	vlicense LICENSE
+}

From dab4ebcac84604471c365374fb90a0a90c141dc6 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 24 Feb 2023 19:35:15 -0800
Subject: [PATCH 2/3] New package: rav1e-0.6.3_1

---
 common/shlibs          |  1 +
 srcpkgs/rav1e-devel    |  1 +
 srcpkgs/rav1e/template | 42 ++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 44 insertions(+)
 create mode 120000 srcpkgs/rav1e-devel
 create mode 100644 srcpkgs/rav1e/template

diff --git a/common/shlibs b/common/shlibs
index ddd0a3266a36..1acd0c7ad7c6 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3572,6 +3572,7 @@ libcsfml-system.so.2.5 CSFML-2.5_1
 libcsfml-network.so.2.5 CSFML-2.5_1
 libtokyocabinet.so.9 tokyocabinet-1.4.48_1
 libdav1d.so.6 libdav1d6-1.0.0_1
+librav1e.so.0 rav1e-0.6.3_1
 libdqlite.so.0 dqlite-0.2.1_1
 libwoff2common.so.1.0.2 libwoff2common1.0.2-1.0.2_1
 libwoff2enc.so.1.0.2 libwoff2enc1.0.2-1.0.2_1
diff --git a/srcpkgs/rav1e-devel b/srcpkgs/rav1e-devel
new file mode 120000
index 000000000000..c810b6809ce8
--- /dev/null
+++ b/srcpkgs/rav1e-devel
@@ -0,0 +1 @@
+rav1e
\ No newline at end of file
diff --git a/srcpkgs/rav1e/template b/srcpkgs/rav1e/template
new file mode 100644
index 000000000000..e4589a60170e
--- /dev/null
+++ b/srcpkgs/rav1e/template
@@ -0,0 +1,42 @@
+# Template file for 'rav1e'
+pkgname=rav1e
+version=0.6.3
+revision=1
+build_style=cargo
+hostmakedepends="nasm cargo-c"
+short_desc="Fastest and safest AV1 encoder"
+maintainer="oreo639 <oreo6391@gmail.com>"
+license="BSD-2-Clause"
+homepage="https://crates.io/crates/rav1e"
+distfiles="https://static.crates.io/crates/rav1e/rav1e-${version}.crate"
+checksum=277898094f0d03c6a609e491324102daf5080e71c06b4b25e5acf8b89d26c945
+
+if [ "$XBPS_TARGET_MACHINE" = "i686" ]; then
+	# error: ran out of registers during register allocation
+	# LLVM ERROR: Cannot emit physreg copy instruction
+	make_check=no # Tests fail to compile
+fi
+
+post_build() {
+	cargo auditable cbuild --release --target ${RUST_TARGET} \
+		--library-type cdylib --library-type staticlib \
+		--destdir="${DESTDIR}" --prefix="/usr" ${configure_args}
+}
+
+post_install() {
+	cargo auditable cinstall --release --target ${RUST_TARGET} \
+		--library-type cdylib --library-type staticlib \
+		--destdir="${DESTDIR}" --prefix="/usr" --offline --locked ${configure_args}
+
+	vlicense LICENSE
+}
+
+rav1e-devel_package() {
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove "usr/lib/*.so"
+		vmove usr/lib/pkgconfig
+		vmove usr/include
+	}
+}

From a3737ea75dc9466bbd4f07977e80863e4431d20b Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 24 Feb 2023 19:36:06 -0800
Subject: [PATCH 3/3] libavif: enable encoding support

---
 srcpkgs/libavif/template | 22 ++++++++++++++++++----
 1 file changed, 18 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/libavif/template b/srcpkgs/libavif/template
index 7a00dba5b3e5..1edeb56fc725 100644
--- a/srcpkgs/libavif/template
+++ b/srcpkgs/libavif/template
@@ -1,13 +1,16 @@
 # Template file for 'libavif'
 pkgname=libavif
 version=0.11.1
-revision=1
+revision=2
 build_style=cmake
 configure_args="-DAVIF_BUILD_APPS=ON -DAVIF_BUILD_GDK_PIXBUF=ON
- -DAVIF_CODEC_DAV1D=ON"
+ -DAVIF_CODEC_AOM=ON $(vopt_bool dav1d AVIF_CODEC_DAV1D) $(vopt_bool rav1e AVIF_CODEC_RAV1E)
+ $(vopt_bool svt AVIF_CODEC_SVT)"
 hostmakedepends="gdk-pixbuf-devel pkg-config"
-makedepends="gdk-pixbuf-devel libdav1d-devel
- libjpeg-turbo-devel libpng-devel zlib-devel"
+makedepends="gdk-pixbuf-devel libaom-devel
+ libjpeg-turbo-devel libpng-devel zlib-devel
+ $(vopt_if dav1d "libdav1d-devel") $(vopt_if rav1e "rav1e-devel")
+ $(vopt_if svt "libsvt-av1-devel")"
 short_desc="Library for encoding and decoding .avif files"
 maintainer="Leah Neukirchen <leah@vuxu.org>"
 license="BSD-2-Clause"
@@ -16,6 +19,17 @@ changelog="https://github.com/AOMediaCodec/libavif/blob/main/CHANGELOG.md"
 distfiles="https://github.com/AOMediaCodec/libavif/archive/refs/tags/v${version}.tar.gz"
 checksum=0eb49965562a0e5e5de58389650d434cff32af84c34185b6c9b7b2fccae06d4e
 
+build_options="dav1d rav1e svt"
+build_options_default="dav1d rav1e"
+
+desc_option_dav1d="Enable support for DAV1D decoder"
+desc_option_rav1e="Enable support for RAV1E encoder"
+desc_option_svt="Enable support for SVT-AV1 encoder (64-bit only)"
+
+if [ "$XBPS_TARGET_WORDSIZE" != "32" ]; then
+	build_options_default+=" svt"
+fi
+
 post_install() {
 	vlicense LICENSE
 }

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PR PATCH] [Merged]: libavif: enable encoding support
  2023-02-25  3:44 [PR PATCH] libavif: enable encoding support oreo639
                   ` (21 preceding siblings ...)
  2023-04-03  8:24 ` oreo639
@ 2023-04-06  5:22 ` lemmi
  22 siblings, 0 replies; 24+ messages in thread
From: lemmi @ 2023-04-06  5:22 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1180 bytes --]

There's a merged pull request on the void-packages repository

libavif: enable encoding support
https://github.com/void-linux/void-packages/pull/42438

Description:
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

Allows tests to pass for https://github.com/void-linux/void-packages/pull/42426

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2023-04-06  5:22 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-25  3:44 [PR PATCH] libavif: enable encoding support oreo639
2023-02-25  3:45 ` [PR PATCH] [Updated] " oreo639
2023-02-25  3:57 ` oreo639
2023-02-25  4:51 ` lemmi
2023-02-25  5:26 ` oreo639
2023-02-25  5:26 ` oreo639
2023-02-25  5:27 ` oreo639
2023-02-25  5:28 ` oreo639
2023-02-25  5:30 ` oreo639
2023-02-25  5:30 ` oreo639
2023-02-25  5:34 ` oreo639
2023-02-25  5:34 ` oreo639
2023-02-25  5:36 ` oreo639
2023-02-25  5:46 ` [PR PATCH] [Updated] " oreo639
2023-02-25  6:54 ` lemmi
2023-02-25  7:06 ` oreo639
2023-02-25  7:14 ` oreo639
2023-02-25  7:14 ` oreo639
2023-02-25  7:14 ` oreo639
2023-02-25  7:52 ` oreo639
2023-04-03  2:39 ` [PR PATCH] [Updated] " oreo639
2023-04-03  8:22 ` oreo639
2023-04-03  8:24 ` oreo639
2023-04-06  5:22 ` [PR PATCH] [Merged]: " lemmi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).