You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
92 lines
1.6 KiB
92 lines
1.6 KiB
5 years ago
|
# Copyright 1999-2020 Gentoo Authors
|
||
5 years ago
|
# Distributed under the terms of the GNU General Public License v2
|
||
|
|
||
|
EAPI=7
|
||
|
inherit toolchain-funcs xdg-utils
|
||
|
|
||
|
DESCRIPTION="Minimal image viewer designed for tiling window manager users"
|
||
|
HOMEPAGE="https://github.com/eXeC64/imv"
|
||
|
SRC_URI="https://github.com/eXeC64/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||
|
|
||
5 years ago
|
LICENSE="MIT-with-advertising"
|
||
5 years ago
|
SLOT="0"
|
||
|
KEYWORDS="~amd64 ~x86"
|
||
5 years ago
|
IUSE="X +freeimage jpeg png +svg test tiff wayland"
|
||
5 years ago
|
RESTRICT="!test? ( test )"
|
||
|
REQUIRED_USE="
|
||
|
|| ( X wayland )
|
||
|
"
|
||
|
|
||
|
RDEPEND="
|
||
|
!sys-apps/renameutils
|
||
|
media-libs/fontconfig
|
||
|
media-libs/libsdl2
|
||
|
media-libs/sdl2-ttf
|
||
|
X? (
|
||
5 years ago
|
virtual/glu
|
||
5 years ago
|
x11-libs/libX11
|
||
5 years ago
|
x11-libs/libxcb
|
||
|
x11-libs/libxkbcommon
|
||
|
x11-libs/pango
|
||
5 years ago
|
)
|
||
|
freeimage? ( media-libs/freeimage )
|
||
|
jpeg? ( media-libs/libjpeg-turbo )
|
||
|
png? ( media-libs/libpng )
|
||
|
svg? ( gnome-base/librsvg )
|
||
|
tiff? ( media-libs/tiff )
|
||
|
wayland? ( dev-libs/wayland )
|
||
|
"
|
||
|
BDEPEND="
|
||
|
app-text/asciidoc
|
||
|
test? ( dev-util/cmocka )
|
||
|
"
|
||
|
DEPEND="
|
||
|
${RDEPEND}
|
||
|
"
|
||
|
|
||
|
src_prepare() {
|
||
|
default
|
||
|
sed -i -e 's|pkg-config|$(PKG_CONFIG)|g' Makefile || die
|
||
|
}
|
||
|
|
||
|
src_configure() {
|
||
|
tc-export PKG_CONFIG
|
||
|
local WINDOWS
|
||
|
if use X; then
|
||
|
if ! use wayland; then
|
||
|
WINDOWS=x11
|
||
|
else
|
||
|
WINDOWS=all
|
||
|
fi
|
||
|
else
|
||
|
if use wayland; then
|
||
|
WINDOWS=wayland
|
||
|
fi
|
||
|
fi
|
||
|
|
||
|
BACKENDS=(
|
||
|
BACKEND_FREEIMAGE=$(usex freeimage)
|
||
|
BACKEND_JPEG=$(usex jpeg)
|
||
|
BACKEND_LIBPNG=$(usex png)
|
||
|
BACKEND_LIBRSVG=$(usex svg)
|
||
|
BACKEND_LIBTIFF=$(usex tiff)
|
||
|
WINDOWS=${WINDOWS}
|
||
|
)
|
||
|
}
|
||
|
|
||
|
src_compile() {
|
||
|
emake ${BACKENDS[@]}
|
||
|
}
|
||
|
|
||
|
src_install() {
|
||
|
emake ${BACKENDS[@]} DESTDIR="${D}" install
|
||
|
}
|
||
|
|
||
|
pkg_postinst() {
|
||
|
xdg_desktop_database_update
|
||
|
}
|
||
|
|
||
|
pkg_postrm() {
|
||
|
xdg_desktop_database_update
|
||
|
}
|