pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Update libjxl to version 0.8.2



Module Name:	pkgsrc-wip
Committed By:	Niclas Rosenvik <nros%pkgsrc.org@localhost>
Pushed By:	nros
Date:		Sun Aug 20 09:53:28 2023 +0200
Changeset:	420283b0b3da67a1f8ef372639b835746cf3eb23

Modified Files:
	gdk-pixbuf-jxl/Makefile
	gdk-pixbuf-jxl/PLIST
	libjxl/Makefile
	libjxl/Makefile.common
	libjxl/PLIST
	libjxl/TODO
	libjxl/buildlink3.mk
	libjxl/distinfo
	libjxl/patches/patch-deps.sh
	libjxl/patches/patch-plugins_gdk-pixbuf_CMakeLists.txt
Removed Files:
	libjxl/patches/patch-CMakeLists.txt
	libjxl/patches/patch-plugins_gimp_CMakeLists.txt
	libjxl/patches/patch-tools_cpu_os__specific.cc

Log Message:
Update libjxl to version 0.8.2

This version does use lcms2 in libjxl
instead of skcms so no donloads in the
package are needed, gdk-pixbuf-jxl
still depends on skcms so it still
needs to download it to build.
CVE-2023-0645 nad CVE 2023-35790 are
fixed in this release.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=420283b0b3da67a1f8ef372639b835746cf3eb23

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 gdk-pixbuf-jxl/Makefile                            |   8 +-
 gdk-pixbuf-jxl/PLIST                               |   1 -
 libjxl/Makefile                                    |   8 +-
 libjxl/Makefile.common                             |   2 +-
 libjxl/PLIST                                       |   8 +-
 libjxl/TODO                                        |   3 -
 libjxl/buildlink3.mk                               |   3 +-
 libjxl/distinfo                                    |  13 +-
 libjxl/patches/patch-CMakeLists.txt                |  15 ---
 libjxl/patches/patch-deps.sh                       |   9 +-
 .../patch-plugins_gdk-pixbuf_CMakeLists.txt        |  18 +--
 libjxl/patches/patch-plugins_gimp_CMakeLists.txt   |  32 -----
 libjxl/patches/patch-tools_cpu_os__specific.cc     | 145 ---------------------
 13 files changed, 37 insertions(+), 228 deletions(-)

diffs:
diff --git a/gdk-pixbuf-jxl/Makefile b/gdk-pixbuf-jxl/Makefile
index 1c42b085d1..8489f6b166 100644
--- a/gdk-pixbuf-jxl/Makefile
+++ b/gdk-pixbuf-jxl/Makefile
@@ -7,7 +7,7 @@ COMMENT=	JpegXL GDK pixbuf loader
 
 WRKSRC=		${WRKDIR}/${DISTNAME}
 
-USE_TOOLS+=	bash pkg-config
+USE_TOOLS+=	bash pkg-config realpath
 USE_LANGUAGES=	c c++
 USE_CMAKE=	yes
 
@@ -22,6 +22,12 @@ SUBST_MESSAGE.gpt=	Fixing path to gdk-pixbuf-thumbnailer
 SUBST_FILES.gpt=	plugins/gdk-pixbuf/jxl.thumbnailer
 SUBST_SED.gpt=		-e 's,/usr,${PREFIX},g'
 
+CMAKE_USE_GNU_INSTALL_DIRS=	no
+
+# TODO:
+# The dependencies installed using deps.sh should be packaged
+# and buildlink3ed 
+# the next version 0.9 depends on lcms2 instead of skcms
 pre-configure:
 	cd ${WRKSRC} && ./deps.sh
 
diff --git a/gdk-pixbuf-jxl/PLIST b/gdk-pixbuf-jxl/PLIST
index 8d7aa4405e..7b6f8289e7 100644
--- a/gdk-pixbuf-jxl/PLIST
+++ b/gdk-pixbuf-jxl/PLIST
@@ -1,4 +1,3 @@
 @comment $NetBSD$
 lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-jxl.so
-share/mime/packages/image-jxl.xml
 share/thumbnailers/jxl.thumbnailer
diff --git a/libjxl/Makefile b/libjxl/Makefile
index 86434ab9ce..9b96691595 100644
--- a/libjxl/Makefile
+++ b/libjxl/Makefile
@@ -13,7 +13,10 @@ CMAKE_ARGS+=	-DJPEGXL_VERSION=${PKGVERSION_NOREV}
 CMAKE_ARGS+=	-DJPEGXL_FORCE_SYSTEM_BROTLI=ON
 CMAKE_ARGS+=	-DJPEGXL_FORCE_SYSTEM_GTEST=ON
 CMAKE_ARGS+=	-DJPEGXL_FORCE_SYSTEM_HWY=ON
+CMAKE_ARGS+=	-DJPEGXL_FORCE_SYSTEM_LCMS2=ON
 CMAKE_ARGS+=	-DJPEGXL_ENABLE_SJPEG=OFF
+CMAKE_ARGS+=	-DJPEGXL_ENABLE_SKCMS=OFF
+CMAKE_ARGS+=	-DJPEGXL_ENABLE_PLUGINS=OFF
 
 REPLACE_BASH=	deps.sh
 
@@ -24,13 +27,14 @@ PKGCONFIG_OVERRIDE+=	lib/threads/libjxl_threads.pc.in
 # The dependencies installed using deps.sh should be packaged
 # and buildlink3ed instead:
 # lodepng, sjpeg, skcms
-pre-configure:
-	cd ${WRKSRC} && ./deps.sh
+#pre-configure:
+#	cd ${WRKSRC} && ./deps.sh
 
 .include "../../archivers/brotli/buildlink3.mk"
 .include "../../devel/googletest/buildlink3.mk"
 .include "../../graphics/giflib/buildlink3.mk"
 .include "../../graphics/openexr/buildlink3.mk"
+.include "../../graphics/lcms2/buildlink3.mk"
 .include "../../graphics/libwebp/buildlink3.mk"
 .include "../../graphics/png/buildlink3.mk"
 .include "../../graphics/libhighway/buildlink3.mk"
diff --git a/libjxl/Makefile.common b/libjxl/Makefile.common
index 2b59c3a792..3270d4cff7 100644
--- a/libjxl/Makefile.common
+++ b/libjxl/Makefile.common
@@ -1,7 +1,7 @@
 # $NetBSD$
 # used by wip/gdk-pixbuf-jxl/Makefile
 
-DISTNAME=	libjxl-0.6.1
+DISTNAME=	libjxl-0.8.2
 CATEGORIES=	graphics
 MASTER_SITES=	${MASTER_SITE_GITHUB:=libjxl/}
 GITHUB_TAG=	v${PKGVERSION_NOREV}
diff --git a/libjxl/PLIST b/libjxl/PLIST
index 6809bf8dab..12cbd7b3a1 100644
--- a/libjxl/PLIST
+++ b/libjxl/PLIST
@@ -1,9 +1,12 @@
 @comment $NetBSD$
 bin/benchmark_xl
+bin/cjpeg_hdr
 bin/cjxl
 bin/djxl
+bin/jxlinfo
 include/jxl/butteraugli.h
 include/jxl/butteraugli_cxx.h
+include/jxl/cms_interface.h
 include/jxl/codestream_header.h
 include/jxl/color_encoding.h
 include/jxl/decode.h
@@ -19,14 +22,15 @@ include/jxl/resizable_parallel_runner_cxx.h
 include/jxl/thread_parallel_runner.h
 include/jxl/thread_parallel_runner_cxx.h
 include/jxl/types.h
+include/jxl/version.h
 lib/libjxl.a
 lib/libjxl.so
-lib/libjxl.so.0.6
+lib/libjxl.so.0.8
 lib/libjxl.so.${PKGVERSION}
 lib/libjxl_dec.a
 lib/libjxl_threads.a
 lib/libjxl_threads.so
-lib/libjxl_threads.so.0.6
+lib/libjxl_threads.so.0.8
 lib/libjxl_threads.so.${PKGVERSION}
 lib/pkgconfig/libjxl.pc
 lib/pkgconfig/libjxl_threads.pc
diff --git a/libjxl/TODO b/libjxl/TODO
index 80dcb442da..5fac02b89c 100644
--- a/libjxl/TODO
+++ b/libjxl/TODO
@@ -1,5 +1,2 @@
 Some dependencies need to be packaged and used before this can be
 imported.
-
-This package has known vulnerabilities, please investigate and fix if possible:
-  CVE-2023-0645, CVE-2023-35790
diff --git a/libjxl/buildlink3.mk b/libjxl/buildlink3.mk
index 42d96f38c2..39a730221b 100644
--- a/libjxl/buildlink3.mk
+++ b/libjxl/buildlink3.mk
@@ -5,11 +5,12 @@ BUILDLINK_TREE+=	libjxl
 .if !defined(LIBJXL_BUILDLINK3_MK)
 LIBJXL_BUILDLINK3_MK:=
 
-BUILDLINK_API_DEPENDS.libjxl+=	libjxl>=0.6
+BUILDLINK_API_DEPENDS.libjxl+=	libjxl>=0.8.2
 BUILDLINK_PKGSRCDIR.libjxl?=	../../wip/libjxl
 
 .include "../../archivers/brotli/buildlink3.mk"
 .include "../../graphics/libhighway/buildlink3.mk"
+.include "../../graphics/lcms2/buildlink3.mk"
 .endif	# LIBJXL_BUILDLINK3_MK
 
 BUILDLINK_TREE+=	-libjxl
diff --git a/libjxl/distinfo b/libjxl/distinfo
index c982fdf447..306bd955de 100644
--- a/libjxl/distinfo
+++ b/libjxl/distinfo
@@ -1,11 +1,8 @@
 $NetBSD$
 
-BLAKE2s (libjxl-0.6.1.tar.gz) = 81ffdea0d94c7a0e0640fd87d90babe817b4ca0215c29c3eb45eaba07f2479dd
-SHA512 (libjxl-0.6.1.tar.gz) = 302935d722160b0b288ac63301f9e95caf82eccf6ad76c4f4da6316a0314ee3562115932b1ceacb0d02708de0a07788992d3478cae73af0b90193f5769f9fb52
-Size (libjxl-0.6.1.tar.gz) = 16953185 bytes
-SHA1 (patch-CMakeLists.txt) = 037a77f2c258424fcc75f7eff2b75ae4cc150b19
-SHA1 (patch-deps.sh) = 7886018fe8f79f692865c852b2755e4b16a3ee72
+BLAKE2s (libjxl-0.8.2.tar.gz) = d76b602ecf1714635d063d52cda1389936181f239c108b44f54f1279718bd8a7
+SHA512 (libjxl-0.8.2.tar.gz) = 769f102c46755d11a705ce47ae9e2ef49627ae708f416693bf1293aeeb713934baf4466e45b9c70b04ec1fc8b4a00d5ca7688c8ca03f0a91c9a15252c522a887
+Size (libjxl-0.8.2.tar.gz) = 1612062 bytes
+SHA1 (patch-deps.sh) = 5dcdb36e97f612d921d5bf95211ba19dc57a389a
 SHA1 (patch-lib_jxl_base_os__macros.h) = 083d97beeec362271fa1ce515204332f1d8938e6
-SHA1 (patch-plugins_gdk-pixbuf_CMakeLists.txt) = 1f73463f206d92e3f4a5ead0ffc8d99257ca6677
-SHA1 (patch-plugins_gimp_CMakeLists.txt) = fda9e3f42bf71848bb7348219ae06839f0f1c93c
-SHA1 (patch-tools_cpu_os__specific.cc) = 8cdd77ae04ad80e09c4e46ef1de29ba71cebc0b7
+SHA1 (patch-plugins_gdk-pixbuf_CMakeLists.txt) = 6aac2ff940087d453ddcd74f2a18436ca0146508
diff --git a/libjxl/patches/patch-CMakeLists.txt b/libjxl/patches/patch-CMakeLists.txt
deleted file mode 100644
index 09d4146891..0000000000
--- a/libjxl/patches/patch-CMakeLists.txt
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD$
-
-* install manpages to PKGMANDIR
-
---- CMakeLists.txt.orig	2021-10-04 18:02:44.000000000 +0000
-+++ CMakeLists.txt
-@@ -364,7 +364,7 @@ if (ASCIIDOC_PY_FOUND)
-     list(APPEND MANPAGES "${PAGE}.1")
-   endforeach()
-   add_custom_target(manpages ALL DEPENDS ${MANPAGES})
--  install(FILES ${MANPAGE_FILES} DESTINATION share/man/man1)
-+  install(FILES ${MANPAGE_FILES} DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
- endif()  # ASCIIDOC_PY_FOUND
- else()
-   message(WARNING "asciidoc was not found, the man pages will not be installed.")
diff --git a/libjxl/patches/patch-deps.sh b/libjxl/patches/patch-deps.sh
index 8a1953d6d9..cb9479c12c 100644
--- a/libjxl/patches/patch-deps.sh
+++ b/libjxl/patches/patch-deps.sh
@@ -2,9 +2,9 @@ $NetBSD$
 
 * don't require git
 
---- deps.sh.orig	2021-10-04 18:02:44.000000000 +0000
+--- deps.sh.orig	2023-08-18 15:54:41.998155227 +0000
 +++ deps.sh
-@@ -57,16 +57,6 @@ download_github() {
+@@ -59,17 +59,6 @@ download_github() {
  
  
  main() {
@@ -15,9 +15,10 @@ $NetBSD$
 -  git submodule update --init --recursive
 -
 -EOF
--    git -C "${MYDIR}" submodule update --init --recursive
+-    git -C "${MYDIR}" submodule update --init --recursive --depth 1 --recommend-shallow
 -    return 0
 -  fi
- 
+-
    # Sources downloaded from a tarball.
+   download_github third_party/brotli google/brotli
    download_github third_party/highway google/highway
diff --git a/libjxl/patches/patch-plugins_gdk-pixbuf_CMakeLists.txt b/libjxl/patches/patch-plugins_gdk-pixbuf_CMakeLists.txt
index 1087a6a95e..f50134d788 100644
--- a/libjxl/patches/patch-plugins_gdk-pixbuf_CMakeLists.txt
+++ b/libjxl/patches/patch-plugins_gdk-pixbuf_CMakeLists.txt
@@ -2,7 +2,7 @@ $NetBSD$
 
 * adapt to make gdk-pixbuf plugin a separate package
 
---- plugins/gdk-pixbuf/CMakeLists.txt.orig	2021-10-04 18:02:44.000000000 +0000
+--- plugins/gdk-pixbuf/CMakeLists.txt.orig	2023-06-14 07:49:21.000000000 +0000
 +++ plugins/gdk-pixbuf/CMakeLists.txt
 @@ -2,9 +2,12 @@
  #
@@ -21,8 +21,8 @@ $NetBSD$
    return ()
  endif ()
  
--add_library(pixbufloader-jxl SHARED pixbufloader-jxl.c)
-+add_library(pixbufloader-jxl SHARED pixbufloader-jxl.c ../../third_party/skcms/skcms.cc)
+-add_library(pixbufloader-jxl MODULE pixbufloader-jxl.c)
++add_library(pixbufloader-jxl MODULE pixbufloader-jxl.c ../../third_party/skcms/skcms.cc)
  
  # Mark all symbols as hidden by default. The PkgConfig::Gdk-Pixbuf dependency
  # will cause fill_info and fill_vtable entry points to be made public.
@@ -34,13 +34,5 @@ $NetBSD$
 +target_link_libraries(pixbufloader-jxl PkgConfig::JXL PkgConfig::Gdk-Pixbuf)
 +target_include_directories(pixbufloader-jxl PRIVATE "../../third_party/skcms")
  
- pkg_get_variable(GDK_PIXBUF_MODULEDIR gdk-pixbuf-2.0 gdk_pixbuf_moduledir)
- install(TARGETS pixbufloader-jxl LIBRARY DESTINATION "${GDK_PIXBUF_MODULEDIR}")
-@@ -32,6 +36,7 @@ install(TARGETS pixbufloader-jxl LIBRARY
- # mime type image/jxl to
- # /usr/share/thumbnailers/gdk-pixbuf-thumbnailer.thumbnailer
- install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/jxl.thumbnailer DESTINATION share/thumbnailers/)
-+install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/../mime/image-jxl.xml DESTINATION share/mime/packages/)
- 
- if(BUILD_TESTING AND NOT MINGW)
-   pkg_check_modules(Gdk IMPORTED_TARGET gdk-2.0)
+ execute_process(COMMAND ${PKG_CONFIG_EXECUTABLE} gdk-pixbuf-2.0 --variable gdk_pixbuf_moduledir --define-variable=prefix=${CMAKE_INSTALL_PREFIX} OUTPUT_VARIABLE GDK_PIXBUF_MODULEDIR OUTPUT_STRIP_TRAILING_WHITESPACE)
+ install(TARGETS pixbufloader-jxl DESTINATION "${GDK_PIXBUF_MODULEDIR}")
diff --git a/libjxl/patches/patch-plugins_gimp_CMakeLists.txt b/libjxl/patches/patch-plugins_gimp_CMakeLists.txt
deleted file mode 100644
index 872d6fd587..0000000000
--- a/libjxl/patches/patch-plugins_gimp_CMakeLists.txt
+++ /dev/null
@@ -1,32 +0,0 @@
-$NetBSD$
-
-* adapt to make gimp plugin a separate package
-
---- plugins/gimp/CMakeLists.txt.orig	2021-10-04 18:02:44.000000000 +0000
-+++ plugins/gimp/CMakeLists.txt
-@@ -2,9 +2,12 @@
- #
- # Use of this source code is governed by a BSD-style
- # license that can be found in the LICENSE file.
-+cmake_minimum_required(VERSION 3.10)
-+project(gimp-jxl LANGUAGES C CXX)
- 
- find_package(PkgConfig)
- pkg_check_modules(Gimp IMPORTED_TARGET gimp-2.0>=2.10 gimpui-2.0>=2.10)
-+pkg_check_modules(JXL IMPORTED_TARGET libjxl libjxl_threads)
- 
- if (NOT Gimp_FOUND)
-   message(WARNING "Gimp development libraries not found, the Gimp plugin will not be built")
-@@ -19,10 +22,10 @@ add_executable(file-jxl WIN32
-   file-jxl-save.cc
-   file-jxl-save.h
-   file-jxl.cc)
--target_link_libraries(file-jxl jxl jxl_threads PkgConfig::Gimp)
-+target_link_libraries(file-jxl PkgConfig::JXL PkgConfig::Gimp)
- 
- target_include_directories(file-jxl PUBLIC
--    ${PROJECT_SOURCE_DIR})  # for plugins/gimp absolute paths.
-+    ${PROJECT_SOURCE_DIR}/../..)  # for plugins/gimp absolute paths.
- 
- pkg_get_variable(GIMP_LIB_DIR gimp-2.0 gimplibdir)
- install(TARGETS file-jxl RUNTIME DESTINATION "${GIMP_LIB_DIR}/plug-ins/file-jxl/")
diff --git a/libjxl/patches/patch-tools_cpu_os__specific.cc b/libjxl/patches/patch-tools_cpu_os__specific.cc
deleted file mode 100644
index df269bdf04..0000000000
--- a/libjxl/patches/patch-tools_cpu_os__specific.cc
+++ /dev/null
@@ -1,145 +0,0 @@
-$NetBSD$
-
-* add NetBSD support
-
---- tools/cpu/os_specific.cc.orig	2021-10-04 18:02:44.000000000 +0000
-+++ tools/cpu/os_specific.cc
-@@ -59,6 +59,15 @@
- #include <OS.h>
- #endif  // JXL_OS_HAIKU
- 
-+#if JXL_OS_NETBSD
-+#include <pthread.h>
-+#include <sched.h>
-+#include <sys/param.h>
-+#include <sys/sysctl.h>
-+#include <sys/types.h>
-+#include <unistd.h>
-+#endif //JXL_OS_NETBSD
-+
- using jxl::Status;
- 
- namespace jpegxl {
-@@ -82,10 +91,14 @@ static inline void CPU_SET(int cpu, cpu_
- #endif
- 
- struct ThreadAffinity {
-+#if JXL_OS_NETBSD
-+  cpuset_t *set;
-+#else
-   cpu_set_t set;
-+#endif
- };
- 
--#if JXL_OS_MAC
-+#if JXL_OS_MAC || JXL_OS_NETBSD 
- namespace {
- Status GetSystemValue(const char* name, size_t* value) {
-   int64_t value_i64 = 0;
-@@ -96,7 +109,9 @@ Status GetSystemValue(const char* name, 
-   *value = static_cast<size_t>(value_i64);
-   return true;
- }
--
-+} // namespace
-+#endif
-+#if JXL_OS_MAC
- // Returns mask with the lowest N bits set, one per logical processor.
- cpu_set_t SetOfAllLogicalProcessors() {
-   size_t logical;
-@@ -153,7 +168,14 @@ Status GetProcessorTopologyFromOS(Proces
-   pt->logical_per_core = 1;
- 
-   return true;
-+#elif JXL_OS_NETBSD
-+  size_t cores;
-+  JXL_RETURN_IF_ERROR(GetSystemValue("hw.ncpuonline", &cores));
-+  pt->packages = 1;
-+  pt->cores_per_package = cores;
-+  pt->logical_per_core = 1;
- 
-+  return true;
- #else
-   // Not needed on X64 if the affinity APIs work (DetectProcessorTopology will
-   // succeed)
-@@ -164,6 +186,19 @@ Status GetProcessorTopologyFromOS(Proces
- ThreadAffinity* GetThreadAffinity() {
-   ThreadAffinity* affinity =
-       static_cast<ThreadAffinity*>(malloc(sizeof(ThreadAffinity)));
-+#if JXL_OS_NETBSD
-+  if (affinity != NULL) {
-+    affinity->set = cpuset_create();
-+    if (affinity->set == NULL) {
-+      free(affinity);
-+      affinity = NULL;
-+    } else {
-+      cpuset_zero(affinity->set);
-+      const int err = pthread_getaffinity_np(pthread_self(), cpuset_size(affinity->set), affinity->set);
-+      JXL_CHECK(err == 0);
-+    }
-+  }
-+#endif
- #if JXL_OS_WIN
-   DWORD_PTR process_affinity, system_affinity;
-   const BOOL ok = GetProcessAffinityMask(GetCurrentProcess(), &process_affinity,
-@@ -195,6 +230,19 @@ ThreadAffinity* OriginalThreadAffinity()
- 
- }  // namespace
- 
-+#if JXL_OS_NETBSD
-+bool set_affinity_allowed()
-+{
-+  if (geteuid() == 0)
-+    return true;
-+
-+  size_t len = 4;
-+  int *val =(int*)asysctlbyname("security.models.extensions.user_set_cpu_affinity", &len);
-+
-+  return (*val == 1);
-+}
-+#endif
-+
- Status SetThreadAffinity(ThreadAffinity* affinity) {
-   // Ensure original is initialized before changing.
-   const ThreadAffinity* const original = OriginalThreadAffinity();
-@@ -224,6 +272,14 @@ Status SetThreadAffinity(ThreadAffinity*
-   // As of 2020-06 Haiku does not support pinning threads to cores.
-   (void)affinity;
-   return false;
-+#elif JXL_OS_NETBSD
-+  if (!set_affinity_allowed()) 
-+     return false;
-+
-+  const int err = pthread_setaffinity_np(pthread_self(), cpuset_size(affinity->set),
-+                                        affinity->set);
-+  if (err != 0) return JXL_FAILURE("cpuset_setaffinity_np failed");
-+  return true;  
- #else
-   printf("Don't know how to SetThreadAffinity on this platform.\n");
-   return false;
-@@ -255,6 +311,16 @@ Status PinThreadToCPU(const int cpu) {
-   CPU_ZERO(&affinity.set);
-   CPU_SET(cpu, &affinity.set);
-   return SetThreadAffinity(&affinity);
-+#elif JXL_OS_NETBSD
-+  ThreadAffinity affinity;
-+  affinity.set = cpuset_create();
-+  if (affinity.set == nullptr)
-+    return false;
-+  cpuset_zero(affinity.set);
-+  cpuset_set(cpu, affinity.set);
-+  bool st = SetThreadAffinity(&affinity);
-+  cpuset_destroy(affinity.set);
-+  return st;
- #else
-   return false;
- #endif
-@@ -280,7 +346,7 @@ Status PinThreadToRandomCPU() {
- namespace {
- 
- size_t DetectTotalMemoryMiB() {
--#if JXL_OS_LINUX || JXL_OS_FREEBSD || JXL_OS_MAC
-+#if JXL_OS_LINUX || JXL_OS_FREEBSD || JXL_OS_MAC || JXL_OS_NETBSD
-   const long page_size = sysconf(_SC_PAGESIZE);
-   const long num_pages = sysconf(_SC_PHYS_PAGES);
-   if (page_size == -1 || num_pages == -1) {


Home | Main Index | Thread Index | Old Index