Thu Aug 17 07:43:40 2023 UTC ()
svt-av1: Fix build on SunOS.
(jperkin)
diff -r1.2 -r1.3 pkgsrc/multimedia/svt-av1/distinfo
diff -r0 -r1.1 pkgsrc/multimedia/svt-av1/patches/patch-CMakeLists.txt
diff -r0 -r1.1 pkgsrc/multimedia/svt-av1/patches/patch-third__party_cpuinfo_CMakeLists.txt
diff -r0 -r1.1 pkgsrc/multimedia/svt-av1/patches/patch-third__party_cpuinfo_src_init.c
--- pkgsrc/multimedia/svt-av1/distinfo 2023/07/19 13:14:02 1.2
+++ pkgsrc/multimedia/svt-av1/distinfo 2023/08/17 07:43:40 1.3
$NetBSD: patch-CMakeLists.txt,v 1.1 2023/08/17 07:43:40 jperkin Exp $
Avoid incompatible linker flags on SunOS.
--- CMakeLists.txt.orig 2023-04-26 22:11:56.000000000 +0000
+++ CMakeLists.txt
@@ -209,7 +209,7 @@ if(UNIX)
set(CMAKE_C_ARCHIVE_FINISH "<CMAKE_RANLIB> -no_warning_for_no_symbols -c <TARGET>")
set(CMAKE_CXX_ARCHIVE_FINISH "<CMAKE_RANLIB> -no_warning_for_no_symbols -c <TARGET>")
endif()
- else()
+ elseif(NOT CMAKE_SYSTEM_NAME MATCHES "SunOS")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -z noexecstack -z relro -z now")
endif()
endif()
$NetBSD: patch-third__party_cpuinfo_CMakeLists.txt,v 1.1 2023/08/17 07:43:40 jperkin Exp $
Support SunOS.
--- third_party/cpuinfo/CMakeLists.txt.orig 2023-04-26 22:11:56.000000000 +0000
+++ third_party/cpuinfo/CMakeLists.txt
@@ -72,7 +72,7 @@ IF(NOT CMAKE_SYSTEM_NAME)
"Target operating system is not specified. "
"cpuinfo will compile, but cpuinfo_initialize() will always fail.")
SET(CPUINFO_SUPPORTED_PLATFORM FALSE)
-ELSEIF(NOT CMAKE_SYSTEM_NAME MATCHES "^(Windows|CYGWIN|MSYS|Darwin|Linux|Android|DragonFly|FreeBSD|NetBSD|OpenBSD)$")
+ELSEIF(NOT CMAKE_SYSTEM_NAME MATCHES "^(Windows|CYGWIN|MSYS|Darwin|Linux|Android|DragonFly|FreeBSD|NetBSD|OpenBSD|SunOS)$")
IF(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.14" AND NOT CMAKE_SYSTEM_NAME STREQUAL "iOS")
MESSAGE(WARNING
"Target operating system \"${CMAKE_SYSTEM_NAME}\" is not supported in cpuinfo. "
@@ -95,7 +95,7 @@ IF(CPUINFO_SUPPORTED_PLATFORM)
IF(CMAKE_SYSTEM_NAME STREQUAL "Linux" OR CMAKE_SYSTEM_NAME STREQUAL "Android")
LIST(APPEND CPUINFO_SRCS
src/x86/linux/init.c)
- ELSEIF(CMAKE_SYSTEM_NAME MATCHES "^(DragonFly|FreeBSD|NetBSD|OpenBSD)$")
+ ELSEIF(CMAKE_SYSTEM_NAME MATCHES "^(DragonFly|FreeBSD|NetBSD|OpenBSD|SunOS)$")
LIST(APPEND CPUINFO_SRCS src/x86/bsd/init.c)
ELSEIF(CMAKE_SYSTEM_NAME STREQUAL "Darwin" OR CMAKE_SYSTEM_NAME STREQUAL "iOS")
LIST(APPEND CPUINFO_SRCS src/x86/mach/x86_mach_init.c)
$NetBSD: patch-third__party_cpuinfo_src_init.c,v 1.1 2023/08/17 07:43:40 jperkin Exp $
Support SunOS.
--- third_party/cpuinfo/src/init.c.orig 2023-04-26 22:11:56.000000000 +0000
+++ third_party/cpuinfo/src/init.c
@@ -29,7 +29,7 @@ bool CPUINFO_ABI cpuinfo_initialize(void
pthread_once(&init_guard, &cpuinfo_x86_linux_init);
#elif defined(_WIN32) || defined(__CYGWIN__)
InitOnceExecuteOnce(&init_guard, &cpuinfo_x86_windows_init, NULL, NULL);
- #elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__bsdi__) || defined(__DragonFly__)
+ #elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__bsdi__) || defined(__DragonFly__) || defined(__sun)
pthread_once(&init_guard, &cpuinfo_x86_bsd_init);
#else
cpuinfo_log_error("operating system is not supported in cpuinfo");