From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 7AF4A139083 for ; Wed, 13 Dec 2017 00:50:53 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 672DEE0F06; Wed, 13 Dec 2017 00:50:52 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 367CFE0F06 for ; Wed, 13 Dec 2017 00:50:52 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 72137341754 for ; Wed, 13 Dec 2017 00:50:50 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 073CCA1A0 for ; Wed, 13 Dec 2017 00:50:49 +0000 (UTC) From: "Aric Belsito" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Aric Belsito" Message-ID: <1513126210.2508a62f0eb80f2c60e8fa5a9c461c3431348778.lluixhi@gentoo> Subject: [gentoo-commits] proj/musl:master commit in: media-libs/mesa/files/, media-libs/mesa/ X-VCS-Repository: proj/musl X-VCS-Files: media-libs/mesa/files/mesa-17-musl-invocation_name.patch media-libs/mesa/files/mesa-17-musl-pthread.patch media-libs/mesa/files/mesa-17-musl-string_h.patch media-libs/mesa/mesa-17.3.0.ebuild X-VCS-Directories: media-libs/mesa/ media-libs/mesa/files/ X-VCS-Committer: lluixhi X-VCS-Committer-Name: Aric Belsito X-VCS-Revision: 2508a62f0eb80f2c60e8fa5a9c461c3431348778 X-VCS-Branch: master Date: Wed, 13 Dec 2017 00:50:49 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: d14c990b-88c6-4da8-a0a2-d5c60111fdc2 X-Archives-Hash: 5176749b9fe58fe63a99aa57f183e1b2 commit: 2508a62f0eb80f2c60e8fa5a9c461c3431348778 Author: Aric Belsito gmail com> AuthorDate: Wed Dec 13 00:50:10 2017 +0000 Commit: Aric Belsito gmail 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 +-#elif defined(__GLIBC__) || defined(__CYGWIN__) ++#elif defined(__linux__) || defined(__CYGWIN__) + # include + #elif defined(PIPE_OS_BSD) || defined(PIPE_OS_APPLE) || defined(PIPE_OS_ANDROID) + # include +@@ -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 ++#include + #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