2020-11-20 18:04:18 +01:00
|
|
|
PORTNAME= jpeg-xl
|
|
|
|
DISTVERSIONPREFIX= v
|
2021-03-30 01:51:20 +02:00
|
|
|
DISTVERSION= 0.3.7
|
2021-04-11 02:11:57 +02:00
|
|
|
PORTREVISION= 1
|
2020-11-20 18:04:18 +01:00
|
|
|
CATEGORIES= graphics
|
|
|
|
|
|
|
|
MAINTAINER= jbeich@FreeBSD.org
|
|
|
|
COMMENT= JPEG XL reference encoder/decoder
|
|
|
|
|
2020-12-24 20:44:32 +01:00
|
|
|
LICENSE= APACHE20 BSD3CLAUSE ZLIB
|
2020-11-20 18:04:18 +01:00
|
|
|
LICENSE_COMB= multi
|
|
|
|
LICENSE_FILE_BSD3CLAUSE=${WRKSRC}/third_party/skcms/LICENSE
|
|
|
|
LICENSE_FILE_ZLIB= ${WRKSRC}/third_party/lodepng/LICENSE
|
|
|
|
|
|
|
|
LIB_DEPENDS= libbrotlienc.so:archivers/brotli
|
|
|
|
|
|
|
|
USES= cmake compiler:c++11-lib pkgconfig shared-mime-info
|
|
|
|
USE_GITHUB= nodefault
|
|
|
|
USE_GITLAB= yes
|
|
|
|
USE_LDCONFIG= yes
|
|
|
|
GH_TUPLE= barmco:skcms:6437475:skcms/third_party/skcms \
|
2021-03-06 01:43:46 +01:00
|
|
|
google:highway:0.11.1:highway/third_party/highway \
|
2020-11-20 18:04:18 +01:00
|
|
|
lvandeve:lodepng:48e5364:lodepng/third_party/lodepng \
|
|
|
|
webmproject:sjpeg:868ab55:sjpeg/third_party/sjpeg \
|
|
|
|
${NULL}
|
2020-11-20 18:19:45 +01:00
|
|
|
GL_ACCOUNT= wg1
|
2021-03-30 01:51:20 +02:00
|
|
|
GL_COMMIT= 9e9bce86164dc4d01c39eeeb3404d6aed85137b2
|
2020-11-20 18:04:18 +01:00
|
|
|
CMAKE_ON= JPEGXL_ENABLE_PLUGINS
|
|
|
|
CMAKE_OFF= JPEGXL_WARNINGS_AS_ERRORS ${BENCHMARK FUZZERS TCMALLOC:L:S/^/JPEGXL_ENABLE_/}
|
|
|
|
CMAKE_OFF+= ${OpenGL GLUT:L:S/^/CMAKE_DISABLE_FIND_PACKAGE_/} # sjpeg
|
|
|
|
LDFLAGS+= -Wl,--as-needed # brotlicommon, GIMP/OPENEXR/PNG deps
|
|
|
|
|
2021-03-24 19:45:39 +01:00
|
|
|
OPTIONS_DEFINE= GIF GIMP JPEG LTO MANPAGES OPENEXR PIXBUF PNG TEST
|
|
|
|
OPTIONS_DEFAULT=GIF GIMP JPEG LTO MANPAGES OPENEXR PIXBUF PNG
|
2021-02-25 19:32:23 +01:00
|
|
|
OPTIONS_EXCLUDE_i386= LTO # ConvolutionWithTranspose(): JXL_CHECK: out->xsize() == in.ysize()
|
|
|
|
OPTIONS_EXCLUDE_powerpc64= ${"${/usr/bin/ld:L:tA}"==/usr/bin/ld.lld:?LTO:} # LLVM bug 47353
|
2020-11-20 18:04:18 +01:00
|
|
|
OPTIONS_SUB= yes
|
|
|
|
|
|
|
|
GIF_LIB_DEPENDS= libgif.so:graphics/giflib
|
|
|
|
GIF_CMAKE_BOOL_OFF= CMAKE_DISABLE_FIND_PACKAGE_GIF
|
|
|
|
|
|
|
|
GIMP_DESC= GIMP plugin support
|
|
|
|
GIMP_LIB_DEPENDS= libgegl-0.4.so:graphics/gegl \
|
|
|
|
libgimp-2.0.so:graphics/gimp-app \
|
|
|
|
libbabl-0.1.so:x11/babl
|
|
|
|
|
|
|
|
JPEG_USES= jpeg
|
|
|
|
JPEG_CMAKE_BOOL_OFF= CMAKE_DISABLE_FIND_PACKAGE_JPEG
|
|
|
|
|
2021-02-25 19:32:23 +01:00
|
|
|
LTO_CMAKE_BOOL= CMAKE_INTERPROCEDURAL_OPTIMIZATION
|
|
|
|
LTO_CMAKE_ON= -DCMAKE_POLICY_DEFAULT_CMP0069:STRING=NEW
|
|
|
|
.if exists(/usr/bin/ld.lld) && ${/usr/bin/ld:L:tA} != /usr/bin/ld.lld
|
|
|
|
# --plugin isn't supported by old GNU ld.bfd in base
|
|
|
|
LTO_LDFLAGS= -fuse-ld=lld
|
|
|
|
.endif
|
|
|
|
|
2021-03-24 19:45:39 +01:00
|
|
|
MANPAGES_BUILD_DEPENDS= a2x:textproc/asciidoc
|
|
|
|
MANPAGES_USES= python:build
|
|
|
|
MANPAGES_CMAKE_BOOL_OFF=CMAKE_DISABLE_FIND_PACKAGE_Python
|
|
|
|
|
2021-04-11 02:11:57 +02:00
|
|
|
OPENEXR_LIB_DEPENDS= libImath.so:math/Imath \
|
|
|
|
libOpenEXR.so:graphics/openexr
|
2020-11-20 18:04:18 +01:00
|
|
|
OPENEXR_CMAKE_BOOL= JPEGXL_ENABLE_OPENEXR
|
|
|
|
|
|
|
|
PIXBUF_USES= gnome
|
|
|
|
PIXBUF_USE= GNOME=gdkpixbuf2
|
|
|
|
|
|
|
|
PNG_LIB_DEPENDS= libpng.so:graphics/png
|
|
|
|
PNG_CMAKE_BOOL_OFF= CMAKE_DISABLE_FIND_PACKAGE_PNG
|
|
|
|
|
|
|
|
TEST_BUILD_DEPENDS= googletest>0:devel/googletest
|
|
|
|
TEST_USES= localbase:ldflags
|
|
|
|
TEST_CMAKE_BOOL= BUILD_TESTING
|
|
|
|
TEST_TEST_TARGET= test
|
|
|
|
|
2020-12-24 20:44:27 +01:00
|
|
|
post-patch:
|
|
|
|
@${REINPLACE_CMD} 's,/usr,${LOCALBASE},' \
|
|
|
|
${WRKSRC}/plugins/gdk-pixbuf/jxl.thumbnailer
|
2021-04-11 02:11:57 +02:00
|
|
|
${REINPLACE_CMD} 's,OpenEXR::Int64,uint64_t,' \
|
|
|
|
${WRKSRC}/lib/extras/codec_exr.cc
|
2020-12-24 20:44:27 +01:00
|
|
|
|
2020-11-20 18:04:18 +01:00
|
|
|
# pkg_check_modules doesn't support CMAKE_DISABLE_*
|
|
|
|
post-patch-GIMP-off:
|
|
|
|
@${REINPLACE_CMD} -i.nogimp '/gimp/d' ${WRKSRC}/plugins/CMakeLists.txt
|
|
|
|
post-patch-PIXBUF-off:
|
|
|
|
@${REINPLACE_CMD} -i.nopixbuf '/gdk-pixbuf/d' ${WRKSRC}/plugins/CMakeLists.txt
|
|
|
|
|
|
|
|
pre-install-TEST-on: do-test
|
|
|
|
|
|
|
|
.include <bsd.port.mk>
|