1 # Buildsheet autogenerated by ravenadm tool -- Do not edit.
7 SDESC[standard]= Mesa 3D Graphics Library
8 HOMEPAGE= https://www.mesa3d.org/
12 SITES[main]= https://mesa.freedesktop.org/archive/
13 ftp://ftp.freedesktop.org/pub/mesa/
14 DISTFILE[1]= mesa-18.2.1.tar.xz:main
16 SPKGS[standard]= complete
22 OPTIONS_AVAILABLE= X86_DRIVERS ARM_DRIVERS
23 OPTIONS_STANDARD= X86_DRIVERS ARM_DRIVERS
24 OPT_ON[aarch64]= ARM_DRIVERS
25 OPT_ON[x86_64]= X86_DRIVERS
26 OPT_ON[i386]= X86_DRIVERS
28 BUILD_DEPENDS= libpthread-stubs:single:standard
29 libclc:single:standard
33 libelf:single:standard
34 libvdpau:single:standard
37 BUILDRUN_DEPENDS= expat:shared:standard
39 libdrm:single:standard
40 ocl-icd:primary:standard
41 opencl:single:standard
42 B_DEPS[sunos]= libbsd4sol:single:standard
43 EXRUN[clover]= llvm:llvm:standard
45 libelf:single:standard
47 libdrm:single:standard
48 EXRUN[drivers]= llvm:llvm:standard
51 libelf:single:standard
52 EXRUN[osmesa]= llvm:llvm:standard
56 USES= bison gettext-tools gmake libtool pkgconfig
57 python:py27,build shebangfix
58 c++:clover,drivers,osmesa
59 XORG_COMPONENTS= x11 xcb xdamage xext xfixes xshmfence xxf86vm xv
62 LICENSE= MIT:libs CUSTOM1:libs CUSTOM2:libs
63 LICENSE_NAME= CUSTOM1:"Kronos License (MIT with modifications)"
64 CUSTOM2:"SGI Free Software License B"
65 LICENSE_FILE= MIT:{{WRKDIR}}/LICENSE_MIT
66 CUSTOM1:{{WRKDIR}}/LICENSE_KHRONOS
67 CUSTOM2:{{WRKDIR}}/LICENSE_SGI
68 LICENSE_AWK= MIT:"^$$"
70 LICENSE_SOURCE= MIT:{{WRKSRC}}/include/GL/gl.h
71 CUSTOM2:{{WRKSRC}}/src/glx/eval.c
74 FPC_EQUIVALENT= graphics/mesa-libs
75 SHEBANG_FILES= src/gallium/*/*/*.py
76 src/gallium/tools/trace/*.py
77 src/gallium/drivers/svga/svgadump/svga_dump.py
78 src/mapi/glapi/gen/*.py
80 src/util/xmlpool/gen_xmlpool.py
81 src/mesa/main/get_*.py
82 src/util/format_srgb.py
84 src/intel/genxml/gen_pack_header.py
85 SHEBANG_OLD_PYTHON= /usr/bin/env[[:space:]]python2
87 /bin/env[[:space:]]python
90 CONFIGURE_ARGS= --enable-llvm
91 --enable-texture-float
98 --with-platforms=x11,drm
99 --enable-gallium-osmesa
100 --with-llvm-prefix={{LOCALBASE}}/llvm
101 --with-dri-drivers="{{DRI_DRIVERS:tl}}"
102 --with-gallium_drivers="{{GALLIUM_DRIVERS:tl}}"
103 CONFIGURE_ENV= ax_cv_check_cflags___Wno_initializer_overrides=no
105 INSTALL_TARGET= install-strip
106 INSTALL_REQ_TOOLCHAIN= yes
108 LDFLAGS= -Wl,-rpath,{{LOCALBASE}}/llvm/lib
109 VAR_OPSYS[sunos]= CPPFLAGS=-D__EXTENSIONS__=1
110 CPPFLAGS=-D_POSIX_PTHREAD_SEMANTICS
111 CFLAGS=-DF_DUPFD_CLOEXEC=F_DUPFD
113 [ARM_DRIVERS].DESCRIPTION= Build drivers for aarch64 architecture
114 [ARM_DRIVERS].MAKEFILE_ON= GALLIUM_DRIVERS+=FREEDRENO
117 [X86_DRIVERS].DESCRIPTION= Build drivers for i386 and x86_64 architectures
118 [X86_DRIVERS].CONFIGURE_ENABLE_BOTH= opencl
120 [X86_DRIVERS].MAKEFILE_ON= DRI_DRIVERS+=RADEON
124 GALLIUM_DRIVERS+=R300
125 GALLIUM_DRIVERS+=R600
126 GALLIUM_DRIVERS+=RADEONSI
127 GALLIUM_DRIVERS+=SVGA
130 ${REINPLACE_CMD} -e 's|/etc/|${PREFIX}/etc/|g' \
131 ${WRKSRC}/src/util/xmlconfig.c
133 post-patch-dragonfly:
134 # shm_open doesn't support SHM_ANON, and no memfd_create syscall
135 ${REINPLACE_CMD} -e '/^noinst_PROGRAMS =/ s|tools/aubinator.(EXEEXT)||' \
136 ${WRKSRC}/src/intel/Makefile.in
139 ${AWK} '/Copyright/,/DEALINGS/' ${WRKSRC}/include/GL/glext.h \
140 > ${WRKDIR}/LICENSE_KHRONOS
143 ${REINPLACE_CMD} -e 's|x86_64|amd64|' ${WRKSRC}/configure
147 -e '/^CFLAGS =/ s|$$| -I$$(prefix)/include/bsd|' \
148 -e '/^LDFLAGS =/ s|$$| -lbsd|' \
149 ${WRKSRC}/src/egl/Makefile.in \
150 ${WRKSRC}/src/gallium/drivers/r600/Makefile.in \
151 ${WRKSRC}/src/gallium/drivers/radeonsi/Makefile.in \
152 ${WRKSRC}/src/gallium/auxiliary/Makefile.in \
153 ${WRKSRC}/src/loader/Makefile.in
155 [FILE:808:descriptions/desc.libs]
156 The Mesa project began as an open-source implementation of the OpenGL
157 specification - a system for rendering interactive 3D graphics.
159 Over the years the project has grown to implement more graphics APIs,
160 including OpenGL ES (versions 1, 2, 3), OpenCL, OpenMAX, VDPAU, VA API,
163 A variety of device drivers allows the Mesa libraries to be used in many
164 different environments ranging from software emulation to complete
165 hardware acceleration for modern GPUs.
167 Mesa ties into several other open-source projects: the Direct Rendering
168 Infrastructure and X.org to provide OpenGL support on Linux, FreeBSD
169 and other operating systems.
171 This package contains the Mesa OpenGL libraries for GLX and EGL clients.
172 These include libEGL, libGL, and libglesv2 as well as utlity libraries
176 [FILE:130:descriptions/desc.clover]
177 This package contains Mesa's libOpenCL implementation "Clover".
178 It is built upon GALLIUM and currently only supports Radeon GPUs.
181 [FILE:162:descriptions/desc.drivers]
182 This package contains the Mesa OpenGL libraries for GLX and EGL clients.
183 These include libEGL, libGL, and libglesv2 as well as utlity libraries
187 [FILE:591:descriptions/desc.osmesa]
188 Mesa is a 3-D graphics library with an API which is very similar to that
189 of OpenGL*. To the extent that Mesa utilizes the OpenGL command syntax or
190 state machine, it is being used with authorization from Silicon Graphics,
191 Inc. However, the author makes no claim that Mesa is in any way a
192 compatible replacement for OpenGL or associated with Silicon Graphics, Inc.
194 This is a Off-Screen version of Mesa in order to do off-screen rendering in
195 other packages like VTK. Offscreen rendering is useful for a
196 number of things, such as batch processing, parallel processing, and
201 9636dc6f3d188abdcca02da97cedd73640d9035224efd5db724187d062c81056 11374476 mesa-18.2.1.tar.xz
204 [FILE:721:manifests/plist.libs]
205 @comment lib/libwayland-egl.so
206 @comment lib/libwayland-egl.so.1
207 @comment lib/libwayland-egl.so.1.0.0
208 @comment lib/pkgconfig/wayland-egl.pc
234 include/KHR/khrplatform.h
258 [FILE:245:manifests/plist.clover]
259 %%X86_DRIVERS-ON%%etc/OpenCL/vendors/mesa.icd
260 %%X86_DRIVERS-ON%%lib/
263 libMesaOpenCL.so.1.0.0
264 %%X86_DRIVERS-ON%%lib/gallium-pipe/
272 [FILE:751:manifests/plist.drivers]
273 %%ARM_DRIVERS-ON%%lib/dri/
277 %%X86_DRIVERS-ON%%lib/
282 %%X86_DRIVERS-ON%%lib/dri/
291 radeonsi_drv_video.so
293 %%X86_DRIVERS-ON%%lib/vdpau/
297 libvdpau_r300.so.1.0.0
301 libvdpau_r600.so.1.0.0
303 libvdpau_radeonsi.so.1
304 libvdpau_radeonsi.so.1.0
305 libvdpau_radeonsi.so.1.0.0
307 include/GL/internal/dri_interface.h
314 [FILE:99:manifests/plist.osmesa]
320 lib/pkgconfig/osmesa.pc
323 [FILE:2164:patches/patch-configure]
324 --- configure.orig 2018-09-21 10:57:09 UTC
326 @@ -21678,7 +21678,7 @@ LDFLAGS=$save_LDFLAGS
330 -openbsd* | darwin* )
331 +openbsd* | darwin* | solaris* )
332 LD_NO_UNDEFINED="" ;;
334 if test "x$enable_sanitize" = xno; then
335 @@ -21746,7 +21746,7 @@ fi
344 @@ -23674,7 +23674,7 @@ fi
349 +linux* | freebsd* | dragonfly*)
353 @@ -28200,9 +28200,6 @@ rm -f core conftest.err conftest.$ac_obj
354 CLANG_LIBDIR=${LLVM_LIBDIR}
356 CLANG_RESOURCE_DIR=$CLANG_LIBDIR/clang/${LLVM_VERSION}
357 - if test ! -f "$CLANG_RESOURCE_DIR/include/stddef.h"; then :
358 - 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
361 if test "x$enable_opencl" = xyes; then
363 @@ -29628,7 +29625,7 @@ if test "x$enable_llvm" = xyes; then
364 LLVM_CXXFLAGS=`strip_unwanted_llvm_flags "$LLVM_CONFIG --cxxflags"`
367 - if test $LLVM_VERSION_MAJOR -ge 4 -o $LLVM_VERSION_MAJOR -eq 3 -a $LLVM_VERSION_MINOR -ge 9; then
368 + if false $LLVM_VERSION_MAJOR -ge 4 -o $LLVM_VERSION_MAJOR -eq 3 -a $LLVM_VERSION_MINOR -ge 9; then
369 if test "x$enable_llvm_shared_libs" = xyes; then
370 LLVM_LIBS="`$LLVM_CONFIG --link-shared --libs ${LLVM_COMPONENTS}`"
372 @@ -29642,7 +29639,7 @@ if test "x$enable_llvm" = xyes; then
374 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Building mesa with statically linked LLVM may cause compilation issues" >&5
375 $as_echo "$as_me: WARNING: Building mesa with statically linked LLVM may cause compilation issues" >&2;}
376 - if test $LLVM_VERSION_MAJOR -ge 4 -o $LLVM_VERSION_MAJOR -eq 3 -a $LLVM_VERSION_MINOR -ge 5; then
377 + if false $LLVM_VERSION_MAJOR -ge 4 -o $LLVM_VERSION_MAJOR -eq 3 -a $LLVM_VERSION_MINOR -ge 5; then
378 LLVM_LIBS="$LLVM_LIBS `$LLVM_CONFIG --system-libs`"
383 [FILE:512:patches/patch-include_GL_internal_dri__interface.h]
384 GCC on 9.x doesn't allow types to be overwritten, these types are defined
385 in drm.h also, which causes build issues in xorg-server.
387 --- include/GL/internal/dri_interface.h.orig 2018-09-21 10:57:00 UTC
388 +++ include/GL/internal/dri_interface.h
390 #ifndef DRI_INTERFACE_H
391 #define DRI_INTERFACE_H
396 -typedef unsigned int drm_context_t;
397 -typedef unsigned int drm_drawable_t;
398 -typedef struct drm_clip_rect drm_clip_rect_t;
405 [FILE:629:patches/patch-src_amd_common_ac__debug.c]
406 --- src/amd/common/ac_debug.c.orig 2018-09-21 10:57:00 UTC
407 +++ src/amd/common/ac_debug.c
408 @@ -560,6 +560,10 @@ void ac_parse_ib_chunk(FILE *f, uint32_t
409 unsigned trace_id_count, enum chip_class chip_class,
410 ac_debug_addr_callback addr_callback, void *addr_callback_data)
413 + printf("\nac_parse_ib_chunk: open_memstream unsupported on solaris");
416 struct ac_ib_parser ib = {};
419 @@ -585,6 +589,7 @@ void ac_parse_ib_chunk(FILE *f, uint32_t
420 printf("\nPacket ends after the end of IB.\n");
429 [FILE:321:patches/patch-src_amd_vulkan_winsys_amdgpu_radv__amdgpu__cs.c]
430 - Define ETIME if missing
432 --- src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c.orig 2018-09-21 10:57:00 UTC
433 +++ src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c
435 #include "radv_amdgpu_bo.h"
439 +#define ETIME ETIMEDOUT
443 VIRTUAL_BUFFER_HASH_TABLE_SIZE = 1024
446 [FILE:784:patches/patch-src_compiler_glsl_linker.cpp]
447 --- src/compiler/glsl/linker.cpp.orig 2018-09-21 10:57:00 UTC
448 +++ src/compiler/glsl/linker.cpp
450 #include "main/enums.h"
451 #include "main/mtypes.h"
454 +/* uses libbsd4sol prototypes, so can't be static */
460 +strnlen(const char *s, size_t maxlen)
463 + for (len = 0; len < maxlen; len++, s++) {
470 +strndup(const char *str, size_t n)
477 + return strdup(str);
478 + if ((copy = (char *)malloc(len + 1)) == NULL)
480 + memcpy(copy, str, len);
490 [FILE:586:patches/patch-src_egl_drivers_dri2_platform__x11.c]
491 # work-around for https://bugs.freedesktop.org/show_bug.cgi?id=100627
493 --- src/egl/drivers/dri2/platform_x11.c.orig 2018-09-21 10:57:00 UTC
494 +++ src/egl/drivers/dri2/platform_x11.c
495 @@ -1516,6 +1516,9 @@ dri2_initialize_x11(_EGLDriver *drv, _EG
497 if (!disp->Options.ForceSoftware) {
499 +#if (defined(__FreeBSD__) || defined(__FreeBSD_kernel__)) && !defined(__DRM_NEXT__)
500 + if (env_var_as_boolean("LIBGL_DRI3_ENABLE", false))
502 if (!env_var_as_boolean("LIBGL_DRI3_DISABLE", false))
503 initialized = dri2_initialize_x11_dri3(drv, disp);
507 [FILE:3256:patches/patch-src_gallium_auxiliary_pipe-loader_pipe__loader__drm.c]
508 Revert the following commit.
510 FreeBSD and DragonFly don't have the required render nodes.
514 From 69a1b9959e59653da262185c4e2cf57d24939b19 Mon Sep 17 00:00:00 2001
515 From: Emil Velikov <emil.l.velikov@gmail.com>
516 Date: Mon, 29 Jun 2015 12:36:45 +0100
517 Subject: pipe-loader: drop support for non-render node devices
519 Render nodes have been around for quite some time. Removing support via
520 the master/primary node allows us to clean up the conditional
521 compilation and simplify the build greatly.
523 For example currently we the pipe-loader, which explicitly links against
524 xcb and friends (for X auth) if found at compile-time. That
525 would cause problems as one will be forced to use X/xcb, even if it's a
526 headless system that is used for opencl.
528 v2: Clarify the linking topic in the commit message.
530 Cc: Tom Stellard <thomas.stellard@amd.com>
531 Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
532 Reviewed-by: Francisco Jerez <currojerez@riseup.net>
535 --- src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c.orig 2018-09-21 10:57:00 UTC
536 +++ src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c
537 @@ -213,6 +213,14 @@ pipe_loader_drm_probe_fd(struct pipe_loa
541 +open_drm_minor(int minor)
543 + char path[PATH_MAX];
544 + snprintf(path, sizeof(path), DRM_DEV_NAME, DRM_DIR_NAME, minor);
545 + return open(path, O_RDWR, 0);
549 open_drm_render_node_minor(int minor)
552 @@ -224,8 +232,15 @@ open_drm_render_node_minor(int minor)
554 pipe_loader_drm_probe(struct pipe_loader_device **devs, int ndev)
557 + int i, k, fd, num_render_node_devs;
561 + unsigned vendor_id;
563 + } render_node_devs[DRM_RENDER_NODE_MAX_NODES];
565 + /* Look for render nodes first */
566 for (i = DRM_RENDER_NODE_MIN_MINOR, j = 0;
567 i <= DRM_RENDER_NODE_MAX_MINOR; i++) {
568 struct pipe_loader_device *dev;
569 @@ -239,6 +254,9 @@ pipe_loader_drm_probe(struct pipe_loader
573 + render_node_devs[j].vendor_id = dev->u.pci.vendor_id;
574 + render_node_devs[j].chip_id = dev->u.pci.chip_id;
579 @@ -248,6 +266,46 @@ pipe_loader_drm_probe(struct pipe_loader
583 + num_render_node_devs = j;
585 + /* Next look for drm devices. */
586 + for (i = 0; i < DRM_MAX_MINOR; i++) {
587 + struct pipe_loader_device *dev;
588 + boolean duplicate = FALSE;
589 + fd = open_drm_minor(i);
593 + if (!pipe_loader_drm_probe_fd(&dev, fd)) {
598 + /* Check to make sure we aren't already accessing this device via
601 + for (k = 0; k < num_render_node_devs; k++) {
602 + if (dev->u.pci.vendor_id == render_node_devs[k].vendor_id &&
603 + dev->u.pci.chip_id == render_node_devs[k].chip_id) {
605 + dev->ops->release(&dev);
617 + dev->ops->release(&dev);
628 [FILE:257:patches/patch-src_gallium_auxiliary_util_u__math.h]
629 --- src/gallium/auxiliary/util/u_math.h.orig 2018-09-21 10:57:00 UTC
630 +++ src/gallium/auxiliary/util/u_math.h
632 #include "util/bitscan.h"
636 +#define restrict __restrict__
643 [FILE:338:patches/patch-src_gallium_drivers_radeonsi_si__shader.c]
644 --- src/gallium/drivers/radeonsi/si_shader.c.orig 2018-09-21 10:57:00 UTC
645 +++ src/gallium/drivers/radeonsi/si_shader.c
647 * USE OR OTHER DEALINGS IN THE SOFTWARE.
651 +#include <alloca.h> /* for alloca */
654 #include "util/u_memory.h"
655 #include "util/u_string.h"
656 #include "tgsi/tgsi_build.h"
659 [FILE:511:patches/patch-src_gallium_drivers_radeonsi_si__state__shaders.c]
660 --- src/gallium/drivers/radeonsi/si_state_shaders.c.orig 2018-09-21 10:57:00 UTC
661 +++ src/gallium/drivers/radeonsi/si_state_shaders.c
662 @@ -1536,6 +1536,7 @@ static void si_build_shader_variant(stru
667 if (shader->compiler_ctx_state.is_debug_context) {
668 FILE *f = open_memstream(&shader->shader_log,
669 &shader->shader_log_size);
670 @@ -1544,6 +1545,7 @@ static void si_build_shader_variant(stru
676 si_shader_init_pm4_state(sscreen, shader);
680 [FILE:360:patches/patch-src_gallium_drivers_vc4_vc4__bufmgr.c]
681 # define ETIME as ETIMEOUT same as in intel driver
683 --- src/gallium/drivers/vc4/vc4_bufmgr.c.orig 2018-09-21 10:57:00 UTC
684 +++ src/gallium/drivers/vc4/vc4_bufmgr.c
688 #include <xf86drmMode.h>
690 +#define ETIME ETIMEDOUT
693 #include "util/u_hash_table.h"
694 #include "util/u_memory.h"
697 [FILE:1043:patches/patch-src_gallium_include_pipe_p__config.h]
698 --- src/gallium/include/pipe/p_config.h.orig 2018-09-21 10:57:00 UTC
699 +++ src/gallium/include/pipe/p_config.h
704 +#if defined(__sparc__) || defined(__sparc64__)
705 +#define PIPE_ARCH_SPARC
706 +#if defined(__sparc64__)
707 +#define PIPE_ARCH_SPARC_64
713 * Processor architecture
716 #if defined(PIPE_ARCH_X86) || defined(PIPE_ARCH_X86_64) || defined(PIPE_ARCH_ARM) || defined(PIPE_ARCH_AARCH64)
717 #define PIPE_ARCH_LITTLE_ENDIAN
718 -#elif defined(PIPE_ARCH_PPC) || defined(PIPE_ARCH_PPC_64) || defined(PIPE_ARCH_S390)
719 +#elif defined(PIPE_ARCH_PPC) || defined(PIPE_ARCH_PPC_64) || defined(PIPE_ARCH_S390) || defined(PIPE_ARCH_SPARC) || defined(PIPE_ARCH_SPARC_64)
720 #define PIPE_ARCH_BIG_ENDIAN
724 #define PIPE_OS_ANDROID
727 +#if defined(__DragonFly__)
728 +#define PIPE_OS_DRAGONFLY
730 +#define PIPE_OS_UNIX
733 #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
734 #define PIPE_OS_FREEBSD
738 [FILE:1604:patches/patch-src_gallium_state__trackers_clover_llvm_invocation.cpp]
739 # fix errors like the following
741 # llvm/invocation.cpp:(.text+0x1275): undefined reference to `std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::c_str()
743 # /usr/bin/ld: ../../../../src/gallium/state_trackers/clover/.libs/libclover.a(libclllvm_la-invocation.o): relocation R_X86_64_PC32 against `_ZNKSt3__112bas
744 ic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE5c_strEv' can not be used when making a shared object; recompile with -fPIC
745 # /usr/bin/ld: final link failed: Bad value
747 --- src/gallium/state_trackers/clover/llvm/invocation.cpp.orig 2018-09-21 10:57:00 UTC
748 +++ src/gallium/state_trackers/clover/llvm/invocation.cpp
749 @@ -181,6 +181,8 @@ namespace {
750 return get_lang_standard_from_version_str(device_version);
753 + const char* cstr(const std::string& str) { return str.c_str(); }
755 std::unique_ptr<clang::CompilerInstance>
756 create_compiler_instance(const device &dev,
757 const std::vector<std::string> &opts,
758 @@ -193,8 +195,8 @@ namespace {
759 // Parse the compiler options. A file name should be present at the end
760 // and must have the .cl extension in order for the CompilerInvocation
761 // class to recognize it as an OpenCL source file.
762 - const std::vector<const char *> copts =
763 - map(std::mem_fn(&std::string::c_str), opts);
764 + std::vector<const char *> copts(opts.size());
765 + std::transform(opts.begin(), opts.end(), copts.begin(), cstr);
767 const target &target = dev.ir_target();
768 const std::string &device_clc_version = dev.device_clc_version();
771 [FILE:635:patches/patch-src_gallium_state__trackers_clover_llvm_metadata.hpp]
772 # Fix error: no matching constructor for initialization of 'std::vector<const ::llvm::MDNode *>'
774 --- src/gallium/state_trackers/clover/llvm/metadata.hpp.orig 2018-09-21 10:57:00 UTC
775 +++ src/gallium/state_trackers/clover/llvm/metadata.hpp
776 @@ -42,7 +42,7 @@ namespace clover {
777 get_kernel_nodes(const ::llvm::Module &mod) {
778 if (const ::llvm::NamedMDNode *n =
779 mod.getNamedMetadata("opencl.kernels"))
780 - return { n->op_begin(), n->op_end() };
781 + return { n->getOperand(0), n->getOperand(n->getNumOperands()) };
787 [FILE:1150:patches/patch-src_gallium_state__trackers_clover_util_range.hpp]
788 From b95533b981af9a6687b41418e7cc2a5652fc2bdb Mon Sep 17 00:00:00 2001
789 From: =?UTF-8?q?Jean-S=C3=A9bastien=20P=C3=A9dron?= <dumbbell@FreeBSD.org>
790 Date: Fri, 7 Mar 2014 15:16:08 +0100
791 Subject: [PATCH 3/3] Work around for clang 3.4 which fails to build Clover
794 https://bugs.freedesktop.org/show_bug.cgi?id=74098#c3
795 --- src/gallium/state_trackers/clover/util/range.hpp.orig 2018-09-21 10:57:00 UTC
796 +++ src/gallium/state_trackers/clover/util/range.hpp
797 @@ -362,6 +362,12 @@ namespace clover {
802 + template<typename T>
803 + using fixup_function_type =
804 + typename std::conditional<std::is_function<T>::value, T &, T>::type;
808 /// Create a range by transforming the contents of a number of
809 /// source ranges \a rs element-wise using a provided functor \a f.
810 @@ -369,7 +375,7 @@ namespace clover {
811 /// \sa adaptor_range.
813 template<typename F, typename... Rs>
814 - adaptor_range<F, Rs...>
815 + adaptor_range<detail::fixup_function_type<F>, Rs...>
816 map(F &&f, Rs &&... rs) {
817 return { std::forward<F>(f), std::forward<Rs>(rs)... };
821 [FILE:323:patches/patch-src_gallium_winsys_amdgpu_drm_amdgpu__cs.c]
822 --- src/gallium/winsys/amdgpu/drm/amdgpu_cs.c.orig 2018-09-21 10:57:00 UTC
823 +++ src/gallium/winsys/amdgpu/drm/amdgpu_cs.c
825 #define AMDGPU_IB_FLAG_TC_WB_NOT_INVALIDATE (1 << 3)
832 DEBUG_GET_ONCE_BOOL_OPTION(noop, "RADEON_NOOP", false)
837 [FILE:575:patches/patch-src_glx_glxext.c]
838 # work-around for https://bugs.freedesktop.org/show_bug.cgi?id=100627
840 --- src/glx/glxext.c.orig 2018-09-21 10:57:00 UTC
842 @@ -920,6 +920,9 @@ __glXInitialize(Display * dpy)
843 #if defined(GLX_USE_DRM)
844 if (glx_direct && glx_accel) {
845 #if defined(HAVE_DRI3)
846 +#if (defined(__FreeBSD__) || defined(__FreeBSD_kernel__)) && !defined(__DRM_NEXT__)
847 + if (env_var_as_boolean("LIBGL_DRI3_ENABLE", false))
849 if (!env_var_as_boolean("LIBGL_DRI3_DISABLE", false))
850 dpyPriv->dri3Display = dri3_create_display(dpy);
851 #endif /* HAVE_DRI3 */
854 [FILE:686:patches/patch-src_intel_Makefile.in]
855 ../../src/util/.libs/libmesautil.a(libmesautil_la-half_float.o): In function `_mesa_float_to_half':
856 half_float.c:(.text+0x94): undefined reference to `lrintf'
857 half_float.c:(.text+0xbf): undefined reference to `lrintf'
858 cc: error: linker command failed with exit code 1 (use -v to see invocation)
859 gmake[5]: *** [Makefile:2706: tools/aubinator_error_decode] Error 1
861 --- src/intel/Makefile.in.orig 2018-09-21 10:57:17 UTC
862 +++ src/intel/Makefile.in
863 @@ -2345,7 +2345,8 @@ tools_aubinator_error_decode_LDADD = \
865 $(top_builddir)/src/util/libmesautil.la \
871 tools_aubinator_error_decode_CFLAGS = \
875 [FILE:995:patches/patch-src_intel_compiler_brw__eu__validate.c]
876 --- src/intel/compiler/brw_eu_validate.c.orig 2018-09-21 10:57:00 UTC
877 +++ src/intel/compiler/brw_eu_validate.c
886 +memmem(const void *l, size_t l_len, const void *s, size_t s_len)
889 + const char *cl = (const char *)l;
890 + const char *cs = (const char *)s;
892 + /* we need something to compare */
893 + if (l_len == 0 || s_len == 0)
896 + /* "s" must be smaller or equal to "l" */
900 + /* special case where s_len == 1 */
902 + return memchr(l, (int)*cs, l_len);
904 + /* the last position where its possible to find "s" in "l" */
905 + last = (char *)cl + l_len - s_len;
907 + for (cur = (char *)cl; cur <= last; cur++)
908 + if (cur[0] == cs[0] && memcmp(cur, cs, s_len) == 0)
915 /* We're going to do lots of string concatenation, so this should help. */
920 [FILE:954:patches/patch-src_intel_compiler_brw__fs__bank__conflicts.cpp]
921 --- src/intel/compiler/brw_fs_bank_conflicts.cpp.orig 2018-09-21 10:57:00 UTC
922 +++ src/intel/compiler/brw_fs_bank_conflicts.cpp
923 @@ -309,8 +309,13 @@ namespace {
924 const unsigned align = MAX2(sizeof(void *), __alignof__(vector_type));
925 const unsigned size = DIV_ROUND_UP(n, vector_width) * sizeof(vector_type);
928 + p = memalign(align, size);
929 + if (p == NULL) return NULL;
931 if (posix_memalign(&p, align, size))
935 return reinterpret_cast<vector_type *>(p);
937 @@ -728,7 +733,7 @@ namespace {
938 const weight_vector_type &conflicts)
940 const unsigned m = DIV_ROUND_UP(conflicts.size, vector_width);
941 - vector_type s_p = {}, s_n = {};
942 + vector_type s_p = {0}, s_n = {0};
944 for (unsigned r = 0; r < m; r++) {
945 s_p = adds(s_p, mask(bank_mask_p.v[r], conflicts.v[r]));
948 [FILE:225:patches/patch-src_intel_isl_isl.h]
949 --- src/intel/isl/isl.h.orig 2018-09-21 10:57:00 UTC
950 +++ src/intel/isl/isl.h
952 #include "util/macros.h"
956 +# define restrict __restrict__
963 [FILE:605:patches/patch-src_intel_tools_aubinator.c]
964 --- src/intel/tools/aubinator.c.orig 2018-09-21 10:57:00 UTC
965 +++ src/intel/tools/aubinator.c
967 #include "intel_aub.h"
969 #ifndef HAVE_MEMFD_CREATE
971 #include <sys/syscall.h>
974 @@ -54,6 +55,13 @@ memfd_create(const char *name, unsigned
976 return syscall(SYS_memfd_create, name, flags);
978 +# elif defined __FreeBSD__
980 +memfd_create(const char *name __unused__, unsigned int flags __unused__)
982 + return shm_open(SHM_ANON, O_RDWR, 0600);
987 /* Below is the only command missing from intel_aub.h in libdrm
990 [FILE:302:patches/patch-src_intel_tools_aubinator__error__decode.c]
991 # expose getline in FreeBSD's stdio.h
993 --- src/intel/tools/aubinator_error_decode.c.orig 2018-09-21 10:57:00 UTC
994 +++ src/intel/tools/aubinator_error_decode.c
1000 +#define _WITH_GETLINE
1002 #include <stdbool.h>
1007 [FILE:619:patches/patch-src_mapi_glapi_gen_gl__gentable.py]
1008 --- src/mapi/glapi/gen/gl_gentable.py.orig 2018-09-21 10:57:00 UTC
1009 +++ src/mapi/glapi/gen/gl_gentable.py
1010 @@ -45,7 +45,7 @@ header = """/* GLXEXT is the define used
1013 #if (defined(GLXEXT) && defined(HAVE_BACKTRACE)) \\
1014 - || (!defined(GLXEXT) && defined(DEBUG) && !defined(__CYGWIN__) && !defined(__MINGW32__) && !defined(__OpenBSD__) && !defined(__NetBSD__) && !defined(__DragonFly__))
1015 + || (!defined(GLXEXT) && defined(DEBUG) && !defined(__CYGWIN__) && !defined(__MINGW32__) && !defined(__OpenBSD__) && !defined(__NetBSD__) && !defined(__FreeBSD__) && !defined(__DragonFly__))
1016 #define USE_BACKTRACE
1021 [FILE:425:patches/patch-src_mesa_drivers_dri_i965_brw__bufmgr.c]
1022 --- src/mesa/drivers/dri/i965/brw_bufmgr.c.orig 2018-09-21 10:57:00 UTC
1023 +++ src/mesa/drivers/dri/i965/brw_bufmgr.c
1029 +#define O_CLOEXEC 0
1032 /* VALGRIND_FREELIKE_BLOCK unfortunately does not actually undo the earlier
1033 * VALGRIND_MALLOCLIKE_BLOCK but instead leaves vg convinced the memory is
1034 * leaked. All because it does not call VG(cli_free) from its
1037 [FILE:714:patches/patch-src_mesa_drivers_dri_i965_brw__disk__cache.c]
1038 --- src/mesa/drivers/dri/i965/brw_disk_cache.c.orig 2018-09-21 10:57:00 UTC
1039 +++ src/mesa/drivers/dri/i965/brw_disk_cache.c
1040 @@ -380,6 +380,7 @@ brw_disk_cache_init(struct intel_screen
1041 if (INTEL_DEBUG & DEBUG_DISK_CACHE_DISABLE_MASK)
1044 +# ifdef HAVE_DL_ITERATE_PHDR
1045 /* array length: print length + null char + 1 extra to verify it is unused */
1047 MAYBE_UNUSED int len = snprintf(renderer, sizeof(renderer), "i965_%04x",
1048 @@ -399,5 +400,6 @@ brw_disk_cache_init(struct intel_screen
1049 const uint64_t driver_flags =
1050 brw_get_compiler_config_value(screen->compiler);
1051 screen->disk_cache = disk_cache_create(renderer, timestamp, driver_flags);
1057 [FILE:1350:patches/patch-src_mesa_drivers_dri_i965_brw__performance__query.c]
1058 --- src/mesa/drivers/dri/i965/brw_performance_query.c.orig 2018-09-21 10:57:01 UTC
1059 +++ src/mesa/drivers/dri/i965/brw_performance_query.c
1060 @@ -1812,9 +1812,17 @@ enumerate_sysfs_metrics(struct brw_conte
1061 while ((metric_entry = readdir(metricsdir))) {
1062 struct hash_entry *entry;
1065 + struct stat entry_stat;
1067 + lstat(metric_entry->d_name, &entry_stat);
1068 + if ((!S_ISDIR(entry_stat.st_mode) && !S_ISLNK(entry_stat.st_mode)) ||
1069 + metric_entry->d_name[0] == '.')
1071 if ((metric_entry->d_type != DT_DIR &&
1072 metric_entry->d_type != DT_LNK) ||
1073 metric_entry->d_name[0] == '.')
1077 DBG("metric set: %s\n", metric_entry->d_name);
1078 @@ -2088,9 +2096,17 @@ get_sysfs_dev_dir(struct brw_context *br
1081 while ((drm_entry = readdir(drmdir))) {
1083 + struct stat drm_stat;
1085 + lstat(drm_entry->d_name, &drm_stat);
1086 + if ((S_ISDIR(drm_stat.st_mode) || S_ISLNK(drm_stat.st_mode)) &&
1087 + strncmp(drm_entry->d_name, "card", 4) == 0)
1089 if ((drm_entry->d_type == DT_DIR ||
1090 drm_entry->d_type == DT_LNK) &&
1091 strncmp(drm_entry->d_name, "card", 4) == 0)
1094 len = snprintf(brw->perfquery.sysfs_dev_dir,
1095 sizeof(brw->perfquery.sysfs_dev_dir),
1098 [FILE:851:patches/patch-src_mesa_drivers_dri_i965_brw__program__binary.c]
1099 --- src/mesa/drivers/dri/i965/brw_program_binary.c.orig 2018-09-21 10:57:01 UTC
1100 +++ src/mesa/drivers/dri/i965/brw_program_binary.c
1101 @@ -36,9 +36,11 @@ static uint8_t driver_sha1[20];
1103 brw_program_binary_init(unsigned device_id)
1105 +#ifdef HAVE_DL_ITERATE_PHDR
1106 const struct build_id_note *note =
1107 build_id_find_nhdr_for_addr(brw_program_binary_init);
1112 * With Mesa's megadrivers, taking the sha1 of i965_dri.so may not be
1113 @@ -52,7 +54,9 @@ brw_program_binary_init(unsigned device_
1114 int len = snprintf(renderer, sizeof(renderer), "i965_%04x", device_id);
1115 assert(len == sizeof(renderer) - 1);
1116 _mesa_sha1_update(&ctx, renderer, len);
1117 +#ifdef HAVE_DL_ITERATE_PHDR
1118 _mesa_sha1_update(&ctx, build_id_data(note), build_id_length(note));
1120 _mesa_sha1_final(&ctx, driver_sha1);
1125 [FILE:406:patches/patch-src_mesa_main_compiler.h]
1126 --- src/mesa/main/compiler.h.orig 2018-09-21 10:57:01 UTC
1127 +++ src/mesa/main/compiler.h
1129 #if defined(__linux__)
1130 #include <byteswap.h>
1131 #define CPU_TO_LE32( x ) bswap_32( x )
1132 +#elif defined(__FreeBSD__)
1133 +#include <sys/endian.h>
1134 +#define CPU_TO_LE32( x ) bswap32( x )
1135 #elif defined(__APPLE__)
1136 #include <CoreFoundation/CFByteOrder.h>
1137 #define CPU_TO_LE32( x ) CFSwapInt32HostToLittle( x )
1140 [FILE:328:patches/patch-src_util_build__id.c]
1141 # Elf_ doesn't exist, use Elf32_ or Elf64_
1143 --- src/util/build_id.c.orig 2018-09-21 10:57:01 UTC
1144 +++ src/util/build_id.c
1149 -#define ElfW(type) Elf_##type
1151 +#define ElfW(type) Elf64_##type
1153 +#define ElfW(type) Elf32_##type
1157 struct build_id_note {
1160 [FILE:649:patches/patch-src_util_disk__cache.c]
1161 --- src/util/disk_cache.c.orig 2018-09-21 10:57:01 UTC
1162 +++ src/util/disk_cache.c
1165 #include "disk_cache.h"
1168 +#define O_CLOEXEC 0
1171 /* Number of bits to mask off from a cache key to get an index. */
1172 #define CACHE_INDEX_KEY_BITS 16
1174 @@ -513,7 +517,11 @@ choose_lru_file_matching(const char *dir
1179 + if (fstatat(dir->dd_fd, entry->d_name, &sb, 0) == 0) {
1181 if (fstatat(dirfd(dir), entry->d_name, &sb, 0) == 0) {
1183 if (!lru_atime || (sb.st_atime < lru_atime)) {
1184 size_t len = strlen(entry->d_name);
1188 [FILE:1462:patches/patch-src_util_futex.h]
1189 - Implement futex_wake() and futex_wait() via _umtx_op()
1191 --- src/util/futex.h.orig 2018-09-21 10:57:01 UTC
1192 +++ src/util/futex.h
1197 +#if defined(__FreeBSD__)
1199 +# if __FreeBSD__ < 11
1200 +# include <machine/atomic.h>
1202 +#include <sys/umtx.h>
1204 #include <linux/futex.h>
1205 #include <sys/syscall.h>
1207 #include <sys/time.h>
1209 +#if defined(__FreeBSD__)
1210 +static inline int futex_wake(uint32_t *addr, int count)
1212 + return _umtx_op(addr, UMTX_OP_WAKE, (uint32_t)count, NULL, NULL) == -1 ? errno : 0;
1215 +static inline int futex_wait(uint32_t *addr, int32_t value, struct timespec *timeout)
1217 + void *uaddr = NULL, *uaddr2 = NULL;
1218 + if (timeout != NULL) {
1219 + const struct _umtx_time tmo = { ._timeout = *timeout, ._flags = UMTX_ABSTIME, ._clockid = CLOCK_MONOTONIC };
1220 + uaddr = (void *)(uintptr_t)sizeof(tmo);
1221 + uaddr2 = (void *)&tmo;
1223 + return _umtx_op(addr, UMTX_OP_WAIT_UINT, (uint32_t)value, uaddr, uaddr2) == -1 ? errno : 0;
1226 static inline long sys_futex(void *addr1, int op, int val1, const struct timespec *timeout, void *addr2, int val3)
1228 return syscall(SYS_futex, addr1, op, val1, timeout, addr2, val3);
1229 @@ -50,6 +75,7 @@ static inline int futex_wait(uint32_t *a
1230 return sys_futex(addr, FUTEX_WAIT_BITSET, value, timeout, NULL,
1231 FUTEX_BITSET_MATCH_ANY);
1239 [FILE:360:patches/patch-src_util_os__time.c]
1240 - Use monotonic clock for timeouts
1242 --- src/util/os_time.c.orig 2018-09-21 10:57:01 UTC
1243 +++ src/util/os_time.c
1244 @@ -95,7 +95,7 @@ os_time_get_nano(void)
1246 os_time_sleep(int64_t usecs)
1248 -#if defined(PIPE_OS_LINUX)
1249 +#if defined(HAVE_CLOCK_NANOSLEEP)
1250 struct timespec time;
1251 time.tv_sec = usecs / 1000000;
1252 time.tv_nsec = (usecs % 1000000) * 1000;
1255 [FILE:430:patches/patch-src_util_u__atomic.h]
1256 --- src/util/u_atomic.h.orig 2018-09-21 10:57:01 UTC
1257 +++ src/util/u_atomic.h
1259 * locally coded assembly, compiler intrinsic or ultimately a
1260 * mutex-based implementation.
1263 -#define PIPE_ATOMIC_OS_SOLARIS
1264 -#elif defined(_MSC_VER)
1265 -#define PIPE_ATOMIC_MSVC_INTRINSIC
1266 -#elif defined(__GNUC__)
1267 +#if defined(__GNUC__)
1268 #define PIPE_ATOMIC_GCC_INTRINSIC
1270 #error "Unsupported platform"
1273 [FILE:1151:patches/patch-src_util_u__thread.h]
1274 - Implement setting thread name
1275 - Use monotonic clock for timeouts
1277 --- src/util/u_thread.h.orig 2018-09-21 10:57:01 UTC
1278 +++ src/util/u_thread.h
1283 +#if defined(__DragonFly__) || defined(__FreeBSD__) || defined(__OpenBSD__)
1284 +#include <pthread_np.h>
1285 +#undef ALIGN /* Avoid conflict on FreeBSD in main/macros.h */
1290 @@ -65,6 +69,12 @@ static inline void u_thread_setname( con
1291 (__GLIBC__ >= 3 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 12)) && \
1293 pthread_setname_np(pthread_self(), name);
1294 +# elif defined(__sun)
1296 +# elif defined(__DragonFly__) || defined(__FreeBSD__) || defined(__OpenBSD__)
1297 + pthread_set_name_np(pthread_self(), name);
1298 +# elif defined(__NetBSD__)
1299 + pthread_setname_np(pthread_self(), "%s", (void*)name);
1303 @@ -78,7 +88,7 @@ static inline void u_thread_setname( con
1304 static inline int64_t
1305 u_thread_get_time_nano(thrd_t thread)
1307 -#if defined(__linux__) && defined(HAVE_PTHREAD)
1308 +#if defined(HAVE_PTHREAD) && !defined(__sun)
1314 [FILE:47:files/special.mk]
1315 DRI_DRIVERS+= SWRAST
1316 GALLIUM_DRIVERS+= SWRAST
1319 [FILE:684:freebsd/patch-src_intel_tools_aubinator.c]
1320 # We don't have MAP_NORESERVE so use MAP_NOSYNC | MAP_NOCORE and
1321 # hope for the best (this alloc is too big but it's only a test)
1323 --- src/intel/tools/aubinator.c.orig 2018-08-13 16:42:38 UTC
1324 +++ src/intel/tools/aubinator.c
1325 @@ -633,7 +633,7 @@ int main(int argc, char *argv[])
1326 /* mmap a terabyte for our gtt space. */
1327 gtt_size = 1ull << 40;
1328 gtt = mmap(NULL, gtt_size, PROT_READ | PROT_WRITE,
1329 - MAP_PRIVATE | MAP_ANONYMOUS | MAP_NORESERVE, -1, 0);
1330 + MAP_PRIVATE | MAP_ANONYMOUS | MAP_NOSYNC | MAP_NOCORE, -1, 0);
1331 if (gtt == MAP_FAILED) {
1332 fprintf(stderr, "failed to alloc gtt space: %s\n", strerror(errno));
1336 [FILE:713:sunos/patch-src_amd_Makefile.in]
1337 --- src/amd/Makefile.in.orig 2018-07-13 18:41:35 UTC
1338 +++ src/amd/Makefile.in
1339 @@ -331,7 +331,7 @@ CCAS = @CCAS@
1340 CCASDEPMODE = @CCASDEPMODE@
1341 CCASFLAGS = @CCASFLAGS@
1342 CCDEPMODE = @CCDEPMODE@
1344 +CFLAGS = @CFLAGS@ -I$(prefix)/include/bsd
1345 CLANG_RESOURCE_DIR = @CLANG_RESOURCE_DIR@
1346 CLOCK_LIB = @CLOCK_LIB@
1347 CLOVER_STD_OVERRIDE = @CLOVER_STD_OVERRIDE@
1348 @@ -741,7 +741,7 @@ addrlib_libamdgpu_addrlib_la_SOURCES = $
1349 @HAVE_GALLIUM_LLVM_TRUE@ $(AMD_GENERATED_FILES) \
1350 @HAVE_GALLIUM_LLVM_TRUE@ $(AMD_NIR_FILES)
1352 -common_libamd_common_la_LIBADD = $(LIBELF_LIBS)
1353 +common_libamd_common_la_LIBADD = $(LIBELF_LIBS) -lbsd
1354 BUILT_SOURCES = $(AMD_GENERATED_FILES)
1356 $(COMMON_HEADER_FILES) \
1359 [FILE:368:sunos/patch-src_compiler_Makefile.in]
1360 --- src/compiler/Makefile.in.orig 2018-07-13 18:41:35 UTC
1361 +++ src/compiler/Makefile.in
1362 @@ -757,7 +757,7 @@ CLANG_RESOURCE_DIR = @CLANG_RESOURCE_DIR
1363 CLOCK_LIB = @CLOCK_LIB@
1364 CLOVER_STD_OVERRIDE = @CLOVER_STD_OVERRIDE@
1366 -CPPFLAGS = @CPPFLAGS@
1367 +CPPFLAGS = @CPPFLAGS@ -I$(prefix)/include/bsd
1369 CXX11_CXXFLAGS = @CXX11_CXXFLAGS@
1373 [FILE:343:sunos/patch-src_intel_Makefile.in]
1374 --- src/intel/Makefile.in.orig 2018-07-20 17:55:23 UTC
1375 +++ src/intel/Makefile.in
1376 @@ -2104,7 +2104,7 @@ tools_aubinator_error_decode_LDADD = \
1378 tools_aubinator_error_decode_CFLAGS = \
1381 + $(ZLIB_CFLAGS) -I$(prefix)/include/bsd
1384 # Due to a what seems like a autoconf bug, we must ensure that the genaration
1387 [FILE:760:sunos/patch-src_mesa_drivers_dri_common_Makefile.in]
1388 --- src/mesa/drivers/dri/common/Makefile.in.orig 2018-01-18 21:30:42 UTC
1389 +++ src/mesa/drivers/dri/common/Makefile.in
1390 @@ -138,7 +138,7 @@ AM_V_lt = $(am__v_lt_@AM_V@)
1391 am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
1392 am__v_lt_0 = --silent
1394 -libmegadriver_stub_la_LIBADD =
1395 +libmegadriver_stub_la_LIBADD = -lbsd
1396 am__objects_2 = megadriver_stub.lo
1397 am_libmegadriver_stub_la_OBJECTS = $(am__objects_2)
1398 libmegadriver_stub_la_OBJECTS = $(am_libmegadriver_stub_la_OBJECTS)
1399 @@ -224,7 +224,7 @@ CCAS = @CCAS@
1400 CCASDEPMODE = @CCASDEPMODE@
1401 CCASFLAGS = @CCASFLAGS@
1402 CCDEPMODE = @CCDEPMODE@
1404 +CFLAGS = @CFLAGS@ -I$(prefix)/include/bsd
1405 CLANG_RESOURCE_DIR = @CLANG_RESOURCE_DIR@
1406 CLOCK_LIB = @CLOCK_LIB@
1407 CLOVER_STD_OVERRIDE = @CLOVER_STD_OVERRIDE@
1410 [FILE:919:sunos/patch-src_util_Makefile.in]
1411 --- src/util/Makefile.in.orig 2018-07-13 18:41:40 UTC
1412 +++ src/util/Makefile.in
1413 @@ -879,6 +879,7 @@ libmesautil_la_CPPFLAGS = \
1414 -I$(top_srcdir)/src/mesa \
1415 -I$(top_srcdir)/src/gallium/include \
1416 -I$(top_srcdir)/src/gallium/auxiliary \
1417 + -I$(prefix)/include/bsd \
1418 $(VISIBILITY_CFLAGS) \
1419 $(MSVC2013_COMPAT_CFLAGS) \
1421 @@ -891,18 +892,19 @@ libmesautil_la_LIBADD = \
1426 + $(LIBATOMIC_LIBS) -lbsd
1428 libxmlconfig_la_SOURCES = $(XMLCONFIG_FILES)
1429 libxmlconfig_la_CFLAGS = \
1431 -I$(top_srcdir)/include \
1432 -I$(top_srcdir)/src \
1433 + -I$(prefix)/include/bsd \
1434 -DSYSCONFDIR=\"$(sysconfdir)\" \
1435 $(VISIBILITY_CFLAGS) \
1438 -libxmlconfig_la_LIBADD = $(EXPAT_LIBS) -lm
1439 +libxmlconfig_la_LIBADD = $(EXPAT_LIBS) -lm -lbsd
1440 sysconf_DATA = drirc
1441 u_atomic_test_LDADD = libmesautil.la
1442 roundeven_test_LDADD = -lm