Github messages for voidlinux
 help / color / mirror / Atom feed
From: balejk <balejk@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: [PR PATCH] lame: fix ID3 tags on musl
Date: Thu, 20 Apr 2023 19:37:36 +0200	[thread overview]
Message-ID: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-43550@inbox.vuxu.org> (raw)

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

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

https://github.com/balejk/void-packages lame-translit
https://github.com/void-linux/void-packages/pull/43550

lame: fix ID3 tags on musl
<!-- Uncomment relevant sections and delete options which are not applicable -->

musl's iconv does not support transliterations causing `lame` to fail to write most of the ID3 tags.

I have modified the code so that it only does transliteration if the host libc is glibc. I don't know whether there are any other iconv implementations which support this, if so, please let me know and I can try to add them, although for Void's purposes it's needless at the moment.

I have not attempted to submit the patch upstream as it seems inactive, I might try to do so later.

#### Testing the changes
- I tested the changes in this PR: **YES** (on musl)

<!--
#### 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, (x86_64-musl)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - x86_64


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

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

From 1797153489c2cfbfcedab88f863a72f25852eb14 Mon Sep 17 00:00:00 2001
From: Karel Balej <balejk@matfyz.cz>
Date: Thu, 20 Apr 2023 19:15:09 +0200
Subject: [PATCH] lame: fix ID3 tags on musl

---
 srcpkgs/lame/patches/translit.patch | 26 ++++++++++++++++++++++++++
 srcpkgs/lame/template               |  2 +-
 2 files changed, 27 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/lame/patches/translit.patch

diff --git a/srcpkgs/lame/patches/translit.patch b/srcpkgs/lame/patches/translit.patch
new file mode 100644
index 000000000000..660c57c930d9
--- /dev/null
+++ b/srcpkgs/lame/patches/translit.patch
@@ -0,0 +1,26 @@
+--- lame/frontend/parse.c	2023-04-20 18:12:43.988212890 +0200
++++ -	2023-04-20 18:13:39.537622345 +0200
+@@ -232,7 +232,11 @@
+         dst = calloc(n+4, 4);
+         if (dst != 0) {
+             char* cur_code = nl_langinfo(CODESET);
++#ifdef __GNU_LIBRARY__
+             iconv_t xiconv = iconv_open("ISO_8859-1//TRANSLIT", cur_code);
++#else
++            iconv_t xiconv = iconv_open("ISO_8859-1", cur_code);
++#endif
+             if (xiconv != (iconv_t)-1) {
+                 char* i_ptr = (char*)src;
+                 char* o_ptr = dst;
+@@ -258,7 +262,11 @@
+         dst = calloc(n+4, 4);
+         if (dst != 0) {
+             char* cur_code = nl_langinfo(CODESET);
++#ifdef __GNU_LIBRARY__
+             iconv_t xiconv = iconv_open("UTF-16LE//TRANSLIT", cur_code);
++#else
++            iconv_t xiconv = iconv_open("UTF-16LE", cur_code);
++#endif
+             dst[0] = 0xff;
+             dst[1] = 0xfe;
+             if (xiconv != (iconv_t)-1) {
diff --git a/srcpkgs/lame/template b/srcpkgs/lame/template
index 7718c7720c76..5bc4247b3f43 100644
--- a/srcpkgs/lame/template
+++ b/srcpkgs/lame/template
@@ -1,7 +1,7 @@
 # Template file for 'lame'
 pkgname=lame
 version=3.100
-revision=1
+revision=2
 build_style=gnu-configure
 configure_args="--enable-nasm --enable-shared"
 hostmakedepends="nasm"

             reply	other threads:[~2023-04-20 17:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-20 17:37 balejk [this message]
2023-04-24 16:19 ` [PR PATCH] [Closed]: " sgn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-43550@inbox.vuxu.org \
    --to=balejk@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).