public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Aric Belsito" <lluixhi@gmail.com>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/musl:master commit in: media-libs/mesa/files/, media-libs/mesa/
Date: Wed, 13 Dec 2017 00:50:49 +0000 (UTC)	[thread overview]
Message-ID: <1513126210.2508a62f0eb80f2c60e8fa5a9c461c3431348778.lluixhi@gentoo> (raw)

commit:     2508a62f0eb80f2c60e8fa5a9c461c3431348778
Author:     Aric Belsito <lluixhi <AT> gmail <DOT> com>
AuthorDate: Wed Dec 13 00:50:10 2017 +0000
Commit:     Aric Belsito <lluixhi <AT> gmail <DOT> com>
CommitDate: Wed Dec 13 00:50:10 2017 +0000
URL:        https://gitweb.gentoo.org/proj/musl.git/commit/?id=2508a62f

media-libs/mesa: add more musl compat patches

 .../mesa/files/mesa-17-musl-invocation_name.patch  | 47 ++++++++++++++++
 media-libs/mesa/files/mesa-17-musl-pthread.patch   | 49 +++++++++++++++++
 media-libs/mesa/files/mesa-17-musl-string_h.patch  | 63 ++++++++++++++++++++++
 media-libs/mesa/mesa-17.3.0.ebuild                 |  5 +-
 4 files changed, 163 insertions(+), 1 deletion(-)

diff --git a/media-libs/mesa/files/mesa-17-musl-invocation_name.patch b/media-libs/mesa/files/mesa-17-musl-invocation_name.patch
new file mode 100644
index 0000000..80b02f5
--- /dev/null
+++ b/media-libs/mesa/files/mesa-17-musl-invocation_name.patch
@@ -0,0 +1,47 @@
+diff -Naur mesa-17.3.0.orig/src/gallium/auxiliary/os/os_process.c mesa-17.3.0/src/gallium/auxiliary/os/os_process.c
+--- mesa-17.3.0.orig/src/gallium/auxiliary/os/os_process.c	2017-12-08 05:49:11.000000000 -0800
++++ mesa-17.3.0/src/gallium/auxiliary/os/os_process.c	2017-12-11 14:24:35.200797607 -0800
+@@ -32,7 +32,7 @@
+ 
+ #if defined(PIPE_SUBSYSTEM_WINDOWS_USER)
+ #  include <windows.h>
+-#elif defined(__GLIBC__) || defined(__CYGWIN__)
++#elif defined(__linux__) || defined(__CYGWIN__)
+ #  include <errno.h>
+ #elif defined(PIPE_OS_BSD) || defined(PIPE_OS_APPLE) || defined(PIPE_OS_ANDROID)
+ #  include <stdlib.h>
+@@ -84,7 +84,7 @@
+ 
+       name = lpProcessName;
+ 
+-#elif defined(__GLIBC__) || defined(__CYGWIN__)
++#elif defined(__linux__) || defined(__CYGWIN__)
+       name = program_invocation_short_name;
+ #elif defined(PIPE_OS_BSD) || defined(PIPE_OS_APPLE) || defined(PIPE_OS_ANDROID)
+       /* *BSD and OS X */
+diff -Naur mesa-17.3.0.orig/src/gallium/winsys/virgl/vtest/virgl_vtest_socket.c mesa-17.3.0/src/gallium/winsys/virgl/vtest/virgl_vtest_socket.c
+--- mesa-17.3.0.orig/src/gallium/winsys/virgl/vtest/virgl_vtest_socket.c	2017-12-08 05:49:11.000000000 -0800
++++ mesa-17.3.0/src/gallium/winsys/virgl/vtest/virgl_vtest_socket.c	2017-12-11 14:23:35.312798680 -0800
+@@ -84,7 +84,7 @@
+    ret = os_get_process_name(cmdline, 63);
+    if (ret == FALSE)
+       strcpy(cmdline, nstr);
+-#if defined(__GLIBC__) || defined(__CYGWIN__)
++#if defined(__linux__) || defined(__CYGWIN__)
+    if (!strcmp(cmdline, "shader_runner")) {
+       const char *name;
+       /* hack to get better testname */
+diff -Naur mesa-17.3.0.orig/src/util/xmlconfig.c mesa-17.3.0/src/util/xmlconfig.c
+--- mesa-17.3.0.orig/src/util/xmlconfig.c	2017-12-08 05:49:11.000000000 -0800
++++ mesa-17.3.0/src/util/xmlconfig.c	2017-12-11 14:22:54.052799419 -0800
+@@ -40,8 +40,8 @@
+ 
+ #undef GET_PROGRAM_NAME
+ 
+-#if (defined(__GNU_LIBRARY__) || defined(__GLIBC__)) && !defined(__UCLIBC__)
+-#    if !defined(__GLIBC__) || (__GLIBC__ < 2)
++#if defined(__linux__)
++#    if defined(__GLIBC__) && (__GLIBC__ < 2)
+ /* These aren't declared in any libc5 header */
+ extern char *program_invocation_name, *program_invocation_short_name;
+ #    endif

diff --git a/media-libs/mesa/files/mesa-17-musl-pthread.patch b/media-libs/mesa/files/mesa-17-musl-pthread.patch
new file mode 100644
index 0000000..a488b69
--- /dev/null
+++ b/media-libs/mesa/files/mesa-17-musl-pthread.patch
@@ -0,0 +1,49 @@
+diff -Naur mesa-17.3.0.orig/src/gallium/state_trackers/nine/nine_debug.c mesa-17.3.0/src/gallium/state_trackers/nine/nine_debug.c
+--- mesa-17.3.0.orig/src/gallium/state_trackers/nine/nine_debug.c	2017-12-08 05:49:11.000000000 -0800
++++ mesa-17.3.0/src/gallium/state_trackers/nine/nine_debug.c	2017-12-11 14:24:00.264798233 -0800
+@@ -73,11 +73,8 @@
+     }
+ 
+ #if defined(HAVE_PTHREAD)
+-#  if defined(__GNU_LIBRARY__) && defined(__GLIBC__) && defined(__GLIBC_MINOR__) && \
+-      (__GLIBC__ >= 3 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 12))
+     if (dbg_flags & DBG_TID)
+         tid = pthread_self();
+-#  endif
+ #endif
+ 
+     if (dbg_flags & flag) {
+diff -Naur mesa-17.3.0.orig/src/util/u_thread.h mesa-17.3.0/src/util/u_thread.h
+--- mesa-17.3.0.orig/src/util/u_thread.h	2017-12-08 05:49:11.000000000 -0800
++++ mesa-17.3.0/src/util/u_thread.h	2017-12-11 14:19:54.898802627 -0800
+@@ -34,6 +34,7 @@
+ 
+ #ifdef HAVE_PTHREAD
+ #include <signal.h>
++#include <sys/prctl.h>
+ #endif
+ 
+ 
+@@ -61,10 +62,7 @@
+ static inline void u_thread_setname( const char *name )
+ {
+ #if defined(HAVE_PTHREAD)
+-#  if defined(__GNU_LIBRARY__) && defined(__GLIBC__) && defined(__GLIBC_MINOR__) && \
+-      (__GLIBC__ >= 3 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 12))
+-   pthread_setname_np(pthread_self(), name);
+-#  endif
++   prctl(PR_SET_NAME, name);
+ #endif
+    (void)name;
+ }
+@@ -92,10 +90,7 @@
+ static inline bool u_thread_is_self(thrd_t thread)
+ {
+ #if defined(HAVE_PTHREAD)
+-#  if defined(__GNU_LIBRARY__) && defined(__GLIBC__) && defined(__GLIBC_MINOR__) && \
+-      (__GLIBC__ >= 3 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 12))
+    return pthread_equal(pthread_self(), thread);
+-#  endif
+ #endif
+    return false;
+ }

diff --git a/media-libs/mesa/files/mesa-17-musl-string_h.patch b/media-libs/mesa/files/mesa-17-musl-string_h.patch
new file mode 100644
index 0000000..f3ec9e9
--- /dev/null
+++ b/media-libs/mesa/files/mesa-17-musl-string_h.patch
@@ -0,0 +1,63 @@
+diff -Naur mesa-17.3.0.orig/src/compiler/glsl/glcpp/glcpp-parse.c mesa-17.3.0/src/compiler/glsl/glcpp/glcpp-parse.c
+--- mesa-17.3.0.orig/src/compiler/glsl/glcpp/glcpp-parse.c	2017-12-08 05:49:48.000000000 -0800
++++ mesa-17.3.0/src/compiler/glsl/glcpp/glcpp-parse.c	2017-12-11 14:07:34.299815890 -0800
+@@ -1220,7 +1220,7 @@
+ #if YYERROR_VERBOSE
+ 
+ # ifndef yystrlen
+-#  if defined __GLIBC__ && defined _STRING_H
++#  if defined __linux__ && defined _STRING_H
+ #   define yystrlen strlen
+ #  else
+ /* Return the length of YYSTR.  */
+@@ -1236,7 +1236,7 @@
+ # endif
+ 
+ # ifndef yystpcpy
+-#  if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
++#  if defined __linux__ && defined _STRING_H && defined _GNU_SOURCE
+ #   define yystpcpy stpcpy
+ #  else
+ /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
+diff -Naur mesa-17.3.0.orig/src/compiler/glsl/glsl_parser.cpp mesa-17.3.0/src/compiler/glsl/glsl_parser.cpp
+--- mesa-17.3.0.orig/src/compiler/glsl/glsl_parser.cpp	2017-12-08 05:49:49.000000000 -0800
++++ mesa-17.3.0/src/compiler/glsl/glsl_parser.cpp	2017-12-11 14:07:04.530816423 -0800
+@@ -2815,7 +2815,7 @@
+ #if YYERROR_VERBOSE
+ 
+ # ifndef yystrlen
+-#  if defined __GLIBC__ && defined _STRING_H
++#  if defined __linux__ && defined _STRING_H
+ #   define yystrlen strlen
+ #  else
+ /* Return the length of YYSTR.  */
+@@ -2831,7 +2831,7 @@
+ # endif
+ 
+ # ifndef yystpcpy
+-#  if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
++#  if defined __linux__ && defined _STRING_H && defined _GNU_SOURCE
+ #   define yystpcpy stpcpy
+ #  else
+ /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
+diff -Naur mesa-17.3.0.orig/src/mesa/program/program_parse.tab.c mesa-17.3.0/src/mesa/program/program_parse.tab.c
+--- mesa-17.3.0.orig/src/mesa/program/program_parse.tab.c	2017-12-08 05:49:53.000000000 -0800
++++ mesa-17.3.0/src/mesa/program/program_parse.tab.c	2017-12-11 14:10:08.621813126 -0800
+@@ -1440,7 +1440,7 @@
+ #if YYERROR_VERBOSE
+ 
+ # ifndef yystrlen
+-#  if defined __GLIBC__ && defined _STRING_H
++#  if defined __linux__ && defined _STRING_H
+ #   define yystrlen strlen
+ #  else
+ /* Return the length of YYSTR.  */
+@@ -1456,7 +1456,7 @@
+ # endif
+ 
+ # ifndef yystpcpy
+-#  if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
++#  if defined __linux__ && defined _STRING_H && defined _GNU_SOURCE
+ #   define yystpcpy stpcpy
+ #  else
+ /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in

diff --git a/media-libs/mesa/mesa-17.3.0.ebuild b/media-libs/mesa/mesa-17.3.0.ebuild
index 49ae075..040450c 100644
--- a/media-libs/mesa/mesa-17.3.0.ebuild
+++ b/media-libs/mesa/mesa-17.3.0.ebuild
@@ -280,8 +280,11 @@ pkg_setup() {
 }
 
 src_prepare() {
-	eapply "${FILESDIR}"/${PN}-17-execinfo.patch
 	eapply "${FILESDIR}"/${PN}-13-musl_endian.patch
+	eapply "${FILESDIR}"/${PN}-17-execinfo.patch
+	eapply "${FILESDIR}"/${PN}-17-musl-string_h.patch
+	eapply "${FILESDIR}"/${PN}-17-musl-invocation_name.patch
+	eapply "${FILESDIR}"/${PN}-17-musl-pthread.patch
 
 	eautoreconf
 


             reply	other threads:[~2017-12-13  0:50 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-13  0:50 Aric Belsito [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-07-19  1:08 [gentoo-commits] proj/musl:master commit in: media-libs/mesa/files/, media-libs/mesa/ Anthony G. Basile
2021-08-20 14:14 Jory Pratt
2021-07-06 13:17 Jory Pratt
2021-03-10 15:06 Jory Pratt
2020-09-19 12:45 Jory Pratt
2020-03-09  0:53 Jory Pratt
2019-11-06 19:35 Jory Pratt
2019-08-11 22:46 Jory Pratt
2019-07-02 17:27 Jory Pratt
2019-01-27 17:52 Anthony G. Basile
2019-01-23 19:29 Anthony G. Basile
2018-11-09 13:16 Anthony G. Basile
2018-10-29 11:48 Anthony G. Basile
2018-10-05  0:12 Anthony G. Basile
2018-07-08 21:58 Anthony G. Basile
2018-01-24 21:25 Aric Belsito
2017-12-29 22:23 Aric Belsito
2017-12-11 22:29 Aric Belsito
2017-05-10  0:41 Aric Belsito
2016-03-14  2:22 Anthony G. Basile

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=1513126210.2508a62f0eb80f2c60e8fa5a9c461c3431348778.lluixhi@gentoo \
    --to=lluixhi@gmail.com \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.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