Skip to content

Commit

Permalink
graphics/libheif: Update to 1.17.1
Browse files Browse the repository at this point in the history
- Replace libde265 with FFmpeg as HEVC decoder
- Enable JPEG and OpenJPEG 2000 support
- Disable Doxygen detection

While FFmpeg's default configuration can be a bit on the heavy side
it's also relatively easy to tailor it to fit your needs and if libheif
is needed you're likely to have other related ports depending on FFmpeg
installed. Support is relatively new so there may be bugs lurking.
Looking back libde265 has also been hit by several CVEs which is another
reason for the switch.

References:
https://www.opencve.io/cve?vendor=struktur&product=libde265

PR:		274546
Reviewed by:	makc (maintainer)
  • Loading branch information
Daniel Engberg authored and Daniel Engberg committed Oct 21, 2023
1 parent 1e9f8e5 commit 5b0594f
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 11 deletions.
28 changes: 21 additions & 7 deletions graphics/libheif/Makefile
@@ -1,6 +1,5 @@
PORTNAME= libheif
DISTVERSION= 1.16.1
PORTREVISION= 2
DISTVERSION= 1.17.1
CATEGORIES= graphics
MASTER_SITES= https://github.com/strukturag/${PORTNAME}/releases/download/v${DISTVERSION}/

Expand All @@ -13,18 +12,24 @@ LICENSE_FILE= ${WRKSRC}/COPYING

LIB_DEPENDS= libsharpyuv.so:graphics/webp

USES= cmake compiler:c++11-lang cpe gettext-runtime gnome \
localbase:ldflags pkgconfig
USES= cmake:testing compiler:c++11-lang cpe gettext-runtime gnome \
localbase:ldflags pathfix pkgconfig
CPE_VENDOR= struktur
USE_GNOME= gdkpixbuf2 glib20
USE_LDCONFIG= yes
PLIST_SUB= LIB_VER=${DISTVERSION}

OPTIONS_DEFINE= AOM DAV1D EXAMPLES LIBDE265 SVTAV1 RAV1E X265
OPTIONS_DEFAULT= AOM DAV1D LIBDE265 SVTAV1 X265
CMAKE_OFF= BUILD_TESTING \
WITH_KVAZAAR
CMAKE_ON= CMAKE_DISABLE_FIND_PACKAGE_Doxygen

OPTIONS_DEFINE= AOM DAV1D EXAMPLES FFMPEG JPEG LIBDE265 \
OPENJPEG SVTAV1 RAV1E X265
OPTIONS_DEFAULT=AOM DAV1D FFMPEG JPEG OPENJPEG SVTAV1 X265
OPTIONS_SUB= yes

AOM_DESC= AV1 encoding/decoding via libaom
FFMPEG_DESC= Use FFmpeg (support for HEVC decoding)
DAV1D_DESC= Build dav1e decoder
LIBDE265_DESC= Use libde265 (support for HEVC decoding)
SVTAV1_DESC= Build svt-av1 encoder
Expand All @@ -38,12 +43,21 @@ DAV1D_LIB_DEPENDS= libdav1d.so:multimedia/dav1d
DAV1D_CMAKE_BOOL= WITH_DAV1D

EXAMPLES_LIB_DEPENDS= libpng16.so:graphics/png
EXAMPLES_USES= jpeg
EXAMPLES_CMAKE_BOOL= WITH_EXAMPLES
EXAMPLE_IMPLIES= JPEG

FFMPEG_LIB_DEPENDS= libavcodec.so:multimedia/ffmpeg
FFMPEG_CMAKE_BOOL= WITH_FFMPEG_DECODER

JPEG_USES= jpeg
JPEG_CMAKE_BOOL= WITH_JPEG_ENCODER WITH_JPEG_DECODER

LIBDE265_LIB_DEPENDS= libde265.so:multimedia/libde265
LIBDE265_CMAKE_BOOL= WITH_LIBDE265

OPENJPEG_LIB_DEPENDS= libopenjp2.so:graphics/openjpeg
OPENJPEG_CMAKE_BOOL= WITH_OpenJPEG_ENCODER WITH_OpenJPEG_DECODER

SVTAV1_LIB_DEPENDS= libSvtAv1Enc.so:multimedia/svt-av1
SVTAV1_CMAKE_BOOL= WITH_SvtEnc

Expand Down
6 changes: 3 additions & 3 deletions graphics/libheif/distinfo
@@ -1,3 +1,3 @@
TIMESTAMP = 1683244302
SHA256 (libheif-1.16.1.tar.gz) = ac15b54b6d7c315710e156d119b8a1bfc89f29621e99222b2750b1f31c9c3558
SIZE (libheif-1.16.1.tar.gz) = 1338412
TIMESTAMP = 1697734701
SHA256 (libheif-1.17.1.tar.gz) = 97d74c58a346887c1bbf98dcf0322c13b728286153d0f1be2b350f7107e49dba
SIZE (libheif-1.17.1.tar.gz) = 1430684
7 changes: 6 additions & 1 deletion graphics/libheif/pkg-plist
Expand Up @@ -5,6 +5,8 @@
include/libheif/heif.h
include/libheif/heif_cxx.h
include/libheif/heif_plugin.h
include/libheif/heif_properties.h
include/libheif/heif_regions.h
include/libheif/heif_version.h
lib/cmake/libheif/libheif-config-%%CMAKE_BUILD_TYPE%%.cmake
lib/cmake/libheif/libheif-config-version.cmake
Expand All @@ -13,8 +15,11 @@ lib/gdk-pixbuf-2.0/%%GTK2_VERSION%%/loaders/libpixbufloader-heif.so
lib/libheif.so
lib/libheif.so.1
lib/libheif.so.%%LIB_VER%%
%%SVTAV1%%lib/libheif/libheif-svtenc.so
%%DAV1D%%lib/libheif/libheif-dav1d.so
%%OPENJPEG%%lib/libheif/libheif-j2kdec.so
%%OPENJPEG%%lib/libheif/libheif-j2kenc.so
%%RAV1E%%lib/libheif/libheif-rav1e.so
%%SVTAV1%%lib/libheif/libheif-svtenc.so
libdata/pkgconfig/libheif.pc
%%PORTEXAMPLES%%share/man/man1/heif-convert.1.gz
%%PORTEXAMPLES%%share/man/man1/heif-enc.1.gz
Expand Down

0 comments on commit 5b0594f

Please sign in to comment.