From 21435953e16cda318a82334ddbadb3b5c36d9ea7 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Wed, 15 Jan 2020 15:51:32 +0000 Subject: gentoo resync : 15.01.2020 --- media-gfx/imv/imv-9999.ebuild | 77 +++++++++++++++++++++++++++++++++++++------ 1 file changed, 67 insertions(+), 10 deletions(-) (limited to 'media-gfx/imv/imv-9999.ebuild') diff --git a/media-gfx/imv/imv-9999.ebuild b/media-gfx/imv/imv-9999.ebuild index 275366fe87f1..5fc4052027f6 100644 --- a/media-gfx/imv/imv-9999.ebuild +++ b/media-gfx/imv/imv-9999.ebuild @@ -1,30 +1,87 @@ -# Copyright 1999-2019 Gentoo Authors +# Copyright 1999-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=6 - -inherit xdg-utils git-r3 +EAPI=7 +inherit git-r3 toolchain-funcs xdg-utils DESCRIPTION="Minimal image viewer designed for tiling window manager users" HOMEPAGE="https://github.com/eXeC64/imv" -EGIT_REPO_URI="https://github.com/eXeC64/imv.git" +EGIT_REPO_URI="https://github.com/eXeC64/imv" -LICENSE="GPL-2+" +LICENSE="MIT-with-advertising" SLOT="0" KEYWORDS="" -IUSE="test" +IUSE="X +freeimage jpeg libnsgif png +svg test tiff wayland" RESTRICT="!test? ( test )" +REQUIRED_USE=" + || ( X wayland ) +" RDEPEND=" !sys-apps/renameutils media-libs/fontconfig media-libs/libsdl2 media-libs/sdl2-ttf - media-libs/freeimage + X? ( + x11-libs/libX11 + x11-libs/libxcb + x11-libs/libxkbcommon + x11-libs/pango + ) + freeimage? ( media-libs/freeimage ) + jpeg? ( media-libs/libjpeg-turbo ) + libnsgif? ( media-libs/libnsgif ) + 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 +} -DEPEND="${RDEPEND} - test? ( dev-util/cmocka )" +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_LIBNSGIF=$(usex libnsgif) + 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 -- cgit v1.2.3