author | Evangelos Foutras
<foutrelis@archlinux.org> 2018-06-10 20:14:01 UTC |
committer | Evangelos Foutras
<foutrelis@archlinux.org> 2018-06-10 20:14:01 UTC |
parent | 294e8f2434cef878dec7d234eeaa61b44c049b79 |
PKGBUILD | +16 | -4 |
accept-network-paths-in-ffmpeg-thumbnailer-plugin.patch | +38 | -0 |
use-pkg-config-to-find-FreeType.patch | +42 | -0 |
diff --git a/PKGBUILD b/PKGBUILD index 016124a..4cc220f 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -4,7 +4,7 @@ pkgname=tumbler pkgver=0.2.1 -pkgrel=1 +pkgrel=2 pkgdesc="D-Bus service for applications to request thumbnails" arch=('x86_64') url="http://www.xfce.org/" @@ -12,14 +12,26 @@ license=('GPL2' 'LGPL') groups=('xfce4') depends=('gdk-pixbuf2') makedepends=('intltool' 'python' 'ffmpegthumbnailer' 'poppler-glib' 'libgsf' - 'libopenraw' 'freetype2') + 'libopenraw' 'freetype2' 'xfce4-dev-tools') optdepends=('ffmpegthumbnailer: for video thumbnails' 'poppler-glib: for PDF thumbnails' 'libgsf: for ODF thumbnails' 'libopenraw: for RAW thumbnails' 'freetype2: for font thumbnails') -source=(https://archive.xfce.org/src/xfce/$pkgname/${pkgver%.*}/$pkgname-$pkgver.tar.bz2) -sha256sums=('204b677be6c350ca2c84789ada668435de73de8460660cc6230b1604eaa8f5db') +source=(https://archive.xfce.org/src/xfce/$pkgname/${pkgver%.*}/$pkgname-$pkgver.tar.bz2 + use-pkg-config-to-find-FreeType.patch + accept-network-paths-in-ffmpeg-thumbnailer-plugin.patch) +sha256sums=('204b677be6c350ca2c84789ada668435de73de8460660cc6230b1604eaa8f5db' + 'e585caff41845817636d5d3c006ac63882ffc439e1f9bc4fe9361e76fa9a6c9f' + 'd9fca39e2490eebcdd782cf3d885857ca17e030dac61d5e8f2065f840441272b') + +prepare() { + cd "$srcdir/$pkgname-$pkgver" + patch -Np1 -i ../use-pkg-config-to-find-FreeType.patch + patch -Np1 -i ../accept-network-paths-in-ffmpeg-thumbnailer-plugin.patch + mkdir m4 + xdt-autogen +} build() { cd "$srcdir/$pkgname-$pkgver" diff --git a/accept-network-paths-in-ffmpeg-thumbnailer-plugin.patch b/accept-network-paths-in-ffmpeg-thumbnailer-plugin.patch new file mode 100644 index 0000000..a64449c --- /dev/null +++ b/accept-network-paths-in-ffmpeg-thumbnailer-plugin.patch @@ -0,0 +1,38 @@ +From a471e43838ae96295e1757986724f76057539665 Mon Sep 17 00:00:00 2001 +From: Evangelos Foutras <evangelos@foutrelis.com> +Date: Sun, 10 Jun 2018 22:01:39 +0300 +Subject: [PATCH] Accept network paths in ffmpeg thumbnailer plugin + +g_file_get_path() appears to be able to convert smb://, sftp://, and +other GVFS schemes to local absolute paths which can be passed as is +to ffmpegthumbnailer. In order to handle these URIs, remove the call +to g_file_is_native() and rely exclussively on g_file_get_path(). +--- + plugins/ffmpeg-thumbnailer/ffmpeg-thumbnailer.c | 9 +++------ + 1 file changed, 3 insertions(+), 6 deletions(-) + +diff --git a/plugins/ffmpeg-thumbnailer/ffmpeg-thumbnailer.c b/plugins/ffmpeg-thumbnailer/ffmpeg-thumbnailer.c +index 04cbb9d..81f2922 100644 +--- a/plugins/ffmpeg-thumbnailer/ffmpeg-thumbnailer.c ++++ b/plugins/ffmpeg-thumbnailer/ffmpeg-thumbnailer.c +@@ -196,14 +196,11 @@ ffmpeg_thumbnailer_create (TumblerAbstractThumbnailer *thumbnailer, + + uri = tumbler_file_info_get_uri (info); + +- /* try to open the source file for reading */ ++ /* get the local absolute path to the source file */ + file = g_file_new_for_uri (uri); ++ path = g_file_get_path (file); + +- if (g_file_is_native (file)) +- { +- path = g_file_get_path (file); +- } +- else ++ if (path == NULL) + { + /* there was an error, emit error signal */ + g_set_error (&error, TUMBLER_ERROR, TUMBLER_ERROR_INVALID_FORMAT, +-- +2.17.1 + diff --git a/use-pkg-config-to-find-FreeType.patch b/use-pkg-config-to-find-FreeType.patch new file mode 100644 index 0000000..f8d0970 --- /dev/null +++ b/use-pkg-config-to-find-FreeType.patch @@ -0,0 +1,42 @@ +From ee186a1ea5b104a520bf8f39a2fd37bb4cb4d57b Mon Sep 17 00:00:00 2001 +From: Evangelos Foutras <evangelos@foutrelis.com> +Date: Sun, 10 Jun 2018 22:48:13 +0300 +Subject: [PATCH] Use pkg-config to find FreeType + +Starting with FreeType 2.9.1, freetype-config might not be available. +--- + acinclude.m4 | 18 +----------------- + 1 file changed, 1 insertion(+), 17 deletions(-) + +diff --git a/acinclude.m4 b/acinclude.m4 +index 546e2fe..596917b 100644 +--- a/acinclude.m4 ++++ b/acinclude.m4 +@@ -52,23 +52,7 @@ if test x"$ac_tumbler_font_thumbnailer" = x"yes"; then + PKG_CHECK_MODULES([GDK_PIXBUF], [gdk-pixbuf-2.0 >= 2.14], + [ + dnl Check for FreeType 2.x +- FREETYPE_LIBS="" +- FREETYPE_CFLAGS="" +- AC_PATH_PROG([FREETYPE_CONFIG], [freetype-config], [no]) +- if test x"$FREETYPE_CONFIG" != x"no"; then +- AC_MSG_CHECKING([FREETYPE_CFLAGS]) +- FREETYPE_CFLAGS="`$FREETYPE_CONFIG --cflags`" +- AC_MSG_RESULT([$FREETYPE_CFLAGS]) +- +- AC_MSG_CHECKING([FREETYPE_LIBS]) +- FREETYPE_LIBS="`$FREETYPE_CONFIG --libs`" +- AC_MSG_RESULT([$FREETYPE_LIBS]) +- else +- dnl We can only build the font thumbnailer if FreeType 2.x is available +- ac_tumbler_font_thumbnailer=no +- fi +- AC_SUBST([FREETYPE_CFLAGS]) +- AC_SUBST([FREETYPE_LIBS]) ++ PKG_CHECK_MODULES([FREETYPE], [freetype2], [], [ac_tumbler_font_thumbnailer=no]) + ], [ac_tumbler_font_thumbnailer=no]) + fi + +-- +2.17.1 +