Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] id3lib: patch for c99 bool
@ 2022-09-14  4:41 mtboehlke
  2022-09-14  4:41 ` [PR PATCH] [Updated] " mtboehlke
                   ` (18 more replies)
  0 siblings, 19 replies; 20+ messages in thread
From: mtboehlke @ 2022-09-14  4:41 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1677 bytes --]

There is a new pull request by mtboehlke against master on the void-packages repository

https://github.com/mtboehlke/void-packages id3lib
https://github.com/void-linux/void-packages/pull/39275

id3lib: patch for c99 bool
id3/globals.h has a typedef for bool which is incompatible with c99 stdbool.
This is a known issue, but upstream is effectively unmaintained.
See [this thread](https://sourceforege.net/p/id3lib/mailman/message/30500558/) from upstream.

This only seems to be an issue for castget while building, and they have already switched to using taglib for the next release.
Castget [issue](https://github.com/mlj/castget/issues/47).

<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/39275.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-id3lib-39275.patch --]
[-- Type: text/x-diff, Size: 3645 bytes --]

From 2f58083c06634b7ee670f70d5f67d730617faf17 Mon Sep 17 00:00:00 2001
From: Mat Boehlke <mtboehlke@gmail.com>
Date: Tue, 13 Sep 2022 21:37:55 -0500
Subject: [PATCH 1/2] id3lib: patch for c99 bool

id3/globals.h has a typedef for bool which is incompatible with c99 stdbool.
This is a known issue, but upstream is effectively unmaintained.
See https://sourceforege.net/p/id3lib/mailman/message/30500558/
---
 srcpkgs/id3lib/patches/c99-bool.patch | 23 +++++++++++++++++++++++
 srcpkgs/id3lib/patches/test-io.patch  | 22 ++++++++++++++++++++++
 srcpkgs/id3lib/template               |  2 +-
 3 files changed, 46 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/id3lib/patches/c99-bool.patch
 create mode 100644 srcpkgs/id3lib/patches/test-io.patch

diff --git a/srcpkgs/id3lib/patches/c99-bool.patch b/srcpkgs/id3lib/patches/c99-bool.patch
new file mode 100644
index 000000000000..bc8996419bab
--- /dev/null
+++ b/srcpkgs/id3lib/patches/c99-bool.patch
@@ -0,0 +1,23 @@
+Needed for C99 bool compatability when stdbool.h is included:
+https://sourceforge.net/p/id3lib/mailman/message/30500558/
+
+diff --git a/include/id3/globals.h b/include/id3/globals.h
+index 5d8fa20..733ab3f 100644
+--- a/include/id3/globals.h
++++ b/include/id3/globals.h
+@@ -82,13 +82,13 @@
+ 
+ #define ID3_C_VAR extern
+ 
+-#ifndef __cplusplus
++#if !defined(__cplusplus) && !defined(__bool_true_false_are_defined)
+ 
+ typedef int bool;
+ #  define false (0)
+ #  define true (!false)
+ 
+-#endif /* __cplusplus */
++#endif /* __cplusplus __bool_true_false_are_defined */
+ 
+ ID3_C_VAR const char * const ID3LIB_NAME;
+ ID3_C_VAR const char * const ID3LIB_RELEASE;
diff --git a/srcpkgs/id3lib/patches/test-io.patch b/srcpkgs/id3lib/patches/test-io.patch
new file mode 100644
index 000000000000..7b18b4a9e0fa
--- /dev/null
+++ b/srcpkgs/id3lib/patches/test-io.patch
@@ -0,0 +1,22 @@
+diff --git a/examples/test_io.cpp b/examples/test_io.cpp
+index bee1a27..80020eb 100644
+--- a/examples/test_io.cpp
++++ b/examples/test_io.cpp
+@@ -24,7 +24,7 @@ main(size_t argc, const char** argv)
+   ID3D_INIT_WARNING();
+   ID3D_INIT_NOTICE();
+ 
+-  ID3_IStreamReader isr(cin);
++  ID3_IStreamReader isr(std::cin);
+   BString orig = io::readAllBinary(isr);
+     
+   cout << "input size:    " << orig.size() << endl;
+@@ -116,7 +116,7 @@ main(size_t argc, const char** argv)
+   cout << "binary number:";
+   for (size_t i = 0; i < number.size(); ++i)
+   {
+-    cout << " 0x" << hex << (size_t) (0xFF & number[i]) << dec;
++    cout << " 0x" << std::hex << (size_t) (0xFF & number[i]) << std::dec;
+   }
+   cout << endl;
+ 
diff --git a/srcpkgs/id3lib/template b/srcpkgs/id3lib/template
index 44cb7f55f1dd..ad9a60665e7e 100644
--- a/srcpkgs/id3lib/template
+++ b/srcpkgs/id3lib/template
@@ -1,7 +1,7 @@
 # Template file for 'id3lib'
 pkgname=id3lib
 version=3.8.3
-revision=6
+revision=7
 build_style=gnu-configure
 hostmakedepends="libtool automake"
 makedepends="zlib-devel"

From 93be8c325159cc94b4ca4c8bf598af8853e9c716 Mon Sep 17 00:00:00 2001
From: Mat Boehlke <mtboehlke@gmail.com>
Date: Tue, 13 Sep 2022 21:53:38 -0500
Subject: [PATCH 2/2] castget: bump to fix build with id3lib

---
 srcpkgs/castget/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/castget/template b/srcpkgs/castget/template
index 7b48ce324aec..30ab99f62d52 100644
--- a/srcpkgs/castget/template
+++ b/srcpkgs/castget/template
@@ -1,7 +1,7 @@
 # Template file for 'castget'
 pkgname=castget
 version=2.0.1
-revision=1
+revision=2
 build_style=gnu-configure
 hostmakedepends="pkg-config"
 makedepends="glib-devel libxml2-devel libcurl-devel id3lib-devel"

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PR PATCH] [Updated] id3lib: patch for c99 bool
  2022-09-14  4:41 [PR PATCH] id3lib: patch for c99 bool mtboehlke
@ 2022-09-14  4:41 ` mtboehlke
  2022-09-14  4:44 ` [PR REVIEW] " sgn
                   ` (17 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: mtboehlke @ 2022-09-14  4:41 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1682 bytes --]

There is an updated pull request by mtboehlke against master on the void-packages repository

https://github.com/mtboehlke/void-packages id3lib
https://github.com/void-linux/void-packages/pull/39275

id3lib: patch for c99 bool
id3/globals.h has a typedef for bool which is incompatible with c99 stdbool.
This is a known issue, but upstream is effectively unmaintained.
See [this thread](https://sourceforege.net/p/id3lib/mailman/message/30500558/) from upstream.

This only seems to be an issue for castget while building, and they have already switched to using taglib for the next release.
Castget [issue](https://github.com/mlj/castget/issues/47).

<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/39275.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-id3lib-39275.patch --]
[-- Type: text/x-diff, Size: 4076 bytes --]

From 2f58083c06634b7ee670f70d5f67d730617faf17 Mon Sep 17 00:00:00 2001
From: Mat Boehlke <mtboehlke@gmail.com>
Date: Tue, 13 Sep 2022 21:37:55 -0500
Subject: [PATCH 1/2] id3lib: patch for c99 bool

id3/globals.h has a typedef for bool which is incompatible with c99 stdbool.
This is a known issue, but upstream is effectively unmaintained.
See https://sourceforege.net/p/id3lib/mailman/message/30500558/
---
 srcpkgs/id3lib/patches/c99-bool.patch | 23 +++++++++++++++++++++++
 srcpkgs/id3lib/patches/test-io.patch  | 22 ++++++++++++++++++++++
 srcpkgs/id3lib/template               |  2 +-
 3 files changed, 46 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/id3lib/patches/c99-bool.patch
 create mode 100644 srcpkgs/id3lib/patches/test-io.patch

diff --git a/srcpkgs/id3lib/patches/c99-bool.patch b/srcpkgs/id3lib/patches/c99-bool.patch
new file mode 100644
index 000000000000..bc8996419bab
--- /dev/null
+++ b/srcpkgs/id3lib/patches/c99-bool.patch
@@ -0,0 +1,23 @@
+Needed for C99 bool compatability when stdbool.h is included:
+https://sourceforge.net/p/id3lib/mailman/message/30500558/
+
+diff --git a/include/id3/globals.h b/include/id3/globals.h
+index 5d8fa20..733ab3f 100644
+--- a/include/id3/globals.h
++++ b/include/id3/globals.h
+@@ -82,13 +82,13 @@
+ 
+ #define ID3_C_VAR extern
+ 
+-#ifndef __cplusplus
++#if !defined(__cplusplus) && !defined(__bool_true_false_are_defined)
+ 
+ typedef int bool;
+ #  define false (0)
+ #  define true (!false)
+ 
+-#endif /* __cplusplus */
++#endif /* __cplusplus __bool_true_false_are_defined */
+ 
+ ID3_C_VAR const char * const ID3LIB_NAME;
+ ID3_C_VAR const char * const ID3LIB_RELEASE;
diff --git a/srcpkgs/id3lib/patches/test-io.patch b/srcpkgs/id3lib/patches/test-io.patch
new file mode 100644
index 000000000000..7b18b4a9e0fa
--- /dev/null
+++ b/srcpkgs/id3lib/patches/test-io.patch
@@ -0,0 +1,22 @@
+diff --git a/examples/test_io.cpp b/examples/test_io.cpp
+index bee1a27..80020eb 100644
+--- a/examples/test_io.cpp
++++ b/examples/test_io.cpp
+@@ -24,7 +24,7 @@ main(size_t argc, const char** argv)
+   ID3D_INIT_WARNING();
+   ID3D_INIT_NOTICE();
+ 
+-  ID3_IStreamReader isr(cin);
++  ID3_IStreamReader isr(std::cin);
+   BString orig = io::readAllBinary(isr);
+     
+   cout << "input size:    " << orig.size() << endl;
+@@ -116,7 +116,7 @@ main(size_t argc, const char** argv)
+   cout << "binary number:";
+   for (size_t i = 0; i < number.size(); ++i)
+   {
+-    cout << " 0x" << hex << (size_t) (0xFF & number[i]) << dec;
++    cout << " 0x" << std::hex << (size_t) (0xFF & number[i]) << std::dec;
+   }
+   cout << endl;
+ 
diff --git a/srcpkgs/id3lib/template b/srcpkgs/id3lib/template
index 44cb7f55f1dd..ad9a60665e7e 100644
--- a/srcpkgs/id3lib/template
+++ b/srcpkgs/id3lib/template
@@ -1,7 +1,7 @@
 # Template file for 'id3lib'
 pkgname=id3lib
 version=3.8.3
-revision=6
+revision=7
 build_style=gnu-configure
 hostmakedepends="libtool automake"
 makedepends="zlib-devel"

From e161b6bc6554832fc8cbe4cf2f69da8229c56273 Mon Sep 17 00:00:00 2001
From: Mat Boehlke <mtboehlke@gmail.com>
Date: Tue, 13 Sep 2022 21:53:38 -0500
Subject: [PATCH 2/2] castget: bump to fix build with id3lib

Also, add changelog
---
 srcpkgs/castget/template | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/castget/template b/srcpkgs/castget/template
index 7b48ce324aec..759964a55a53 100644
--- a/srcpkgs/castget/template
+++ b/srcpkgs/castget/template
@@ -1,7 +1,7 @@
 # Template file for 'castget'
 pkgname=castget
 version=2.0.1
-revision=1
+revision=2
 build_style=gnu-configure
 hostmakedepends="pkg-config"
 makedepends="glib-devel libxml2-devel libcurl-devel id3lib-devel"
@@ -9,5 +9,6 @@ short_desc="Simple command-line RSS enclosure downloader"
 maintainer="AN3223 <ethanr2048@gmail.com>"
 license="LGPL-2.1-or-later"
 homepage="https://castget.johndal.com/"
+changelog="https://raw.githubusercontent.com/mlj/castget/master/CHANGES.md"
 distfiles="${NONGNU_SITE}/${pkgname}/${pkgname}-${version}.tar.bz2"
 checksum=438b5f7ec7e31a45ed3756630fe447f42015acda53ec09202f48628726b5e875

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PR REVIEW] id3lib: patch for c99 bool
  2022-09-14  4:41 [PR PATCH] id3lib: patch for c99 bool mtboehlke
  2022-09-14  4:41 ` [PR PATCH] [Updated] " mtboehlke
@ 2022-09-14  4:44 ` sgn
  2022-09-14  4:45 ` sgn
                   ` (16 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: sgn @ 2022-09-14  4:44 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 193 bytes --]

New review comment by sgn on void-packages repository

https://github.com/void-linux/void-packages/pull/39275#discussion_r970303033

Comment:
No need to bump revision, binary code is the same.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PR REVIEW] id3lib: patch for c99 bool
  2022-09-14  4:41 [PR PATCH] id3lib: patch for c99 bool mtboehlke
  2022-09-14  4:41 ` [PR PATCH] [Updated] " mtboehlke
  2022-09-14  4:44 ` [PR REVIEW] " sgn
@ 2022-09-14  4:45 ` sgn
  2022-09-14  4:50 ` [PR PATCH] [Updated] " mtboehlke
                   ` (15 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: sgn @ 2022-09-14  4:45 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 193 bytes --]

New review comment by sgn on void-packages repository

https://github.com/void-linux/void-packages/pull/39275#discussion_r970303033

Comment:
No need to bump revision, binary code is the same.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PR PATCH] [Updated] id3lib: patch for c99 bool
  2022-09-14  4:41 [PR PATCH] id3lib: patch for c99 bool mtboehlke
                   ` (2 preceding siblings ...)
  2022-09-14  4:45 ` sgn
@ 2022-09-14  4:50 ` mtboehlke
  2022-09-14  4:51 ` mtboehlke
                   ` (14 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: mtboehlke @ 2022-09-14  4:50 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1682 bytes --]

There is an updated pull request by mtboehlke against master on the void-packages repository

https://github.com/mtboehlke/void-packages id3lib
https://github.com/void-linux/void-packages/pull/39275

id3lib: patch for c99 bool
id3/globals.h has a typedef for bool which is incompatible with c99 stdbool.
This is a known issue, but upstream is effectively unmaintained.
See [this thread](https://sourceforege.net/p/id3lib/mailman/message/30500558/) from upstream.

This only seems to be an issue for castget while building, and they have already switched to using taglib for the next release.
Castget [issue](https://github.com/mlj/castget/issues/47).

<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/39275.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-id3lib-39275.patch --]
[-- Type: text/x-diff, Size: 2951 bytes --]

From 2f58083c06634b7ee670f70d5f67d730617faf17 Mon Sep 17 00:00:00 2001
From: Mat Boehlke <mtboehlke@gmail.com>
Date: Tue, 13 Sep 2022 21:37:55 -0500
Subject: [PATCH] id3lib: patch for c99 bool

id3/globals.h has a typedef for bool which is incompatible with c99 stdbool.
This is a known issue, but upstream is effectively unmaintained.
See https://sourceforege.net/p/id3lib/mailman/message/30500558/
---
 srcpkgs/id3lib/patches/c99-bool.patch | 23 +++++++++++++++++++++++
 srcpkgs/id3lib/patches/test-io.patch  | 22 ++++++++++++++++++++++
 srcpkgs/id3lib/template               |  2 +-
 3 files changed, 46 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/id3lib/patches/c99-bool.patch
 create mode 100644 srcpkgs/id3lib/patches/test-io.patch

diff --git a/srcpkgs/id3lib/patches/c99-bool.patch b/srcpkgs/id3lib/patches/c99-bool.patch
new file mode 100644
index 000000000000..bc8996419bab
--- /dev/null
+++ b/srcpkgs/id3lib/patches/c99-bool.patch
@@ -0,0 +1,23 @@
+Needed for C99 bool compatability when stdbool.h is included:
+https://sourceforge.net/p/id3lib/mailman/message/30500558/
+
+diff --git a/include/id3/globals.h b/include/id3/globals.h
+index 5d8fa20..733ab3f 100644
+--- a/include/id3/globals.h
++++ b/include/id3/globals.h
+@@ -82,13 +82,13 @@
+ 
+ #define ID3_C_VAR extern
+ 
+-#ifndef __cplusplus
++#if !defined(__cplusplus) && !defined(__bool_true_false_are_defined)
+ 
+ typedef int bool;
+ #  define false (0)
+ #  define true (!false)
+ 
+-#endif /* __cplusplus */
++#endif /* __cplusplus __bool_true_false_are_defined */
+ 
+ ID3_C_VAR const char * const ID3LIB_NAME;
+ ID3_C_VAR const char * const ID3LIB_RELEASE;
diff --git a/srcpkgs/id3lib/patches/test-io.patch b/srcpkgs/id3lib/patches/test-io.patch
new file mode 100644
index 000000000000..7b18b4a9e0fa
--- /dev/null
+++ b/srcpkgs/id3lib/patches/test-io.patch
@@ -0,0 +1,22 @@
+diff --git a/examples/test_io.cpp b/examples/test_io.cpp
+index bee1a27..80020eb 100644
+--- a/examples/test_io.cpp
++++ b/examples/test_io.cpp
+@@ -24,7 +24,7 @@ main(size_t argc, const char** argv)
+   ID3D_INIT_WARNING();
+   ID3D_INIT_NOTICE();
+ 
+-  ID3_IStreamReader isr(cin);
++  ID3_IStreamReader isr(std::cin);
+   BString orig = io::readAllBinary(isr);
+     
+   cout << "input size:    " << orig.size() << endl;
+@@ -116,7 +116,7 @@ main(size_t argc, const char** argv)
+   cout << "binary number:";
+   for (size_t i = 0; i < number.size(); ++i)
+   {
+-    cout << " 0x" << hex << (size_t) (0xFF & number[i]) << dec;
++    cout << " 0x" << std::hex << (size_t) (0xFF & number[i]) << std::dec;
+   }
+   cout << endl;
+ 
diff --git a/srcpkgs/id3lib/template b/srcpkgs/id3lib/template
index 44cb7f55f1dd..ad9a60665e7e 100644
--- a/srcpkgs/id3lib/template
+++ b/srcpkgs/id3lib/template
@@ -1,7 +1,7 @@
 # Template file for 'id3lib'
 pkgname=id3lib
 version=3.8.3
-revision=6
+revision=7
 build_style=gnu-configure
 hostmakedepends="libtool automake"
 makedepends="zlib-devel"

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: id3lib: patch for c99 bool
  2022-09-14  4:41 [PR PATCH] id3lib: patch for c99 bool mtboehlke
                   ` (3 preceding siblings ...)
  2022-09-14  4:50 ` [PR PATCH] [Updated] " mtboehlke
@ 2022-09-14  4:51 ` mtboehlke
  2022-09-14  4:59 ` [PR PATCH] [Updated] " mtboehlke
                   ` (13 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: mtboehlke @ 2022-09-14  4:51 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 226 bytes --]

New comment by mtboehlke on void-packages repository

https://github.com/void-linux/void-packages/pull/39275#issuecomment-1246230467

Comment:
@sgn Not sure what happened to your comment, but I removed the revbump to castget.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PR PATCH] [Updated] id3lib: patch for c99 bool
  2022-09-14  4:41 [PR PATCH] id3lib: patch for c99 bool mtboehlke
                   ` (4 preceding siblings ...)
  2022-09-14  4:51 ` mtboehlke
@ 2022-09-14  4:59 ` mtboehlke
  2022-09-14  5:00 ` mtboehlke
                   ` (12 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: mtboehlke @ 2022-09-14  4:59 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1682 bytes --]

There is an updated pull request by mtboehlke against master on the void-packages repository

https://github.com/mtboehlke/void-packages id3lib
https://github.com/void-linux/void-packages/pull/39275

id3lib: patch for c99 bool
id3/globals.h has a typedef for bool which is incompatible with c99 stdbool.
This is a known issue, but upstream is effectively unmaintained.
See [this thread](https://sourceforege.net/p/id3lib/mailman/message/30500558/) from upstream.

This only seems to be an issue for castget while building, and they have already switched to using taglib for the next release.
Castget [issue](https://github.com/mlj/castget/issues/47).

<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/39275.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-id3lib-39275.patch --]
[-- Type: text/x-diff, Size: 2536 bytes --]

From 648a0536247d8054d4a6632538ce0ebf4ff8d3ca Mon Sep 17 00:00:00 2001
From: Mat Boehlke <mtboehlke@gmail.com>
Date: Tue, 13 Sep 2022 21:37:55 -0500
Subject: [PATCH] id3lib: patch for c99 bool

id3/globals.h has a typedef for bool which is incompatible with c99 stdbool.
This is a known issue, but upstream is effectively unmaintained.
See https://sourceforege.net/p/id3lib/mailman/message/30500558/
---
 srcpkgs/id3lib/patches/c99-bool.patch | 23 +++++++++++++++++++++++
 srcpkgs/id3lib/patches/test-io.patch  | 22 ++++++++++++++++++++++
 2 files changed, 45 insertions(+)
 create mode 100644 srcpkgs/id3lib/patches/c99-bool.patch
 create mode 100644 srcpkgs/id3lib/patches/test-io.patch

diff --git a/srcpkgs/id3lib/patches/c99-bool.patch b/srcpkgs/id3lib/patches/c99-bool.patch
new file mode 100644
index 000000000000..bc8996419bab
--- /dev/null
+++ b/srcpkgs/id3lib/patches/c99-bool.patch
@@ -0,0 +1,23 @@
+Needed for C99 bool compatability when stdbool.h is included:
+https://sourceforge.net/p/id3lib/mailman/message/30500558/
+
+diff --git a/include/id3/globals.h b/include/id3/globals.h
+index 5d8fa20..733ab3f 100644
+--- a/include/id3/globals.h
++++ b/include/id3/globals.h
+@@ -82,13 +82,13 @@
+ 
+ #define ID3_C_VAR extern
+ 
+-#ifndef __cplusplus
++#if !defined(__cplusplus) && !defined(__bool_true_false_are_defined)
+ 
+ typedef int bool;
+ #  define false (0)
+ #  define true (!false)
+ 
+-#endif /* __cplusplus */
++#endif /* __cplusplus __bool_true_false_are_defined */
+ 
+ ID3_C_VAR const char * const ID3LIB_NAME;
+ ID3_C_VAR const char * const ID3LIB_RELEASE;
diff --git a/srcpkgs/id3lib/patches/test-io.patch b/srcpkgs/id3lib/patches/test-io.patch
new file mode 100644
index 000000000000..7b18b4a9e0fa
--- /dev/null
+++ b/srcpkgs/id3lib/patches/test-io.patch
@@ -0,0 +1,22 @@
+diff --git a/examples/test_io.cpp b/examples/test_io.cpp
+index bee1a27..80020eb 100644
+--- a/examples/test_io.cpp
++++ b/examples/test_io.cpp
+@@ -24,7 +24,7 @@ main(size_t argc, const char** argv)
+   ID3D_INIT_WARNING();
+   ID3D_INIT_NOTICE();
+ 
+-  ID3_IStreamReader isr(cin);
++  ID3_IStreamReader isr(std::cin);
+   BString orig = io::readAllBinary(isr);
+     
+   cout << "input size:    " << orig.size() << endl;
+@@ -116,7 +116,7 @@ main(size_t argc, const char** argv)
+   cout << "binary number:";
+   for (size_t i = 0; i < number.size(); ++i)
+   {
+-    cout << " 0x" << hex << (size_t) (0xFF & number[i]) << dec;
++    cout << " 0x" << std::hex << (size_t) (0xFF & number[i]) << std::dec;
+   }
+   cout << endl;
+ 

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: id3lib: patch for c99 bool
  2022-09-14  4:41 [PR PATCH] id3lib: patch for c99 bool mtboehlke
                   ` (5 preceding siblings ...)
  2022-09-14  4:59 ` [PR PATCH] [Updated] " mtboehlke
@ 2022-09-14  5:00 ` mtboehlke
  2022-09-14  5:01 ` mtboehlke
                   ` (11 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: mtboehlke @ 2022-09-14  5:00 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 323 bytes --]

New comment by mtboehlke on void-packages repository

https://github.com/void-linux/void-packages/pull/39275#issuecomment-1246230467

Comment:
@sgn Not sure what happened to your comment, but I removed the revbump to castget.

Edit: and I misread it as well, sorry about that.  Should this include a revbump for castget?

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: id3lib: patch for c99 bool
  2022-09-14  4:41 [PR PATCH] id3lib: patch for c99 bool mtboehlke
                   ` (6 preceding siblings ...)
  2022-09-14  5:00 ` mtboehlke
@ 2022-09-14  5:01 ` mtboehlke
  2022-09-15  1:57 ` [PR REVIEW] " sgn
                   ` (10 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: mtboehlke @ 2022-09-14  5:01 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 359 bytes --]

New comment by mtboehlke on void-packages repository

https://github.com/void-linux/void-packages/pull/39275#issuecomment-1246230467

Comment:
@sgn Not sure what happened to your comment, but I removed the revbump to castget.

Edit: and I misread it as well, sorry about that.  Should this include a revbump for castget, since all it does is fix the build?

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PR REVIEW] id3lib: patch for c99 bool
  2022-09-14  4:41 [PR PATCH] id3lib: patch for c99 bool mtboehlke
                   ` (7 preceding siblings ...)
  2022-09-14  5:01 ` mtboehlke
@ 2022-09-15  1:57 ` sgn
  2022-09-15  1:57 ` sgn
                   ` (9 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: sgn @ 2022-09-15  1:57 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 580 bytes --]

New review comment by sgn on void-packages repository

https://github.com/void-linux/void-packages/pull/39275#discussion_r971447243

Comment:
Hm, thinking a bit more, this look wrong.
`stdbool.h` and C++'s `bool` size could be 1 char.
But this header specifically `typedef int bool` which would be either 4 or 8,
if they don't use bool as a struct member, there're nothing wrong, however, `struct Mp3_Headerinfo` has 3 `bool` for `privatebit`, `copyrighted` and `original` squeeze together. This already break ABI between C and C++.
And with this change break ABI for C, too.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PR REVIEW] id3lib: patch for c99 bool
  2022-09-14  4:41 [PR PATCH] id3lib: patch for c99 bool mtboehlke
                   ` (8 preceding siblings ...)
  2022-09-15  1:57 ` [PR REVIEW] " sgn
@ 2022-09-15  1:57 ` sgn
  2022-09-15  2:13 ` [PR PATCH] [Updated] " sgn
                   ` (8 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: sgn @ 2022-09-15  1:57 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 167 bytes --]

New review comment by sgn on void-packages repository

https://github.com/void-linux/void-packages/pull/39275#discussion_r971447307

Comment:
And this need a revbump.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PR PATCH] [Updated] id3lib: patch for c99 bool
  2022-09-14  4:41 [PR PATCH] id3lib: patch for c99 bool mtboehlke
                   ` (9 preceding siblings ...)
  2022-09-15  1:57 ` sgn
@ 2022-09-15  2:13 ` sgn
  2022-09-15  2:15 ` sgn
                   ` (7 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: sgn @ 2022-09-15  2:13 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1676 bytes --]

There is an updated pull request by sgn against master on the void-packages repository

https://github.com/mtboehlke/void-packages id3lib
https://github.com/void-linux/void-packages/pull/39275

id3lib: patch for c99 bool
id3/globals.h has a typedef for bool which is incompatible with c99 stdbool.
This is a known issue, but upstream is effectively unmaintained.
See [this thread](https://sourceforege.net/p/id3lib/mailman/message/30500558/) from upstream.

This only seems to be an issue for castget while building, and they have already switched to using taglib for the next release.
Castget [issue](https://github.com/mlj/castget/issues/47).

<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/39275.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-id3lib-39275.patch --]
[-- Type: text/x-diff, Size: 3493 bytes --]

From 05560cb8acb003cb3db11a4ca37781087d95285e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Thu, 15 Sep 2022 09:11:49 +0700
Subject: [PATCH] id3lib: patch for c99 bool

id3/globals.h has a typedef for bool which is incompatible with c99 stdbool.
This is a known issue, but upstream is effectively unmaintained.
See https://sourceforege.net/p/id3lib/mailman/message/30500558/

Close: #39275
---
 srcpkgs/id3lib/patches/c99-bool.patch | 36 +++++++++++++++++++++++++++
 srcpkgs/id3lib/patches/test-io.patch  | 22 ++++++++++++++++
 srcpkgs/id3lib/template               |  2 +-
 3 files changed, 59 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/id3lib/patches/c99-bool.patch
 create mode 100644 srcpkgs/id3lib/patches/test-io.patch

diff --git a/srcpkgs/id3lib/patches/c99-bool.patch b/srcpkgs/id3lib/patches/c99-bool.patch
new file mode 100644
index 000000000000..59b68c7381c9
--- /dev/null
+++ b/srcpkgs/id3lib/patches/c99-bool.patch
@@ -0,0 +1,36 @@
+First hunk fix build for C99 since C99 typedef bool for _Bool
+
+Second hunk re-correct ABI for C99, since sizeof(_Bool) is 1,
+So privatebit, copyrighted, and original will be squeezed into single word
+
+Second hunk also fix ABI for C++ since in C++, sizeof(bool) also 1
+--- a/include/id3/globals.h
++++ b/include/id3/globals.h
+@@ -82,13 +82,7 @@
+ 
+ #define ID3_C_VAR extern
+ 
+-#ifndef __cplusplus
+-
+-typedef int bool;
+-#  define false (0)
+-#  define true (!false)
+-
+-#endif /* __cplusplus */
++#include <stdbool.h>
+ 
+ ID3_C_VAR const char * const ID3LIB_NAME;
+ ID3_C_VAR const char * const ID3LIB_RELEASE;
+@@ -532,9 +526,9 @@ ID3_STRUCT(Mp3_Headerinfo)
+   uint32 framesize;
+   uint32 frames;                // nr of frames
+   uint32 time;                  // nr of seconds in song
+-  bool privatebit;
+-  bool copyrighted;
+-  bool original;
++  int privatebit;               // bool upstream, change to int for stable ABI
++  int copyrighted;              // bool upstream, change to int for stable ABI
++  int original;                 // bool upstream, change to int for stable ABI
+ };
+ 
+ #define ID3_NR_OF_V1_GENRES 148
diff --git a/srcpkgs/id3lib/patches/test-io.patch b/srcpkgs/id3lib/patches/test-io.patch
new file mode 100644
index 000000000000..7b18b4a9e0fa
--- /dev/null
+++ b/srcpkgs/id3lib/patches/test-io.patch
@@ -0,0 +1,22 @@
+diff --git a/examples/test_io.cpp b/examples/test_io.cpp
+index bee1a27..80020eb 100644
+--- a/examples/test_io.cpp
++++ b/examples/test_io.cpp
+@@ -24,7 +24,7 @@ main(size_t argc, const char** argv)
+   ID3D_INIT_WARNING();
+   ID3D_INIT_NOTICE();
+ 
+-  ID3_IStreamReader isr(cin);
++  ID3_IStreamReader isr(std::cin);
+   BString orig = io::readAllBinary(isr);
+     
+   cout << "input size:    " << orig.size() << endl;
+@@ -116,7 +116,7 @@ main(size_t argc, const char** argv)
+   cout << "binary number:";
+   for (size_t i = 0; i < number.size(); ++i)
+   {
+-    cout << " 0x" << hex << (size_t) (0xFF & number[i]) << dec;
++    cout << " 0x" << std::hex << (size_t) (0xFF & number[i]) << std::dec;
+   }
+   cout << endl;
+ 
diff --git a/srcpkgs/id3lib/template b/srcpkgs/id3lib/template
index 44cb7f55f1dd..ad9a60665e7e 100644
--- a/srcpkgs/id3lib/template
+++ b/srcpkgs/id3lib/template
@@ -1,7 +1,7 @@
 # Template file for 'id3lib'
 pkgname=id3lib
 version=3.8.3
-revision=6
+revision=7
 build_style=gnu-configure
 hostmakedepends="libtool automake"
 makedepends="zlib-devel"

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PR PATCH] [Updated] id3lib: patch for c99 bool
  2022-09-14  4:41 [PR PATCH] id3lib: patch for c99 bool mtboehlke
                   ` (10 preceding siblings ...)
  2022-09-15  2:13 ` [PR PATCH] [Updated] " sgn
@ 2022-09-15  2:15 ` sgn
  2022-09-15  3:40 ` [PR REVIEW] " mtboehlke
                   ` (6 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: sgn @ 2022-09-15  2:15 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1676 bytes --]

There is an updated pull request by sgn against master on the void-packages repository

https://github.com/mtboehlke/void-packages id3lib
https://github.com/void-linux/void-packages/pull/39275

id3lib: patch for c99 bool
id3/globals.h has a typedef for bool which is incompatible with c99 stdbool.
This is a known issue, but upstream is effectively unmaintained.
See [this thread](https://sourceforege.net/p/id3lib/mailman/message/30500558/) from upstream.

This only seems to be an issue for castget while building, and they have already switched to using taglib for the next release.
Castget [issue](https://github.com/mlj/castget/issues/47).

<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/39275.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-id3lib-39275.patch --]
[-- Type: text/x-diff, Size: 4241 bytes --]

From 05560cb8acb003cb3db11a4ca37781087d95285e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Thu, 15 Sep 2022 09:11:49 +0700
Subject: [PATCH 1/2] id3lib: patch for c99 bool

id3/globals.h has a typedef for bool which is incompatible with c99 stdbool.
This is a known issue, but upstream is effectively unmaintained.
See https://sourceforege.net/p/id3lib/mailman/message/30500558/

Close: #39275
---
 srcpkgs/id3lib/patches/c99-bool.patch | 36 +++++++++++++++++++++++++++
 srcpkgs/id3lib/patches/test-io.patch  | 22 ++++++++++++++++
 srcpkgs/id3lib/template               |  2 +-
 3 files changed, 59 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/id3lib/patches/c99-bool.patch
 create mode 100644 srcpkgs/id3lib/patches/test-io.patch

diff --git a/srcpkgs/id3lib/patches/c99-bool.patch b/srcpkgs/id3lib/patches/c99-bool.patch
new file mode 100644
index 000000000000..59b68c7381c9
--- /dev/null
+++ b/srcpkgs/id3lib/patches/c99-bool.patch
@@ -0,0 +1,36 @@
+First hunk fix build for C99 since C99 typedef bool for _Bool
+
+Second hunk re-correct ABI for C99, since sizeof(_Bool) is 1,
+So privatebit, copyrighted, and original will be squeezed into single word
+
+Second hunk also fix ABI for C++ since in C++, sizeof(bool) also 1
+--- a/include/id3/globals.h
++++ b/include/id3/globals.h
+@@ -82,13 +82,7 @@
+ 
+ #define ID3_C_VAR extern
+ 
+-#ifndef __cplusplus
+-
+-typedef int bool;
+-#  define false (0)
+-#  define true (!false)
+-
+-#endif /* __cplusplus */
++#include <stdbool.h>
+ 
+ ID3_C_VAR const char * const ID3LIB_NAME;
+ ID3_C_VAR const char * const ID3LIB_RELEASE;
+@@ -532,9 +526,9 @@ ID3_STRUCT(Mp3_Headerinfo)
+   uint32 framesize;
+   uint32 frames;                // nr of frames
+   uint32 time;                  // nr of seconds in song
+-  bool privatebit;
+-  bool copyrighted;
+-  bool original;
++  int privatebit;               // bool upstream, change to int for stable ABI
++  int copyrighted;              // bool upstream, change to int for stable ABI
++  int original;                 // bool upstream, change to int for stable ABI
+ };
+ 
+ #define ID3_NR_OF_V1_GENRES 148
diff --git a/srcpkgs/id3lib/patches/test-io.patch b/srcpkgs/id3lib/patches/test-io.patch
new file mode 100644
index 000000000000..7b18b4a9e0fa
--- /dev/null
+++ b/srcpkgs/id3lib/patches/test-io.patch
@@ -0,0 +1,22 @@
+diff --git a/examples/test_io.cpp b/examples/test_io.cpp
+index bee1a27..80020eb 100644
+--- a/examples/test_io.cpp
++++ b/examples/test_io.cpp
+@@ -24,7 +24,7 @@ main(size_t argc, const char** argv)
+   ID3D_INIT_WARNING();
+   ID3D_INIT_NOTICE();
+ 
+-  ID3_IStreamReader isr(cin);
++  ID3_IStreamReader isr(std::cin);
+   BString orig = io::readAllBinary(isr);
+     
+   cout << "input size:    " << orig.size() << endl;
+@@ -116,7 +116,7 @@ main(size_t argc, const char** argv)
+   cout << "binary number:";
+   for (size_t i = 0; i < number.size(); ++i)
+   {
+-    cout << " 0x" << hex << (size_t) (0xFF & number[i]) << dec;
++    cout << " 0x" << std::hex << (size_t) (0xFF & number[i]) << std::dec;
+   }
+   cout << endl;
+ 
diff --git a/srcpkgs/id3lib/template b/srcpkgs/id3lib/template
index 44cb7f55f1dd..ad9a60665e7e 100644
--- a/srcpkgs/id3lib/template
+++ b/srcpkgs/id3lib/template
@@ -1,7 +1,7 @@
 # Template file for 'id3lib'
 pkgname=id3lib
 version=3.8.3
-revision=6
+revision=7
 build_style=gnu-configure
 hostmakedepends="libtool automake"
 makedepends="zlib-devel"

From c072887105c866a06bce0d83c4b161ce6173b847 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Thu, 15 Sep 2022 09:13:17 +0700
Subject: [PATCH 2/2] kid3: rebuild for id3lib C++ ABI

---
 srcpkgs/kid3/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/kid3/template b/srcpkgs/kid3/template
index 81633262dc03..456206d90e16 100644
--- a/srcpkgs/kid3/template
+++ b/srcpkgs/kid3/template
@@ -1,7 +1,7 @@
 # Template file for 'kid3'
 pkgname=kid3
 version=3.9.1
-revision=1
+revision=2
 build_style=cmake
 configure_args="-DWITH_APPS='CLI;$(vopt_if KDE KDE Qt)'
  -DWITH_DOCBOOKDIR=/usr/share/xsl/docbook -DWITH_FLAC=$(vopt_if flac ON OFF)

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PR REVIEW] id3lib: patch for c99 bool
  2022-09-14  4:41 [PR PATCH] id3lib: patch for c99 bool mtboehlke
                   ` (11 preceding siblings ...)
  2022-09-15  2:15 ` sgn
@ 2022-09-15  3:40 ` mtboehlke
  2022-09-15  3:48 ` mtboehlke
                   ` (5 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: mtboehlke @ 2022-09-15  3:40 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 394 bytes --]

New review comment by mtboehlke on void-packages repository

https://github.com/void-linux/void-packages/pull/39275#discussion_r971492809

Comment:
 I see what you mean. Is it safe to assume gcc will define C++ bool and bool from stdbool.h in a compatible way, given that we expect C++ to be able to call C code?  In that case, we could simply remove the whole block and `#include <stdbool.h>`

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PR REVIEW] id3lib: patch for c99 bool
  2022-09-14  4:41 [PR PATCH] id3lib: patch for c99 bool mtboehlke
                   ` (12 preceding siblings ...)
  2022-09-15  3:40 ` [PR REVIEW] " mtboehlke
@ 2022-09-15  3:48 ` mtboehlke
  2022-09-15  4:39 ` mtboehlke
                   ` (4 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: mtboehlke @ 2022-09-15  3:48 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 212 bytes --]

New review comment by mtboehlke on void-packages repository

https://github.com/void-linux/void-packages/pull/39275#discussion_r971495753

Comment:
Posted before I saw your changes.  That's exactly what you did.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: id3lib: patch for c99 bool
  2022-09-14  4:41 [PR PATCH] id3lib: patch for c99 bool mtboehlke
                   ` (13 preceding siblings ...)
  2022-09-15  3:48 ` mtboehlke
@ 2022-09-15  4:39 ` mtboehlke
  2022-09-15 14:49 ` [PR PATCH] [Updated] " sgn
                   ` (3 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: mtboehlke @ 2022-09-15  4:39 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 179 bytes --]

New comment by mtboehlke on void-packages repository

https://github.com/void-linux/void-packages/pull/39275#issuecomment-1247573664

Comment:
@sgn thanks for jumping in on this!

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PR PATCH] [Updated] id3lib: patch for c99 bool
  2022-09-14  4:41 [PR PATCH] id3lib: patch for c99 bool mtboehlke
                   ` (14 preceding siblings ...)
  2022-09-15  4:39 ` mtboehlke
@ 2022-09-15 14:49 ` sgn
  2022-09-15 14:51 ` sgn
                   ` (2 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: sgn @ 2022-09-15 14:49 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1676 bytes --]

There is an updated pull request by sgn against master on the void-packages repository

https://github.com/mtboehlke/void-packages id3lib
https://github.com/void-linux/void-packages/pull/39275

id3lib: patch for c99 bool
id3/globals.h has a typedef for bool which is incompatible with c99 stdbool.
This is a known issue, but upstream is effectively unmaintained.
See [this thread](https://sourceforege.net/p/id3lib/mailman/message/30500558/) from upstream.

This only seems to be an issue for castget while building, and they have already switched to using taglib for the next release.
Castget [issue](https://github.com/mlj/castget/issues/47).

<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/39275.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-id3lib-39275.patch --]
[-- Type: text/x-diff, Size: 10094 bytes --]

From 0e8ba0fe5133bda2cbffc226e93710e38cf5e98b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Thu, 15 Sep 2022 09:11:49 +0700
Subject: [PATCH 1/2] id3lib: patch for c99 bool

id3/globals.h has a typedef for bool which is incompatible with c99
stdbool which is available transitively via stdlib.h

Also C99 bool and C++ bool is incompatible with original id3lib's bool
---
 srcpkgs/id3lib/patches/fix-abi.patch  | 169 ++++++++++++++++++++++++++
 srcpkgs/id3lib/patches/test-fix.patch |  49 ++++++++
 srcpkgs/id3lib/template               |   2 +-
 3 files changed, 219 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/id3lib/patches/fix-abi.patch
 create mode 100644 srcpkgs/id3lib/patches/test-fix.patch

diff --git a/srcpkgs/id3lib/patches/fix-abi.patch b/srcpkgs/id3lib/patches/fix-abi.patch
new file mode 100644
index 000000000000..840f5ede485d
--- /dev/null
+++ b/srcpkgs/id3lib/patches/fix-abi.patch
@@ -0,0 +1,169 @@
+--- a/include/id3.h
++++ b/include/id3.h
+@@ -47,12 +47,12 @@ extern "C"
+   ID3_C_EXPORT ID3Tag*              CCONV ID3Tag_New                  (void);
+   ID3_C_EXPORT void                 CCONV ID3Tag_Delete               (ID3Tag *tag);
+   ID3_C_EXPORT void                 CCONV ID3Tag_Clear                (ID3Tag *tag);
+-  ID3_C_EXPORT bool                 CCONV ID3Tag_HasChanged           (const ID3Tag *tag);
+-  ID3_C_EXPORT void                 CCONV ID3Tag_SetUnsync            (ID3Tag *tag, bool unsync);
+-  ID3_C_EXPORT void                 CCONV ID3Tag_SetExtendedHeader    (ID3Tag *tag, bool ext);
+-  ID3_C_EXPORT void                 CCONV ID3Tag_SetPadding           (ID3Tag *tag, bool pad);
++  ID3_C_EXPORT int                 CCONV ID3Tag_HasChanged           (const ID3Tag *tag);
++  ID3_C_EXPORT void                 CCONV ID3Tag_SetUnsync            (ID3Tag *tag, int unsync);
++  ID3_C_EXPORT void                 CCONV ID3Tag_SetExtendedHeader    (ID3Tag *tag, int ext);
++  ID3_C_EXPORT void                 CCONV ID3Tag_SetPadding           (ID3Tag *tag, int pad);
+   ID3_C_EXPORT void                 CCONV ID3Tag_AddFrame             (ID3Tag *tag, const ID3Frame *frame);
+-  ID3_C_EXPORT bool                 CCONV ID3Tag_AttachFrame          (ID3Tag *tag, ID3Frame *frame);
++  ID3_C_EXPORT int                 CCONV ID3Tag_AttachFrame          (ID3Tag *tag, ID3Frame *frame);
+   ID3_C_EXPORT void                 CCONV ID3Tag_AddFrames            (ID3Tag *tag, const ID3Frame *frames, size_t num);
+   ID3_C_EXPORT ID3Frame*            CCONV ID3Tag_RemoveFrame          (ID3Tag *tag, const ID3Frame *frame);
+   ID3_C_EXPORT ID3_Err              CCONV ID3Tag_Parse                (ID3Tag *tag, const uchar header[ID3_TAGHEADERSIZE], const uchar *buffer);
+@@ -66,7 +66,7 @@ extern "C"
+   ID3_C_EXPORT ID3Frame*            CCONV ID3Tag_FindFrameWithASCII   (const ID3Tag *tag, ID3_FrameID id, ID3_FieldID fld, const char *data);
+   ID3_C_EXPORT ID3Frame*            CCONV ID3Tag_FindFrameWithUNICODE (const ID3Tag *tag, ID3_FrameID id, ID3_FieldID fld, const unicode_t *data);
+   ID3_C_EXPORT size_t               CCONV ID3Tag_NumFrames            (const ID3Tag *tag);
+-  ID3_C_EXPORT bool                 CCONV ID3Tag_HasTagType           (const ID3Tag *tag, ID3_TagType);
++  ID3_C_EXPORT int                 CCONV ID3Tag_HasTagType           (const ID3Tag *tag, ID3_TagType);
+   ID3_C_EXPORT ID3TagIterator*      CCONV ID3Tag_CreateIterator       (ID3Tag *tag);
+   ID3_C_EXPORT ID3TagConstIterator* CCONV ID3Tag_CreateConstIterator  (const ID3Tag *tag);
+ 
+@@ -83,8 +83,8 @@ extern "C"
+   ID3_C_EXPORT void                 CCONV ID3Frame_SetID              (ID3Frame *frame, ID3_FrameID id);
+   ID3_C_EXPORT ID3_FrameID          CCONV ID3Frame_GetID              (const ID3Frame *frame);
+   ID3_C_EXPORT ID3Field*            CCONV ID3Frame_GetField           (const ID3Frame *frame, ID3_FieldID name);
+-  ID3_C_EXPORT void                 CCONV ID3Frame_SetCompression     (ID3Frame *frame, bool comp);
+-  ID3_C_EXPORT bool                 CCONV ID3Frame_GetCompression     (const ID3Frame *frame);
++  ID3_C_EXPORT void                 CCONV ID3Frame_SetCompression     (ID3Frame *frame, int comp);
++  ID3_C_EXPORT int                 CCONV ID3Frame_GetCompression     (const ID3Frame *frame);
+ 
+   /* field wrappers */
+   ID3_C_EXPORT void                 CCONV ID3Field_Clear              (ID3Field *field);
+@@ -116,7 +116,7 @@ extern "C"
+   ID3_C_EXPORT flags_t              CCONV ID3FrameInfo_FieldFlags     (ID3_FrameID frameid, int fieldnum);
+ 
+   /* Deprecated */
+-  ID3_C_EXPORT void                 CCONV ID3Tag_SetCompression       (ID3Tag *tag, bool comp);
++  ID3_C_EXPORT void                 CCONV ID3Tag_SetCompression       (ID3Tag *tag, int comp);
+ 
+ #ifdef __cplusplus
+ }
+--- a/include/id3/globals.h
++++ b/include/id3/globals.h
+@@ -82,14 +82,6 @@
+ 
+ #define ID3_C_VAR extern
+ 
+-#ifndef __cplusplus
+-
+-typedef int bool;
+-#  define false (0)
+-#  define true (!false)
+-
+-#endif /* __cplusplus */
+-
+ ID3_C_VAR const char * const ID3LIB_NAME;
+ ID3_C_VAR const char * const ID3LIB_RELEASE;
+ ID3_C_VAR const char * const ID3LIB_FULL_NAME;
+@@ -532,9 +524,9 @@ ID3_STRUCT(Mp3_Headerinfo)
+   uint32 framesize;
+   uint32 frames;                // nr of frames
+   uint32 time;                  // nr of seconds in song
+-  bool privatebit;
+-  bool copyrighted;
+-  bool original;
++  int privatebit;
++  int copyrighted;
++  int original;
+ };
+ 
+ #define ID3_NR_OF_V1_GENRES 148
+--- a/src/c_wrapper.cpp
++++ b/src/c_wrapper.cpp
+@@ -72,10 +72,10 @@ extern "C"
+   }
+ 
+ 
+-  ID3_C_EXPORT bool CCONV
++  ID3_C_EXPORT int CCONV
+   ID3Tag_HasChanged(const ID3Tag *tag)
+   {
+-    bool changed = false;
++    int changed = 0;
+ 
+     if (tag)
+     {
+@@ -87,7 +87,7 @@ extern "C"
+ 
+ 
+   ID3_C_EXPORT void CCONV
+-  ID3Tag_SetUnsync(ID3Tag *tag, bool unsync)
++  ID3Tag_SetUnsync(ID3Tag *tag, int unsync)
+   {
+     if (tag)
+     {
+@@ -97,7 +97,7 @@ extern "C"
+ 
+ 
+   ID3_C_EXPORT void CCONV
+-  ID3Tag_SetExtendedHeader(ID3Tag *tag, bool ext)
++  ID3Tag_SetExtendedHeader(ID3Tag *tag, int ext)
+   {
+     if (tag)
+     {
+@@ -106,7 +106,7 @@ extern "C"
+   }
+ 
+   ID3_C_EXPORT void CCONV
+-  ID3Tag_SetPadding(ID3Tag *tag, bool pad)
++  ID3Tag_SetPadding(ID3Tag *tag, int pad)
+   {
+     if (tag)
+     {
+@@ -125,10 +125,10 @@ extern "C"
+   }
+ 
+ 
+-  ID3_C_EXPORT bool CCONV
++  ID3_C_EXPORT int CCONV
+   ID3Tag_AttachFrame(ID3Tag *tag, ID3Frame *frame)
+   {
+-    bool b = false;
++    int b = 0;
+     if (tag)
+     {
+       ID3_CATCH(b = reinterpret_cast<ID3_Tag *>(tag)->AttachFrame(reinterpret_cast<ID3_Frame *>(frame)));
+@@ -303,10 +303,10 @@ extern "C"
+   }
+ 
+ 
+-  ID3_C_EXPORT bool CCONV
++  ID3_C_EXPORT int CCONV
+   ID3Tag_HasTagType(const ID3Tag *tag, ID3_TagType tt)
+   {
+-    bool has_tt = false;
++    int has_tt = 0;
+ 
+     if (tag)
+     {
+@@ -459,7 +459,7 @@ extern "C"
+ 
+ 
+   ID3_C_EXPORT void CCONV
+-  ID3Frame_SetCompression(ID3Frame *frame, bool comp)
++  ID3Frame_SetCompression(ID3Frame *frame, int comp)
+   {
+     if (frame)
+     {
+@@ -468,10 +468,10 @@ extern "C"
+   }
+ 
+ 
+-  ID3_C_EXPORT bool CCONV
++  ID3_C_EXPORT int CCONV
+   ID3Frame_GetCompression(const ID3Frame *frame)
+   {
+-    bool compressed = false;
++    int compressed = 0;
+     if (frame)
+     {
+       ID3_CATCH(compressed = reinterpret_cast<const ID3_Frame *>(frame)->GetCompression());
diff --git a/srcpkgs/id3lib/patches/test-fix.patch b/srcpkgs/id3lib/patches/test-fix.patch
new file mode 100644
index 000000000000..86ee27b15d21
--- /dev/null
+++ b/srcpkgs/id3lib/patches/test-fix.patch
@@ -0,0 +1,49 @@
+--- a/examples/findeng.cpp
++++ b/examples/findeng.cpp
+@@ -9,7 +9,7 @@
+ using std::cout;
+ using std::endl;
+ 
+-int main(unsigned argc, char* argv[])
++int main(int argc, char* argv[])
+ {
+   ID3D_INIT_DOUT();
+   ID3D_INIT_WARNING();
+--- a/examples/findstr.cpp
++++ b/examples/findstr.cpp
+@@ -9,7 +9,7 @@
+ using std::cout;
+ using std::endl;
+ 
+-int main(unsigned argc, char* argv[])
++int main(int argc, char* argv[])
+ {
+   ID3D_INIT_DOUT();
+   ID3D_INIT_WARNING();
+--- a/examples/test_io.cpp
++++ b/examples/test_io.cpp
+@@ -18,13 +18,13 @@ using std::cerr;
+ using namespace dami;
+ 
+ int
+-main(size_t argc, const char** argv)
++main(int argc, const char** argv)
+ {
+   ID3D_INIT_DOUT();
+   ID3D_INIT_WARNING();
+   ID3D_INIT_NOTICE();
+ 
+-  ID3_IStreamReader isr(cin);
++  ID3_IStreamReader isr(std::cin);
+   BString orig = io::readAllBinary(isr);
+     
+   cout << "input size:    " << orig.size() << endl;
+@@ -116,7 +116,7 @@ main(size_t argc, const char** argv)
+   cout << "binary number:";
+   for (size_t i = 0; i < number.size(); ++i)
+   {
+-    cout << " 0x" << hex << (size_t) (0xFF & number[i]) << dec;
++    cout << " 0x" << std::hex << (size_t) (0xFF & number[i]) << std::dec;
+   }
+   cout << endl;
+ 
diff --git a/srcpkgs/id3lib/template b/srcpkgs/id3lib/template
index 44cb7f55f1dd..ad9a60665e7e 100644
--- a/srcpkgs/id3lib/template
+++ b/srcpkgs/id3lib/template
@@ -1,7 +1,7 @@
 # Template file for 'id3lib'
 pkgname=id3lib
 version=3.8.3
-revision=6
+revision=7
 build_style=gnu-configure
 hostmakedepends="libtool automake"
 makedepends="zlib-devel"

From 483542520505aa2ad491edcd7cd182581cd481a2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Thu, 15 Sep 2022 09:13:17 +0700
Subject: [PATCH 2/2] kid3: rebuild for id3lib C++ ABI

---
 srcpkgs/kid3/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/kid3/template b/srcpkgs/kid3/template
index 81633262dc03..456206d90e16 100644
--- a/srcpkgs/kid3/template
+++ b/srcpkgs/kid3/template
@@ -1,7 +1,7 @@
 # Template file for 'kid3'
 pkgname=kid3
 version=3.9.1
-revision=1
+revision=2
 build_style=cmake
 configure_args="-DWITH_APPS='CLI;$(vopt_if KDE KDE Qt)'
  -DWITH_DOCBOOKDIR=/usr/share/xsl/docbook -DWITH_FLAC=$(vopt_if flac ON OFF)

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: id3lib: patch for c99 bool
  2022-09-14  4:41 [PR PATCH] id3lib: patch for c99 bool mtboehlke
                   ` (15 preceding siblings ...)
  2022-09-15 14:49 ` [PR PATCH] [Updated] " sgn
@ 2022-09-15 14:51 ` sgn
  2022-09-15 14:59 ` [PR PATCH] [Updated] " sgn
  2022-09-15 15:59 ` [PR PATCH] [Merged]: " sgn
  18 siblings, 0 replies; 20+ messages in thread
From: sgn @ 2022-09-15 14:51 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 205 bytes --]

New comment by sgn on void-packages repository

https://github.com/void-linux/void-packages/pull/39275#issuecomment-1248212601

Comment:
As discussed on IRC, we need to patch all `bool` in C API to `int`.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PR PATCH] [Updated] id3lib: patch for c99 bool
  2022-09-14  4:41 [PR PATCH] id3lib: patch for c99 bool mtboehlke
                   ` (16 preceding siblings ...)
  2022-09-15 14:51 ` sgn
@ 2022-09-15 14:59 ` sgn
  2022-09-15 15:59 ` [PR PATCH] [Merged]: " sgn
  18 siblings, 0 replies; 20+ messages in thread
From: sgn @ 2022-09-15 14:59 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1676 bytes --]

There is an updated pull request by sgn against master on the void-packages repository

https://github.com/mtboehlke/void-packages id3lib
https://github.com/void-linux/void-packages/pull/39275

id3lib: patch for c99 bool
id3/globals.h has a typedef for bool which is incompatible with c99 stdbool.
This is a known issue, but upstream is effectively unmaintained.
See [this thread](https://sourceforege.net/p/id3lib/mailman/message/30500558/) from upstream.

This only seems to be an issue for castget while building, and they have already switched to using taglib for the next release.
Castget [issue](https://github.com/mlj/castget/issues/47).

<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/39275.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-id3lib-39275.patch --]
[-- Type: text/x-diff, Size: 10319 bytes --]

From 937293b3d29aedc0a487c49a28eb65af9507d1d1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Thu, 15 Sep 2022 09:11:49 +0700
Subject: [PATCH 1/2] id3lib: patch for c99 bool

id3/globals.h has a typedef for bool which is incompatible with c99
stdbool which is available transitively via stdlib.h

Also C99 bool and C++ bool is incompatible with original id3lib's bool
---
 srcpkgs/id3lib/patches/fix-abi.patch  | 172 ++++++++++++++++++++++++++
 srcpkgs/id3lib/patches/test-fix.patch |  49 ++++++++
 srcpkgs/id3lib/template               |   2 +-
 3 files changed, 222 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/id3lib/patches/fix-abi.patch
 create mode 100644 srcpkgs/id3lib/patches/test-fix.patch

diff --git a/srcpkgs/id3lib/patches/fix-abi.patch b/srcpkgs/id3lib/patches/fix-abi.patch
new file mode 100644
index 000000000000..c38ea24de8cb
--- /dev/null
+++ b/srcpkgs/id3lib/patches/fix-abi.patch
@@ -0,0 +1,172 @@
+--- a/include/id3.h
++++ b/include/id3.h
+@@ -47,12 +47,12 @@ extern "C"
+   ID3_C_EXPORT ID3Tag*              CCONV ID3Tag_New                  (void);
+   ID3_C_EXPORT void                 CCONV ID3Tag_Delete               (ID3Tag *tag);
+   ID3_C_EXPORT void                 CCONV ID3Tag_Clear                (ID3Tag *tag);
+-  ID3_C_EXPORT bool                 CCONV ID3Tag_HasChanged           (const ID3Tag *tag);
+-  ID3_C_EXPORT void                 CCONV ID3Tag_SetUnsync            (ID3Tag *tag, bool unsync);
+-  ID3_C_EXPORT void                 CCONV ID3Tag_SetExtendedHeader    (ID3Tag *tag, bool ext);
+-  ID3_C_EXPORT void                 CCONV ID3Tag_SetPadding           (ID3Tag *tag, bool pad);
++  ID3_C_EXPORT ID3_Bool                 CCONV ID3Tag_HasChanged           (const ID3Tag *tag);
++  ID3_C_EXPORT void                 CCONV ID3Tag_SetUnsync            (ID3Tag *tag, ID3_Bool unsync);
++  ID3_C_EXPORT void                 CCONV ID3Tag_SetExtendedHeader    (ID3Tag *tag, ID3_Bool ext);
++  ID3_C_EXPORT void                 CCONV ID3Tag_SetPadding           (ID3Tag *tag, ID3_Bool pad);
+   ID3_C_EXPORT void                 CCONV ID3Tag_AddFrame             (ID3Tag *tag, const ID3Frame *frame);
+-  ID3_C_EXPORT bool                 CCONV ID3Tag_AttachFrame          (ID3Tag *tag, ID3Frame *frame);
++  ID3_C_EXPORT ID3_Bool                 CCONV ID3Tag_AttachFrame          (ID3Tag *tag, ID3Frame *frame);
+   ID3_C_EXPORT void                 CCONV ID3Tag_AddFrames            (ID3Tag *tag, const ID3Frame *frames, size_t num);
+   ID3_C_EXPORT ID3Frame*            CCONV ID3Tag_RemoveFrame          (ID3Tag *tag, const ID3Frame *frame);
+   ID3_C_EXPORT ID3_Err              CCONV ID3Tag_Parse                (ID3Tag *tag, const uchar header[ID3_TAGHEADERSIZE], const uchar *buffer);
+@@ -66,7 +66,7 @@ extern "C"
+   ID3_C_EXPORT ID3Frame*            CCONV ID3Tag_FindFrameWithASCII   (const ID3Tag *tag, ID3_FrameID id, ID3_FieldID fld, const char *data);
+   ID3_C_EXPORT ID3Frame*            CCONV ID3Tag_FindFrameWithUNICODE (const ID3Tag *tag, ID3_FrameID id, ID3_FieldID fld, const unicode_t *data);
+   ID3_C_EXPORT size_t               CCONV ID3Tag_NumFrames            (const ID3Tag *tag);
+-  ID3_C_EXPORT bool                 CCONV ID3Tag_HasTagType           (const ID3Tag *tag, ID3_TagType);
++  ID3_C_EXPORT ID3_Bool                 CCONV ID3Tag_HasTagType           (const ID3Tag *tag, ID3_TagType);
+   ID3_C_EXPORT ID3TagIterator*      CCONV ID3Tag_CreateIterator       (ID3Tag *tag);
+   ID3_C_EXPORT ID3TagConstIterator* CCONV ID3Tag_CreateConstIterator  (const ID3Tag *tag);
+ 
+@@ -83,8 +83,8 @@ extern "C"
+   ID3_C_EXPORT void                 CCONV ID3Frame_SetID              (ID3Frame *frame, ID3_FrameID id);
+   ID3_C_EXPORT ID3_FrameID          CCONV ID3Frame_GetID              (const ID3Frame *frame);
+   ID3_C_EXPORT ID3Field*            CCONV ID3Frame_GetField           (const ID3Frame *frame, ID3_FieldID name);
+-  ID3_C_EXPORT void                 CCONV ID3Frame_SetCompression     (ID3Frame *frame, bool comp);
+-  ID3_C_EXPORT bool                 CCONV ID3Frame_GetCompression     (const ID3Frame *frame);
++  ID3_C_EXPORT void                 CCONV ID3Frame_SetCompression     (ID3Frame *frame, ID3_Bool comp);
++  ID3_C_EXPORT ID3_Bool                 CCONV ID3Frame_GetCompression     (const ID3Frame *frame);
+ 
+   /* field wrappers */
+   ID3_C_EXPORT void                 CCONV ID3Field_Clear              (ID3Field *field);
+@@ -116,7 +116,7 @@ extern "C"
+   ID3_C_EXPORT flags_t              CCONV ID3FrameInfo_FieldFlags     (ID3_FrameID frameid, int fieldnum);
+ 
+   /* Deprecated */
+-  ID3_C_EXPORT void                 CCONV ID3Tag_SetCompression       (ID3Tag *tag, bool comp);
++  ID3_C_EXPORT void                 CCONV ID3Tag_SetCompression       (ID3Tag *tag, ID3_Bool comp);
+ 
+ #ifdef __cplusplus
+ }
+--- a/include/id3/globals.h
++++ b/include/id3/globals.h
+@@ -82,14 +82,10 @@
+ 
+ #define ID3_C_VAR extern
+ 
+-#ifndef __cplusplus
+-
+-typedef int bool;
+-#  define false (0)
+-#  define true (!false)
+-
+-#endif /* __cplusplus */
++typedef int ID3_Bool;
++#  define ID3_False 0
++#  define ID3_True  1
+ 
+ ID3_C_VAR const char * const ID3LIB_NAME;
+ ID3_C_VAR const char * const ID3LIB_RELEASE;
+ ID3_C_VAR const char * const ID3LIB_FULL_NAME;
+@@ -532,9 +530,9 @@ ID3_STRUCT(Mp3_Headerinfo)
+   uint32 framesize;
+   uint32 frames;                // nr of frames
+   uint32 time;                  // nr of seconds in song
+-  bool privatebit;
+-  bool copyrighted;
+-  bool original;
++  ID3_Bool privatebit;
++  ID3_Bool copyrighted;
++  ID3_Bool original;
+ };
+ 
+ #define ID3_NR_OF_V1_GENRES 148
+--- a/src/c_wrapper.cpp
++++ b/src/c_wrapper.cpp
+@@ -72,10 +72,10 @@ extern "C"
+   }
+ 
+ 
+-  ID3_C_EXPORT bool CCONV
++  ID3_C_EXPORT ID3_Bool CCONV
+   ID3Tag_HasChanged(const ID3Tag *tag)
+   {
+-    bool changed = false;
++    ID3_Bool changed = ID3_False;
+ 
+     if (tag)
+     {
+@@ -87,7 +87,7 @@ extern "C"
+ 
+ 
+   ID3_C_EXPORT void CCONV
+-  ID3Tag_SetUnsync(ID3Tag *tag, bool unsync)
++  ID3Tag_SetUnsync(ID3Tag *tag, ID3_Bool unsync)
+   {
+     if (tag)
+     {
+@@ -97,7 +97,7 @@ extern "C"
+ 
+ 
+   ID3_C_EXPORT void CCONV
+-  ID3Tag_SetExtendedHeader(ID3Tag *tag, bool ext)
++  ID3Tag_SetExtendedHeader(ID3Tag *tag, ID3_Bool ext)
+   {
+     if (tag)
+     {
+@@ -106,7 +106,7 @@ extern "C"
+   }
+ 
+   ID3_C_EXPORT void CCONV
+-  ID3Tag_SetPadding(ID3Tag *tag, bool pad)
++  ID3Tag_SetPadding(ID3Tag *tag, ID3_Bool pad)
+   {
+     if (tag)
+     {
+@@ -125,10 +125,10 @@ extern "C"
+   }
+ 
+ 
+-  ID3_C_EXPORT bool CCONV
++  ID3_C_EXPORT ID3_Bool CCONV
+   ID3Tag_AttachFrame(ID3Tag *tag, ID3Frame *frame)
+   {
+-    bool b = false;
++    ID3_Bool b = ID3_False;
+     if (tag)
+     {
+       ID3_CATCH(b = reinterpret_cast<ID3_Tag *>(tag)->AttachFrame(reinterpret_cast<ID3_Frame *>(frame)));
+@@ -303,10 +303,10 @@ extern "C"
+   }
+ 
+ 
+-  ID3_C_EXPORT bool CCONV
++  ID3_C_EXPORT ID3_Bool CCONV
+   ID3Tag_HasTagType(const ID3Tag *tag, ID3_TagType tt)
+   {
+-    bool has_tt = false;
++    ID3_Bool has_tt = ID3_False;
+ 
+     if (tag)
+     {
+@@ -459,7 +459,7 @@ extern "C"
+ 
+ 
+   ID3_C_EXPORT void CCONV
+-  ID3Frame_SetCompression(ID3Frame *frame, bool comp)
++  ID3Frame_SetCompression(ID3Frame *frame, ID3_Bool comp)
+   {
+     if (frame)
+     {
+@@ -468,10 +468,10 @@ extern "C"
+   }
+ 
+ 
+-  ID3_C_EXPORT bool CCONV
++  ID3_C_EXPORT ID3_Bool CCONV
+   ID3Frame_GetCompression(const ID3Frame *frame)
+   {
+-    bool compressed = false;
++    ID3_Bool compressed = ID3_False;
+     if (frame)
+     {
+       ID3_CATCH(compressed = reinterpret_cast<const ID3_Frame *>(frame)->GetCompression());
diff --git a/srcpkgs/id3lib/patches/test-fix.patch b/srcpkgs/id3lib/patches/test-fix.patch
new file mode 100644
index 000000000000..86ee27b15d21
--- /dev/null
+++ b/srcpkgs/id3lib/patches/test-fix.patch
@@ -0,0 +1,49 @@
+--- a/examples/findeng.cpp
++++ b/examples/findeng.cpp
+@@ -9,7 +9,7 @@
+ using std::cout;
+ using std::endl;
+ 
+-int main(unsigned argc, char* argv[])
++int main(int argc, char* argv[])
+ {
+   ID3D_INIT_DOUT();
+   ID3D_INIT_WARNING();
+--- a/examples/findstr.cpp
++++ b/examples/findstr.cpp
+@@ -9,7 +9,7 @@
+ using std::cout;
+ using std::endl;
+ 
+-int main(unsigned argc, char* argv[])
++int main(int argc, char* argv[])
+ {
+   ID3D_INIT_DOUT();
+   ID3D_INIT_WARNING();
+--- a/examples/test_io.cpp
++++ b/examples/test_io.cpp
+@@ -18,13 +18,13 @@ using std::cerr;
+ using namespace dami;
+ 
+ int
+-main(size_t argc, const char** argv)
++main(int argc, const char** argv)
+ {
+   ID3D_INIT_DOUT();
+   ID3D_INIT_WARNING();
+   ID3D_INIT_NOTICE();
+ 
+-  ID3_IStreamReader isr(cin);
++  ID3_IStreamReader isr(std::cin);
+   BString orig = io::readAllBinary(isr);
+     
+   cout << "input size:    " << orig.size() << endl;
+@@ -116,7 +116,7 @@ main(size_t argc, const char** argv)
+   cout << "binary number:";
+   for (size_t i = 0; i < number.size(); ++i)
+   {
+-    cout << " 0x" << hex << (size_t) (0xFF & number[i]) << dec;
++    cout << " 0x" << std::hex << (size_t) (0xFF & number[i]) << std::dec;
+   }
+   cout << endl;
+ 
diff --git a/srcpkgs/id3lib/template b/srcpkgs/id3lib/template
index 44cb7f55f1dd..ad9a60665e7e 100644
--- a/srcpkgs/id3lib/template
+++ b/srcpkgs/id3lib/template
@@ -1,7 +1,7 @@
 # Template file for 'id3lib'
 pkgname=id3lib
 version=3.8.3
-revision=6
+revision=7
 build_style=gnu-configure
 hostmakedepends="libtool automake"
 makedepends="zlib-devel"

From e788c77e2d97969af51138c2aa4ea1951b67e6d6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Thu, 15 Sep 2022 09:13:17 +0700
Subject: [PATCH 2/2] kid3: rebuild for id3lib C++ ABI

---
 srcpkgs/kid3/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/kid3/template b/srcpkgs/kid3/template
index 81633262dc03..456206d90e16 100644
--- a/srcpkgs/kid3/template
+++ b/srcpkgs/kid3/template
@@ -1,7 +1,7 @@
 # Template file for 'kid3'
 pkgname=kid3
 version=3.9.1
-revision=1
+revision=2
 build_style=cmake
 configure_args="-DWITH_APPS='CLI;$(vopt_if KDE KDE Qt)'
  -DWITH_DOCBOOKDIR=/usr/share/xsl/docbook -DWITH_FLAC=$(vopt_if flac ON OFF)

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PR PATCH] [Merged]: id3lib: patch for c99 bool
  2022-09-14  4:41 [PR PATCH] id3lib: patch for c99 bool mtboehlke
                   ` (17 preceding siblings ...)
  2022-09-15 14:59 ` [PR PATCH] [Updated] " sgn
@ 2022-09-15 15:59 ` sgn
  18 siblings, 0 replies; 20+ messages in thread
From: sgn @ 2022-09-15 15:59 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1523 bytes --]

There's a merged pull request on the void-packages repository

id3lib: patch for c99 bool
https://github.com/void-linux/void-packages/pull/39275

Description:
id3/globals.h has a typedef for bool which is incompatible with c99 stdbool.
This is a known issue, but upstream is effectively unmaintained.
See [this thread](https://sourceforege.net/p/id3lib/mailman/message/30500558/) from upstream.

This only seems to be an issue for castget while building, and they have already switched to using taglib for the next release.
Castget [issue](https://github.com/mlj/castget/issues/47).

<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2022-09-15 15:59 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-14  4:41 [PR PATCH] id3lib: patch for c99 bool mtboehlke
2022-09-14  4:41 ` [PR PATCH] [Updated] " mtboehlke
2022-09-14  4:44 ` [PR REVIEW] " sgn
2022-09-14  4:45 ` sgn
2022-09-14  4:50 ` [PR PATCH] [Updated] " mtboehlke
2022-09-14  4:51 ` mtboehlke
2022-09-14  4:59 ` [PR PATCH] [Updated] " mtboehlke
2022-09-14  5:00 ` mtboehlke
2022-09-14  5:01 ` mtboehlke
2022-09-15  1:57 ` [PR REVIEW] " sgn
2022-09-15  1:57 ` sgn
2022-09-15  2:13 ` [PR PATCH] [Updated] " sgn
2022-09-15  2:15 ` sgn
2022-09-15  3:40 ` [PR REVIEW] " mtboehlke
2022-09-15  3:48 ` mtboehlke
2022-09-15  4:39 ` mtboehlke
2022-09-15 14:49 ` [PR PATCH] [Updated] " sgn
2022-09-15 14:51 ` sgn
2022-09-15 14:59 ` [PR PATCH] [Updated] " sgn
2022-09-15 15:59 ` [PR PATCH] [Merged]: " sgn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).