From 74bb792f86b51c999430cf53e135b10fddc7012d Mon Sep 17 00:00:00 2001 From: Li-Wen Hsu Date: Tue, 11 Dec 2018 20:29:28 +0000 Subject: [PATCH] Add graphics/webp-pixbuf-loader, gdkpixbuf2 loader and thumbnailer for webp PR: 232872 Submitted by: Greg V --- graphics/Makefile | 1 + graphics/webp-pixbuf-loader/Makefile | 29 +++++++++++++++++++ graphics/webp-pixbuf-loader/distinfo | 3 ++ .../gdk-pixbuf-webp-thumbnailer.thumbnailer | 4 +++ .../webp-pixbuf-loader/files/patch-wscript | 13 +++++++++ graphics/webp-pixbuf-loader/pkg-descr | 4 +++ 6 files changed, 54 insertions(+) create mode 100644 graphics/webp-pixbuf-loader/Makefile create mode 100644 graphics/webp-pixbuf-loader/distinfo create mode 100644 graphics/webp-pixbuf-loader/files/gdk-pixbuf-webp-thumbnailer.thumbnailer create mode 100644 graphics/webp-pixbuf-loader/files/patch-wscript create mode 100644 graphics/webp-pixbuf-loader/pkg-descr diff --git a/graphics/Makefile b/graphics/Makefile index 3ef1ac2edd8a..1ce3d50b4075 100644 --- a/graphics/Makefile +++ b/graphics/Makefile @@ -1135,6 +1135,7 @@ SUBDIR += wayland-protocols SUBDIR += waylandpp SUBDIR += webp + SUBDIR += webp-pixbuf-loader SUBDIR += wings SUBDIR += wmicons SUBDIR += wxsvg diff --git a/graphics/webp-pixbuf-loader/Makefile b/graphics/webp-pixbuf-loader/Makefile new file mode 100644 index 000000000000..8b24275030a1 --- /dev/null +++ b/graphics/webp-pixbuf-loader/Makefile @@ -0,0 +1,29 @@ +# $FreeBSD$ + +PORTNAME= webp-pixbuf-loader +PORTVERSION= 20160329 +CATEGORIES= graphics + +MAINTAINER= greg@unrelenting.technology +COMMENT= WebP image loader plugin for GdkPixbuf2 + +LICENSE= LGPL20+ + +LIB_DEPENDS= libwebp.so:graphics/webp + +USES= gnome perl5 pkgconfig waf +USE_GNOME= gdkpixbuf2 +USE_GITHUB= yes +GH_ACCOUNT= aruiz +GH_TAGNAME= 9b92950d49d7 + +PLIST_FILES= lib/gdk-pixbuf-2.0/${GTK2_VERSION}/loaders/libpixbufloader-webp.so \ + share/thumbnailers/gdk-pixbuf-webp-thumbnailer.thumbnailer + +post-install: + ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/gdk-pixbuf-2.0/*/loaders/* + ${MKDIR} ${STAGEDIR}${PREFIX}/share/thumbnailers + ${SED} -e 's|@PREFIX@|${LOCALBASE}|g' ${FILESDIR}/gdk-pixbuf-webp-thumbnailer.thumbnailer \ + > ${STAGEDIR}${PREFIX}/share/thumbnailers/gdk-pixbuf-webp-thumbnailer.thumbnailer + +.include diff --git a/graphics/webp-pixbuf-loader/distinfo b/graphics/webp-pixbuf-loader/distinfo new file mode 100644 index 000000000000..7c75f1bef62f --- /dev/null +++ b/graphics/webp-pixbuf-loader/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1541025028 +SHA256 (aruiz-webp-pixbuf-loader-20160329-9b92950d49d7_GH0.tar.gz) = 98bc7726ce18363b559253c698769921500f1a583d4d8deffb937c787f3792b0 +SIZE (aruiz-webp-pixbuf-loader-20160329-9b92950d49d7_GH0.tar.gz) = 86102 diff --git a/graphics/webp-pixbuf-loader/files/gdk-pixbuf-webp-thumbnailer.thumbnailer b/graphics/webp-pixbuf-loader/files/gdk-pixbuf-webp-thumbnailer.thumbnailer new file mode 100644 index 000000000000..572b68ca4cdb --- /dev/null +++ b/graphics/webp-pixbuf-loader/files/gdk-pixbuf-webp-thumbnailer.thumbnailer @@ -0,0 +1,4 @@ +[Thumbnailer Entry] +TryExec=@PREFIX@/bin/gdk-pixbuf-thumbnailer +Exec=@PREFIX@/bin/gdk-pixbuf-thumbnailer -s %s %u %o +MimeType=image/webp; diff --git a/graphics/webp-pixbuf-loader/files/patch-wscript b/graphics/webp-pixbuf-loader/files/patch-wscript new file mode 100644 index 000000000000..a3ded26a51b7 --- /dev/null +++ b/graphics/webp-pixbuf-loader/files/patch-wscript @@ -0,0 +1,13 @@ +--- wscript.orig 2018-10-31 22:31:58 UTC ++++ wscript +@@ -5,8 +5,8 @@ def options(opt): + def configure(conf): + conf.load('compiler_c glib2') + conf.find_program('gdk-pixbuf-query-loaders') +- conf.check_cc(lib='webp', header_name='webp/decode.h', +- uselib_store='WEBP', mandatory=True) ++ conf.check_cfg(package='libwebp', uselib_store='WEBP', ++ args='--cflags --libs', mandatory=True) + conf.check_cfg(package='gdk-pixbuf-2.0', uselib_store='GDK_PIXBUF', + atleast_version='2.22.0', args='--cflags --libs', + mandatory=True) diff --git a/graphics/webp-pixbuf-loader/pkg-descr b/graphics/webp-pixbuf-loader/pkg-descr new file mode 100644 index 000000000000..aad097f154ae --- /dev/null +++ b/graphics/webp-pixbuf-loader/pkg-descr @@ -0,0 +1,4 @@ +A WebP image loader for GdkPixbuf2. +Also a thumbnailer definition file for e.g. Nautilus. + +WWW: https://github.com/aruiz/webp-pixbuf-loader