summaryrefslogtreecommitdiff
path: root/media-sound/alacenc
diff options
context:
space:
mode:
Diffstat (limited to 'media-sound/alacenc')
-rw-r--r--media-sound/alacenc/Manifest3
-rw-r--r--media-sound/alacenc/alacenc-0.4.0.ebuild4
-rw-r--r--media-sound/alacenc/files/alacenc-0.4.0-musl.patch30
3 files changed, 36 insertions, 1 deletions
diff --git a/media-sound/alacenc/Manifest b/media-sound/alacenc/Manifest
index 6d53509c91b1..f1119ad34a83 100644
--- a/media-sound/alacenc/Manifest
+++ b/media-sound/alacenc/Manifest
@@ -1,3 +1,4 @@
+AUX alacenc-0.4.0-musl.patch 916 BLAKE2B 38236f9c93714d2593e7ef44b377930875ec67f07b0d5588cb8b212dd92ff1352de6b436c5f436ca29ce4c3ca12e4c6485a7b465f1364253649e7a5d49f6a10c SHA512 026265747bb719ef5a69850f8e4b1f1dcaa77d304164ec2fce4a358c1ac6f8f242d437a7911c44e762a37bd84d6a45f5aac55b24578646ae3ac749de9745ead8
DIST alacenc-0.4.0.tar.gz 114463 BLAKE2B 6682a77d1df90f22969bbdf82b3ad273cac8855f245ff533b90e81a02952c9dc3f9f14f4e7ec23059ebe7ba9e3a7fff51f009dbe7ee945fca5a9a04d1f2fb8c9 SHA512 2a95725b6aa4ef3f42b2c8d379cd8a83dbf46d69faa0bd6a03bec4d0b56665b3d0716c76e9c7183096a0761d36a282a559f2e5c70f0a9aa1a9808587db004727
-EBUILD alacenc-0.4.0.ebuild 471 BLAKE2B b17e50a3f88a6382703accec0358dc533c2a8366baddca2ea1c5aa0cec6a0246882a0e5422b905ec9edbec676ae1ce82baaea8f7e556b64182a6b7fbdddaafc3 SHA512 d520fa19024fdd904c11b5bb28483af60d8682b5c3d8d8961fce6f292161c5ff1540bf77accdf3e7cb6856adc146fe6c74214ba935dd99a5b92edd98a039e0d3
+EBUILD alacenc-0.4.0.ebuild 515 BLAKE2B d804e93b86c1ccb7a564a33f1770ed365e22d4fa7dd5413763eb80bc6787f39579c4792d99ab0d8e95f888c42a7db2b423c9927108bae56d6bb7fa5ec9f9a005 SHA512 4b8e9624a0d31462625ce141b9342d9eba0489d4eab820d2068f32f77aa625c0b093063899c384a8a688491862748f06b544e80a6f87ce42ad3e41b5e5da820e
MISC metadata.xml 484 BLAKE2B 9138178a4dfd1c575b245205b22bc174c1c70aaffef1233d00888c01f67772dbe82dcfe9db702b1427cd2ca643eea84fb5a59c201ebb26185d93f45b47c50dc2 SHA512 66a583fbc6b1c4651d1eacbbe682cc33ea5cc91b61f5ed70ce981551eb2ff4b184e5f49af86f751c1e670e2e163f2b8544f8bb58161e98c85c0f23c43c1b7a36
diff --git a/media-sound/alacenc/alacenc-0.4.0.ebuild b/media-sound/alacenc/alacenc-0.4.0.ebuild
index d1e6d081f081..a18ef84e118d 100644
--- a/media-sound/alacenc/alacenc-0.4.0.ebuild
+++ b/media-sound/alacenc/alacenc-0.4.0.ebuild
@@ -15,6 +15,10 @@ KEYWORDS="~amd64 ~x86"
BDEPEND="virtual/pkgconfig"
+PATCHES=(
+ "${FILESDIR}/${P}-musl.patch"
+)
+
src_install() {
dobin "${BUILD_DIR}/alacenc"
einstalldocs
diff --git a/media-sound/alacenc/files/alacenc-0.4.0-musl.patch b/media-sound/alacenc/files/alacenc-0.4.0-musl.patch
new file mode 100644
index 000000000000..e42a0def06d9
--- /dev/null
+++ b/media-sound/alacenc/files/alacenc-0.4.0-musl.patch
@@ -0,0 +1,30 @@
+# Include endian.h because otherwise constants like BYTE_ORDER,
+# LITTLE_ENDIAN or BIG_ENDIAN as well as functions like
+# toBigEndian are missing when building with musl.
+# On glibc these symbols are present without including
+# endian.h, however including it anyway is fine.
+#
+# Related bug: https://bugs.gentoo.org/927902
+--- a/types.h
++++ b/types.h
+@@ -40,6 +40,7 @@
+ #include <fstream>
+ #include <array>
+ #include <cstdint>
++#include <endian.h>
+
+ class Error : public std::runtime_error
+ {
+# There is no typedef for uint in musl, so replace it
+# Upstream PR: https://github.com/flacon/alacenc/pull/4
+--- a/atoms.cpp
++++ b/atoms.cpp
+@@ -655,7 +655,7 @@ OutFile &operator<<(OutFile &os, const FreeAtom &atom)
+ {
+ os << uint32_t(atom.mSize);
+ os << "free";
+- for (uint i = 0; i < atom.mSize - 8; ++i) {
++ for (unsigned int i = 0; i < atom.mSize - 8; ++i) {
+ os << '\0';
+ }
+ return os;