pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/graphics/MesaLib18 MesaLib18: Various fixes for the Su...
details: https://anonhg.NetBSD.org/pkgsrc/rev/001cb4b21fab
branches: trunk
changeset: 386362:001cb4b21fab
user: jperkin <jperkin%pkgsrc.org@localhost>
date: Tue Oct 16 15:21:20 2018 +0000
description:
MesaLib18: Various fixes for the SunOS build.
diffstat:
graphics/MesaLib18/Makefile | 7 +-
graphics/MesaLib18/distinfo | 11 +-
graphics/MesaLib18/patches/patch-configure | 4 +-
graphics/MesaLib18/patches/patch-configure.ac | 6 +-
graphics/MesaLib18/patches/patch-src_mesa_drivers_dri_i965_brw__performance__query.c | 60 +++++++++-
graphics/MesaLib18/patches/patch-src_util_disk__cache.c | 29 ++++
graphics/MesaLib18/patches/patch-src_util_u__atomic.h | 37 +----
7 files changed, 113 insertions(+), 41 deletions(-)
diffs (257 lines):
diff -r 022801d940a0 -r 001cb4b21fab graphics/MesaLib18/Makefile
--- a/graphics/MesaLib18/Makefile Tue Oct 16 15:18:08 2018 +0000
+++ b/graphics/MesaLib18/Makefile Tue Oct 16 15:21:20 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.2 2018/10/10 10:56:11 maya Exp $
+# $NetBSD: Makefile,v 1.3 2018/10/16 15:21:20 jperkin Exp $
DISTNAME= mesa-18.2.0
PKGNAME= ${DISTNAME:S/mesa/MesaLib/}
@@ -52,8 +52,9 @@
SUBST_FILES.drirc+= src/util/xmlconfig.c
SUBST_SED.drirc+= -e 's|/etc|${PREFIX}/etc|g'
-# Required due to clang defaulting to strict C standard by default (no strdup).
-CFLAGS.SunOS+= -D__EXTENSIONS__
+CFLAGS.SunOS+= -D__EXTENSIONS__ -D_POSIX_PTHREAD_SEMANTICS
+CXXFLAGS.SunOS+= -Drestrict=__restrict__
+LDFLAGS.SunOS+= -lsocket -lnsl
.include "../../mk/bsd.prefs.mk"
.include "../../mk/compiler.mk"
diff -r 022801d940a0 -r 001cb4b21fab graphics/MesaLib18/distinfo
--- a/graphics/MesaLib18/distinfo Tue Oct 16 15:18:08 2018 +0000
+++ b/graphics/MesaLib18/distinfo Tue Oct 16 15:21:20 2018 +0000
@@ -1,11 +1,11 @@
-$NetBSD: distinfo,v 1.2 2018/10/10 11:03:02 maya Exp $
+$NetBSD: distinfo,v 1.3 2018/10/16 15:21:20 jperkin Exp $
SHA1 (mesa-18.2.0.tar.xz) = 73723d9f3815487f474d84eb91a5cd17edfb63d4
RMD160 (mesa-18.2.0.tar.xz) = 51aae6c7a566d7d7da5e545ef3b4f04295897b21
SHA512 (mesa-18.2.0.tar.xz) = e6e997e166845009f6b97da204384758c797c870b56332652c0a2636734638f9180b7e4dbad144495645308ae4d77981a2493a22d57973723338b658e0655557
Size (mesa-18.2.0.tar.xz) = 11331164 bytes
-SHA1 (patch-configure) = c938bc7807a92fb4484d459b401133fb9fd7dbce
-SHA1 (patch-configure.ac) = 8347a3116906b8648a7841a6b109832397bd896e
+SHA1 (patch-configure) = 39093e9c7c2ea503413988ba736c11da68711c1b
+SHA1 (patch-configure.ac) = 8ef8f1d91e905f2b7ee976c8552c03b712bfb139
SHA1 (patch-include_GL_internal_dri__interface.h) = 146d2f3f3e50fc1947e8941301d9cf9d90a035e2
SHA1 (patch-src_amd_vulkan_winsys_amdgpu_radv__amdgpu__cs.c) = 1fe81a7b16e36dc9125400c20543271216a33a45
SHA1 (patch-src_compiler_builtin__type__macros.h) = 857bca0c0f55ec8d7a20b3807c7a5d7bd06bdfbf
@@ -45,7 +45,7 @@
SHA1 (patch-src_mapi_u__current.c) = 38d324fcd1c28d155106ccd248edb5eb1aa9ffac
SHA1 (patch-src_mapi_u__current.h) = 465a992bd34057e9521f0a33e6f2e25cefc145ca
SHA1 (patch-src_mesa_drivers_dri_i915_intel__screen.c) = e33f51b3502e8c52ff7283aeb807996717f79f4f
-SHA1 (patch-src_mesa_drivers_dri_i965_brw__performance__query.c) = 43ca8315a4964adf7bc99d772fd817deda3ec249
+SHA1 (patch-src_mesa_drivers_dri_i965_brw__performance__query.c) = 1250b3477c4b8013b928772b7dc7f24e8c4b67aa
SHA1 (patch-src_mesa_drivers_dri_i965_intel__screen.c) = 795b17970e95347222514bacc0701aa86fa1ff02
SHA1 (patch-src_mesa_drivers_dri_i965_intel__tiled__memcpy.c) = 5b940f9a56c694ffaf8a4383c3a2eae25cfd35a6
SHA1 (patch-src_mesa_drivers_dri_swrast_swrast.c) = 3106f350e590f62c8bd29cd85f24f977639dccdb
@@ -56,9 +56,10 @@
SHA1 (patch-src_mesa_tnl_t__pipeline.c) = e6abcdb24019ca57527d25c5cd86737332db98e3
SHA1 (patch-src_mesa_x86_common__x86.c) = f8c4b93443ef66d017f6aa114b877565b30f2598
SHA1 (patch-src_util_build__id.c) = 7a9547bbda9d2fb9f0018ccf27b70b59e497aa2c
+SHA1 (patch-src_util_disk__cache.c) = cc0b29780dba5d5b5e43c0798336f16a1f0008de
SHA1 (patch-src_util_futex.h) = 35097c3b8baf8b969c6ec5ec1feb6f4e0a48237e
SHA1 (patch-src_util_ralloc.c) = d311bfd9ed7e673d72e050668d351c1e6552cdc8
SHA1 (patch-src_util_strndup.h) = 73f49694ca48ad6b9a9d8346c5b84fddec2463bd
-SHA1 (patch-src_util_u__atomic.h) = beb1df2bb28151bde0405bcae3994107be6813a5
+SHA1 (patch-src_util_u__atomic.h) = 31d4514538ef5ee53012695eb5c66134aaec981e
SHA1 (patch-src_util_u__queue.c) = 1ea1c2f8e2971235aa98be96bfd6b2b68f876072
SHA1 (patch-src_util_xmlconfig.c) = ad5619e067957b120a70c1c63421c92b356e16ac
diff -r 022801d940a0 -r 001cb4b21fab graphics/MesaLib18/patches/patch-configure
--- a/graphics/MesaLib18/patches/patch-configure Tue Oct 16 15:18:08 2018 +0000
+++ b/graphics/MesaLib18/patches/patch-configure Tue Oct 16 15:21:20 2018 +0000
@@ -1,4 +1,4 @@
-$NetBSD: patch-configure,v 1.1 2018/10/07 23:49:31 ryoon Exp $
+$NetBSD: patch-configure,v 1.2 2018/10/16 15:21:20 jperkin Exp $
Don't check for pthread stubs on netbsd.
@@ -28,7 +28,7 @@
case "$host_os" in
-darwin*)
-+darwin* | freebsd*)
++darwin* | freebsd* | solaris*)
LD_BUILD_ID=""
;;
*)
diff -r 022801d940a0 -r 001cb4b21fab graphics/MesaLib18/patches/patch-configure.ac
--- a/graphics/MesaLib18/patches/patch-configure.ac Tue Oct 16 15:18:08 2018 +0000
+++ b/graphics/MesaLib18/patches/patch-configure.ac Tue Oct 16 15:21:20 2018 +0000
@@ -1,4 +1,4 @@
-$NetBSD: patch-configure.ac,v 1.2 2018/10/10 11:03:02 maya Exp $
+$NetBSD: patch-configure.ac,v 1.3 2018/10/16 15:21:20 jperkin Exp $
Don't check for pthread stubs anywhere, as we don't provide it.
@@ -21,14 +21,14 @@
which fails to fall back to using DRI2 when run on a system
without DRI3 support.
---- configure.ac.orig 2018-02-09 02:17:57.000000000 +0000
+--- configure.ac.orig 2018-09-07 21:18:07.000000000 +0000
+++ configure.ac
@@ -713,7 +713,7 @@ dnl
dnl OSX linker does not support build-id
dnl
case "$host_os" in
-darwin*)
-+darwin* | freebsd*)
++darwin* | freebsd* | solaris*)
LD_BUILD_ID=""
;;
*)
diff -r 022801d940a0 -r 001cb4b21fab graphics/MesaLib18/patches/patch-src_mesa_drivers_dri_i965_brw__performance__query.c
--- a/graphics/MesaLib18/patches/patch-src_mesa_drivers_dri_i965_brw__performance__query.c Tue Oct 16 15:18:08 2018 +0000
+++ b/graphics/MesaLib18/patches/patch-src_mesa_drivers_dri_i965_brw__performance__query.c Tue Oct 16 15:21:20 2018 +0000
@@ -1,9 +1,9 @@
-$NetBSD: patch-src_mesa_drivers_dri_i965_brw__performance__query.c,v 1.1 2018/10/07 23:49:31 ryoon Exp $
+$NetBSD: patch-src_mesa_drivers_dri_i965_brw__performance__query.c,v 1.2 2018/10/16 15:21:20 jperkin Exp $
Prevents libdrm i915_drm.h header from being used.
libdrm 2.4.88 does not have certain symbols defined in its i915_drm.h.
---- src/mesa/drivers/dri/i965/brw_performance_query.c.orig 2017-10-19 12:23:53.000000000 +0000
+--- src/mesa/drivers/dri/i965/brw_performance_query.c.orig 2018-09-07 21:18:07.000000000 +0000
+++ src/mesa/drivers/dri/i965/brw_performance_query.c
@@ -56,7 +56,7 @@
#include <sys/ioctl.h>
@@ -14,3 +14,59 @@
#include "main/hash.h"
#include "main/macros.h"
+@@ -1796,6 +1796,9 @@ enumerate_sysfs_metrics(struct brw_conte
+ DIR *metricsdir = NULL;
+ struct dirent *metric_entry;
+ int len;
++#ifdef __sun
++ struct stat s;
++#endif
+
+ len = snprintf(buf, sizeof(buf), "%s/metrics", brw->perfquery.sysfs_dev_dir);
+ if (len < 0 || len >= sizeof(buf)) {
+@@ -1812,10 +1815,18 @@ enumerate_sysfs_metrics(struct brw_conte
+ while ((metric_entry = readdir(metricsdir))) {
+ struct hash_entry *entry;
+
++#if defined(__sun)
++ stat(metric_entry->d_name, &s);
++ if ((s.st_mode != S_IFDIR &&
++ s.st_mode != S_IFLNK) ||
++ metric_entry->d_name[0] == '.')
++ continue;
++#else
+ if ((metric_entry->d_type != DT_DIR &&
+ metric_entry->d_type != DT_LNK) ||
+ metric_entry->d_name[0] == '.')
+ continue;
++#endif
+
+ DBG("metric set: %s\n", metric_entry->d_name);
+ entry = _mesa_hash_table_search(brw->perfquery.oa_metrics_table,
+@@ -2057,6 +2068,9 @@ get_sysfs_dev_dir(struct brw_context *br
+ DIR *drmdir;
+ struct dirent *drm_entry;
+ int len;
++#ifdef __sun
++ struct stat s;
++#endif
+
+ brw->perfquery.sysfs_dev_dir[0] = '\0';
+
+@@ -2088,9 +2102,16 @@ get_sysfs_dev_dir(struct brw_context *br
+ }
+
+ while ((drm_entry = readdir(drmdir))) {
++#if defined(__sun)
++ stat(drm_entry->d_name, &s);
++ if ((s.st_mode == S_IFDIR ||
++ s.st_mode == S_IFLNK) &&
++ strncmp(drm_entry->d_name, "card", 4) == 0)
++#else
+ if ((drm_entry->d_type == DT_DIR ||
+ drm_entry->d_type == DT_LNK) &&
+ strncmp(drm_entry->d_name, "card", 4) == 0)
++#endif
+ {
+ len = snprintf(brw->perfquery.sysfs_dev_dir,
+ sizeof(brw->perfquery.sysfs_dev_dir),
diff -r 022801d940a0 -r 001cb4b21fab graphics/MesaLib18/patches/patch-src_util_disk__cache.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/MesaLib18/patches/patch-src_util_disk__cache.c Tue Oct 16 15:21:20 2018 +0000
@@ -0,0 +1,29 @@
+$NetBSD: patch-src_util_disk__cache.c,v 1.1 2018/10/16 15:21:20 jperkin Exp $
+
+Use fcntl() on SunOS.
+
+--- src/util/disk_cache.c.orig 2018-09-07 21:18:07.000000000 +0000
++++ src/util/disk_cache.c
+@@ -857,6 +857,9 @@ cache_put(void *job, int thread_index)
+ unsigned i = 0;
+ char *filename = NULL, *filename_tmp = NULL;
+ struct disk_cache_put_job *dc_job = (struct disk_cache_put_job *) job;
++#ifdef __sun
++ struct flock lock = {0};
++#endif
+
+ filename = get_cache_file(dc_job->cache, dc_job->key);
+ if (filename == NULL)
+@@ -895,7 +898,12 @@ cache_put(void *job, int thread_index)
+ * open with the flock held. So just let that file be responsible
+ * for writing the file.
+ */
++#ifdef __sun
++ lock.l_type = F_WRLCK;
++ err = fcntl(fd, F_SETLK, &lock);
++#else
+ err = flock(fd, LOCK_EX | LOCK_NB);
++#endif
+ if (err == -1)
+ goto done;
+
diff -r 022801d940a0 -r 001cb4b21fab graphics/MesaLib18/patches/patch-src_util_u__atomic.h
--- a/graphics/MesaLib18/patches/patch-src_util_u__atomic.h Tue Oct 16 15:18:08 2018 +0000
+++ b/graphics/MesaLib18/patches/patch-src_util_u__atomic.h Tue Oct 16 15:21:20 2018 +0000
@@ -1,30 +1,15 @@
-$NetBSD: patch-src_util_u__atomic.h,v 1.1 2018/10/07 23:49:31 ryoon Exp $
+$NetBSD: patch-src_util_u__atomic.h,v 1.2 2018/10/16 15:21:20 jperkin Exp $
Fix SunOS atomic macros.
---- src/util/u_atomic.h.orig 2017-02-13 11:55:50.000000000 +0000
+--- src/util/u_atomic.h.orig 2018-09-07 21:18:07.000000000 +0000
+++ src/util/u_atomic.h
-@@ -177,7 +177,7 @@
- sizeof(*v) == sizeof(uint16_t) ? atomic_inc_16((uint16_t *)(v)) : \
- sizeof(*v) == sizeof(uint32_t) ? atomic_inc_32((uint32_t *)(v)) : \
- sizeof(*v) == sizeof(uint64_t) ? atomic_inc_64((uint64_t *)(v)) : \
-- (assert(!"should not get here"), 0))
-+ (assert(!"should not get here"), (void)0))
-
- #define p_atomic_inc_return(v) ((__typeof(*v)) \
- sizeof(*v) == sizeof(uint8_t) ? atomic_inc_8_nv ((uint8_t *)(v)) : \
-@@ -186,12 +186,12 @@
- sizeof(*v) == sizeof(uint64_t) ? atomic_inc_64_nv((uint64_t *)(v)) : \
- (assert(!"should not get here"), 0))
-
--#define p_atomic_dec(v) ((void) \
-+#define p_atomic_dec(v) (void) (\
- sizeof(*v) == sizeof(uint8_t) ? atomic_dec_8 ((uint8_t *)(v)) : \
- sizeof(*v) == sizeof(uint16_t) ? atomic_dec_16((uint16_t *)(v)) : \
- sizeof(*v) == sizeof(uint32_t) ? atomic_dec_32((uint32_t *)(v)) : \
- sizeof(*v) == sizeof(uint64_t) ? atomic_dec_64((uint64_t *)(v)) : \
-- (assert(!"should not get here"), 0))
-+ (assert(!"should not get here"), (void)0))
-
- #define p_atomic_dec_return(v) ((__typeof(*v)) \
- sizeof(*v) == sizeof(uint8_t) ? atomic_dec_8_nv ((uint8_t *)(v)) : \
+@@ -20,7 +20,7 @@
+ * locally coded assembly, compiler intrinsic or ultimately a
+ * mutex-based implementation.
+ */
+-#if defined(__sun)
++#if defined(__sun) && !defined(__GNUC__)
+ #define PIPE_ATOMIC_OS_SOLARIS
+ #elif defined(_MSC_VER)
+ #define PIPE_ATOMIC_MSVC_INTRINSIC
Home |
Main Index |
Thread Index |
Old Index