Here is an update to libheif 1.14.2. Upstream has deprecated the autoconf build as of 1.14.0, so convert over to using CMake.
Index: Makefile =================================================================== RCS file: /cvs/ports/multimedia/libheif/Makefile,v retrieving revision 1.9 diff -u -p -u -p -r1.9 Makefile --- Makefile 5 Nov 2022 17:06:29 -0000 1.9 +++ Makefile 16 Jan 2023 05:20:38 -0000 @@ -1,10 +1,9 @@ COMMENT= HEIF and AVIF file format decoder and encoder -V= 1.13.0 +V= 1.14.2 DISTNAME= libheif-$V -REVISION= 0 -SHARED_LIBS += heif 1.3 # 9.0 +SHARED_LIBS += heif 1.4 # 9.0 CATEGORIES= multimedia graphics @@ -13,26 +12,28 @@ HOMEPAGE= https://github.com/strukturag/ # LGPLv3+ (library), MIT (sample applications) PERMIT_PACKAGE= Yes -WANTLIB += ${COMPILER_LIBCXX} aom c dav1d de265 ffi gdk_pixbuf-2.0 -WANTLIB += gio-2.0 glib-2.0 gmodule-2.0 gobject-2.0 iconv intl -WANTLIB += jpeg m pcre2-8 png x265 z +WANTLIB += ${COMPILER_LIBCXX} aom c dav1d de265 gdk_pixbuf-2.0 +WANTLIB += glib-2.0 gobject-2.0 intl jpeg m png x265 MASTER_SITES= https://github.com/strukturag/libheif/releases/download/v$V/ COMPILER= base-clang ports-gcc -USE_GMAKE= Yes -CONFIGURE_STYLE= gnu -CONFIGURE_ARGS= --disable-go -CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \ - LDFLAGS="-L${LOCALBASE}/lib" +MODULES= devel/cmake LIB_DEPENDS= graphics/gdk-pixbuf2 \ multimedia/aom \ multimedia/dav1d \ multimedia/libde265 \ multimedia/x265 +# examples +LIB_DEPENDS+= graphics/jpeg \ + graphics/png + RUN_DEPENDS= misc/shared-mime-info + +CONFIGURE_ARGS= -DWITH_RAV1E=Off \ + -DWITH_SvtEnc=Off NO_TEST= Yes Index: distinfo =================================================================== RCS file: /cvs/ports/multimedia/libheif/distinfo,v retrieving revision 1.5 diff -u -p -u -p -r1.5 distinfo --- distinfo 6 Sep 2022 20:19:06 -0000 1.5 +++ distinfo 16 Jan 2023 05:20:38 -0000 @@ -1,2 +1,2 @@ -SHA256 (libheif-1.13.0.tar.gz) = wgrgG6zjnokpj2NS8f9KVLQVszuXQ5Atp5jooeUdfKE= -SIZE (libheif-1.13.0.tar.gz) = 1703950 +SHA256 (libheif-1.14.2.tar.gz) = 0BaQXiR9aVLNfuT5uQlXNQtqbKpGa8dv3+brMCttCIw= +SIZE (libheif-1.14.2.tar.gz) = 1739439 Index: patches/patch-libheif_CMakeLists_txt =================================================================== RCS file: patches/patch-libheif_CMakeLists_txt diff -N patches/patch-libheif_CMakeLists_txt --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-libheif_CMakeLists_txt 16 Jan 2023 05:20:38 -0000 @@ -0,0 +1,14 @@ +cmake: Use CMAKE_DL_LIBS instead of dl to fix build on OpenBSD + +Index: libheif/CMakeLists.txt +--- libheif/CMakeLists.txt.orig ++++ libheif/CMakeLists.txt +@@ -64,7 +64,7 @@ target_compile_definitions(heif + + if (PLUGIN_LOADING_SUPPORTED_AND_ENABLED) + target_compile_definitions(heif PRIVATE ENABLE_PLUGIN_LOADING=1) +- target_link_libraries(heif PRIVATE dl) ++ target_link_libraries(heif PRIVATE ${CMAKE_DL_LIBS}) + endif() + + add_subdirectory(plugins) Index: pkg/PLIST =================================================================== RCS file: /cvs/ports/multimedia/libheif/pkg/PLIST,v retrieving revision 1.3 diff -u -p -u -p -r1.3 PLIST --- pkg/PLIST 11 Mar 2022 19:39:21 -0000 1.3 +++ pkg/PLIST 16 Jan 2023 05:20:38 -0000 @@ -7,11 +7,12 @@ include/libheif/heif.h include/libheif/heif_cxx.h include/libheif/heif_plugin.h include/libheif/heif_version.h -@static-lib lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-heif.a -lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-heif.la +lib/cmake/libheif/ +lib/cmake/libheif/libheif-config${MODCMAKE_BUILD_SUFFIX} +lib/cmake/libheif/libheif-config-version.cmake +lib/cmake/libheif/libheif-config.cmake @so lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-heif.so -@static-lib lib/libheif.a -lib/libheif.la +lib/libheif/ @lib lib/libheif.so.${LIBheif_VERSION} lib/pkgconfig/libheif.pc @man man/man1/heif-convert.1