Skip to content

Commit

Permalink
ortp: fix build for < 10.7
Browse files Browse the repository at this point in the history
  • Loading branch information
barracuda156 committed Aug 14, 2024
1 parent f265a0a commit 3cf0816
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 1 deletion.
7 changes: 6 additions & 1 deletion devel/ortp/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,18 @@ checksums rmd160 6a5e145c6d1485a8b497349268fa62c2cf4adb13 \

depends_lib port:bctoolbox

patchfiles patch-fix-Frameworks-path.diff
patchfiles patch-fix-Frameworks-path.diff \
patch-fix-gcc-build.diff \
patch-legacy.diff

configure.args-append \
-DENABLE_DOC=NO \
-DENABLE_STATIC=NO \
-DENABLE_UNIT_TESTS=NO

compiler.cxx_standard \
2011

variant docs description {Build and install documentation in HTML format} {
depends_build-append \
path:bin/doxygen:doxygen
Expand Down
15 changes: 15 additions & 0 deletions devel/ortp/files/patch-fix-gcc-build.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
--- CMakeLists.txt 2022-12-20 22:30:27.000000000 +0800
+++ CMakeLists.txt 2024-08-14 11:45:13.000000000 +0800
@@ -166,10 +166,10 @@
list(APPEND STRICT_OPTIONS_CPP "-Wall" "-Wuninitialized")
list(APPEND STRICT_OPTIONS_C "-Wdeclaration-after-statement" "-Wstrict-prototypes" "-Wno-error=strict-prototypes")
if(CMAKE_C_COMPILER_ID MATCHES "Clang")
- list(APPEND STRICT_OPTIONS_CPP "-Qunused-arguments" "-Wno-array-bounds")
+ list(APPEND STRICT_OPTIONS_CPP "-Wno-error=unknown-warning-option" "-Qunused-arguments" "-Wno-array-bounds")
endif()
if(APPLE)
- list(APPEND STRICT_OPTIONS_CPP "-Wno-error=unknown-warning-option" "-Qunused-arguments" "-Wno-tautological-compare" "-Wno-unused-function" "-Wno-array-bounds")
+ list(APPEND STRICT_OPTIONS_CPP "-Wno-tautological-compare" "-Wno-unused-function" "-Wno-array-bounds")
endif()
if(ENABLE_STRICT)
list(APPEND STRICT_OPTIONS_CPP "-Werror" "-Wextra" "-Wno-unused-parameter" "-Wno-missing-field-initializers" "-fno-strict-aliasing")
15 changes: 15 additions & 0 deletions devel/ortp/files/patch-legacy.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
--- src/rtpsession_inet.c 2022-12-20 22:30:27.000000000 +0800
+++ src/rtpsession_inet.c 2024-08-14 11:59:03.000000000 +0800
@@ -25,6 +25,12 @@

#if __APPLE__
#include "TargetConditionals.h"
+#ifndef _DARWIN_C_SOURCE
+#define _DARWIN_C_SOURCE
+#endif
+#ifndef IPV6_RECVDSTADDR
+#define IPV6_RECVDSTADDR 7
+#endif
#endif

#ifdef HAVE_CONFIG_H

0 comments on commit 3cf0816

Please sign in to comment.