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

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).