You've already forked macports-ports
mirror of
https://github.com/macports/macports-ports.git
synced 2026-07-12 18:20:25 -07:00
bctoolbox: fix build for < 10.7
This commit is contained in:
committed by
Renee Otten
parent
f317d14e71
commit
83f2f5b758
@@ -22,15 +22,6 @@ checksums rmd160 bbd9a9dd4318820299d5fec1b7819c2483745940 \
|
||||
sha256 1869d04fadaa20c8f07d6781dfbd65aef01812fd681eb2961f7f0300f699031f \
|
||||
size 194676
|
||||
|
||||
if {${os.major} <= 10} {
|
||||
known_fail yes
|
||||
pre-fetch {
|
||||
ui_error "${name} requires the AVFoundation framework"
|
||||
ui_error "AVFoundation available from macOS 10.7 and later"
|
||||
return -code error "incompatible OS X version"
|
||||
}
|
||||
}
|
||||
|
||||
depends_build-append \
|
||||
port:bcunit
|
||||
depends_lib port:libiconv \
|
||||
@@ -38,6 +29,17 @@ depends_lib port:libiconv \
|
||||
|
||||
patchfiles patch-fix-Frameworks-path.diff
|
||||
|
||||
# https://github.com/BelledonneCommunications/bctoolbox/pull/26
|
||||
patchfiles-append 0001-ios_utils.hh-add-a-missing-memory-include.patch \
|
||||
0002-port.c-define-AI_NUMERICSERV-if-undefined.patch \
|
||||
0003-BcToolboxCMakeUtils.cmake-fix-flags-for-Apple.patch
|
||||
|
||||
if {${os.platform} eq "darwin" && ${os.major} <= 10} {
|
||||
# Nothing in fact links to AVFoundation, it can just be dropped.
|
||||
patchfiles-append \
|
||||
patch-fix-10.6.diff
|
||||
}
|
||||
|
||||
compiler.cxx_standard \
|
||||
2011
|
||||
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
From 78834487b7aa51ffc8ed58d49904410d2a6fe3b3 Mon Sep 17 00:00:00 2001
|
||||
From: Sergey Fedorov <barracuda@macos-powerpc.org>
|
||||
Date: Wed, 14 Aug 2024 11:00:20 +0800
|
||||
Subject: [PATCH 1/3] ios_utils.hh: add a missing <memory> include
|
||||
|
||||
---
|
||||
include/bctoolbox/ios_utils.hh | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git include/bctoolbox/ios_utils.hh include/bctoolbox/ios_utils.hh
|
||||
index 90e2936..8cf6b80 100644
|
||||
--- include/bctoolbox/ios_utils.hh
|
||||
+++ include/bctoolbox/ios_utils.hh
|
||||
@@ -20,6 +20,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <functional>
|
||||
+#include <memory>
|
||||
|
||||
namespace bctoolbox {
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
From d6ed57b7c265a4abc018297e942b653d2a0bf005 Mon Sep 17 00:00:00 2001
|
||||
From: Sergey Fedorov <barracuda@macos-powerpc.org>
|
||||
Date: Wed, 14 Aug 2024 11:01:54 +0800
|
||||
Subject: [PATCH 2/3] port.c: define AI_NUMERICSERV if undefined
|
||||
|
||||
---
|
||||
src/utils/port.c | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git src/utils/port.c src/utils/port.c
|
||||
index 76982ac..823f7f1 100644
|
||||
--- src/utils/port.c
|
||||
+++ src/utils/port.c
|
||||
@@ -62,6 +62,10 @@
|
||||
#define MIN(a,b) a<=b ? a : b
|
||||
#endif
|
||||
|
||||
+#ifndef AI_NUMERICSERV
|
||||
+#define AI_NUMERICSERV 0
|
||||
+#endif
|
||||
+
|
||||
static void *bctbx_libc_malloc(size_t sz){
|
||||
return malloc(sz);
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
From c588d25761e845c60a1713d6ec4064159a1d1414 Mon Sep 17 00:00:00 2001
|
||||
From: Sergey Fedorov <barracuda@macos-powerpc.org>
|
||||
Date: Wed, 14 Aug 2024 11:08:10 +0800
|
||||
Subject: [PATCH 3/3] BcToolboxCMakeUtils.cmake: fix flags for Apple
|
||||
|
||||
---
|
||||
cmake/BCToolboxCMakeUtils.cmake | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git cmake/BCToolboxCMakeUtils.cmake cmake/BCToolboxCMakeUtils.cmake
|
||||
index 4a3b8c3..0763a31 100644
|
||||
--- cmake/BCToolboxCMakeUtils.cmake
|
||||
+++ cmake/BCToolboxCMakeUtils.cmake
|
||||
@@ -39,7 +39,10 @@
|
||||
list(APPEND ${CPP_FLAGS} "-Wno-error=pragmas")
|
||||
endif()
|
||||
if(APPLE)
|
||||
- list(APPEND ${CPP_FLAGS} "-Wno-error=unknown-warning-option" "-Qunused-arguments" "-Wno-tautological-compare" "-Wno-unused-function" "-Wno-array-bounds")
|
||||
+ list(APPEND ${CPP_FLAGS} "-Wno-tautological-compare" "-Wno-unused-function" "-Wno-array-bounds")
|
||||
+ if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
|
||||
+ list(APPEND ${CPP_FLAGS} "-Wno-discarded-qualifiers")
|
||||
+ endif()
|
||||
endif()
|
||||
if(ENABLE_STRICT)
|
||||
list(APPEND ${CPP_FLAGS} "-Werror" "-Wextra" "-Wno-unused-parameter" "-Wno-error=unknown-pragmas" "-Wuninitialized" "-Wno-missing-field-initializers"
|
||||
@@ -0,0 +1,20 @@
|
||||
--- src/CMakeLists.txt 2023-01-16 16:38:20.000000000 +0800
|
||||
+++ src/CMakeLists.txt 2024-08-14 11:13:46.000000000 +0800
|
||||
@@ -105,7 +105,7 @@
|
||||
add_library(bctoolbox-static STATIC ${BCTOOLBOX_SOURCE_FILES} ${BCTOOLBOX_HEADER_FILES} ${BCTOOLBOX_PRIVATE_HEADER_FILES})
|
||||
target_link_libraries(bctoolbox-static INTERFACE ${CMAKE_THREAD_LIBS_INIT})
|
||||
if(APPLE)
|
||||
- target_link_libraries(bctoolbox-static INTERFACE "-framework Foundation" "-framework AVFoundation")
|
||||
+ target_link_libraries(bctoolbox-static INTERFACE "-framework Foundation")
|
||||
target_include_directories(bctoolbox-static SYSTEM PRIVATE ${ICONV_INCLUDE_DIRS})
|
||||
target_link_libraries(bctoolbox-static INTERFACE ${ICONV_LIBRARIES})
|
||||
endif()
|
||||
@@ -149,7 +149,7 @@
|
||||
if (IOS)
|
||||
target_link_libraries(bctoolbox PRIVATE "-framework UIKit" "-framework Foundation" "-framework AVFoundation")
|
||||
else()
|
||||
- target_link_libraries(bctoolbox PRIVATE "-framework Foundation" "-framework AVFoundation")
|
||||
+ target_link_libraries(bctoolbox PRIVATE "-framework Foundation")
|
||||
endif()
|
||||
target_include_directories(bctoolbox SYSTEM PRIVATE ${ICONV_INCLUDE_DIRS})
|
||||
target_link_libraries(bctoolbox PRIVATE ${ICONV_LIBRARIES})
|
||||
Reference in New Issue
Block a user