commit:     024897195560f8288889e352cf5992cd3a657321
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Feb 16 01:42:07 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Feb 16 01:42:07 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=02489719

media-libs/libsixel: fix build on musl

Closes: https://bugs.gentoo.org/830074
Signed-off-by: Sam James <sam <AT> gentoo.org>

 media-libs/libsixel/files/libsixel-musl.patch | 57 +++++++++++++++++++++++++++
 media-libs/libsixel/libsixel-1.10.3.ebuild    |  3 +-
 2 files changed, 59 insertions(+), 1 deletion(-)

diff --git a/media-libs/libsixel/files/libsixel-musl.patch 
b/media-libs/libsixel/files/libsixel-musl.patch
new file mode 100644
index 000000000000..f353a2f7c8d6
--- /dev/null
+++ b/media-libs/libsixel/files/libsixel-musl.patch
@@ -0,0 +1,57 @@
+https://github.com/libsixel/libsixel/commit/a8d60939d00af520e7139741b58928a9cc2c5f04.patch
+https://bugs.gentoo.org/830074
+
+From: nick black <dankamong...@gmail.com>
+Date: Wed, 29 Sep 2021 22:31:58 -0400
+Subject: [PATCH] no need for sys/unistd.h
+
+--- a/converters/img2sixel.c
++++ b/converters/img2sixel.c
+@@ -28,7 +28,6 @@
+ #include <string.h>
+ 
+ # include <unistd.h>
+-# include <sys/unistd.h>
+ #include <sys/types.h>
+ # include <getopt.h>
+ # include <inttypes.h>
+--- a/meson.build
++++ b/meson.build
+@@ -66,7 +66,6 @@ needed_headers = [
+   'string.h',
+   'unistd.h',
+   'stdint.h',
+-  'sys/unistd.h',
+   'getopt.h',
+   'sys/types.h',
+   'sys/stat.h',
+--- a/src/decoder.c
++++ b/src/decoder.c
+@@ -26,7 +26,6 @@
+ # include <stdarg.h>
+ # include <string.h>
+ # include <unistd.h>
+-# include <sys/unistd.h>
+ #include <sys/types.h>
+ #include <sys/select.h>
+ # include <time.h>
+--- a/src/encoder.c
++++ b/src/encoder.c
+@@ -27,7 +27,6 @@
+ # include <stdarg.h>
+ #include <string.h>
+ # include <unistd.h>
+-# include <sys/unistd.h>
+ # include <sys/types.h>
+ # include <time.h>
+ # include <sys/time.h>
+--- a/src/tty.c
++++ b/src/tty.c
+@@ -28,7 +28,6 @@
+ # include <sys/time.h>
+ # include <sys/types.h>
+ # include <unistd.h>
+-# include <sys/unistd.h>
+ # include <sys/select.h>
+ # include <errno.h>
+ # include <termios.h>

diff --git a/media-libs/libsixel/libsixel-1.10.3.ebuild 
b/media-libs/libsixel/libsixel-1.10.3.ebuild
index 4e9128a773dd..636229521e33 100644
--- a/media-libs/libsixel/libsixel-1.10.3.ebuild
+++ b/media-libs/libsixel/libsixel-1.10.3.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI="8"
@@ -34,6 +34,7 @@ BDEPEND="virtual/pkgconfig
 PATCHES=(
        "${FILESDIR}"/${PN}-meson.patch
        "${FILESDIR}"/${PN}-static-libs.patch
+       "${FILESDIR}"/${PN}-musl.patch
 )
 
 src_prepare() {

Reply via email to