1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-03 01:23:49 +00:00

net/sems: fix build on big-endian architectures

This port needs C++11 compiler:
cc1plus: error: unrecognized command line option "-std=c++11"

Additionally, it needs appropriate definitions for big-endian architectures:
/usr/local/poudriere/ports/default/net/sems/work/sems-7400051/core/plug-in/isac/libisac/typedefs.h:80:2: error: #error Please add support for your architecture in typedefs.h
   80 | #error Please add support for your architecture in typedefs.h
      |  ^~~~~

PR:		240707
Approved by:    nwhitehorn (maintainer), linimon (mentor)
This commit is contained in:
Piotr Kubaj 2019-09-30 14:22:54 +00:00
parent 5f27f0be79
commit 7840093c8a
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=513387
2 changed files with 24 additions and 1 deletions

View File

@ -21,7 +21,7 @@ LIB_DEPENDS= libopus.so:audio/opus \
libspeex.so:audio/speex \
libspandsp.so:comms/spandsp
USES= cmake python:2.7,run shebangfix
USES= cmake compiler:c++11-lang python:2.7,run shebangfix
SHEBANG_GLOB= sems-*
USE_GITHUB= yes

View File

@ -0,0 +1,23 @@
--- core/plug-in/isac/libisac/typedefs.h.orig 2019-09-18 08:25:08 UTC
+++ core/plug-in/isac/libisac/typedefs.h
@@ -77,7 +77,19 @@
#define WEBRTC_ARCH_32_BITS
#define WEBRTC_ARCH_LITTLE_ENDIAN
#else
-#error Please add support for your architecture in typedefs.h
+/* instead of failing, use typical unix defines... */
+#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
+#define WEBRTC_ARCH_LITTLE_ENDIAN
+#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
+#define WEBRTC_ARCH_BIG_ENDIAN
+#else
+#error __BYTE_ORDER__ is not defined
+#endif
+#if defined(__LP64__)
+#define WEBRTC_ARCH_64_BITS
+#else
+#define WEBRTC_ARCH_32_BITS
+#endif
#endif
#if defined(__SSE2__) || defined(_MSC_VER)