From d73b7b66143eb9c6d71b872d38a89d2f7655e0a0 Mon Sep 17 00:00:00 2001 From: dholland Date: Sat, 7 Nov 2015 19:43:56 +0000 Subject: Improve endian detection; should (with a bit of luck at least) fix build on MacOS, OpenBSD, and Bitrig. Note: There's enough stylized goop here that lots of packages will need to know about that we should consider creating a USE_FEATURES for sys/endian.h. --- audio/alsa-lib/distinfo | 4 ++-- audio/alsa-lib/patches/patch-ae | 23 +++++++++++++++++++---- 2 files changed, 21 insertions(+), 6 deletions(-) (limited to 'audio/alsa-lib') diff --git a/audio/alsa-lib/distinfo b/audio/alsa-lib/distinfo index cae6602e2c2..62d139a7507 100644 --- a/audio/alsa-lib/distinfo +++ b/audio/alsa-lib/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.18 2015/11/03 01:12:24 agc Exp $ +$NetBSD: distinfo,v 1.19 2015/11/07 19:43:56 dholland Exp $ SHA1 (alsa-lib-1.0.27.2.tar.bz2) = 9cd50f4b5f07d5e7213dd1277b8673e677804cf8 RMD160 (alsa-lib-1.0.27.2.tar.bz2) = 6794e626affe9b6b6ec5fb64ff31384526b160c2 @@ -8,7 +8,7 @@ SHA1 (patch-aa) = 5a8e9571ac6fb1f1f6cbd18d3859468a7b64076f SHA1 (patch-ab) = 4853bdbdd559c4fa6a9d00dca3e880022d7fc6ba SHA1 (patch-ac) = 47f5cad6c436b08161acd726090ec20a9cb50fc8 SHA1 (patch-ad) = 10beb6cca7cf7c554a13337e8cded23e02bca2c8 -SHA1 (patch-ae) = f1eced4561ded4e685f5e690393c7b93e4c42837 +SHA1 (patch-ae) = 6b39426634f1a5c7bb33a2cba1cf1586b606f287 SHA1 (patch-af) = b5d0a48da183c0725367b08abb24bf1fed85cb30 SHA1 (patch-ag) = bea09d714bf75735f5be6d370f7242c34b73cb95 SHA1 (patch-ah) = 3d2aa98ba2791c2beb152d7e3a454b8d6bb527d3 diff --git a/audio/alsa-lib/patches/patch-ae b/audio/alsa-lib/patches/patch-ae index 44907751cd3..478ca53d81f 100644 --- a/audio/alsa-lib/patches/patch-ae +++ b/audio/alsa-lib/patches/patch-ae @@ -1,13 +1,20 @@ -$NetBSD: patch-ae,v 1.5 2014/06/09 12:21:07 ryoon Exp $ +$NetBSD: patch-ae,v 1.6 2015/11/07 19:43:57 dholland Exp $ + + - Handle endian detection for assorted operating systems. + - Fix up linuxism. + - Don't assert GNU ld on Solaris, where it might not be true. --- include/local.h.orig 2013-07-08 12:31:36.000000000 +0000 +++ include/local.h -@@ -28,11 +28,26 @@ +@@ -28,11 +28,37 @@ #include #include #include -+#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__DragonFly__) ++#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__DragonFly__) || \ ++ defined(__OpenBSD__) || defined(__Bitrig__) +#include ++#elif defined(__APPLE__) ++#include +#elif defined(__sun) +#include +#define __LITTLE_ENDIAN 1234 @@ -20,6 +27,14 @@ $NetBSD: patch-ae,v 1.5 2014/06/09 12:21:07 ryoon Exp $ +#else #include +#endif ++ ++#if !defined(__BYTE_ORDER) && defined(_BYTE_ORDER) ++/* Older BSDs */ ++#define __BYTE_ORDER _BYTE_ORDER ++#define __BIG_ENDIAN _BIG_ENDIAN ++#define __LITTLE_ENDIAN _LITTLE_ENDIAN ++#endif ++ #include #include #include @@ -29,7 +44,7 @@ $NetBSD: patch-ae,v 1.5 2014/06/09 12:21:07 ryoon Exp $ #include "config.h" #ifdef SUPPORT_RESMGR -@@ -228,7 +245,9 @@ extern snd_lib_error_handler_t snd_err_m +@@ -228,7 +254,9 @@ extern snd_lib_error_handler_t snd_err_m /* */ -- cgit v1.2.3