freebsd-ports/graphics/libjxl/Makefile

85 lines
2.9 KiB
Makefile
Raw Normal View History

PORTNAME= libjxl
DISTVERSIONPREFIX= v
DISTVERSION= 0.5
CATEGORIES= graphics
graphics/libjxl: unbreak with libc++ 12 In file included from tools/cpu/os_specific.cc:60: /usr/include/sys/cpuset.h:153:12: error: unknown type name 'cpusetid_t' int cpuset(cpusetid_t *); ^ /usr/include/sys/cpuset.h:154:18: error: unknown type name 'cpuwhich_t'; did you mean '__cpuwhich_t'? int cpuset_setid(cpuwhich_t, id_t, cpusetid_t); ^ /usr/include/sys/_types.h:146:14: note: '__cpuwhich_t' declared here typedef int __cpuwhich_t; /* which parameter for cpuset. */ ^ In file included from tools/cpu/os_specific.cc:60: /usr/include/sys/cpuset.h:154:30: error: unknown type name 'id_t'; did you mean 'pid_t'? int cpuset_setid(cpuwhich_t, id_t, cpusetid_t); ^ /usr/include/time.h:95:18: note: 'pid_t' declared here typedef __pid_t pid_t; ^ In file included from tools/cpu/os_specific.cc:60: /usr/include/sys/cpuset.h:154:36: error: unknown type name 'cpusetid_t' int cpuset_setid(cpuwhich_t, id_t, cpusetid_t); ^ /usr/include/sys/cpuset.h:155:18: error: unknown type name 'cpulevel_t'; did you mean '__cpulevel_t'? int cpuset_getid(cpulevel_t, cpuwhich_t, id_t, cpusetid_t *); ^ /usr/include/sys/_types.h:147:14: note: '__cpulevel_t' declared here typedef int __cpulevel_t; /* level parameter for cpuset. */ ^ In file included from tools/cpu/os_specific.cc:60: /usr/include/sys/cpuset.h:155:30: error: unknown type name 'cpuwhich_t'; did you mean '__cpuwhich_t'? int cpuset_getid(cpulevel_t, cpuwhich_t, id_t, cpusetid_t *); ^ /usr/include/sys/_types.h:146:14: note: '__cpuwhich_t' declared here typedef int __cpuwhich_t; /* which parameter for cpuset. */ ^ In file included from tools/cpu/os_specific.cc:60: /usr/include/sys/cpuset.h:155:42: error: unknown type name 'id_t'; did you mean 'pid_t'? int cpuset_getid(cpulevel_t, cpuwhich_t, id_t, cpusetid_t *); ^ /usr/include/time.h:95:18: note: 'pid_t' declared here typedef __pid_t pid_t; ^ In file included from tools/cpu/os_specific.cc:60: /usr/include/sys/cpuset.h:155:48: error: unknown type name 'cpusetid_t' int cpuset_getid(cpulevel_t, cpuwhich_t, id_t, cpusetid_t *); ^ /usr/include/sys/cpuset.h:156:24: error: unknown type name 'cpulevel_t'; did you mean '__cpulevel_t'? int cpuset_getaffinity(cpulevel_t, cpuwhich_t, id_t, size_t, cpuset_t *); ^ /usr/include/sys/_types.h:147:14: note: '__cpulevel_t' declared here typedef int __cpulevel_t; /* level parameter for cpuset. */ ^ In file included from tools/cpu/os_specific.cc:60: /usr/include/sys/cpuset.h:156:36: error: unknown type name 'cpuwhich_t'; did you mean '__cpuwhich_t'? int cpuset_getaffinity(cpulevel_t, cpuwhich_t, id_t, size_t, cpuset_t *); ^ /usr/include/sys/_types.h:146:14: note: '__cpuwhich_t' declared here typedef int __cpuwhich_t; /* which parameter for cpuset. */ ^ In file included from tools/cpu/os_specific.cc:60: /usr/include/sys/cpuset.h:156:48: error: unknown type name 'id_t'; did you mean 'pid_t'? int cpuset_getaffinity(cpulevel_t, cpuwhich_t, id_t, size_t, cpuset_t *); ^ /usr/include/time.h:95:18: note: 'pid_t' declared here typedef __pid_t pid_t; ^ In file included from tools/cpu/os_specific.cc:60: /usr/include/sys/cpuset.h:157:24: error: unknown type name 'cpulevel_t'; did you mean '__cpulevel_t'? int cpuset_setaffinity(cpulevel_t, cpuwhich_t, id_t, size_t, const cpuset_t *); ^ /usr/include/sys/_types.h:147:14: note: '__cpulevel_t' declared here typedef int __cpulevel_t; /* level parameter for cpuset. */ ^ In file included from tools/cpu/os_specific.cc:60: /usr/include/sys/cpuset.h:157:36: error: unknown type name 'cpuwhich_t'; did you mean '__cpuwhich_t'? int cpuset_setaffinity(cpulevel_t, cpuwhich_t, id_t, size_t, const cpuset_t *); ^ /usr/include/sys/_types.h:146:14: note: '__cpuwhich_t' declared here typedef int __cpuwhich_t; /* which parameter for cpuset. */ ^ In file included from tools/cpu/os_specific.cc:60: /usr/include/sys/cpuset.h:157:48: error: unknown type name 'id_t'; did you mean 'pid_t'? int cpuset_setaffinity(cpulevel_t, cpuwhich_t, id_t, size_t, const cpuset_t *); ^ /usr/include/time.h:95:18: note: 'pid_t' declared here typedef __pid_t pid_t; ^ Reported by: pkg-fallout
2021-06-17 01:46:02 +02:00
PATCH_SITES= https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/commit/
PATCHFILES+= adb32f3f8f37.patch:-p1 # https://github.com/libjxl/libjxl/pull/193
MAINTAINER= jbeich@FreeBSD.org
COMMENT= JPEG XL reference encoder/decoder
LICENSE= APACHE20 BSD3CLAUSE ZLIB
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
TEST_DEPENDS= googletest>0:devel/googletest
USES= cmake:testing compiler:c++11-lib localbase:ldflags pkgconfig shared-mime-info
USE_GITHUB= yes
USE_LDCONFIG= yes
GH_TUPLE= barmco:skcms:6437475:skcms/third_party/skcms \
google:highway:0.12.2-4-ge239774:highway/third_party/highway \
lvandeve:lodepng:48e5364:lodepng/third_party/lodepng \
webmproject:sjpeg:868ab55:sjpeg/third_party/sjpeg \
${NULL}
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
CMAKE_OFF+= ${CMAKE_TESTING_ON}
LDFLAGS+= -Wl,--as-needed # brotlicommon, GIMP/OPENEXR/PNG deps
OPTIONS_DEFINE= GIF GIMP JPEG LTO MANPAGES OPENEXR PIXBUF PNG
OPTIONS_DEFAULT=GIF GIMP JPEG LTO MANPAGES OPENEXR PIXBUF PNG
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
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
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
MANPAGES_BUILD_DEPENDS= a2x:textproc/asciidoc
MANPAGES_USES= python:build
MANPAGES_CMAKE_BOOL= JPEGXL_ENABLE_MANPAGES
OPENEXR_LIB_DEPENDS= libImath.so:math/Imath \
libOpenEXR.so:graphics/openexr
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
post-patch:
@${REINPLACE_CMD} 's,/usr,${LOCALBASE},' \
${WRKSRC}/plugins/gdk-pixbuf/jxl.thumbnailer
${REINPLACE_CMD} 's,OpenEXR::Int64,uint64_t,' \
${WRKSRC}/lib/extras/codec_exr.cc
# 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
.include <bsd.port.mk>