gentoo-ebuilds/media-gfx/qiv/qiv-3.0.2.ebuild
Nicolas PARLANT f527985002
media-gfx/qiv: add 3.0.2
SRC_URI : move to codeberg release tarball

use a patched-Makefile to install, to not miss new files in the future
remove the magic useflag as its rdep sys-apps/file is already in @system

rdeps :
move to gdk-pixbuf/glib (and optfeature for it) instead of imlib (since 2.9.0)
move to gtk+:3 (since 3.0.0)
add cairo, pango and libXext/libX11, all required by code

bug #943819 fixed w/ https://codeberg.org/ciberandy/qiv/commit/9c34

Bug: https://bugs.gentoo.org/943819
Signed-off-by: Nicolas PARLANT <nicolas.parlant@parhuet.fr>
Part-of: https://github.com/gentoo/gentoo/pull/42892
Closes: https://github.com/gentoo/gentoo/pull/42892
Signed-off-by: Sam James <sam@gentoo.org>
2025-07-08 20:31:48 +01:00

78 lines
1.5 KiB
Bash

# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit optfeature toolchain-funcs xdg
DESCRIPTION="Quick Image Viewer"
HOMEPAGE="https://spiegl.de/qiv/ https://codeberg.org/ciberandy/qiv"
SRC_URI="https://codeberg.org/ciberandy/qiv/releases/download/v${PV}/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~arm64 ~mips ~x86"
IUSE="exif lcms"
# just a launch-test
RESTRICT="test"
RDEPEND="
dev-libs/glib:2
sys-apps/file
x11-libs/cairo
x11-libs/gdk-pixbuf:2
x11-libs/gtk+:3[X]
x11-libs/libX11
x11-libs/libXext
x11-libs/pango
exif? ( media-libs/libexif )
lcms? (
media-libs/lcms:2
media-libs/libjpeg-turbo:=
media-libs/tiff:=
)
"
DEPEND="${RDEPEND}"
BDEPEND="virtual/pkgconfig"
PATCHES=(
"${FILESDIR}"/${PN}-3.0.2-adapt_makefile.patch
)
src_prepare() {
default
if ! use exif ; then
sed -i 's/^EXIF =/#\0/' Makefile || die
fi
if ! use lcms ; then
sed -i 's/^LCMS =/#\0/' Makefile || die
fi
}
src_compile() {
tc-export CC PKG_CONFIG
default
}
src_install() {
local myemakeargs=(
PREFIX="${ED}/usr"
# do not compress the manpage
COMPRESS_PROG=true
# do not strip
STRIP_FLAG=
)
emake "${myemakeargs[@]}" install
dodoc Changelog contrib/qiv-command.example README README.TODO
}
pkg_postinst() {
xdg_pkg_postinst
optfeature "GIF support" gui-libs/gdk-pixbuf[gif]
optfeature "JPEG support" gui-libs/gdk-pixbuf[jpeg]
optfeature "TIFF support" gui-libs/gdk-pixbuf[tiff]
optfeature "WebP support" gui-libs/gdk-pixbuf-loader-webp
}