media-video/ffmpegthumbnailer: Fix libffmpegthumbnailer.pc libdir
authorAndreas Sturmlechner <asturm@gentoo.org>
Wed, 12 Jun 2019 10:30:10 +0000 (12:30 +0200)
committerAndreas Sturmlechner <asturm@gentoo.org>
Wed, 12 Jun 2019 10:37:04 +0000 (12:37 +0200)
Package-Manager: Portage-2.3.67, Repoman-2.3.14
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
media-video/ffmpegthumbnailer/ffmpegthumbnailer-2.2.0-r1.ebuild [new file with mode: 0644]
media-video/ffmpegthumbnailer/files/ffmpegthumbnailer-2.2.0-pkgconfig-libdir.patch [new file with mode: 0644]

diff --git a/media-video/ffmpegthumbnailer/ffmpegthumbnailer-2.2.0-r1.ebuild b/media-video/ffmpegthumbnailer/ffmpegthumbnailer-2.2.0-r1.ebuild
new file mode 100644 (file)
index 0000000..c10e330
--- /dev/null
@@ -0,0 +1,51 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake-utils
+
+DESCRIPTION="Lightweight video thumbnailer that can be used by file managers"
+HOMEPAGE="https://github.com/dirkvdb/ffmpegthumbnailer"
+SRC_URI="https://github.com/dirkvdb/${PN}/releases/download/${PV}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 sparc x86 ~x86-fbsd"
+IUSE="gnome gtk jpeg libav png test"
+
+REQUIRED_USE="gnome? ( gtk )
+       test? ( png jpeg )"
+
+BDEPEND="
+       virtual/pkgconfig
+"
+RDEPEND="
+       gtk? ( dev-libs/glib:2= )
+       jpeg? ( virtual/jpeg:0= )
+       !libav? ( >=media-video/ffmpeg-2.7:0= )
+       libav? ( >=media-video/libav-11:0= )
+       png? ( media-libs/libpng:0= )
+"
+DEPEND="${RDEPEND}"
+
+DOCS=( AUTHORS ChangeLog README.md )
+
+PATCHES=( "${FILESDIR}/${P}-pkgconfig-libdir.patch" )
+
+src_prepare() {
+       rm -rf out* || die
+
+       cmake-utils_src_prepare
+}
+
+src_configure() {
+       local mycmakeargs=(
+               -DENABLE_GIO=$(usex gtk)
+               -DENABLE_TESTS=$(usex test)
+               -DENABLE_THUMBNAILER=$(usex gnome)
+               -DHAVE_JPEG=$(usex jpeg)
+               -DHAVE_PNG=$(usex png)
+       )
+       cmake-utils_src_configure
+}
diff --git a/media-video/ffmpegthumbnailer/files/ffmpegthumbnailer-2.2.0-pkgconfig-libdir.patch b/media-video/ffmpegthumbnailer/files/ffmpegthumbnailer-2.2.0-pkgconfig-libdir.patch
new file mode 100644 (file)
index 0000000..8a70b6f
--- /dev/null
@@ -0,0 +1,21 @@
+From 88c09cb6218fda5457c228f33084244db8725ed2 Mon Sep 17 00:00:00 2001
+From: orbea <ovariegata@yahoo.com>
+Date: Sat, 15 Apr 2017 19:36:01 -0700
+Subject: [PATCH] Fix libffmpegthumbnailer.pc to work with multilib systems
+
+---
+ libffmpegthumbnailer.pc.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/libffmpegthumbnailer.pc.in b/libffmpegthumbnailer.pc.in
+index 77c00b2..0a2f997 100644
+--- a/libffmpegthumbnailer.pc.in
++++ b/libffmpegthumbnailer.pc.in
+@@ -1,6 +1,6 @@
+ prefix=@CMAKE_INSTALL_PREFIX@
+ exec_prefix=${prefix}
+-libdir=${exec_prefix}/lib
++libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
+ includedir=${prefix}/include
+ Name: libffmpegthumbnailer