Skip to content

Commit

Permalink
qmmp: work around BSD iconv
Browse files Browse the repository at this point in the history
  • Loading branch information
cho-m committed Aug 29, 2024
1 parent 3c08e7e commit c012c1a
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions Formula/q/qmmp.rb
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,15 @@ class Qmmp < Formula
depends_on "musepack"
end

on_sonoma :or_newer do
# Support Sonoma (BSD iconv) as qmmp has an incompatible typedef:
# /tmp/qmmp-20240828-19582-sf4k85/qmmp-2.1.9/src/qmmp/qmmptextcodec.h:28:15:
# error: typedef redefinition with different types ('void *' vs 'struct __tag_iconv_t *')
#
# Issue ref: https://sourceforge.net/p/qmmp-dev/tickets/1167/
patch :DATA
end

on_linux do
depends_on "alsa-lib"
depends_on "libx11"
Expand Down Expand Up @@ -109,3 +118,23 @@ def install
system bin/"qmmp", "--version"
end
end

__END__
diff --git a/src/qmmp/qmmptextcodec.h b/src/qmmp/qmmptextcodec.h
index 5242c33..7399c54 100644
--- a/src/qmmp/qmmptextcodec.h
+++ b/src/qmmp/qmmptextcodec.h
@@ -21,12 +21,11 @@
#ifndef QMMPTEXTCODEC_H
#define QMMPTEXTCODEC_H

+#include <iconv.h>
#include <QByteArray>
#include <QStringList>
#include "qmmp_export.h"

-typedef void *iconv_t;
-
class QMMP_EXPORT QmmpTextCodec
{
public:

0 comments on commit c012c1a

Please sign in to comment.