build: make avif feature optional but enable by default

This commit is contained in:
Michael Aaron Murphy 2026-07-01 01:41:02 +02:00 committed by Jacob Kauffmann
parent 4d3915c1d7
commit d971176aca
5 changed files with 18 additions and 57 deletions

46
Cargo.lock generated
View file

@ -2504,12 +2504,6 @@ version = "2.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9f1f227452a390804cdb637b74a86990f2a7d7ba4b7d5693aac9b4dd6defd8d6"
[[package]]
name = "fax"
version = "0.2.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "caf1079563223d5d59d83c85886a56e586cfd5c1a26292e971a0fa266531ac5a"
[[package]]
name = "fdeflate"
version = "0.3.7"
@ -2936,16 +2930,6 @@ dependencies = [
"weezl",
]
[[package]]
name = "gif"
version = "0.14.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ee8cfcc411d9adbbaba82fb72661cc1bcca13e8bba98b364e62b2dba8f960159"
dependencies = [
"color_quant",
"weezl",
]
[[package]]
name = "gimli"
version = "0.32.3"
@ -3959,20 +3943,15 @@ checksum = "85ab80394333c02fe689eaf900ab500fbd0c2213da414687ebf995a65d5a6104"
dependencies = [
"bytemuck",
"byteorder-lite",
"color_quant",
"dav1d",
"exr",
"gif 0.14.2",
"image-webp",
"moxcms",
"mp4parse",
"num-traits",
"png 0.18.1",
"qoi",
"ravif",
"rayon",
"rgb",
"tiff",
"zune-core 0.5.1",
"zune-jpeg 0.5.15",
]
@ -6009,15 +5988,6 @@ version = "0.1.30"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d55d956fa96f5ec02be2e13af0e20391a5aa83d6a074e3ad368959d0fab299ea"
[[package]]
name = "qoi"
version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7f6d64c71eb498fe9eae14ce4ec935c555749aef511cca85b5568910d6e48001"
dependencies = [
"bytemuck",
]
[[package]]
name = "qrcode"
version = "0.13.0"
@ -6338,7 +6308,7 @@ version = "0.45.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a8928798c0a55e03c9ca6c4c6846f76377427d2c1e1f7e6de3c06ae57942df43"
dependencies = [
"gif 0.13.3",
"gif",
"image-webp",
"log",
"pico-args",
@ -7255,20 +7225,6 @@ dependencies = [
"cfg-if",
]
[[package]]
name = "tiff"
version = "0.11.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b63feaf3343d35b6ca4d50483f94843803b0f51634937cc2ec519fc32232bc52"
dependencies = [
"fax",
"flate2",
"half",
"quick-error",
"weezl",
"zune-jpeg 0.5.15",
]
[[package]]
name = "time"
version = "0.3.53"

View file

@ -10,6 +10,13 @@ rust-version = "1.93"
cosmic-randr = { git = "https://github.com/pop-os/cosmic-randr" }
tokio = { version = "1.49.0", features = ["macros"] }
iced_winit = { git = "https://github.com/pop-os/libcosmic", default-features = false }
image = { version = "0.25.10", default-features = false, features = [
"jpeg",
"png",
"rayon",
"webp",
"hdr",
] }
[workspace.dependencies.libcosmic]
features = [

View file

@ -47,13 +47,7 @@ futures = "0.3.32"
hostname-validator = "1.1.1"
hostname1-zbus = { git = "https://github.com/pop-os/dbus-settings-bindings", optional = true }
i18n-embed-fl = "0.10.0"
image = { version = "0.25", default-features = false, features = [
"jpeg",
"png",
"rayon",
"webp",
"hdr",
] }
image.workspace = true
indexmap = "2.13.0"
itertools = "0.14.0"
itoa = "1.0.17"
@ -118,7 +112,8 @@ git = "https://github.com/AerynOS/locales-rs"
optional = true
[features]
default = ["a11y", "linux", "single-instance", "wgpu", "systemd"]
default = ["a11y", "avif", "linux", "single-instance", "wgpu", "systemd"]
avif = ["image/avif-native"]
gettext = ["dep:gettext-rs"]
systemd = []
openrc = []

7
debian/rules vendored
View file

@ -1,6 +1,7 @@
#!/usr/bin/make -f
export DESTDIR = debian/tmp
OS_VERSION = $(shell rg VERSION_ID /etc/os-release | awk -F\" '{print $2}')
%:
dh $@
@ -9,7 +10,11 @@ override_dh_auto_clean:
ischroot || just vendor
override_dh_auto_build:
test -e vendor.tar && just build-vendored --features systemd || just build-release --features systemd
ifeq ($(OS_VERSION),22.04)
test -e vendor.tar && just build-vendored || just build-release --no-default-features
else
test -e vendor.tar && just build-vendored || just build-release
endif
override_dh_auto_install:
just rootdir=$(DESTDIR) install

View file

@ -4,8 +4,6 @@ version = "1.0.7"
edition = "2024"
rust-version.workspace = true
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
cosmic-bg-config = { workspace = true }
cosmic-randr-shell = { workspace = true }
@ -16,7 +14,7 @@ fast_image_resize = { version = "6", features = [
] }
futures-lite = "2.6.1"
futures-util = "0.3.32"
image = { version = "0.25.10", features = ["avif-native", "hdr", "jpeg", "png", "rayon", "webp"] }
image.workspace = true
infer = "0.19.0"
jxl-oxide = { version = "0.12.5", features = ["image"] }
tokio = { workspace = true, features = ["sync"] }