MesaLib18: Various fixes for the SunOS build.diff -r1.2 -r1.3 pkgsrc/graphics/MesaLib18/Makefile
(jperkin)
@@ -1,96 +1,97 @@ | @@ -1,96 +1,97 @@ | |||
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 | |||
3 | DISTNAME= mesa-18.2.0 | 3 | DISTNAME= mesa-18.2.0 | |
4 | PKGNAME= ${DISTNAME:S/mesa/MesaLib/} | 4 | PKGNAME= ${DISTNAME:S/mesa/MesaLib/} | |
5 | CATEGORIES= graphics x11 | 5 | CATEGORIES= graphics x11 | |
6 | MASTER_SITES= ftp://ftp.freedesktop.org/pub/mesa/ | 6 | MASTER_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}/ | |
8 | EXTRACT_SUFX= .tar.xz | 8 | EXTRACT_SUFX= .tar.xz | |
9 | 9 | |||
10 | MAINTAINER= pkgsrc-users@NetBSD.org | 10 | MAINTAINER= pkgsrc-users@NetBSD.org | |
11 | HOMEPAGE= https://www.mesa3d.org/ | 11 | HOMEPAGE= https://www.mesa3d.org/ | |
12 | COMMENT= The Mesa 3D Graphics Library | 12 | COMMENT= The Mesa 3D Graphics Library | |
13 | LICENSE= mit | 13 | LICENSE= mit | |
14 | 14 | |||
15 | GNU_CONFIGURE= yes | 15 | GNU_CONFIGURE= yes | |
16 | USE_TOOLS+= bison pkg-config gmake flex | 16 | USE_TOOLS+= bison pkg-config gmake flex | |
17 | USE_LANGUAGES= c99 c++ | 17 | USE_LANGUAGES= c99 c++ | |
18 | USE_LIBTOOL= yes | 18 | USE_LIBTOOL= yes | |
19 | 19 | |||
20 | PKGCONFIG_OVERRIDE+= src/egl/main/egl.pc.in | 20 | PKGCONFIG_OVERRIDE+= src/egl/main/egl.pc.in | |
21 | PKGCONFIG_OVERRIDE+= src/gallium/targets/d3dadapter9/d3d.pc.in | 21 | PKGCONFIG_OVERRIDE+= src/gallium/targets/d3dadapter9/d3d.pc.in | |
22 | PKGCONFIG_OVERRIDE+= src/gallium/targets/osmesa/osmesa.pc.in | 22 | PKGCONFIG_OVERRIDE+= src/gallium/targets/osmesa/osmesa.pc.in | |
23 | PKGCONFIG_OVERRIDE+= src/gallium/targets/xa/xatracker.pc.in | 23 | PKGCONFIG_OVERRIDE+= src/gallium/targets/xa/xatracker.pc.in | |
24 | PKGCONFIG_OVERRIDE+= src/gbm/main/gbm.pc.in | 24 | PKGCONFIG_OVERRIDE+= src/gbm/main/gbm.pc.in | |
25 | PKGCONFIG_OVERRIDE+= src/mapi/es1api/glesv1_cm.pc.in | 25 | PKGCONFIG_OVERRIDE+= src/mapi/es1api/glesv1_cm.pc.in | |
26 | PKGCONFIG_OVERRIDE+= src/mapi/es2api/glesv2.pc.in | 26 | PKGCONFIG_OVERRIDE+= src/mapi/es2api/glesv2.pc.in | |
27 | PKGCONFIG_OVERRIDE+= src/mesa/drivers/dri/dri.pc.in | 27 | PKGCONFIG_OVERRIDE+= src/mesa/drivers/dri/dri.pc.in | |
28 | PKGCONFIG_OVERRIDE+= src/mesa/drivers/osmesa/osmesa.pc.in | 28 | PKGCONFIG_OVERRIDE+= src/mesa/drivers/osmesa/osmesa.pc.in | |
29 | PKGCONFIG_OVERRIDE+= src/mesa/gl.pc.in | 29 | PKGCONFIG_OVERRIDE+= src/mesa/gl.pc.in | |
30 | 30 | |||
31 | CONFIGURE_ARGS+= --enable-shared-glapi | 31 | CONFIGURE_ARGS+= --enable-shared-glapi | |
32 | 32 | |||
33 | # Work around a buildlink and/or libtool bug: | 33 | # Work around a buildlink and/or libtool bug: | |
34 | # In the libtool install/relink stage, if we want to link with two static | 34 | # In the libtool install/relink stage, if we want to link with two static | |
35 | # archives named libglapi.la but in different directories, bad things happen. | 35 | # archives named libglapi.la but in different directories, bad things happen. | |
36 | SUBST_CLASSES+= wrapper-bug | 36 | SUBST_CLASSES+= wrapper-bug | |
37 | SUBST_STAGE.wrapper-bug= pre-configure | 37 | SUBST_STAGE.wrapper-bug= pre-configure | |
38 | SUBST_MESSAGE.wrapper-bug= Renaming glapi-shared/libglapi in Makefiles | 38 | SUBST_MESSAGE.wrapper-bug= Renaming glapi-shared/libglapi in Makefiles | |
39 | SUBST_FILES.wrapper-bug= src/gbm/Makefile.in | 39 | SUBST_FILES.wrapper-bug= src/gbm/Makefile.in | |
40 | SUBST_FILES.wrapper-bug+= src/glx/Makefile.in | 40 | SUBST_FILES.wrapper-bug+= src/glx/Makefile.in | |
41 | SUBST_FILES.wrapper-bug+= src/mapi/Makefile.in | 41 | SUBST_FILES.wrapper-bug+= src/mapi/Makefile.in | |
42 | SUBST_FILES.wrapper-bug+= src/mesa/drivers/x11/Makefile.in | 42 | SUBST_FILES.wrapper-bug+= src/mesa/drivers/x11/Makefile.in | |
43 | SUBST_FILES.wrapper-bug+= src/mesa/drivers/osmesa/Makefile.in | 43 | SUBST_FILES.wrapper-bug+= src/mesa/drivers/osmesa/Makefile.in | |
44 | SUBST_SED.wrapper-bug= -e 's,shared-glapi/libglapi.la,shared-glapi/libglapi_tmp_rename.la,g' | 44 | SUBST_SED.wrapper-bug= -e 's,shared-glapi/libglapi.la,shared-glapi/libglapi_tmp_rename.la,g' | |
45 | SUBST_SED.wrapper-bug+= -e 's,libglapi.la,libglapi_impl.la,g' | 45 | SUBST_SED.wrapper-bug+= -e 's,libglapi.la,libglapi_impl.la,g' | |
46 | SUBST_SED.wrapper-bug+= -e 's,libglapi_tmp_rename.la,libglapi.la,g' | 46 | SUBST_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 | |
49 | SUBST_CLASSES+= drirc | 49 | SUBST_CLASSES+= drirc | |
50 | SUBST_STAGE.drirc= pre-configure | 50 | SUBST_STAGE.drirc= pre-configure | |
51 | SUBST_MESSAGE.drirc= Fixing hardcoded /etc/drirc references | 51 | SUBST_MESSAGE.drirc= Fixing hardcoded /etc/drirc references | |
52 | SUBST_FILES.drirc+= src/util/xmlconfig.c | 52 | SUBST_FILES.drirc+= src/util/xmlconfig.c | |
53 | SUBST_SED.drirc+= -e 's|/etc|${PREFIX}/etc|g' | 53 | SUBST_SED.drirc+= -e 's|/etc|${PREFIX}/etc|g' | |
54 | 54 | |||
55 | # Required due to clang defaulting to strict C standard by default (no strdup). | 55 | CFLAGS.SunOS+= -D__EXTENSIONS__ -D_POSIX_PTHREAD_SEMANTICS | |
56 | CFLAGS.SunOS+= -D__EXTENSIONS__ | 56 | CXXFLAGS.SunOS+= -Drestrict=__restrict__ | |
57 | LDFLAGS.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" | |
63 | CONFIGURE_ARGS+= --enable-glx-read-only-text | 64 | CONFIGURE_ARGS+= --enable-glx-read-only-text | |
64 | .endif | 65 | .endif | |
65 | 66 | |||
66 | PYTHON_FOR_BUILD_ONLY= yes | 67 | PYTHON_FOR_BUILD_ONLY= yes | |
67 | PYTHON_VERSIONS_INCOMPATIBLE= 34 35 36 37 # as of 11.2.2 | 68 | PYTHON_VERSIONS_INCOMPATIBLE= 34 35 36 37 # as of 11.2.2 | |
68 | BUILD_DEPENDS+= ${PYPKGPREFIX}-mako-[0-9]*:../../devel/py-mako | 69 | BUILD_DEPENDS+= ${PYPKGPREFIX}-mako-[0-9]*:../../devel/py-mako | |
69 | CONFIGURE_ENV+= ac_cv_prog_PYTHON2=${PYTHONBIN} | 70 | CONFIGURE_ENV+= ac_cv_prog_PYTHON2=${PYTHONBIN} | |
70 | .include "../../lang/python/tool.mk" | 71 | .include "../../lang/python/tool.mk" | |
71 | 72 | |||
72 | # Handle platforms without exp2 | 73 | # Handle platforms without exp2 | |
73 | .if !empty(MACHINE_PLATFORM:MNetBSD-[1-5].*-*) | 74 | .if !empty(MACHINE_PLATFORM:MNetBSD-[1-5].*-*) | |
74 | CPPFLAGS+= -Dexp2\(x\)=exp\(\(x\)\*M_LN2\) | 75 | CPPFLAGS+= -Dexp2\(x\)=exp\(\(x\)\*M_LN2\) | |
75 | CPPFLAGS+= -Dexp2f\(x\)=expf\(\(x\)\*M_LN2\) | 76 | CPPFLAGS+= -Dexp2f\(x\)=expf\(\(x\)\*M_LN2\) | |
76 | .endif | 77 | .endif | |
77 | 78 | |||
78 | # Manual patch for FDO bug 90311. Don't apply if not on Darwin as there could | 79 | # Manual patch for FDO bug 90311. Don't apply if not on Darwin as there could | |
79 | # be side effects. | 80 | # be side effects. | |
80 | .if ${OPSYS} == "Darwin" | 81 | .if ${OPSYS} == "Darwin" | |
81 | pre-configure: ${WRKDIR}/.manual_patch_done | 82 | pre-configure: ${WRKDIR}/.manual_patch_done | |
82 | ${WRKDIR}/.manual_patch_done: | 83 | ${WRKDIR}/.manual_patch_done: | |
83 | cd ${WRKSRC} && ${TOOLS_PATCH} -z .manual -p0 < ${FILESDIR}/patch-manual_fdo90311 | 84 | cd ${WRKSRC} && ${TOOLS_PATCH} -z .manual -p0 < ${FILESDIR}/patch-manual_fdo90311 | |
84 | touch ${.TARGET} | 85 | touch ${.TARGET} | |
85 | .endif | 86 | .endif | |
86 | 87 | |||
87 | INSTALLATION_DIRS+= share/examples/MesaLib | 88 | INSTALLATION_DIRS+= share/examples/MesaLib | |
88 | 89 | |||
89 | post-install: | 90 | post-install: | |
90 | ${INSTALL_DATA} ${WRKSRC}/src/util/drirc ${DESTDIR}${PREFIX}/share/examples/MesaLib | 91 | ${INSTALL_DATA} ${WRKSRC}/src/util/drirc ${DESTDIR}${PREFIX}/share/examples/MesaLib | |
91 | 92 | |||
92 | .include "../../x11/libXrandr/buildlink3.mk" | 93 | .include "../../x11/libXrandr/buildlink3.mk" | |
93 | .include "../../x11/libX11/buildlink3.mk" | 94 | .include "../../x11/libX11/buildlink3.mk" | |
94 | .include "../../x11/libXext/buildlink3.mk" | 95 | .include "../../x11/libXext/buildlink3.mk" | |
95 | .include "../../x11/libxcb/buildlink3.mk" | 96 | .include "../../x11/libxcb/buildlink3.mk" | |
96 | .include "../../mk/bsd.pkg.mk" | 97 | .include "../../mk/bsd.pkg.mk" |
@@ -1,64 +1,65 @@ | @@ -1,64 +1,65 @@ | |||
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 | |||
3 | SHA1 (mesa-18.2.0.tar.xz) = 73723d9f3815487f474d84eb91a5cd17edfb63d4 | 3 | SHA1 (mesa-18.2.0.tar.xz) = 73723d9f3815487f474d84eb91a5cd17edfb63d4 | |
4 | RMD160 (mesa-18.2.0.tar.xz) = 51aae6c7a566d7d7da5e545ef3b4f04295897b21 | 4 | RMD160 (mesa-18.2.0.tar.xz) = 51aae6c7a566d7d7da5e545ef3b4f04295897b21 | |
5 | SHA512 (mesa-18.2.0.tar.xz) = e6e997e166845009f6b97da204384758c797c870b56332652c0a2636734638f9180b7e4dbad144495645308ae4d77981a2493a22d57973723338b658e0655557 | 5 | SHA512 (mesa-18.2.0.tar.xz) = e6e997e166845009f6b97da204384758c797c870b56332652c0a2636734638f9180b7e4dbad144495645308ae4d77981a2493a22d57973723338b658e0655557 | |
6 | Size (mesa-18.2.0.tar.xz) = 11331164 bytes | 6 | Size (mesa-18.2.0.tar.xz) = 11331164 bytes | |
7 | SHA1 (patch-configure) = c938bc7807a92fb4484d459b401133fb9fd7dbce | 7 | SHA1 (patch-configure) = 39093e9c7c2ea503413988ba736c11da68711c1b | |
8 | SHA1 (patch-configure.ac) = 8347a3116906b8648a7841a6b109832397bd896e | 8 | SHA1 (patch-configure.ac) = 8ef8f1d91e905f2b7ee976c8552c03b712bfb139 | |
9 | SHA1 (patch-include_GL_internal_dri__interface.h) = 146d2f3f3e50fc1947e8941301d9cf9d90a035e2 | 9 | SHA1 (patch-include_GL_internal_dri__interface.h) = 146d2f3f3e50fc1947e8941301d9cf9d90a035e2 | |
10 | SHA1 (patch-src_amd_vulkan_winsys_amdgpu_radv__amdgpu__cs.c) = 1fe81a7b16e36dc9125400c20543271216a33a45 | 10 | SHA1 (patch-src_amd_vulkan_winsys_amdgpu_radv__amdgpu__cs.c) = 1fe81a7b16e36dc9125400c20543271216a33a45 | |
11 | SHA1 (patch-src_compiler_builtin__type__macros.h) = 857bca0c0f55ec8d7a20b3807c7a5d7bd06bdfbf | 11 | SHA1 (patch-src_compiler_builtin__type__macros.h) = 857bca0c0f55ec8d7a20b3807c7a5d7bd06bdfbf | |
12 | SHA1 (patch-src_compiler_glsl_glsl__parser__extras.cpp) = ef114d6e288e6d212fce9d1c0606f7d454a171c4 | 12 | SHA1 (patch-src_compiler_glsl_glsl__parser__extras.cpp) = ef114d6e288e6d212fce9d1c0606f7d454a171c4 | |
13 | SHA1 (patch-src_egl_drivers_dri2_platform__drm.c) = 94ec2e969e7cf7c89c3192e60758e5ad14b02629 | 13 | SHA1 (patch-src_egl_drivers_dri2_platform__drm.c) = 94ec2e969e7cf7c89c3192e60758e5ad14b02629 | |
14 | SHA1 (patch-src_egl_drivers_dri2_platform__x11.c) = 49e48c31eacb79d1da357fe70eaffd2926b5280e | 14 | SHA1 (patch-src_egl_drivers_dri2_platform__x11.c) = 49e48c31eacb79d1da357fe70eaffd2926b5280e | |
15 | SHA1 (patch-src_egl_main_eglglobals.c) = 0d52014f52e62fc5fa6650336ddb0011ecf331e6 | 15 | SHA1 (patch-src_egl_main_eglglobals.c) = 0d52014f52e62fc5fa6650336ddb0011ecf331e6 | |
16 | SHA1 (patch-src_gallium_auxiliary_drivers_trace_tr__dump.c) = 360e1608508a7bbb41acecd58930781038e2309e | 16 | SHA1 (patch-src_gallium_auxiliary_drivers_trace_tr__dump.c) = 360e1608508a7bbb41acecd58930781038e2309e | |
17 | SHA1 (patch-src_gallium_auxiliary_pipe-loader_pipe__loader__drm.c) = b8fd5e0d1bab1fa7ae965cae382a1cd1ffbf1fc4 | 17 | SHA1 (patch-src_gallium_auxiliary_pipe-loader_pipe__loader__drm.c) = b8fd5e0d1bab1fa7ae965cae382a1cd1ffbf1fc4 | |
18 | SHA1 (patch-src_gallium_auxiliary_util_u__format__tests.c) = 4d5e4677c2825778c43440ab131b8807f6840975 | 18 | SHA1 (patch-src_gallium_auxiliary_util_u__format__tests.c) = 4d5e4677c2825778c43440ab131b8807f6840975 | |
19 | SHA1 (patch-src_gallium_drivers_nouveau_nouveau__vp3__video.c) = 04f95784c3270c9bb7e95377982e217962481525 | 19 | SHA1 (patch-src_gallium_drivers_nouveau_nouveau__vp3__video.c) = 04f95784c3270c9bb7e95377982e217962481525 | |
20 | SHA1 (patch-src_gallium_drivers_nouveau_nv50_nv84__video.c) = 1b4239fe053523835ecac006894bdb0cde0ee626 | 20 | SHA1 (patch-src_gallium_drivers_nouveau_nv50_nv84__video.c) = 1b4239fe053523835ecac006894bdb0cde0ee626 | |
21 | SHA1 (patch-src_gallium_drivers_vc4_vc4__bufmgr.c) = 1d591d346486fdf58893f69ab92a272e6a31a987 | 21 | SHA1 (patch-src_gallium_drivers_vc4_vc4__bufmgr.c) = 1d591d346486fdf58893f69ab92a272e6a31a987 | |
22 | SHA1 (patch-src_gallium_include_pipe_p__config.h) = f4e38eac66167b619c30076bb0144dd716310967 | 22 | SHA1 (patch-src_gallium_include_pipe_p__config.h) = f4e38eac66167b619c30076bb0144dd716310967 | |
23 | SHA1 (patch-src_gallium_state__trackers_clover_llvm_invocation.cpp) = 3053db09fbfffffd82e232b60b244a0a80c8f181 | 23 | SHA1 (patch-src_gallium_state__trackers_clover_llvm_invocation.cpp) = 3053db09fbfffffd82e232b60b244a0a80c8f181 | |
24 | SHA1 (patch-src_gallium_state__trackers_clover_llvm_metadata.hpp) = c97d38098ea03658bc193a50e445b87f1c020839 | 24 | SHA1 (patch-src_gallium_state__trackers_clover_llvm_metadata.hpp) = c97d38098ea03658bc193a50e445b87f1c020839 | |
25 | SHA1 (patch-src_gallium_state__trackers_clover_util_range.hpp) = cdc78067986c1b92818472c4201c58ef1b42c4f4 | 25 | SHA1 (patch-src_gallium_state__trackers_clover_util_range.hpp) = cdc78067986c1b92818472c4201c58ef1b42c4f4 | |
26 | SHA1 (patch-src_gbm_Makefile.am) = 5f3107afbf64b97f7d21ce427cecc4fb78974db3 | 26 | SHA1 (patch-src_gbm_Makefile.am) = 5f3107afbf64b97f7d21ce427cecc4fb78974db3 | |
27 | SHA1 (patch-src_gbm_Makefile.in) = 5855f4d2907a0d9c3b9a5334177a037591b51d6a | 27 | SHA1 (patch-src_gbm_Makefile.in) = 5855f4d2907a0d9c3b9a5334177a037591b51d6a | |
28 | SHA1 (patch-src_glx_apple_apple__glapi.c) = c4eea8dabf74eb03d22da4eb834b18ae3384c63b | 28 | SHA1 (patch-src_glx_apple_apple__glapi.c) = c4eea8dabf74eb03d22da4eb834b18ae3384c63b | |
29 | SHA1 (patch-src_glx_dri__glx.c) = 8fd48776e9953b18bd17ba130d90ae2935e67242 | 29 | SHA1 (patch-src_glx_dri__glx.c) = 8fd48776e9953b18bd17ba130d90ae2935e67242 | |
30 | SHA1 (patch-src_glx_glxclient.h) = f0358179ae397bc8677597b0ccb9a471f40f15de | 30 | SHA1 (patch-src_glx_glxclient.h) = f0358179ae397bc8677597b0ccb9a471f40f15de | |
31 | SHA1 (patch-src_glx_glxcurrent.c) = 8b8e949eded13491c5865601253c6e7d4b06e228 | 31 | SHA1 (patch-src_glx_glxcurrent.c) = 8b8e949eded13491c5865601253c6e7d4b06e228 | |
32 | SHA1 (patch-src_glx_glxext.c) = 15c2c5e0c6b5095ce849fb86ad148aa05d7d907a | 32 | SHA1 (patch-src_glx_glxext.c) = 15c2c5e0c6b5095ce849fb86ad148aa05d7d907a | |
33 | SHA1 (patch-src_intel_Makefile.in) = 821c385e07e41ec693e6ada9db73b88e6e8dc70b | 33 | SHA1 (patch-src_intel_Makefile.in) = 821c385e07e41ec693e6ada9db73b88e6e8dc70b | |
34 | SHA1 (patch-src_intel_Makefile.tools.am) = 5253d5972b48ae3bc8d648bb9f479dcf6cbd3fab | 34 | SHA1 (patch-src_intel_Makefile.tools.am) = 5253d5972b48ae3bc8d648bb9f479dcf6cbd3fab | |
35 | SHA1 (patch-src_intel_compiler_brw__fs__bank__conflicts.cpp) = 6276d2c6846bb4dd08699921bec4e20202a17478 | 35 | SHA1 (patch-src_intel_compiler_brw__fs__bank__conflicts.cpp) = 6276d2c6846bb4dd08699921bec4e20202a17478 | |
36 | SHA1 (patch-src_intel_tools_aubinator.c) = a468cf9f1ac88e883ad33400afaf8df690086e72 | 36 | SHA1 (patch-src_intel_tools_aubinator.c) = a468cf9f1ac88e883ad33400afaf8df690086e72 | |
37 | SHA1 (patch-src_intel_tools_aubinator__error__decode.c) = d8f636e3c3e76763a505a1dce23de0b198ad62fa | 37 | SHA1 (patch-src_intel_tools_aubinator__error__decode.c) = d8f636e3c3e76763a505a1dce23de0b198ad62fa | |
38 | SHA1 (patch-src_intel_vulkan_anv__allocator.c) = 5dd27eea9811d739558c5b488c57a3d7ae539d87 | 38 | SHA1 (patch-src_intel_vulkan_anv__allocator.c) = 5dd27eea9811d739558c5b488c57a3d7ae539d87 | |
39 | SHA1 (patch-src_intel_vulkan_anv__device.c) = 5d581dcd9695c869855f200c575cf98b7165c1ba | 39 | SHA1 (patch-src_intel_vulkan_anv__device.c) = 5d581dcd9695c869855f200c575cf98b7165c1ba | |
40 | SHA1 (patch-src_intel_vulkan_anv__gem.c) = b8eb487fa704151e7c3c3b1d23973b2b0aa5922e | 40 | SHA1 (patch-src_intel_vulkan_anv__gem.c) = b8eb487fa704151e7c3c3b1d23973b2b0aa5922e | |
41 | SHA1 (patch-src_intel_vulkan_anv__queue.c) = 2dbf7dfd0c77f74f510032bf8d12109f58c50a30 | 41 | SHA1 (patch-src_intel_vulkan_anv__queue.c) = 2dbf7dfd0c77f74f510032bf8d12109f58c50a30 | |
42 | SHA1 (patch-src_mapi_entry__x86-64__tls.h) = 11b7ef1da435fa17fc7025a46a123d447d6a7d07 | 42 | SHA1 (patch-src_mapi_entry__x86-64__tls.h) = 11b7ef1da435fa17fc7025a46a123d447d6a7d07 | |
43 | SHA1 (patch-src_mapi_entry__x86__tls.h) = 11c0f5302d305a77f3a1780d44a2c61f48a66273 | 43 | SHA1 (patch-src_mapi_entry__x86__tls.h) = 11c0f5302d305a77f3a1780d44a2c61f48a66273 | |
44 | SHA1 (patch-src_mapi_glapi_gen_gl__gentable.py) = 0b1d4ef3f78a9b3726ef7f9921608a48a5e4ac56 | 44 | SHA1 (patch-src_mapi_glapi_gen_gl__gentable.py) = 0b1d4ef3f78a9b3726ef7f9921608a48a5e4ac56 | |
45 | SHA1 (patch-src_mapi_u__current.c) = 38d324fcd1c28d155106ccd248edb5eb1aa9ffac | 45 | SHA1 (patch-src_mapi_u__current.c) = 38d324fcd1c28d155106ccd248edb5eb1aa9ffac | |
46 | SHA1 (patch-src_mapi_u__current.h) = 465a992bd34057e9521f0a33e6f2e25cefc145ca | 46 | SHA1 (patch-src_mapi_u__current.h) = 465a992bd34057e9521f0a33e6f2e25cefc145ca | |
47 | SHA1 (patch-src_mesa_drivers_dri_i915_intel__screen.c) = e33f51b3502e8c52ff7283aeb807996717f79f4f | 47 | SHA1 (patch-src_mesa_drivers_dri_i915_intel__screen.c) = e33f51b3502e8c52ff7283aeb807996717f79f4f | |
48 | SHA1 (patch-src_mesa_drivers_dri_i965_brw__performance__query.c) = 43ca8315a4964adf7bc99d772fd817deda3ec249 | 48 | SHA1 (patch-src_mesa_drivers_dri_i965_brw__performance__query.c) = 1250b3477c4b8013b928772b7dc7f24e8c4b67aa | |
49 | SHA1 (patch-src_mesa_drivers_dri_i965_intel__screen.c) = 795b17970e95347222514bacc0701aa86fa1ff02 | 49 | SHA1 (patch-src_mesa_drivers_dri_i965_intel__screen.c) = 795b17970e95347222514bacc0701aa86fa1ff02 | |
50 | SHA1 (patch-src_mesa_drivers_dri_i965_intel__tiled__memcpy.c) = 5b940f9a56c694ffaf8a4383c3a2eae25cfd35a6 | 50 | SHA1 (patch-src_mesa_drivers_dri_i965_intel__tiled__memcpy.c) = 5b940f9a56c694ffaf8a4383c3a2eae25cfd35a6 | |
51 | SHA1 (patch-src_mesa_drivers_dri_swrast_swrast.c) = 3106f350e590f62c8bd29cd85f24f977639dccdb | 51 | SHA1 (patch-src_mesa_drivers_dri_swrast_swrast.c) = 3106f350e590f62c8bd29cd85f24f977639dccdb | |
52 | SHA1 (patch-src_mesa_main_context.c) = 74226013b56ad6c9678f1970458538b35967678f | 52 | SHA1 (patch-src_mesa_main_context.c) = 74226013b56ad6c9678f1970458538b35967678f | |
53 | SHA1 (patch-src_mesa_main_extensions.c) = 2f48bdb1176c2878bb33bcfab7556172b50a987e | 53 | SHA1 (patch-src_mesa_main_extensions.c) = 2f48bdb1176c2878bb33bcfab7556172b50a987e | |
54 | SHA1 (patch-src_mesa_main_macros.h) = c5dceaa8dc02a58e5b2273d82e3fe1cc12e327d3 | 54 | SHA1 (patch-src_mesa_main_macros.h) = c5dceaa8dc02a58e5b2273d82e3fe1cc12e327d3 | |
55 | SHA1 (patch-src_mesa_main_shader__query.cpp) = 3f9c31645d87855759def11344dee16af23c7be3 | 55 | SHA1 (patch-src_mesa_main_shader__query.cpp) = 3f9c31645d87855759def11344dee16af23c7be3 | |
56 | SHA1 (patch-src_mesa_tnl_t__pipeline.c) = e6abcdb24019ca57527d25c5cd86737332db98e3 | 56 | SHA1 (patch-src_mesa_tnl_t__pipeline.c) = e6abcdb24019ca57527d25c5cd86737332db98e3 | |
57 | SHA1 (patch-src_mesa_x86_common__x86.c) = f8c4b93443ef66d017f6aa114b877565b30f2598 | 57 | SHA1 (patch-src_mesa_x86_common__x86.c) = f8c4b93443ef66d017f6aa114b877565b30f2598 | |
58 | SHA1 (patch-src_util_build__id.c) = 7a9547bbda9d2fb9f0018ccf27b70b59e497aa2c | 58 | SHA1 (patch-src_util_build__id.c) = 7a9547bbda9d2fb9f0018ccf27b70b59e497aa2c | |
59 | SHA1 (patch-src_util_disk__cache.c) = cc0b29780dba5d5b5e43c0798336f16a1f0008de | |||
59 | SHA1 (patch-src_util_futex.h) = 35097c3b8baf8b969c6ec5ec1feb6f4e0a48237e | 60 | SHA1 (patch-src_util_futex.h) = 35097c3b8baf8b969c6ec5ec1feb6f4e0a48237e | |
60 | SHA1 (patch-src_util_ralloc.c) = d311bfd9ed7e673d72e050668d351c1e6552cdc8 | 61 | SHA1 (patch-src_util_ralloc.c) = d311bfd9ed7e673d72e050668d351c1e6552cdc8 | |
61 | SHA1 (patch-src_util_strndup.h) = 73f49694ca48ad6b9a9d8346c5b84fddec2463bd | 62 | SHA1 (patch-src_util_strndup.h) = 73f49694ca48ad6b9a9d8346c5b84fddec2463bd | |
62 | SHA1 (patch-src_util_u__atomic.h) = beb1df2bb28151bde0405bcae3994107be6813a5 | 63 | SHA1 (patch-src_util_u__atomic.h) = 31d4514538ef5ee53012695eb5c66134aaec981e | |
63 | SHA1 (patch-src_util_u__queue.c) = 1ea1c2f8e2971235aa98be96bfd6b2b68f876072 | 64 | SHA1 (patch-src_util_u__queue.c) = 1ea1c2f8e2971235aa98be96bfd6b2b68f876072 | |
64 | SHA1 (patch-src_util_xmlconfig.c) = ad5619e067957b120a70c1c63421c92b356e16ac | 65 | SHA1 (patch-src_util_xmlconfig.c) = ad5619e067957b120a70c1c63421c92b356e16ac |
@@ -1,122 +1,122 @@ | @@ -1,122 +1,122 @@ | |||
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 | |||
3 | Don't check for pthread stubs on netbsd. | 3 | Don't check for pthread stubs on netbsd. | |
4 | 4 | |||
5 | From FreeBSD ports graphics/mesa-dri 18.0.0, | 5 | From FreeBSD ports graphics/mesa-dri 18.0.0, | |
6 | DragonFly dports graphics/mesa-dri 17.3.1, | 6 | DragonFly dports graphics/mesa-dri 17.3.1, | |
7 | files/patch-configure | 7 | files/patch-configure | |
8 | 8 | |||
9 | * Extend to FreeBSD | 9 | * Extend to FreeBSD | |
10 | osx: ld does not support --build-ld | 10 | osx: 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 | |
17 | DRI3 remains enabled at compile time, but it is now disabled at | 17 | DRI3 remains enabled at compile time, but it is now disabled at | |
18 | runtime for stock FreeBSD. Set LIBGL_DRI3_ENABLE in the | 18 | runtime for stock FreeBSD. Set LIBGL_DRI3_ENABLE in the | |
19 | environment to enable DRI3. | 19 | environment to enable DRI3. | |
20 | This change was made to work around a problem in libEGL, | 20 | This change was made to work around a problem in libEGL, | |
21 | which fails to fall back to using DRI2 when run on a system | 21 | which fails to fall back to using DRI2 when run on a system | |
22 | without DRI3 support. | 22 | without 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` | |
45 | +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | 45 | +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
46 | +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : | 46 | +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : | |
47 | cat >>confdefs.h <<_ACEOF | 47 | cat >>confdefs.h <<_ACEOF | |
48 | -#define HAVE_CLOCK_GETTIME 1 | 48 | -#define HAVE_CLOCK_GETTIME 1 | |
49 | +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | 49 | +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
50 | _ACEOF | 50 | _ACEOF | |
51 | CLOCK_LIB= | 51 | CLOCK_LIB= | |
52 | else | 52 | else | |
53 | @@ -22670,7 +22671,7 @@ fi | 53 | @@ -22670,7 +22671,7 @@ fi | |
54 | PTHREAD_LIBS="$PTHREAD_LIBS -pthread" | 54 | PTHREAD_LIBS="$PTHREAD_LIBS -pthread" | |
55 | 55 | |||
56 | case "$host_os" in | 56 | case "$host_os" in | |
57 | -linux* | cygwin* | darwin* | solaris* | *-gnu* | gnu* | openbsd*) | 57 | -linux* | cygwin* | darwin* | solaris* | *-gnu* | gnu* | openbsd*) | |
58 | +linux* | cygwin* | darwin* | solaris* | *-gnu* | gnu* | openbsd* | netbsd*) | 58 | +linux* | cygwin* | darwin* | solaris* | *-gnu* | gnu* | openbsd* | netbsd*) | |
59 | pthread_stubs_possible="no" | 59 | pthread_stubs_possible="no" | |
60 | ;; | 60 | ;; | |
61 | * ) | 61 | * ) | |
62 | @@ -22772,11 +22773,20 @@ $as_echo "yes" >&6; } | 62 | @@ -22772,11 +22773,20 @@ $as_echo "yes" >&6; } | |
63 | fi | 63 | fi | |
64 | fi | 64 | fi | |
65 | 65 | |||
66 | -ac_fn_c_check_header_mongrel "$LINENO" "linux/futex.h" "ac_cv_header_linux_futex_h" "$ac_includes_default" | 66 | -ac_fn_c_check_header_mongrel "$LINENO" "linux/futex.h" "ac_cv_header_linux_futex_h" "$ac_includes_default" | |
67 | -if test "x$ac_cv_header_linux_futex_h" = xyes; then : | 67 | -if test "x$ac_cv_header_linux_futex_h" = xyes; then : | |
68 | - DEFINES="$DEFINES -DHAVE_LINUX_FUTEX_H" | 68 | - DEFINES="$DEFINES -DHAVE_LINUX_FUTEX_H" | |
69 | +for ac_header in linux/futex.h sys/umtx.h | 69 | +for ac_header in linux/futex.h sys/umtx.h | |
70 | +do : | 70 | +do : | |
71 | + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | 71 | + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
72 | +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "#include <errno.h> | 72 | +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "#include <errno.h> | |
73 | + #include <sys/types.h> | 73 | + #include <sys/types.h> | |
74 | +" | 74 | +" | |
75 | +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : | 75 | +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : | |
76 | + cat >>confdefs.h <<_ACEOF | 76 | + cat >>confdefs.h <<_ACEOF | |
77 | +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | 77 | +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
78 | +_ACEOF | 78 | +_ACEOF | |
79 | + DEFINES="$DEFINES -DHAVE_LINUX_FUTEX_H" | 79 | + DEFINES="$DEFINES -DHAVE_LINUX_FUTEX_H" | |
80 | fi | 80 | fi | |
81 | 81 | |||
82 | +done | 82 | +done | |
83 | 83 | |||
84 | 84 | |||
85 | # Check whether --enable-selinux was given. | 85 | # Check whether --enable-selinux was given. | |
86 | @@ -23674,7 +23684,7 @@ fi | 86 | @@ -23674,7 +23684,7 @@ fi | |
87 | 87 | |||
88 | 88 | |||
89 | case "$host_os" in | 89 | case "$host_os" in | |
90 | -linux*) | 90 | -linux*) | |
91 | +linux* | freebsd* | dragonfly*) | 91 | +linux* | freebsd* | dragonfly*) | |
92 | dri3_default=yes | 92 | dri3_default=yes | |
93 | ;; | 93 | ;; | |
94 | *) | 94 | *) | |
95 | @@ -25975,7 +25985,7 @@ $as_echo "yes" >&6; } | 95 | @@ -25975,7 +25985,7 @@ $as_echo "yes" >&6; } | |
96 | have_dri3_modifiers=yes | 96 | have_dri3_modifiers=yes | |
97 | fi | 97 | fi | |
98 | 98 | |||
99 | - if test "x$have_dri3_modifiers" == xyes; then | 99 | - if test "x$have_dri3_modifiers" == xyes; then | |
100 | + if test "x$have_dri3_modifiers" = xyes; then | 100 | + if test "x$have_dri3_modifiers" = xyes; then | |
101 | DEFINES="$DEFINES -DHAVE_DRI3_MODIFIERS" | 101 | DEFINES="$DEFINES -DHAVE_DRI3_MODIFIERS" | |
102 | fi | 102 | fi | |
103 | fi | 103 | fi | |
104 | @@ -28200,9 +28210,6 @@ rm -f core conftest.err conftest.$ac_obj | 104 | @@ -28200,9 +28210,6 @@ rm -f core conftest.err conftest.$ac_obj | |
105 | CLANG_LIBDIR=${LLVM_LIBDIR} | 105 | CLANG_LIBDIR=${LLVM_LIBDIR} | |
106 | fi | 106 | fi | |
107 | CLANG_RESOURCE_DIR=$CLANG_LIBDIR/clang/${LLVM_VERSION} | 107 | CLANG_RESOURCE_DIR=$CLANG_LIBDIR/clang/${LLVM_VERSION} | |
108 | - if test ! -f "$CLANG_RESOURCE_DIR/include/stddef.h"; then : | 108 | - if test ! -f "$CLANG_RESOURCE_DIR/include/stddef.h"; then : | |
109 | - as_fn_error $? "Could not find clang internal header stddef.h in $CLANG_RESOURCE_DIR Use --with-clang-libdir to specify the correct path to the clang libraries." "$LINENO" 5 | 109 | - as_fn_error $? "Could not find clang internal header stddef.h in $CLANG_RESOURCE_DIR Use --with-clang-libdir to specify the correct path to the clang libraries." "$LINENO" 5 | |
110 | -fi | 110 | -fi | |
111 | fi | 111 | fi | |
112 | if test "x$enable_opencl" = xyes; then | 112 | if test "x$enable_opencl" = xyes; then | |
113 | HAVE_CLOVER_TRUE= | 113 | HAVE_CLOVER_TRUE= | |
114 | @@ -29648,7 +29655,7 @@ $as_echo "$as_me: WARNING: Building mesa | 114 | @@ -29648,7 +29655,7 @@ $as_echo "$as_me: WARNING: Building mesa | |
115 | fi | 115 | fi | |
116 | fi | 116 | fi | |
117 | 117 | |||
118 | - if test "x$enable_glx" == xgallium-xlib; then | 118 | - if test "x$enable_glx" == xgallium-xlib; then | |
119 | + if test "x$enable_glx" = xgallium-xlib; then | 119 | + if test "x$enable_glx" = xgallium-xlib; then | |
120 | GL_PC_LIB_PRIV="$GL_PC_LIB_PRIV $LLVM_LIBS" | 120 | GL_PC_LIB_PRIV="$GL_PC_LIB_PRIV $LLVM_LIBS" | |
121 | fi | 121 | fi | |
122 | if test "x$enable_gallium_osmesa" = xyes; then | 122 | if test "x$enable_gallium_osmesa" = xyes; then |
@@ -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 | |||
3 | Prevents libdrm i915_drm.h header from being used. | 3 | Prevents libdrm i915_drm.h header from being used. | |
4 | libdrm 2.4.88 does not have certain symbols defined in its i915_drm.h. | 4 | libdrm 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), |
@@ -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 | |||
3 | Fix SunOS atomic macros. | 3 | Fix 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)) : \ |
@@ -1,82 +1,82 @@ | @@ -1,82 +1,82 @@ | |||
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 | |||
3 | Don't check for pthread stubs anywhere, as we don't provide it. | 3 | Don't check for pthread stubs anywhere, as we don't provide it. | |
4 | 4 | |||
5 | From FreeBSD ports graphics/mesa-dri 18.0.0, | 5 | From FreeBSD ports graphics/mesa-dri 18.0.0, | |
6 | DragonFly dports graphics/mesa-dri 17.3.1, | 6 | DragonFly dports graphics/mesa-dri 17.3.1, | |
7 | files/patch-configure | 7 | files/patch-configure | |
8 | 8 | |||
9 | * Extend to FreeBSD | 9 | * Extend to FreeBSD | |
10 | osx: ld does not support --build-ld | 10 | osx: 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 | |
17 | DRI3 remains enabled at compile time, but it is now disabled at | 17 | DRI3 remains enabled at compile time, but it is now disabled at | |
18 | runtime for stock FreeBSD. Set LIBGL_DRI3_ENABLE in the | 18 | runtime for stock FreeBSD. Set LIBGL_DRI3_ENABLE in the | |
19 | environment to enable DRI3. | 19 | environment to enable DRI3. | |
20 | This change was made to work around a problem in libEGL, | 20 | This change was made to work around a problem in libEGL, | |
21 | which fails to fall back to using DRI2 when run on a system | 21 | which fails to fall back to using DRI2 when run on a system | |
22 | without DRI3 support. | 22 | without 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" | |
45 | dnl pthread-stubs is mandatory on some BSD platforms, due to the nature of the | 45 | dnl pthread-stubs is mandatory on some BSD platforms, due to the nature of the | |
46 | dnl project. Even then there's a notable issue as described in the project README | 46 | dnl project. Even then there's a notable issue as described in the project README | |
47 | case "$host_os" in | 47 | case "$host_os" in | |
48 | -linux* | cygwin* | darwin* | solaris* | *-gnu* | gnu* | openbsd*) | 48 | -linux* | cygwin* | darwin* | solaris* | *-gnu* | gnu* | openbsd*) | |
49 | +*) | 49 | +*) | |
50 | pthread_stubs_possible="no" | 50 | pthread_stubs_possible="no" | |
51 | ;; | 51 | ;; | |
52 | * ) | 52 | * ) | |
53 | @@ -966,7 +966,10 @@ if test "x$pthread_stubs_possible" = xye | 53 | @@ -966,7 +966,10 @@ if test "x$pthread_stubs_possible" = xye | |
54 | fi | 54 | fi | |
55 | 55 | |||
56 | dnl Check for futex for fast inline simple_mtx_t. | 56 | dnl Check for futex for fast inline simple_mtx_t. | |
57 | -AC_CHECK_HEADER([linux/futex.h], [DEFINES="$DEFINES -DHAVE_LINUX_FUTEX_H"]) | 57 | -AC_CHECK_HEADER([linux/futex.h], [DEFINES="$DEFINES -DHAVE_LINUX_FUTEX_H"]) | |
58 | +AC_CHECK_HEADERS([linux/futex.h sys/umtx.h], | 58 | +AC_CHECK_HEADERS([linux/futex.h sys/umtx.h], | |
59 | + [DEFINES="$DEFINES -DHAVE_LINUX_FUTEX_H"],, | 59 | + [DEFINES="$DEFINES -DHAVE_LINUX_FUTEX_H"],, | |
60 | + [#include <errno.h> | 60 | + [#include <errno.h> | |
61 | + #include <sys/types.h>]) | 61 | + #include <sys/types.h>]) | |
62 | 62 | |||
63 | dnl SELinux awareness. | 63 | dnl SELinux awareness. | |
64 | AC_ARG_ENABLE([selinux], | 64 | AC_ARG_ENABLE([selinux], | |
65 | @@ -1249,7 +1252,7 @@ fi | 65 | @@ -1249,7 +1252,7 @@ fi | |
66 | AC_SUBST(LIBSENSORS_LIBS) | 66 | AC_SUBST(LIBSENSORS_LIBS) | |
67 | 67 | |||
68 | case "$host_os" in | 68 | case "$host_os" in | |
69 | -linux*) | 69 | -linux*) | |
70 | +linux* | freebsd* | dragonfly*) | 70 | +linux* | freebsd* | dragonfly*) | |
71 | dri3_default=yes | 71 | dri3_default=yes | |
72 | ;; | 72 | ;; | |
73 | *) | 73 | *) | |
74 | @@ -2481,8 +2484,6 @@ if test "x$enable_opencl" = xyes; then | 74 | @@ -2481,8 +2484,6 @@ if test "x$enable_opencl" = xyes; then | |
75 | CLANG_LIBDIR=${LLVM_LIBDIR} | 75 | CLANG_LIBDIR=${LLVM_LIBDIR} | |
76 | fi | 76 | fi | |
77 | CLANG_RESOURCE_DIR=$CLANG_LIBDIR/clang/${LLVM_VERSION} | 77 | CLANG_RESOURCE_DIR=$CLANG_LIBDIR/clang/${LLVM_VERSION} | |
78 | - AS_IF([test ! -f "$CLANG_RESOURCE_DIR/include/stddef.h"], | 78 | - AS_IF([test ! -f "$CLANG_RESOURCE_DIR/include/stddef.h"], | |
79 | - [AC_MSG_ERROR([Could not find clang internal header stddef.h in $CLANG_RESOURCE_DIR Use --with-clang-libdir to specify the correct path to the clang libraries.])]) | 79 | - [AC_MSG_ERROR([Could not find clang internal header stddef.h in $CLANG_RESOURCE_DIR Use --with-clang-libdir to specify the correct path to the clang libraries.])]) | |
80 | fi | 80 | fi | |
81 | AM_CONDITIONAL(HAVE_CLOVER, test "x$enable_opencl" = xyes) | 81 | AM_CONDITIONAL(HAVE_CLOVER, test "x$enable_opencl" = xyes) | |
82 | AM_CONDITIONAL(HAVE_CLOVER_ICD, test "x$enable_opencl_icd" = xyes) | 82 | AM_CONDITIONAL(HAVE_CLOVER_ICD, test "x$enable_opencl_icd" = xyes) |
$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;