mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-04-07 03:10:15 -04:00
media-gfx/swayimg: add 5.1
Config is now lua libexif is replaced with exiv2 mv gtest from bdep to depend use precompiled doc use en_US.utf8 when available for the sort test or skip it exr needs >=media-libs/openexr-3.4 but it's currently masked Signed-off-by: Nicolas PARLANT <nicolas.parlant@parhuet.fr>
This commit is contained in:
@@ -1,2 +1,3 @@
|
||||
DIST swayimg-4.6.tar.gz 791750 BLAKE2B 3c7859d82cb444acde6b018df64133b67447b7e730252249bfa6b3be4c0c6c984f109084846d92e58fa3f99689999c52570dfadd41fef73427ab05df0ce3e6aa SHA512 a2cd6f3a70b484e33a3f4d478ccda74f046b90622a2ce0c969f864c588358b38373f4755f29159295f4d368e28877536fca11d7c00ce9f83e99867a27d4d9e96
|
||||
DIST swayimg-4.7.tar.gz 793940 BLAKE2B 854690eb0769830e5833db6ce83729adb0b08cdae46b833ef00e0be6fb18d7b196bd4cd76d506df72fec8ca0304247dd4655bbb5e10a41a8da4f2215d0faa1d1 SHA512 77384dc33702594a95f0e961b0677a695071e89a98bffdbc008331ddb143b228295dd0107733d3ddd44499cd5a32e6d61d94efe4ae9d9d45999be12fa9364b6e
|
||||
DIST swayimg-5.1.tar.gz 981703 BLAKE2B b22fb3cc36a3228b184befb507dc94b537d4f3fb2604bfd406681a8ec3dfeb5c3395a3b18b2fc4fbd20384ca2e268439a265ab6a7c17a991b0295c9f02f6417b SHA512 a6dbeb3eab58c046457a3667c04479b49c0f699afc5f0e10e9c2b470b7f201a0d0853c915b58f928131f9ddd2dc855f1da05c9c950fa98bd02d01b5e143ddc4c
|
||||
|
||||
12
media-gfx/swayimg/files/swayimg-5.1-precompiled_doc.patch
Normal file
12
media-gfx/swayimg/files/swayimg-5.1-precompiled_doc.patch
Normal file
@@ -0,0 +1,12 @@
|
||||
use precompiled doc from tarball
|
||||
--- a/meson.build
|
||||
+++ b/meson.build
|
||||
@@ -148,7 +148,7 @@ conf.set_quoted('APP_VERSION', version)
|
||||
configure_file(output: 'buildconf.hpp', configuration: conf)
|
||||
|
||||
# doc generator
|
||||
-python3 = find_program('python3', native: true, required: false)
|
||||
+python3 = find_program('python3', native: true, required: false, disabler: true)
|
||||
if python3.found()
|
||||
extra_dir = meson.global_source_root() / 'extra'
|
||||
# man 1
|
||||
115
media-gfx/swayimg/swayimg-5.1.ebuild
Normal file
115
media-gfx/swayimg/swayimg-5.1.ebuild
Normal file
@@ -0,0 +1,115 @@
|
||||
# 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 exr gif heif jpeg jpegxl png raw sixel svg test tiff +wayland webp X"
|
||||
REQUIRED_USE="
|
||||
${LUA_REQUIRED_USE}
|
||||
|| ( drm wayland )
|
||||
"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
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:= )
|
||||
exr? ( >=media-libs/openexr-3.4:= )
|
||||
gif? ( media-libs/giflib:= )
|
||||
heif? ( media-libs/libheif:= )
|
||||
jpeg? ( media-libs/libjpeg-turbo:= )
|
||||
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 exr)
|
||||
$(meson_feature gif)
|
||||
$(meson_feature heif)
|
||||
$(meson_feature jpeg)
|
||||
$(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() {
|
||||
# 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
|
||||
local -x GTEST_FILTER="-ImageListTest.SortAlphaUnicode"
|
||||
fi
|
||||
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