From f276368a889d7de92fe3561400eeb660c60c6ef6 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Thu, 27 Jun 2019 21:36:01 +0300 Subject: [PATCH] mesa: reeeeeeeeeeeeeeeeeee --- extra/meson/build | 7 +++ extra/meson/checksums | 1 + extra/meson/depends | 3 ++ extra/meson/licenses | 2 + extra/meson/sources | 1 + extra/meson/version | 1 + extra/ninja/build | 5 ++ extra/ninja/checksums | 2 + extra/ninja/depends | 1 + extra/ninja/licenses | 0 extra/ninja/manifest | 14 +++++ extra/ninja/patches/fix-musl.patch | 39 ++++++++++++++ extra/ninja/sources | 2 + extra/ninja/version | 1 + xorg/mesa/build | 18 +++---- xorg/mesa/checksums | 2 +- xorg/mesa/depends | 2 + xorg/mesa/patches/musl.patch | 83 ------------------------------ xorg/mesa/sources | 1 - 19 files changed, 91 insertions(+), 94 deletions(-) create mode 100755 extra/meson/build create mode 100644 extra/meson/checksums create mode 100644 extra/meson/depends create mode 100644 extra/meson/licenses create mode 100644 extra/meson/sources create mode 100644 extra/meson/version create mode 100755 extra/ninja/build create mode 100644 extra/ninja/checksums create mode 100644 extra/ninja/depends create mode 100644 extra/ninja/licenses create mode 100644 extra/ninja/manifest create mode 100644 extra/ninja/patches/fix-musl.patch create mode 100644 extra/ninja/sources create mode 100644 extra/ninja/version delete mode 100644 xorg/mesa/patches/musl.patch diff --git a/extra/meson/build b/extra/meson/build new file mode 100755 index 000000000..366c5443c --- /dev/null +++ b/extra/meson/build @@ -0,0 +1,7 @@ +#!/bin/sh -e + +python setup.py build +python setup.py install \ + --root="$1" \ + --optimize=1 \ + --skip-build diff --git a/extra/meson/checksums b/extra/meson/checksums new file mode 100644 index 000000000..5f0f67ad4 --- /dev/null +++ b/extra/meson/checksums @@ -0,0 +1 @@ +e9f52047f26636ee512439c01755064656db5faecdd68e9af09dc772d829198c 0.50.1.tar.gz diff --git a/extra/meson/depends b/extra/meson/depends new file mode 100644 index 000000000..3df673621 --- /dev/null +++ b/extra/meson/depends @@ -0,0 +1,3 @@ +ninja +python +python-setuptools diff --git a/extra/meson/licenses b/extra/meson/licenses new file mode 100644 index 000000000..fe2e41e05 --- /dev/null +++ b/extra/meson/licenses @@ -0,0 +1,2 @@ +Apache-2.0 + diff --git a/extra/meson/sources b/extra/meson/sources new file mode 100644 index 000000000..b8db2c895 --- /dev/null +++ b/extra/meson/sources @@ -0,0 +1 @@ +https://github.com/mesonbuild/meson/archive/0.50.1.tar.gz diff --git a/extra/meson/version b/extra/meson/version new file mode 100644 index 000000000..511465373 --- /dev/null +++ b/extra/meson/version @@ -0,0 +1 @@ +0.50.1 1 diff --git a/extra/ninja/build b/extra/ninja/build new file mode 100755 index 000000000..6a4e05b8f --- /dev/null +++ b/extra/ninja/build @@ -0,0 +1,5 @@ +#!/bin/sh -e + +patch -p1 < fix-musl.patch +python configure.py --bootstrap +install -m755 -D ninja "$1/usr/bin/ninja" diff --git a/extra/ninja/checksums b/extra/ninja/checksums new file mode 100644 index 000000000..93bd3bdea --- /dev/null +++ b/extra/ninja/checksums @@ -0,0 +1,2 @@ +5d7ec75828f8d3fd1a0c2f31b5b0cea780cdfe1031359228c428c1a48bfcd5b9 v1.9.0.tar.gz +322b1bed1fba2e7a26f030f01d0c2ef570bf01424296b0116cc45d59ea40ea50 fix-musl.patch diff --git a/extra/ninja/depends b/extra/ninja/depends new file mode 100644 index 000000000..ecc77727c --- /dev/null +++ b/extra/ninja/depends @@ -0,0 +1 @@ +python make diff --git a/extra/ninja/licenses b/extra/ninja/licenses new file mode 100644 index 000000000..e69de29bb diff --git a/extra/ninja/manifest b/extra/ninja/manifest new file mode 100644 index 000000000..fed414c57 --- /dev/null +++ b/extra/ninja/manifest @@ -0,0 +1,14 @@ +/var/db/kiss/ninja/version +/var/db/kiss/ninja/sources +/var/db/kiss/ninja/manifest +/var/db/kiss/ninja/licenses +/var/db/kiss/ninja/depends +/var/db/kiss/ninja/checksums +/var/db/kiss/ninja/build +/var/db/kiss/ninja/ +/var/db/kiss/ +/var/db/ +/var/ +/usr/bin/ninja +/usr/bin/ +/usr/ diff --git a/extra/ninja/patches/fix-musl.patch b/extra/ninja/patches/fix-musl.patch new file mode 100644 index 000000000..543d4f1c4 --- /dev/null +++ b/extra/ninja/patches/fix-musl.patch @@ -0,0 +1,39 @@ +2ff54ad7478a90bd75c91e434236a Mon Sep 17 00:00:00 2001 +From: makepost +Date: Mon, 24 Dec 2018 03:13:16 +0200 +Subject: [PATCH] Use st_mtim if st_mtime is macro, fix #1510 + +In POSIX.1-2008, sys_stat has a st_mtim member and a st_mtime backward +compatibility macro. Should help avoid hardcoding platform detection. +--- + src/disk_interface.cc | 14 ++++---------- + 1 file changed, 4 insertions(+), 10 deletions(-) + +diff --git a/src/disk_interface.cc b/src/disk_interface.cc +index d4c2fb087..dc297c449 100644 +--- src/disk_interface.cc ++++ /src/disk_interface.cc +@@ -202,19 +202,13 @@ TimeStamp RealDiskInterface::Stat(const string& path, string* err) const { + // that it doesn't exist. + if (st.st_mtime == 0) + return 1; +-#if defined(__APPLE__) && !defined(_POSIX_C_SOURCE) ++#if defined(_AIX) ++ return (int64_t)st.st_mtime * 1000000000LL + st.st_mtime_n; ++#elif defined(__APPLE__) + return ((int64_t)st.st_mtimespec.tv_sec * 1000000000LL + + st.st_mtimespec.tv_nsec); +-#elif (_POSIX_C_SOURCE >= 200809L || _XOPEN_SOURCE >= 700 || defined(_BSD_SOURCE) || defined(_SVID_SOURCE) || \ +- defined(__BIONIC__) || (defined (__SVR4) && defined (__sun)) || defined(__FreeBSD__)) +- // For glibc, see "Timestamp files" in the Notes of http://www.kernel.org/doc/man-pages/online/pages/man2/stat.2.html +- // newlib, uClibc and musl follow the kernel (or Cygwin) headers and define the right macro values above. +- // For bsd, see https://github.com/freebsd/freebsd/blob/master/sys/sys/stat.h and similar +- // For bionic, C and POSIX API is always enabled. +- // For solaris, see https://docs.oracle.com/cd/E88353_01/html/E37841/stat-2.html. ++#elif defined(st_mtime) // A macro, so we're likely on modern POSIX. + return (int64_t)st.st_mtim.tv_sec * 1000000000LL + st.st_mtim.tv_nsec; +-#elif defined(_AIX) +- return (int64_t)st.st_mtime * 1000000000LL + st.st_mtime_n; + #else + return (int64_t)st.st_mtime * 1000000000LL + st.st_mtimensec; + #endif diff --git a/extra/ninja/sources b/extra/ninja/sources new file mode 100644 index 000000000..ab6da971e --- /dev/null +++ b/extra/ninja/sources @@ -0,0 +1,2 @@ +https://github.com/martine/ninja/archive/v1.9.0.tar.gz +patches/fix-musl.patch diff --git a/extra/ninja/version b/extra/ninja/version new file mode 100644 index 000000000..67fe23c8b --- /dev/null +++ b/extra/ninja/version @@ -0,0 +1 @@ +1.9.0 1 diff --git a/xorg/mesa/build b/xorg/mesa/build index d94a60081..d5620f662 100755 --- a/xorg/mesa/build +++ b/xorg/mesa/build @@ -1,16 +1,16 @@ #!/bin/sh -e -patch -p1 < musl.patch - -# Use autotools to build mesa. -# Meson has no ability to disable 'gettext'. -./configure \ +meson \ --prefix=/usr \ --sysconfdir=/etc \ --mandir=/usr/share/man \ --localstatedir=/var \ - --with-platforms=x11,drm \ - --enable-autotools + --buildtype=release \ + --platforms=x11,drm \ + --valgrind=false \ + . output + +ninja -C output + +DESTDIR="$1" ninja -C output install -make -make DESTDIR="$1" install diff --git a/xorg/mesa/checksums b/xorg/mesa/checksums index 35eff8700..78a9b9171 100644 --- a/xorg/mesa/checksums +++ b/xorg/mesa/checksums @@ -1 +1 @@ -1a2edc3ce56906a676c91e6851298db45903df1f5cb9827395a922c1452db802 mesa-19.0.2.tar.xz +72114b16b4a84373b2acda060fe2bb1d45ea2598efab3ef2d44bdeda74f15581 mesa-19.1.1.tar.xz diff --git a/xorg/mesa/depends b/xorg/mesa/depends index 4495ca13f..a12f8d656 100644 --- a/xorg/mesa/depends +++ b/xorg/mesa/depends @@ -9,6 +9,8 @@ libXxf86vm make libdrm make libxcb make libxshmfence make +meson make +ninja make python make python-mako make xorgproto make diff --git a/xorg/mesa/patches/musl.patch b/xorg/mesa/patches/musl.patch deleted file mode 100644 index dc71d18c3..000000000 --- a/xorg/mesa/patches/musl.patch +++ /dev/null @@ -1,83 +0,0 @@ ---- src/gallium/winsys/svga/drm/vmw_screen.h.orig 2015-05-07 14:02:28.033079796 +0200 -+++ src/gallium/winsys/svga/drm/vmw_screen.h 2015-05-07 14:02:48.832054666 +0200 -@@ -35,6 +35,8 @@ - #define VMW_SCREEN_H_ - - -+#include /* dev_t */ -+ - #include "pipe/p_compiler.h" - #include "pipe/p_state.h" - ---- src/gallium/state_trackers/nine/threadpool.h.orig 2015-05-07 14:10:53.443337212 +0200 -+++ src/gallium/state_trackers/nine/threadpool.h 2015-05-07 14:11:04.210307653 +0200 -@@ -24,6 +24,8 @@ - #ifndef _THREADPOOL_H_ - #define _THREADPOOL_H_ - -+#include -+ - #define MAXTHREADS 1 - - struct threadpool { ---- src/util/rand_xor.c.orig 2017-06-20 00:38:57.199474067 +0200 -+++ src/util/rand_xor.c 2017-06-20 00:40:31.351279557 +0200 -@@ -23,7 +23,9 @@ - */ - - #if defined(__linux__) -+#include - #include -+#include - #include - #include - #else ---- src/gallium/state_trackers/nine/nine_debug.c -+++ src/gallium/state_trackers/nine/nine_debug.c -@@ -73,8 +73,8 @@ - } - - #if defined(HAVE_PTHREAD) --# if defined(__GNU_LIBRARY__) && defined(__GLIBC__) && defined(__GLIBC_MINOR__) && \ -- (__GLIBC__ >= 3 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 12)) -+# if defined(__linux__) && !(defined(__GLIBC__) || \ -+ (__GLIBC__ < 3 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 12))) - if (dbg_flags & DBG_TID) - tid = pthread_self(); - # endif ---- src/util/u_thread.h -+++ src/util/u_thread.h -@@ -61,9 +61,8 @@ - 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)) && \ -- defined(__linux__) -+# if defined(__linux__) && !(defined(__GLIBC__) || \ -+ (__GLIBC__ < 3 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 12))) - pthread_setname_np(pthread_self(), name); - # endif - #endif -@@ -93,8 +92,8 @@ - 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)) -+# if defined(__linux__) && !(defined(__GLIBC__) || \ -+ (__GLIBC__ < 3 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 12))) - return pthread_equal(pthread_self(), thread); - # endif - #endif ---- src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.h -+++ src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.h -@@ -28,6 +28,8 @@ - #ifndef RADV_AMDGPU_WINSYS_H - #define RADV_AMDGPU_WINSYS_H - -+#include -+ - #include "radv_radeon_winsys.h" - #include "ac_gpu_info.h" - #include "addrlib/addrinterface.h" diff --git a/xorg/mesa/sources b/xorg/mesa/sources index 063866f38..547a5bfad 100644 --- a/xorg/mesa/sources +++ b/xorg/mesa/sources @@ -1,2 +1 @@ https://mesa.freedesktop.org/archive/mesa-19.1.1.tar.xz -patches/musl.patch