Tue Oct 16 15:21:20 2018 UTC ()
MesaLib18: Various fixes for the SunOS build.


(jperkin)
diff -r1.2 -r1.3 pkgsrc/graphics/MesaLib18/Makefile
diff -r1.2 -r1.3 pkgsrc/graphics/MesaLib18/distinfo
diff -r1.1 -r1.2 pkgsrc/graphics/MesaLib18/patches/patch-configure
diff -r1.1 -r1.2 pkgsrc/graphics/MesaLib18/patches/patch-src_mesa_drivers_dri_i965_brw__performance__query.c
diff -r1.1 -r1.2 pkgsrc/graphics/MesaLib18/patches/patch-src_util_u__atomic.h
diff -r1.2 -r1.3 pkgsrc/graphics/MesaLib18/patches/patch-configure.ac
diff -r0 -r1.1 pkgsrc/graphics/MesaLib18/patches/patch-src_util_disk__cache.c

cvs diff -r1.2 -r1.3 pkgsrc/graphics/MesaLib18/Attic/Makefile (expand / switch to unified diff)

--- pkgsrc/graphics/MesaLib18/Attic/Makefile 2018/10/10 10:56:11 1.2
+++ pkgsrc/graphics/MesaLib18/Attic/Makefile 2018/10/16 15:21:20 1.3
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: Makefile,v 1.2 2018/10/10 10:56:11 maya Exp $ 1# $NetBSD: Makefile,v 1.3 2018/10/16 15:21:20 jperkin Exp $
2 2
3DISTNAME= mesa-18.2.0 3DISTNAME= mesa-18.2.0
4PKGNAME= ${DISTNAME:S/mesa/MesaLib/} 4PKGNAME= ${DISTNAME:S/mesa/MesaLib/}
5CATEGORIES= graphics x11 5CATEGORIES= graphics x11
6MASTER_SITES= ftp://ftp.freedesktop.org/pub/mesa/ 6MASTER_SITES= ftp://ftp.freedesktop.org/pub/mesa/
7# MASTER_SITES= ftp://ftp.freedesktop.org/pub/mesa/${PKGVERSION_NOREV}/ 7# MASTER_SITES= ftp://ftp.freedesktop.org/pub/mesa/${PKGVERSION_NOREV}/
8EXTRACT_SUFX= .tar.xz 8EXTRACT_SUFX= .tar.xz
9 9
10MAINTAINER= pkgsrc-users@NetBSD.org 10MAINTAINER= pkgsrc-users@NetBSD.org
11HOMEPAGE= https://www.mesa3d.org/ 11HOMEPAGE= https://www.mesa3d.org/
12COMMENT= The Mesa 3D Graphics Library 12COMMENT= The Mesa 3D Graphics Library
13LICENSE= mit 13LICENSE= mit
14 14
@@ -42,28 +42,29 @@ SUBST_FILES.wrapper-bug+= src/mapi/Makef @@ -42,28 +42,29 @@ SUBST_FILES.wrapper-bug+= src/mapi/Makef
42SUBST_FILES.wrapper-bug+= src/mesa/drivers/x11/Makefile.in 42SUBST_FILES.wrapper-bug+= src/mesa/drivers/x11/Makefile.in
43SUBST_FILES.wrapper-bug+= src/mesa/drivers/osmesa/Makefile.in 43SUBST_FILES.wrapper-bug+= src/mesa/drivers/osmesa/Makefile.in
44SUBST_SED.wrapper-bug= -e 's,shared-glapi/libglapi.la,shared-glapi/libglapi_tmp_rename.la,g' 44SUBST_SED.wrapper-bug= -e 's,shared-glapi/libglapi.la,shared-glapi/libglapi_tmp_rename.la,g'
45SUBST_SED.wrapper-bug+= -e 's,libglapi.la,libglapi_impl.la,g' 45SUBST_SED.wrapper-bug+= -e 's,libglapi.la,libglapi_impl.la,g'
46SUBST_SED.wrapper-bug+= -e 's,libglapi_tmp_rename.la,libglapi.la,g' 46SUBST_SED.wrapper-bug+= -e 's,libglapi_tmp_rename.la,libglapi.la,g'
47 47
48# Replace /etc/drirc with ${PREFIX}/etc/drirc 48# Replace /etc/drirc with ${PREFIX}/etc/drirc
49SUBST_CLASSES+= drirc 49SUBST_CLASSES+= drirc
50SUBST_STAGE.drirc= pre-configure 50SUBST_STAGE.drirc= pre-configure
51SUBST_MESSAGE.drirc= Fixing hardcoded /etc/drirc references 51SUBST_MESSAGE.drirc= Fixing hardcoded /etc/drirc references
52SUBST_FILES.drirc+= src/util/xmlconfig.c 52SUBST_FILES.drirc+= src/util/xmlconfig.c
53SUBST_SED.drirc+= -e 's|/etc|${PREFIX}/etc|g' 53SUBST_SED.drirc+= -e 's|/etc|${PREFIX}/etc|g'
54 54
55# Required due to clang defaulting to strict C standard by default (no strdup). 55CFLAGS.SunOS+= -D__EXTENSIONS__ -D_POSIX_PTHREAD_SEMANTICS
56CFLAGS.SunOS+= -D__EXTENSIONS__ 56CXXFLAGS.SunOS+= -Drestrict=__restrict__
 57LDFLAGS.SunOS+= -lsocket -lnsl
57 58
58.include "../../mk/bsd.prefs.mk" 59.include "../../mk/bsd.prefs.mk"
59.include "../../mk/compiler.mk" 60.include "../../mk/compiler.mk"
60.include "options.mk" 61.include "options.mk"
61 62
62.if ${MACHINE_ARCH} == "i386" 63.if ${MACHINE_ARCH} == "i386"
63CONFIGURE_ARGS+= --enable-glx-read-only-text 64CONFIGURE_ARGS+= --enable-glx-read-only-text
64.endif 65.endif
65 66
66PYTHON_FOR_BUILD_ONLY= yes 67PYTHON_FOR_BUILD_ONLY= yes
67PYTHON_VERSIONS_INCOMPATIBLE= 34 35 36 37 # as of 11.2.2 68PYTHON_VERSIONS_INCOMPATIBLE= 34 35 36 37 # as of 11.2.2
68BUILD_DEPENDS+= ${PYPKGPREFIX}-mako-[0-9]*:../../devel/py-mako 69BUILD_DEPENDS+= ${PYPKGPREFIX}-mako-[0-9]*:../../devel/py-mako
69CONFIGURE_ENV+= ac_cv_prog_PYTHON2=${PYTHONBIN} 70CONFIGURE_ENV+= ac_cv_prog_PYTHON2=${PYTHONBIN}

cvs diff -r1.2 -r1.3 pkgsrc/graphics/MesaLib18/Attic/distinfo (expand / switch to unified diff)

--- pkgsrc/graphics/MesaLib18/Attic/distinfo 2018/10/10 11:03:02 1.2
+++ pkgsrc/graphics/MesaLib18/Attic/distinfo 2018/10/16 15:21:20 1.3
@@ -1,21 +1,21 @@ @@ -1,21 +1,21 @@
1$NetBSD: distinfo,v 1.2 2018/10/10 11:03:02 maya Exp $ 1$NetBSD: distinfo,v 1.3 2018/10/16 15:21:20 jperkin Exp $
2 2
3SHA1 (mesa-18.2.0.tar.xz) = 73723d9f3815487f474d84eb91a5cd17edfb63d4 3SHA1 (mesa-18.2.0.tar.xz) = 73723d9f3815487f474d84eb91a5cd17edfb63d4
4RMD160 (mesa-18.2.0.tar.xz) = 51aae6c7a566d7d7da5e545ef3b4f04295897b21 4RMD160 (mesa-18.2.0.tar.xz) = 51aae6c7a566d7d7da5e545ef3b4f04295897b21
5SHA512 (mesa-18.2.0.tar.xz) = e6e997e166845009f6b97da204384758c797c870b56332652c0a2636734638f9180b7e4dbad144495645308ae4d77981a2493a22d57973723338b658e0655557 5SHA512 (mesa-18.2.0.tar.xz) = e6e997e166845009f6b97da204384758c797c870b56332652c0a2636734638f9180b7e4dbad144495645308ae4d77981a2493a22d57973723338b658e0655557
6Size (mesa-18.2.0.tar.xz) = 11331164 bytes 6Size (mesa-18.2.0.tar.xz) = 11331164 bytes
7SHA1 (patch-configure) = c938bc7807a92fb4484d459b401133fb9fd7dbce 7SHA1 (patch-configure) = 39093e9c7c2ea503413988ba736c11da68711c1b
8SHA1 (patch-configure.ac) = 8347a3116906b8648a7841a6b109832397bd896e 8SHA1 (patch-configure.ac) = 8ef8f1d91e905f2b7ee976c8552c03b712bfb139
9SHA1 (patch-include_GL_internal_dri__interface.h) = 146d2f3f3e50fc1947e8941301d9cf9d90a035e2 9SHA1 (patch-include_GL_internal_dri__interface.h) = 146d2f3f3e50fc1947e8941301d9cf9d90a035e2
10SHA1 (patch-src_amd_vulkan_winsys_amdgpu_radv__amdgpu__cs.c) = 1fe81a7b16e36dc9125400c20543271216a33a45 10SHA1 (patch-src_amd_vulkan_winsys_amdgpu_radv__amdgpu__cs.c) = 1fe81a7b16e36dc9125400c20543271216a33a45
11SHA1 (patch-src_compiler_builtin__type__macros.h) = 857bca0c0f55ec8d7a20b3807c7a5d7bd06bdfbf 11SHA1 (patch-src_compiler_builtin__type__macros.h) = 857bca0c0f55ec8d7a20b3807c7a5d7bd06bdfbf
12SHA1 (patch-src_compiler_glsl_glsl__parser__extras.cpp) = ef114d6e288e6d212fce9d1c0606f7d454a171c4 12SHA1 (patch-src_compiler_glsl_glsl__parser__extras.cpp) = ef114d6e288e6d212fce9d1c0606f7d454a171c4
13SHA1 (patch-src_egl_drivers_dri2_platform__drm.c) = 94ec2e969e7cf7c89c3192e60758e5ad14b02629 13SHA1 (patch-src_egl_drivers_dri2_platform__drm.c) = 94ec2e969e7cf7c89c3192e60758e5ad14b02629
14SHA1 (patch-src_egl_drivers_dri2_platform__x11.c) = 49e48c31eacb79d1da357fe70eaffd2926b5280e 14SHA1 (patch-src_egl_drivers_dri2_platform__x11.c) = 49e48c31eacb79d1da357fe70eaffd2926b5280e
15SHA1 (patch-src_egl_main_eglglobals.c) = 0d52014f52e62fc5fa6650336ddb0011ecf331e6 15SHA1 (patch-src_egl_main_eglglobals.c) = 0d52014f52e62fc5fa6650336ddb0011ecf331e6
16SHA1 (patch-src_gallium_auxiliary_drivers_trace_tr__dump.c) = 360e1608508a7bbb41acecd58930781038e2309e 16SHA1 (patch-src_gallium_auxiliary_drivers_trace_tr__dump.c) = 360e1608508a7bbb41acecd58930781038e2309e
17SHA1 (patch-src_gallium_auxiliary_pipe-loader_pipe__loader__drm.c) = b8fd5e0d1bab1fa7ae965cae382a1cd1ffbf1fc4 17SHA1 (patch-src_gallium_auxiliary_pipe-loader_pipe__loader__drm.c) = b8fd5e0d1bab1fa7ae965cae382a1cd1ffbf1fc4
18SHA1 (patch-src_gallium_auxiliary_util_u__format__tests.c) = 4d5e4677c2825778c43440ab131b8807f6840975 18SHA1 (patch-src_gallium_auxiliary_util_u__format__tests.c) = 4d5e4677c2825778c43440ab131b8807f6840975
19SHA1 (patch-src_gallium_drivers_nouveau_nouveau__vp3__video.c) = 04f95784c3270c9bb7e95377982e217962481525 19SHA1 (patch-src_gallium_drivers_nouveau_nouveau__vp3__video.c) = 04f95784c3270c9bb7e95377982e217962481525
20SHA1 (patch-src_gallium_drivers_nouveau_nv50_nv84__video.c) = 1b4239fe053523835ecac006894bdb0cde0ee626 20SHA1 (patch-src_gallium_drivers_nouveau_nv50_nv84__video.c) = 1b4239fe053523835ecac006894bdb0cde0ee626
21SHA1 (patch-src_gallium_drivers_vc4_vc4__bufmgr.c) = 1d591d346486fdf58893f69ab92a272e6a31a987 21SHA1 (patch-src_gallium_drivers_vc4_vc4__bufmgr.c) = 1d591d346486fdf58893f69ab92a272e6a31a987
@@ -35,30 +35,31 @@ SHA1 (patch-src_intel_Makefile.tools.am) @@ -35,30 +35,31 @@ SHA1 (patch-src_intel_Makefile.tools.am)
35SHA1 (patch-src_intel_compiler_brw__fs__bank__conflicts.cpp) = 6276d2c6846bb4dd08699921bec4e20202a17478 35SHA1 (patch-src_intel_compiler_brw__fs__bank__conflicts.cpp) = 6276d2c6846bb4dd08699921bec4e20202a17478
36SHA1 (patch-src_intel_tools_aubinator.c) = a468cf9f1ac88e883ad33400afaf8df690086e72 36SHA1 (patch-src_intel_tools_aubinator.c) = a468cf9f1ac88e883ad33400afaf8df690086e72
37SHA1 (patch-src_intel_tools_aubinator__error__decode.c) = d8f636e3c3e76763a505a1dce23de0b198ad62fa 37SHA1 (patch-src_intel_tools_aubinator__error__decode.c) = d8f636e3c3e76763a505a1dce23de0b198ad62fa
38SHA1 (patch-src_intel_vulkan_anv__allocator.c) = 5dd27eea9811d739558c5b488c57a3d7ae539d87 38SHA1 (patch-src_intel_vulkan_anv__allocator.c) = 5dd27eea9811d739558c5b488c57a3d7ae539d87
39SHA1 (patch-src_intel_vulkan_anv__device.c) = 5d581dcd9695c869855f200c575cf98b7165c1ba 39SHA1 (patch-src_intel_vulkan_anv__device.c) = 5d581dcd9695c869855f200c575cf98b7165c1ba
40SHA1 (patch-src_intel_vulkan_anv__gem.c) = b8eb487fa704151e7c3c3b1d23973b2b0aa5922e 40SHA1 (patch-src_intel_vulkan_anv__gem.c) = b8eb487fa704151e7c3c3b1d23973b2b0aa5922e
41SHA1 (patch-src_intel_vulkan_anv__queue.c) = 2dbf7dfd0c77f74f510032bf8d12109f58c50a30 41SHA1 (patch-src_intel_vulkan_anv__queue.c) = 2dbf7dfd0c77f74f510032bf8d12109f58c50a30
42SHA1 (patch-src_mapi_entry__x86-64__tls.h) = 11b7ef1da435fa17fc7025a46a123d447d6a7d07 42SHA1 (patch-src_mapi_entry__x86-64__tls.h) = 11b7ef1da435fa17fc7025a46a123d447d6a7d07
43SHA1 (patch-src_mapi_entry__x86__tls.h) = 11c0f5302d305a77f3a1780d44a2c61f48a66273 43SHA1 (patch-src_mapi_entry__x86__tls.h) = 11c0f5302d305a77f3a1780d44a2c61f48a66273
44SHA1 (patch-src_mapi_glapi_gen_gl__gentable.py) = 0b1d4ef3f78a9b3726ef7f9921608a48a5e4ac56 44SHA1 (patch-src_mapi_glapi_gen_gl__gentable.py) = 0b1d4ef3f78a9b3726ef7f9921608a48a5e4ac56
45SHA1 (patch-src_mapi_u__current.c) = 38d324fcd1c28d155106ccd248edb5eb1aa9ffac 45SHA1 (patch-src_mapi_u__current.c) = 38d324fcd1c28d155106ccd248edb5eb1aa9ffac
46SHA1 (patch-src_mapi_u__current.h) = 465a992bd34057e9521f0a33e6f2e25cefc145ca 46SHA1 (patch-src_mapi_u__current.h) = 465a992bd34057e9521f0a33e6f2e25cefc145ca
47SHA1 (patch-src_mesa_drivers_dri_i915_intel__screen.c) = e33f51b3502e8c52ff7283aeb807996717f79f4f 47SHA1 (patch-src_mesa_drivers_dri_i915_intel__screen.c) = e33f51b3502e8c52ff7283aeb807996717f79f4f
48SHA1 (patch-src_mesa_drivers_dri_i965_brw__performance__query.c) = 43ca8315a4964adf7bc99d772fd817deda3ec249 48SHA1 (patch-src_mesa_drivers_dri_i965_brw__performance__query.c) = 1250b3477c4b8013b928772b7dc7f24e8c4b67aa
49SHA1 (patch-src_mesa_drivers_dri_i965_intel__screen.c) = 795b17970e95347222514bacc0701aa86fa1ff02 49SHA1 (patch-src_mesa_drivers_dri_i965_intel__screen.c) = 795b17970e95347222514bacc0701aa86fa1ff02
50SHA1 (patch-src_mesa_drivers_dri_i965_intel__tiled__memcpy.c) = 5b940f9a56c694ffaf8a4383c3a2eae25cfd35a6 50SHA1 (patch-src_mesa_drivers_dri_i965_intel__tiled__memcpy.c) = 5b940f9a56c694ffaf8a4383c3a2eae25cfd35a6
51SHA1 (patch-src_mesa_drivers_dri_swrast_swrast.c) = 3106f350e590f62c8bd29cd85f24f977639dccdb 51SHA1 (patch-src_mesa_drivers_dri_swrast_swrast.c) = 3106f350e590f62c8bd29cd85f24f977639dccdb
52SHA1 (patch-src_mesa_main_context.c) = 74226013b56ad6c9678f1970458538b35967678f 52SHA1 (patch-src_mesa_main_context.c) = 74226013b56ad6c9678f1970458538b35967678f
53SHA1 (patch-src_mesa_main_extensions.c) = 2f48bdb1176c2878bb33bcfab7556172b50a987e 53SHA1 (patch-src_mesa_main_extensions.c) = 2f48bdb1176c2878bb33bcfab7556172b50a987e
54SHA1 (patch-src_mesa_main_macros.h) = c5dceaa8dc02a58e5b2273d82e3fe1cc12e327d3 54SHA1 (patch-src_mesa_main_macros.h) = c5dceaa8dc02a58e5b2273d82e3fe1cc12e327d3
55SHA1 (patch-src_mesa_main_shader__query.cpp) = 3f9c31645d87855759def11344dee16af23c7be3 55SHA1 (patch-src_mesa_main_shader__query.cpp) = 3f9c31645d87855759def11344dee16af23c7be3
56SHA1 (patch-src_mesa_tnl_t__pipeline.c) = e6abcdb24019ca57527d25c5cd86737332db98e3 56SHA1 (patch-src_mesa_tnl_t__pipeline.c) = e6abcdb24019ca57527d25c5cd86737332db98e3
57SHA1 (patch-src_mesa_x86_common__x86.c) = f8c4b93443ef66d017f6aa114b877565b30f2598 57SHA1 (patch-src_mesa_x86_common__x86.c) = f8c4b93443ef66d017f6aa114b877565b30f2598
58SHA1 (patch-src_util_build__id.c) = 7a9547bbda9d2fb9f0018ccf27b70b59e497aa2c 58SHA1 (patch-src_util_build__id.c) = 7a9547bbda9d2fb9f0018ccf27b70b59e497aa2c
 59SHA1 (patch-src_util_disk__cache.c) = cc0b29780dba5d5b5e43c0798336f16a1f0008de
59SHA1 (patch-src_util_futex.h) = 35097c3b8baf8b969c6ec5ec1feb6f4e0a48237e 60SHA1 (patch-src_util_futex.h) = 35097c3b8baf8b969c6ec5ec1feb6f4e0a48237e
60SHA1 (patch-src_util_ralloc.c) = d311bfd9ed7e673d72e050668d351c1e6552cdc8 61SHA1 (patch-src_util_ralloc.c) = d311bfd9ed7e673d72e050668d351c1e6552cdc8
61SHA1 (patch-src_util_strndup.h) = 73f49694ca48ad6b9a9d8346c5b84fddec2463bd 62SHA1 (patch-src_util_strndup.h) = 73f49694ca48ad6b9a9d8346c5b84fddec2463bd
62SHA1 (patch-src_util_u__atomic.h) = beb1df2bb28151bde0405bcae3994107be6813a5 63SHA1 (patch-src_util_u__atomic.h) = 31d4514538ef5ee53012695eb5c66134aaec981e
63SHA1 (patch-src_util_u__queue.c) = 1ea1c2f8e2971235aa98be96bfd6b2b68f876072 64SHA1 (patch-src_util_u__queue.c) = 1ea1c2f8e2971235aa98be96bfd6b2b68f876072
64SHA1 (patch-src_util_xmlconfig.c) = ad5619e067957b120a70c1c63421c92b356e16ac 65SHA1 (patch-src_util_xmlconfig.c) = ad5619e067957b120a70c1c63421c92b356e16ac

cvs diff -r1.1 -r1.2 pkgsrc/graphics/MesaLib18/patches/Attic/patch-configure (expand / switch to unified diff)

--- pkgsrc/graphics/MesaLib18/patches/Attic/patch-configure 2018/10/07 23:49:31 1.1
+++ pkgsrc/graphics/MesaLib18/patches/Attic/patch-configure 2018/10/16 15:21:20 1.2
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1$NetBSD: patch-configure,v 1.1 2018/10/07 23:49:31 ryoon Exp $ 1$NetBSD: patch-configure,v 1.2 2018/10/16 15:21:20 jperkin Exp $
2 2
3Don't check for pthread stubs on netbsd. 3Don't check for pthread stubs on netbsd.
4 4
5From FreeBSD ports graphics/mesa-dri 18.0.0, 5From FreeBSD ports graphics/mesa-dri 18.0.0,
6DragonFly dports graphics/mesa-dri 17.3.1, 6DragonFly dports graphics/mesa-dri 17.3.1,
7files/patch-configure 7files/patch-configure
8 8
9* Extend to FreeBSD 9* Extend to FreeBSD
10osx: ld does not support --build-ld 10osx: ld does not support --build-ld
11 11
12* For FreeBSD: Use monotonic clock for timeouts. 12* For FreeBSD: Use monotonic clock for timeouts.
13 13
14* For FreeBSD: Implement futex_wake() and futex_wait() via _umtx_op()  14* For FreeBSD: Implement futex_wake() and futex_wait() via _umtx_op()
@@ -18,27 +18,27 @@ DRI3 remains enabled at compile time, bu @@ -18,27 +18,27 @@ DRI3 remains enabled at compile time, bu
18runtime for stock FreeBSD. Set LIBGL_DRI3_ENABLE in the 18runtime for stock FreeBSD. Set LIBGL_DRI3_ENABLE in the
19environment to enable DRI3. 19environment to enable DRI3.
20This change was made to work around a problem in libEGL, 20This change was made to work around a problem in libEGL,
21which fails to fall back to using DRI2 when run on a system 21which fails to fall back to using DRI2 when run on a system
22without DRI3 support. 22without DRI3 support.
23 23
24--- configure.orig 2018-09-07 21:18:17.000000000 +0000 24--- configure.orig 2018-09-07 21:18:17.000000000 +0000
25+++ configure 25+++ configure
26@@ -21746,7 +21746,7 @@ fi 26@@ -21746,7 +21746,7 @@ fi
27  27
28  28
29 case "$host_os" in 29 case "$host_os" in
30-darwin*) 30-darwin*)
31+darwin* | freebsd*) 31+darwin* | freebsd* | solaris*)
32 LD_BUILD_ID="" 32 LD_BUILD_ID=""
33 ;; 33 ;;
34 *) 34 *)
35@@ -22108,12 +22108,13 @@ case "$host_os" in 35@@ -22108,12 +22108,13 @@ case "$host_os" in
36 darwin*) 36 darwin*)
37 ;; 37 ;;
38 *) 38 *)
39- for ac_func in clock_gettime 39- for ac_func in clock_gettime
40+ for ac_func in clock_gettime clock_nanosleep 40+ for ac_func in clock_gettime clock_nanosleep
41 do : 41 do :
42- ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime" 42- ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
43-if test "x$ac_cv_func_clock_gettime" = xyes; then : 43-if test "x$ac_cv_func_clock_gettime" = xyes; then :
44+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` 44+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`

cvs diff -r1.1 -r1.2 pkgsrc/graphics/MesaLib18/patches/Attic/patch-src_mesa_drivers_dri_i965_brw__performance__query.c (expand / switch to unified diff)

--- pkgsrc/graphics/MesaLib18/patches/Attic/patch-src_mesa_drivers_dri_i965_brw__performance__query.c 2018/10/07 23:49:31 1.1
+++ pkgsrc/graphics/MesaLib18/patches/Attic/patch-src_mesa_drivers_dri_i965_brw__performance__query.c 2018/10/16 15:21:20 1.2
@@ -1,16 +1,72 @@ @@ -1,16 +1,72 @@
1$NetBSD: patch-src_mesa_drivers_dri_i965_brw__performance__query.c,v 1.1 2018/10/07 23:49:31 ryoon Exp $ 1$NetBSD: patch-src_mesa_drivers_dri_i965_brw__performance__query.c,v 1.2 2018/10/16 15:21:20 jperkin Exp $
2 2
3Prevents libdrm i915_drm.h header from being used. 3Prevents libdrm i915_drm.h header from being used.
4libdrm 2.4.88 does not have certain symbols defined in its i915_drm.h. 4libdrm 2.4.88 does not have certain symbols defined in its i915_drm.h.
5 5
6--- src/mesa/drivers/dri/i965/brw_performance_query.c.orig 2017-10-19 12:23:53.000000000 +0000 6--- src/mesa/drivers/dri/i965/brw_performance_query.c.orig 2018-09-07 21:18:07.000000000 +0000
7+++ src/mesa/drivers/dri/i965/brw_performance_query.c 7+++ src/mesa/drivers/dri/i965/brw_performance_query.c
8@@ -56,7 +56,7 @@ 8@@ -56,7 +56,7 @@
9 #include <sys/ioctl.h> 9 #include <sys/ioctl.h>
10  10
11 #include <xf86drm.h> 11 #include <xf86drm.h>
12-#include <i915_drm.h> 12-#include <i915_drm.h>
13+#include "drm-uapi/i915_drm.h" 13+#include "drm-uapi/i915_drm.h"
14  14
15 #include "main/hash.h" 15 #include "main/hash.h"
16 #include "main/macros.h" 16 #include "main/macros.h"
 17@@ -1796,6 +1796,9 @@ enumerate_sysfs_metrics(struct brw_conte
 18 DIR *metricsdir = NULL;
 19 struct dirent *metric_entry;
 20 int len;
 21+#ifdef __sun
 22+ struct stat s;
 23+#endif
 24
 25 len = snprintf(buf, sizeof(buf), "%s/metrics", brw->perfquery.sysfs_dev_dir);
 26 if (len < 0 || len >= sizeof(buf)) {
 27@@ -1812,10 +1815,18 @@ enumerate_sysfs_metrics(struct brw_conte
 28 while ((metric_entry = readdir(metricsdir))) {
 29 struct hash_entry *entry;
 30
 31+#if defined(__sun)
 32+ stat(metric_entry->d_name, &s);
 33+ if ((s.st_mode != S_IFDIR &&
 34+ s.st_mode != S_IFLNK) ||
 35+ metric_entry->d_name[0] == '.')
 36+ continue;
 37+#else
 38 if ((metric_entry->d_type != DT_DIR &&
 39 metric_entry->d_type != DT_LNK) ||
 40 metric_entry->d_name[0] == '.')
 41 continue;
 42+#endif
 43
 44 DBG("metric set: %s\n", metric_entry->d_name);
 45 entry = _mesa_hash_table_search(brw->perfquery.oa_metrics_table,
 46@@ -2057,6 +2068,9 @@ get_sysfs_dev_dir(struct brw_context *br
 47 DIR *drmdir;
 48 struct dirent *drm_entry;
 49 int len;
 50+#ifdef __sun
 51+ struct stat s;
 52+#endif
 53
 54 brw->perfquery.sysfs_dev_dir[0] = '\0';
 55
 56@@ -2088,9 +2102,16 @@ get_sysfs_dev_dir(struct brw_context *br
 57 }
 58
 59 while ((drm_entry = readdir(drmdir))) {
 60+#if defined(__sun)
 61+ stat(drm_entry->d_name, &s);
 62+ if ((s.st_mode == S_IFDIR ||
 63+ s.st_mode == S_IFLNK) &&
 64+ strncmp(drm_entry->d_name, "card", 4) == 0)
 65+#else
 66 if ((drm_entry->d_type == DT_DIR ||
 67 drm_entry->d_type == DT_LNK) &&
 68 strncmp(drm_entry->d_name, "card", 4) == 0)
 69+#endif
 70 {
 71 len = snprintf(brw->perfquery.sysfs_dev_dir,
 72 sizeof(brw->perfquery.sysfs_dev_dir),

cvs diff -r1.1 -r1.2 pkgsrc/graphics/MesaLib18/patches/Attic/patch-src_util_u__atomic.h (expand / switch to unified diff)

--- pkgsrc/graphics/MesaLib18/patches/Attic/patch-src_util_u__atomic.h 2018/10/07 23:49:31 1.1
+++ pkgsrc/graphics/MesaLib18/patches/Attic/patch-src_util_u__atomic.h 2018/10/16 15:21:20 1.2
@@ -1,30 +1,15 @@ @@ -1,30 +1,15 @@
1$NetBSD: patch-src_util_u__atomic.h,v 1.1 2018/10/07 23:49:31 ryoon Exp $ 1$NetBSD: patch-src_util_u__atomic.h,v 1.2 2018/10/16 15:21:20 jperkin Exp $
2 2
3Fix SunOS atomic macros. 3Fix SunOS atomic macros.
4 4
5--- src/util/u_atomic.h.orig 2017-02-13 11:55:50.000000000 +0000 5--- src/util/u_atomic.h.orig 2018-09-07 21:18:07.000000000 +0000
6+++ src/util/u_atomic.h 6+++ src/util/u_atomic.h
7@@ -177,7 +177,7 @@ 7@@ -20,7 +20,7 @@
8 sizeof(*v) == sizeof(uint16_t) ? atomic_inc_16((uint16_t *)(v)) : \ 8 * locally coded assembly, compiler intrinsic or ultimately a
9 sizeof(*v) == sizeof(uint32_t) ? atomic_inc_32((uint32_t *)(v)) : \ 9 * mutex-based implementation.
10 sizeof(*v) == sizeof(uint64_t) ? atomic_inc_64((uint64_t *)(v)) : \ 10 */
11- (assert(!"should not get here"), 0)) 11-#if defined(__sun)
12+ (assert(!"should not get here"), (void)0)) 12+#if defined(__sun) && !defined(__GNUC__)
13  13 #define PIPE_ATOMIC_OS_SOLARIS
14 #define p_atomic_inc_return(v) ((__typeof(*v)) \ 14 #elif defined(_MSC_VER)
15 sizeof(*v) == sizeof(uint8_t) ? atomic_inc_8_nv ((uint8_t *)(v)) : \ 15 #define PIPE_ATOMIC_MSVC_INTRINSIC
16@@ -186,12 +186,12 @@ 
17 sizeof(*v) == sizeof(uint64_t) ? atomic_inc_64_nv((uint64_t *)(v)) : \ 
18 (assert(!"should not get here"), 0)) 
19  
20-#define p_atomic_dec(v) ((void) \ 
21+#define p_atomic_dec(v) (void) (\ 
22 sizeof(*v) == sizeof(uint8_t) ? atomic_dec_8 ((uint8_t *)(v)) : \ 
23 sizeof(*v) == sizeof(uint16_t) ? atomic_dec_16((uint16_t *)(v)) : \ 
24 sizeof(*v) == sizeof(uint32_t) ? atomic_dec_32((uint32_t *)(v)) : \ 
25 sizeof(*v) == sizeof(uint64_t) ? atomic_dec_64((uint64_t *)(v)) : \ 
26- (assert(!"should not get here"), 0)) 
27+ (assert(!"should not get here"), (void)0)) 
28  
29 #define p_atomic_dec_return(v) ((__typeof(*v)) \ 
30 sizeof(*v) == sizeof(uint8_t) ? atomic_dec_8_nv ((uint8_t *)(v)) : \ 

cvs diff -r1.2 -r1.3 pkgsrc/graphics/MesaLib18/patches/Attic/patch-configure.ac (expand / switch to unified diff)

--- pkgsrc/graphics/MesaLib18/patches/Attic/patch-configure.ac 2018/10/10 11:03:02 1.2
+++ pkgsrc/graphics/MesaLib18/patches/Attic/patch-configure.ac 2018/10/16 15:21:20 1.3
@@ -1,44 +1,44 @@ @@ -1,44 +1,44 @@
1$NetBSD: patch-configure.ac,v 1.2 2018/10/10 11:03:02 maya Exp $ 1$NetBSD: patch-configure.ac,v 1.3 2018/10/16 15:21:20 jperkin Exp $
2 2
3Don't check for pthread stubs anywhere, as we don't provide it. 3Don't check for pthread stubs anywhere, as we don't provide it.
4 4
5From FreeBSD ports graphics/mesa-dri 18.0.0, 5From FreeBSD ports graphics/mesa-dri 18.0.0,
6DragonFly dports graphics/mesa-dri 17.3.1, 6DragonFly dports graphics/mesa-dri 17.3.1,
7files/patch-configure 7files/patch-configure
8 8
9* Extend to FreeBSD 9* Extend to FreeBSD
10osx: ld does not support --build-ld 10osx: ld does not support --build-ld
11 11
12* For FreeBSD: Use monotonic clock for timeouts. 12* For FreeBSD: Use monotonic clock for timeouts.
13 13
14* For FreeBSD: Implement futex_wake() and futex_wait() via _umtx_op()  14* For FreeBSD: Implement futex_wake() and futex_wait() via _umtx_op()
15 15
16* dri3: Mon Apr 10 19:14:48 2017 UTC 16* dri3: Mon Apr 10 19:14:48 2017 UTC
17DRI3 remains enabled at compile time, but it is now disabled at 17DRI3 remains enabled at compile time, but it is now disabled at
18runtime for stock FreeBSD. Set LIBGL_DRI3_ENABLE in the 18runtime for stock FreeBSD. Set LIBGL_DRI3_ENABLE in the
19environment to enable DRI3. 19environment to enable DRI3.
20This change was made to work around a problem in libEGL, 20This change was made to work around a problem in libEGL,
21which fails to fall back to using DRI2 when run on a system 21which fails to fall back to using DRI2 when run on a system
22without DRI3 support. 22without DRI3 support.
23 23
24--- configure.ac.orig 2018-02-09 02:17:57.000000000 +0000 24--- configure.ac.orig 2018-09-07 21:18:07.000000000 +0000
25+++ configure.ac 25+++ configure.ac
26@@ -713,7 +713,7 @@ dnl 26@@ -713,7 +713,7 @@ dnl
27 dnl OSX linker does not support build-id 27 dnl OSX linker does not support build-id
28 dnl 28 dnl
29 case "$host_os" in 29 case "$host_os" in
30-darwin*) 30-darwin*)
31+darwin* | freebsd*) 31+darwin* | freebsd* | solaris*)
32 LD_BUILD_ID="" 32 LD_BUILD_ID=""
33 ;; 33 ;;
34 *) 34 *)
35@@ -918,7 +918,7 @@ case "$host_os" in 35@@ -918,7 +918,7 @@ case "$host_os" in
36 darwin*) 36 darwin*)
37 ;; 37 ;;
38 *) 38 *)
39- AC_CHECK_FUNCS([clock_gettime], [CLOCK_LIB=], 39- AC_CHECK_FUNCS([clock_gettime], [CLOCK_LIB=],
40+ AC_CHECK_FUNCS([clock_gettime clock_nanosleep], [CLOCK_LIB=], 40+ AC_CHECK_FUNCS([clock_gettime clock_nanosleep], [CLOCK_LIB=],
41 [AC_CHECK_LIB([rt], [clock_gettime], [CLOCK_LIB=-lrt], 41 [AC_CHECK_LIB([rt], [clock_gettime], [CLOCK_LIB=-lrt],
42 [AC_MSG_ERROR([Could not find clock_gettime])])]) 42 [AC_MSG_ERROR([Could not find clock_gettime])])])
43 AC_SUBST([CLOCK_LIB]) 43 AC_SUBST([CLOCK_LIB])
44@@ -953,7 +953,7 @@ PTHREAD_LIBS="$PTHREAD_LIBS -pthread" 44@@ -953,7 +953,7 @@ PTHREAD_LIBS="$PTHREAD_LIBS -pthread"

File Added: pkgsrc/graphics/MesaLib18/patches/Attic/patch-src_util_disk__cache.c
$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;