View | Details | Raw Unified | Return to bug 228443
Collapse All | Expand All

(-)b/audio/moony-lv2/files/patch-CMakeLists.txt (-4 / +4 lines)
Lines 1-14 Link Here
1
--- CMakeLists.txt.orig	2017-05-16 21:46:21 UTC
1
--- CMakeLists.txt.orig	2017-05-16 21:46:21 UTC
2
+++ CMakeLists.txt
2
+++ CMakeLists.txt
3
@@ -33,6 +33,17 @@ set(CMAKE_C_FLAGS "-Wshadow -Wimplicit-f
3
@@ -33,6 +33,17 @@ set(CMAKE_C_FLAGS "-Wshadow -Wimplicit-function-declar
4
 if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
4
 if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
5
 	set(CMAKE_MODULE_LINKER_FLAGS "-Wl,-z,defs ${CMAKE_MODULE_LINKER_FLAGS}")
5
 	set(CMAKE_MODULE_LINKER_FLAGS "-Wl,-z,defs ${CMAKE_MODULE_LINKER_FLAGS}")
6
 	set(CMAKE_MODULE_LINKER_FLAGS "-Wl,-z,nodelete ${CMAKE_MODULE_LINKER_FLAGS}")
6
 	set(CMAKE_MODULE_LINKER_FLAGS "-Wl,-z,nodelete ${CMAKE_MODULE_LINKER_FLAGS}")
7
+elseif(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
7
+elseif(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
8
+	# see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=221341
8
+	# see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=221341
9
+	include(CheckFunctionExists)
9
+	include(CheckLibraryExists)
10
+	check_function_exists(clog FreeBSD_CLOG_EXISTS)
10
+	check_library_exists(m clog 'copmlex.h' FreeBSD_CLOG_EXISTS)
11
+	check_function_exists(cpow FreeBSD_CPOW_EXISTS)
11
+	check_library_exists(m cpow 'complex.h' FreeBSD_CPOW_EXISTS)
12
+	if (FreeBSD_CLOG_EXISTS)
12
+	if (FreeBSD_CLOG_EXISTS)
13
+		set(CMAKE_C_FLAGS "-DFreeBSD_CLOG_EXISTS ${CMAKE_C_FLAGS}")
13
+		set(CMAKE_C_FLAGS "-DFreeBSD_CLOG_EXISTS ${CMAKE_C_FLAGS}")
14
+	endif()
14
+	endif()

Return to bug 228443