mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-08 06:32:59 -04:00
media-gfx/swayimg: add 5.4
add optional support for jpeg2k Signed-off-by: Nicolas PARLANT <nicolas.parlant@parhuet.fr>
This commit is contained in:
@@ -1,2 +1,3 @@
|
||||
DIST swayimg-4.7.tar.gz 793940 BLAKE2B 854690eb0769830e5833db6ce83729adb0b08cdae46b833ef00e0be6fb18d7b196bd4cd76d506df72fec8ca0304247dd4655bbb5e10a41a8da4f2215d0faa1d1 SHA512 77384dc33702594a95f0e961b0677a695071e89a98bffdbc008331ddb143b228295dd0107733d3ddd44499cd5a32e6d61d94efe4ae9d9d45999be12fa9364b6e
|
||||
DIST swayimg-5.2.tar.gz 985902 BLAKE2B e9e061d2f2a64513bf0ff9cc38b686f92a519876fe0f2056a4b68236ea862ed83703422371a9e45494256f1be1da9f4f69c0082a1455d67db485e3b78c697892 SHA512 6f13d3f160ac2e02d61cb6efb1d47562f97639f759ce474232c9a0f2b61ad30a39d1693a370aeecf5b51c11bb3dad80857198d27a52fe5907afdcd909d9048cb
|
||||
DIST swayimg-5.4.tar.gz 1002027 BLAKE2B 6ab787d32e2bc469880e73bc6bf8ed89d6d4151b43091eaeee6d7d95aaf31b2f3e529a21e5d7190097abc14a289dd7351ea104ec440b5e542906dadb0deffb14 SHA512 7a69c17d57c1f2a8e7ae2c19cb134d5194182a9dd403d5520d5d8fc133ba14a6aef04493e01526dfbcbdc27697a77eb1940baf7355c384075bd547fb1af7d571
|
||||
|
||||
125
media-gfx/swayimg/swayimg-5.4.ebuild
Normal file
125
media-gfx/swayimg/swayimg-5.4.ebuild
Normal file
@@ -0,0 +1,125 @@
|
||||
# Copyright 2023-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
LUA_COMPAT=( luajit )
|
||||
inherit eapi9-ver lua-single meson xdg
|
||||
|
||||
DESCRIPTION="Lightweight image viewer for Wayland display servers"
|
||||
HOMEPAGE="https://github.com/artemsen/swayimg"
|
||||
SRC_URI="https://github.com/artemsen/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
IUSE="avif bash-completion drm exif gif heif jpeg jpeg2k jpegxl png raw sixel svg test tiff +wayland webp X"
|
||||
REQUIRED_USE="
|
||||
${LUA_REQUIRED_USE}
|
||||
|| ( drm wayland )
|
||||
"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
# disable exr until #966735 is fixed
|
||||
# exr? ( >=media-libs/openexr-3.4:= )
|
||||
# $(meson_feature exr)
|
||||
RDEPEND="
|
||||
${LUA_DEPS}
|
||||
media-libs/fontconfig
|
||||
media-libs/freetype
|
||||
x11-libs/libxkbcommon
|
||||
avif? ( >=media-libs/libavif-1.0:= )
|
||||
bash-completion? ( app-shells/bash-completion )
|
||||
drm? ( x11-libs/libdrm )
|
||||
exif? ( media-gfx/exiv2:= )
|
||||
gif? ( media-libs/giflib:= )
|
||||
heif? ( media-libs/libheif:= )
|
||||
jpeg? ( media-libs/libjpeg-turbo:= )
|
||||
jpeg2k? ( media-libs/openjpeg:= )
|
||||
jpegxl? ( media-libs/libjxl:= )
|
||||
png? ( media-libs/libpng:= )
|
||||
raw? ( media-libs/libraw:= )
|
||||
sixel? ( media-libs/libsixel )
|
||||
svg? (
|
||||
dev-libs/glib:2
|
||||
>=gnome-base/librsvg-2.46:2
|
||||
x11-libs/cairo[X=]
|
||||
)
|
||||
tiff? ( media-libs/tiff:= )
|
||||
wayland? ( dev-libs/wayland )
|
||||
webp? ( media-libs/libwebp:= )
|
||||
"
|
||||
DEPEND="
|
||||
${RDEPEND}
|
||||
svg? ( X? ( x11-base/xorg-proto ) )
|
||||
test? ( dev-cpp/gtest )
|
||||
wayland? ( >=dev-libs/wayland-protocols-1.35 )
|
||||
"
|
||||
BDEPEND="
|
||||
wayland? ( dev-util/wayland-scanner )
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-5.1-precompiled_doc.patch
|
||||
)
|
||||
|
||||
DOCS=( CONFIG.md README.md USAGE.md )
|
||||
|
||||
src_configure() {
|
||||
local emesonargs=(
|
||||
$(meson_feature avif)
|
||||
$(meson_feature drm)
|
||||
$(meson_feature exif)
|
||||
$(meson_feature gif)
|
||||
$(meson_feature heif)
|
||||
$(meson_feature jpeg)
|
||||
$(meson_feature jpeg2k jp2)
|
||||
$(meson_feature jpegxl jxl)
|
||||
$(meson_feature png)
|
||||
$(meson_feature raw)
|
||||
$(meson_feature sixel)
|
||||
$(meson_feature svg)
|
||||
$(meson_feature test tests)
|
||||
$(meson_feature tiff)
|
||||
$(meson_feature wayland)
|
||||
$(meson_feature wayland compositor)
|
||||
$(meson_feature webp)
|
||||
$(meson_feature bash-completion bash)
|
||||
-Dversion=${PV}
|
||||
-Ddesktop=true
|
||||
-Ddoc=false
|
||||
-Dlicense=false
|
||||
-Dluameta=true
|
||||
-Dman=true
|
||||
-Dzsh=enabled
|
||||
)
|
||||
meson_src_configure
|
||||
}
|
||||
|
||||
src_test() {
|
||||
local skip_tests=()
|
||||
# Set LC_COLLATE=en_US.utf8 if available for ImageListTest.SortAlphaUnicode
|
||||
if locale -a | grep -iq "en_US.utf8"; then
|
||||
local -x LC_COLLATE="en_US.utf8"
|
||||
else
|
||||
skip_tests+=( ImageListTest.SortAlphaUnicode )
|
||||
fi
|
||||
|
||||
# load extra/example.lua:
|
||||
# swayimg.set_format_params('raw', { camera_wb = true })
|
||||
use raw || skip_tests+=( LuaEngineTest.Load )
|
||||
|
||||
local -x GTEST_FILTER=$(echo -$(IFS=:; echo "${skip_tests[*]}"))
|
||||
meson_src_test
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
xdg_pkg_postinst
|
||||
|
||||
if ver_replacing -lt 5.0; then
|
||||
elog "The Swayimg configuration file is now a Lua script."
|
||||
elog "${EROOT}/usr/share/swayimg/swayimg.lua contains a description of Lua bindings."
|
||||
elog "${EROOT}/usr/share/swayimg/example.lua contains a detailed example."
|
||||
elog "The new user config file is ~/.config/swayimg/init.lua"
|
||||
fi
|
||||
}
|
||||
Reference in New Issue
Block a user