diff options
author | Jeroen Roovers <jer@gentoo.org> | 2020-08-16 20:00:19 +0200 |
---|---|---|
committer | Jeroen Roovers <jer@gentoo.org> | 2020-08-16 20:01:44 +0200 |
commit | b3953d9995275aad3f34d2c389aade2ab61b9b7c (patch) | |
tree | d00a7b9530746b9d42824e2ffdf4e82c8e96987f /media-gfx/imv | |
parent | media-libs/libheif: Add USE=go, disable for non-native ABIs (diff) | |
download | gentoo-b3953d9995275aad3f34d2c389aade2ab61b9b7c.tar.gz gentoo-b3953d9995275aad3f34d2c389aade2ab61b9b7c.tar.bz2 gentoo-b3953d9995275aad3f34d2c389aade2ab61b9b7c.zip |
media-gfx/imv: Add USE=heif, use meson.eclass
Package-Manager: Portage-3.0.2, Repoman-2.3.23
Bug: https://bugs.gentoo.org/show_bug.cgi?id=710344
Closes: https://bugs.gentoo.org/713682
Signed-off-by: Jeroen Roovers <jer@gentoo.org>
Diffstat (limited to 'media-gfx/imv')
-rw-r--r-- | media-gfx/imv/imv-9999.ebuild | 61 | ||||
-rw-r--r-- | media-gfx/imv/metadata.xml | 1 |
2 files changed, 29 insertions, 33 deletions
diff --git a/media-gfx/imv/imv-9999.ebuild b/media-gfx/imv/imv-9999.ebuild index 986d27dd3255..65f50d9221c2 100644 --- a/media-gfx/imv/imv-9999.ebuild +++ b/media-gfx/imv/imv-9999.ebuild @@ -2,16 +2,16 @@ # Distributed under the terms of the GNU General Public License v2 EAPI=7 -inherit git-r3 toolchain-funcs xdg-utils +inherit git-r3 meson xdg-utils DESCRIPTION="Minimal image viewer designed for tiling window manager users" +LICENSE="MIT-with-advertising" HOMEPAGE="https://github.com/eXeC64/imv" EGIT_REPO_URI="https://github.com/eXeC64/imv" -LICENSE="MIT-with-advertising" -SLOT="0" KEYWORDS="" -IUSE="X +freeimage jpeg libnsgif png +svg test tiff wayland" +SLOT="0" +IUSE="X +freeimage +png jpeg svg gif heif test tiff wayland" RESTRICT="!test? ( test )" REQUIRED_USE=" || ( X wayland ) @@ -27,15 +27,18 @@ RDEPEND=" virtual/glu x11-libs/libX11 x11-libs/libxcb - x11-libs/libxkbcommon + x11-libs/libxkbcommon[X] 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 ) + freeimage? ( media-libs/freeimage[png?,jpeg?,tiff?] ) + !freeimage? ( + jpeg? ( media-libs/libjpeg-turbo ) + png? ( media-libs/libpng ) + tiff? ( media-libs/tiff ) + ) + gif? ( media-libs/libnsgif ) + heif? ( media-libs/libheif ) + svg? ( >=gnome-base/librsvg-2.44 ) wayland? ( dev-libs/wayland ) " BDEPEND=" @@ -46,13 +49,7 @@ 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 @@ -66,23 +63,21 @@ src_configure() { 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[@]} -} + if ! use test; then + sed -i -e '/^dep_cmocka/,/^endforeach$/d' meson.build || die + fi -src_install() { - emake ${BACKENDS[@]} DESTDIR="${D}" install + local emesonargs=( + $(meson_feature freeimage) + $(meson_feature gif libnsgif) + $(meson_feature heif libheif) + $(meson_feature svg librsvg) + $(usex freeimage -Dlibjpeg=disabled -Dlibjpeg=enabled) + $(usex freeimage -Dlibpng=disabled -Dlibjpeg=enabled) + $(usex freeimage -Dlibtiff=disabled -Dlibjpeg=enabled) + -Dwindows=$WINDOWS + ) + meson_src_configure } pkg_postinst() { diff --git a/media-gfx/imv/metadata.xml b/media-gfx/imv/metadata.xml index 39258bf23daf..e61730462a7b 100644 --- a/media-gfx/imv/metadata.xml +++ b/media-gfx/imv/metadata.xml @@ -4,6 +4,7 @@ <maintainer type='person'><email>jer@gentoo.org</email></maintainer> <use> <flag name='freeimage'>Use <pkg>media-libs/freeimage</pkg> as image library</flag> +<flag name='heif'>Use <pkg>media-libs/libheif</pkg> as image library</flag> <flag name='libnsgif'>Use <pkg>media-libs/libnsgif</pkg> as image library</flag> </use> <upstream> |