Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 31 Dec 2024 14:00:44 GMT
From:      Piotr Kubaj <pkubaj@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 3cc18ad22908 - main - audio/polyphone: fix build on big-endian
Message-ID:  <202412311400.4BVE0i8j053363@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by pkubaj:

URL: https://cgit.FreeBSD.org/ports/commit/?id=3cc18ad22908124ea1fe7dad1cef08e718c16b55

commit 3cc18ad22908124ea1fe7dad1cef08e718c16b55
Author:     Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2024-12-27 20:05:33 +0000
Commit:     Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2024-12-31 13:59:51 +0000

    audio/polyphone: fix build on big-endian
    
    ../polyphone-2.4.1/sources/core/input/sfark/sfarkextractor2.cpp:293:5: error: use of undeclared identifier 'bioP'
      293 |     INBITS(w, n);
          |     ^
    ../polyphone-2.4.1/sources/core/input/sfark/sfarkextractor2.cpp:62:5: note: expanded from macro 'INBITS'
       62 |     CHECK_INBUFFER                              \
          |     ^
    ../polyphone-2.4.1/sources/core/input/sfark/sfarkextractor2.cpp:76:9: note: expanded from macro 'CHECK_INBUFFER'
       76 |     if (bioP == BIOBUFSIZE)                       \
          |         ^
    ../polyphone-2.4.1/sources/core/input/sfark/sfarkextractor2.cpp:293:5: error: use of undeclared identifier 'bioWholeBlocks'; did you mean '_bioWholeBlocks'?
    ../polyphone-2.4.1/sources/core/input/sfark/sfarkextractor2.cpp:62:5: note: expanded from macro 'INBITS'
       62 |     CHECK_INBUFFER                              \
          |     ^
    ../polyphone-2.4.1/sources/core/input/sfark/sfarkextractor2.cpp:78:5: note: expanded from macro 'CHECK_INBUFFER'
       78 |     bioWholeBlocks++;                           \
          |     ^
    ../polyphone-2.4.1/sources/core/input/sfark/sfarkextractor2.h:411:12: note: '_bioWholeBlocks' declared here
      411 |     int    _bioWholeBlocks;                     // Count blocks read from disk
          |            ^
---
 .../patch-core_input_sfark_sfarkextractor2.cpp      | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/audio/polyphone/files/patch-core_input_sfark_sfarkextractor2.cpp b/audio/polyphone/files/patch-core_input_sfark_sfarkextractor2.cpp
new file mode 100644
index 000000000000..5f072d7092d9
--- /dev/null
+++ b/audio/polyphone/files/patch-core_input_sfark_sfarkextractor2.cpp
@@ -0,0 +1,21 @@
+--- core/input/sfark/sfarkextractor2.cpp.orig	2024-12-27 19:56:25 UTC
++++ core/input/sfark/sfarkextractor2.cpp
+@@ -73,13 +73,13 @@ const char SfArkExtractor2::UpgradeMsg[] = "Please see
+ #define	WFIX(I)		s = bp[I+0]; bp[I+0] = bp[I+1]; bp[I+1] = s;
+ // Read from disk if needed, and fix endians
+ #define CHECK_INBUFFER                          \
+-    if (bioP == BIOBUFSIZE)                       \
++    if (_bioP == BIOBUFSIZE)                       \
+ {                                             \
+-    bioWholeBlocks++;                           \
+-    bioP = 0;                                   \
+-    int ReadLen = ReadInputFile((quint8 *) bioBuf, BIOBUFSIZE * sizeof(quint16)); \
++    _bioWholeBlocks++;                           \
++    _bioP = 0;                                   \
++    int ReadLen = ReadInputFile((quint8 *) _bioBuf, BIOBUFSIZE * sizeof(quint16)); \
+     if (ReadLen <= 0)  return 0;		\
+-    quint8 *bp = (quint8 *) bioBuf, *ep = (quint8 *) (bioBuf+BIOBUFSIZE); \
++    quint8 *bp = (quint8 *) _bioBuf, *ep = (quint8 *) (_bioBuf+BIOBUFSIZE); \
+     do {					\
+     quint8 s;					\
+     WFIX(0); WFIX(2); WFIX(4); WFIX(6);	\



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202412311400.4BVE0i8j053363>