pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/56749: audio/alsa-lib fails to build on Solarish



>Number:         56749
>Category:       pkg
>Synopsis:       audio/alsa-lib fails to build on Solarish
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Mar 14 12:30:00 +0000 2022
>Originator:     Claes Nästén
>Release:        trunk 2022-03-13
>Organization:
>Environment:
Seen on bulktracker (as well as Solaris 10)
>Description:
Building audio/alsa-lib fails with the following error:

'/home/pbulk/build/audio/alsa-lib/work/alsa-lib-1.2.6.1'
  CC       cards.lo
In file included from ../../include/sound/asound.h:2,
                 from ../../include/local.h:155,
                 from control_local.h:22,
                 from cards.c:35:
../../include/alsa/sound/type_compat.h:33:10: fatal error: byteswap.h: No such file or directory
   33 | #include <byteswap.h>
      |          ^~~~~~~~~~~~
compilation terminated.
>How-To-Repeat:
Build audio/alsa-lib on Solarish
>Fix:
--- a/audio/alsa-lib/patches/patch-include_sound_type__compat.h
+++ b/audio/alsa-lib/patches/patch-include_sound_type__compat.h
@@ -1,6 +1,6 @@
 $NetBSD: patch-include_sound_type__compat.h,v 1.1 2021/05/12 14:12:13 ryoon Exp $
 
---- include/sound/type_compat.h.orig   2020-06-29 10:51:08.000000000 +0000
+--- include/sound/type_compat.h.orig   2021-06-14 10:28:44.000000000 +0000
 +++ include/sound/type_compat.h
 @@ -1,5 +1,5 @@
 -#ifndef __TYPE_COMPAT_H
@@ -10,10 +10,13 @@ $NetBSD: patch-include_sound_type__compat.h,v 1.1 2021/05/12 14:12:13 ryoon Exp
  
  #ifndef DOC_HIDDEN
  #include <stdint.h>
-@@ -16,6 +16,20 @@ typedef int32_t __s32;
+@@ -15,7 +15,30 @@ typedef int16_t __s16;
+ typedef int32_t __s32;
  typedef int64_t __s64;
  
++#ifndef __sun
  #include <endian.h>
++#endif
 +#if defined(__NetBSD__)
 +#include <machine/bswap.h>
 +#if BYTE_ORDER == LITTLE_ENDIAN
@@ -27,19 +30,27 @@ $NetBSD: patch-include_sound_type__compat.h,v 1.1 2021/05/12 14:12:13 ryoon Exp
 +#define __cpu_to_le16(x) bswap16(x)
 +#define __cpu_to_be16(x) (x)
 +#endif
++#else
++#ifdef __sun
++#include <sys/byteorder.h>
++#define __cpu_to_le32(x) LE_32(x)
++#define __cpu_to_be32(x) BE_32(x)
++#define __cpu_to_le16(x) LE_16(x)
++#define __cpu_to_be16(x) BE_16(x)
 +#else
  #include <byteswap.h>
  #if __BYTE_ORDER == __LITTLE_ENDIAN
  #define __cpu_to_le32(x) (x)
-@@ -28,6 +42,7 @@ typedef int64_t __s64;
+@@ -28,6 +51,8 @@ typedef int64_t __s64;
  #define __cpu_to_le16(x) bswap_16(x)
  #define __cpu_to_be16(x) (x)
  #endif
++#endif
 +#endif
  
  #define __le32_to_cpu __cpu_to_le32
  #define __be32_to_cpu __cpu_to_be32
-@@ -54,4 +69,4 @@ typedef int64_t __s64;
+@@ -54,4 +79,4 @@ typedef int64_t __s64;
  
  #endif /* DOC_HIDDEN */
  



Home | Main Index | Thread Index | Old Index