svn commit: r544255 - in head/graphics/libavif: . files
Jan Beich
jbeich at FreeBSD.org
Thu Aug 6 00:16:43 UTC 2020
Author: jbeich
Date: Thu Aug 6 00:16:41 2020
New Revision: 544255
URL: https://svnweb.freebsd.org/changeset/ports/544255
Log:
graphics/libavif: enable gdk-pixbuf2 loader
$ avifenc huge.jpg huge.avif
$ mcomix huge.avif
$ swaymsg output \* background $PWD/test.avif fill
Added:
head/graphics/libavif/files/
head/graphics/libavif/files/mime.xml (contents, props changed)
Modified:
head/graphics/libavif/Makefile (contents, props changed)
head/graphics/libavif/pkg-plist (contents, props changed)
Modified: head/graphics/libavif/Makefile
==============================================================================
--- head/graphics/libavif/Makefile Wed Aug 5 23:52:56 2020 (r544254)
+++ head/graphics/libavif/Makefile Thu Aug 6 00:16:41 2020 (r544255)
@@ -3,6 +3,7 @@
PORTNAME= libavif
DISTVERSIONPREFIX= v
DISTVERSION= 0.8.1
+PORTREVISION= 1
CATEGORIES= graphics
MAINTAINER= jbeich at FreeBSD.org
@@ -19,8 +20,9 @@ USE_LDCONFIG= yes
GH_ACCOUNT= AOMediaCodec
CMAKE_ON= AVIF_BUILD_APPS
-OPTIONS_DEFINE= AOM DAV1D RAV1E
-OPTIONS_DEFAULT=AOM DAV1D
+OPTIONS_DEFINE= AOM DAV1D PIXBUF RAV1E
+OPTIONS_DEFAULT=AOM DAV1D PIXBUF
+OPTIONS_SUB= yes
AOM_DESC= AV1 encoding/decoding via libaom
AOM_LIB_DEPENDS= libaom.so:multimedia/aom
@@ -30,8 +32,21 @@ DAV1D_DESC= AV1 decoding via libdav1d
DAV1D_LIB_DEPENDS= libdav1d.so:multimedia/dav1d
DAV1D_CMAKE_BOOL= AVIF_CODEC_DAV1D
+PIXBUF_USES= gnome
+PIXBUF_USE= GNOME=gdkpixbuf2
+PIXBUF_CMAKE_BOOL= AVIF_BUILD_GDK_PIXBUF
+PIXBUF_CFLAGS= -Wno-error=cast-qual # https://github.com/AOMediaCodec/libavif/issues/251
+
RAV1E_DESC= AV1 encoding via librav1e
RAV1E_LIB_DEPENDS= librav1e.so:multimedia/librav1e
RAV1E_CMAKE_BOOL= AVIF_CODEC_RAV1E
+
+# XXX Drop after misc/shared-mime-info is updated to 2.0
+PIXBUF_USES+= shared-mime-info
+PIXBUF_PLIST_FILES+= share/mime/packages/${PORTNAME}.xml
+do-install-PIXBUF-on:
+ ${MKDIR} ${STAGEDIR}${PREFIX}/share/mime/packages
+ ${INSTALL_DATA} ${FILESDIR}/mime.xml \
+ ${STAGEDIR}${PREFIX}/share/mime/packages/${PORTNAME}.xml
.include <bsd.port.mk>
Added: head/graphics/libavif/files/mime.xml
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/graphics/libavif/files/mime.xml Thu Aug 6 00:16:41 2020 (r544255)
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
+ <!-- https://gitlab.freedesktop.org/xdg/shared-mime-info/commit/d23e9fa537b8 -->
+ <mime-type type="image/avif">
+ <comment>AV1 Image File Format (AVIF)</comment>
+ <magic priority="50">
+ <match type="string" value="ftypavif" offset="4"/>
+ <match type="string" value="ftypmif1" offset="4"/>
+ </magic>
+ <glob pattern="*.avif"/>
+ </mime-type>
+ <mime-type type="image/avif-sequence">
+ <comment>AVIF image sequence</comment>
+ <magic priority="50">
+ <match type="string" value="ftypavis" offset="4"/>
+ </magic>
+ <glob pattern="*.avifs"/>
+ </mime-type>
+</mime-info>
Modified: head/graphics/libavif/pkg-plist
==============================================================================
--- head/graphics/libavif/pkg-plist Wed Aug 5 23:52:56 2020 (r544254)
+++ head/graphics/libavif/pkg-plist Thu Aug 6 00:16:41 2020 (r544255)
@@ -4,7 +4,10 @@ include/avif/avif.h
lib/cmake/libavif/libavif-config-%%CMAKE_BUILD_TYPE%%.cmake
lib/cmake/libavif/libavif-config-version.cmake
lib/cmake/libavif/libavif-config.cmake
+%%PIXBUF%%lib/gdk-pixbuf-2.0/%%GTK2_VERSION%%/loaders/libpixbufloader-avif.so
lib/libavif.so
lib/libavif.so.6
lib/libavif.so.6.0.0
libdata/pkgconfig/libavif.pc
+%%PIXBUF%%@postexec %D/bin/gdk-pixbuf-query-loaders > /dev/null 2>&1 && %D/bin/gdk-pixbuf-query-loaders > %D/lib/gdk-pixbuf-2.0/%%GTK2_VERSION%%/loaders.cache 2>/dev/null || /usr/bin/true
+%%PIXBUF%%@postunexec %D/bin/gdk-pixbuf-query-loaders > /dev/null 2>&1 && %D/bin/gdk-pixbuf-query-loaders > %D/lib/gdk-pixbuf-2.0/%%GTK2_VERSION%%/loaders.cache 2>/dev/null || /usr/bin/true
More information about the svn-ports-all
mailing list