Annotation of pkgsrc/graphics/MesaLib/options.mk, Revision 1.81
1.81 ! nia 1: # $NetBSD: options.mk,v 1.80 2020/04/09 16:48:08 nia Exp $
1.1 bjs 2:
1.28 tnn 3: PKG_OPTIONS_VAR= PKG_OPTIONS.MesaLib
1.1 bjs 4:
1.76 nia 5: .include "features.mk"
6:
1.80 nia 7: PKG_SUPPORTED_OPTIONS+= elf-tls llvm vulkan x11
1.1 bjs 8:
1.76 nia 9: .if ${MESALIB_SUPPORTS_DRI} == "yes"
1.71 nia 10: PKG_SUPPORTED_OPTIONS+= wayland
1.79 nia 11: . include "../../devel/wayland/platform.mk"
12: . if ${PLATFORM_SUPPORTS_WAYLAND} == "yes"
13: PKG_SUGGESTED_OPTIONS+= wayland
14: . endif
1.15 hasso 15: .endif
16:
1.71 nia 17: PKG_SUGGESTED_OPTIONS+= x11
1.28 tnn 18:
1.80 nia 19: .include "../../mk/bsd.fast.prefs.mk"
20:
1.71 nia 21: # The LLVM option enables JIT accelerated software rendering and is also
22: # required to support the latest RADEON GPUs.
23: #
24: # Enable it by default on platforms where such GPUs might be encountered or
25: # LLVM-accelerated software rendering might be useful.
1.76 nia 26: .if ${MESALIB_SUPPORTS_DRI} == "yes" && \
27: ${OPSYS} != "SunOS" && \
1.73 nia 28: (${MACHINE_ARCH} == "i386" || \
29: ${MACHINE_ARCH} == "x86_64" || \
30: ${MACHINE_ARCH} == "aarch64")
1.71 nia 31: PKG_SUGGESTED_OPTIONS+= llvm
1.65 nia 32: .endif
33:
1.80 nia 34: # ELF TLS is broken in at least the following cases:
35: # - NetBSD with SDL2 without X11
1.81 ! nia 36: # - FreeBSD - https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3559
1.80 nia 37: # - Linux with musl libc
38: #
39: # https://gitlab.freedesktop.org/mesa/mesa/issues/966
40: .if ${OPSYS} == "Linux" && !empty(GLIBC_VERSION)
41: PKG_SUGGESTED_OPTIONS+= elf-tls
42: .endif
43:
1.71 nia 44: .include "../../mk/bsd.options.mk"
1.1 bjs 45:
1.71 nia 46: # Gallium drivers requiring LLVM
47: PLIST_VARS+= r600 radeonsi
1.65 nia 48:
1.71 nia 49: # Windowing systems
50: PLIST_VARS+= wayland glx
1.65 nia 51:
1.71 nia 52: # Misc. features
53: PLIST_VARS+= vdpau
1.65 nia 54:
1.71 nia 55: #
1.80 nia 56: # ELF TLS support
57: #
58: .if empty(PKG_OPTIONS:Melf-tls)
59: BUILDLINK_TRANSFORM+= rm:-DUSE_ELF_TLS
60: .endif
61:
62: #
1.71 nia 63: # LLVM support
64: #
65: .if !empty(PKG_OPTIONS:Mllvm)
66: MESON_ARGS+= -Dllvm=true
1.74 nia 67: BUILDLINK_API_DEPENDS.libLLVM+= libLLVM>=7.0.1nb2
1.71 nia 68: . include "../../devel/libelf/buildlink3.mk"
69: . include "../../lang/libLLVM/buildlink3.mk"
1.28 tnn 70:
1.71 nia 71: . if ${OPSYS} != "Darwin" && ${OPSYS} != "Cygwin"
1.74 nia 72: # This is the latest libdrm requirement for amdgpu.
73: BUILDLINK_API_DEPENDS.libdrm+= libdrm>=2.4.99
74:
1.38 bouyer 75: PLIST.r600= yes
76: GALLIUM_DRIVERS+= r600
1.71 nia 77: PLIST.radeonsi= yes
78: GALLIUM_DRIVERS+= radeonsi
79: . endif
80: .else
81: MESON_ARGS+= -Dllvm=false
82: .endif
1.38 bouyer 83:
1.71 nia 84: #
1.74 nia 85: # Vulkan support - experimental
86: #
87: .if !empty(PKG_OPTIONS:Mvulkan)
88: MESON_ARGS+= -Dvulkan-drivers="auto"
89: .else
90: MESON_ARGS+= -Dvulkan-drivers=""
91: .endif
92:
93: #
1.71 nia 94: # X11 support
95: #
96: .if !empty(PKG_OPTIONS:Mx11)
97: MESA_PLATFORMS+= x11
98: PLIST.glx= yes
1.76 nia 99: . if ${MESALIB_SUPPORTS_DRI} == "yes"
1.71 nia 100: MESON_ARGS+= -Dglx=dri
101: . include "../../multimedia/libvdpau/available.mk"
1.75 nia 102: . if ${VDPAU_AVAILABLE} == "yes"
1.71 nia 103: MESON_ARGS+= -Dgallium-vdpau=true
104: PLIST.vdpau= yes
105: . include "../../multimedia/libvdpau/buildlink3.mk"
106: . else
107: MESON_ARGS+= -Dgallium-vdpau=false
1.65 nia 108: . endif
109: . endif
1.71 nia 110: . include "../../x11/libX11/buildlink3.mk"
111: . include "../../x11/libXdamage/buildlink3.mk"
112: . include "../../x11/libXext/buildlink3.mk"
113: . include "../../x11/libXfixes/buildlink3.mk"
114: . include "../../x11/libXrandr/buildlink3.mk"
115: . include "../../x11/libXxf86vm/buildlink3.mk"
116: . include "../../x11/libxcb/buildlink3.mk"
117: . include "../../x11/libxshmfence/buildlink3.mk"
118: . include "../../x11/xcb-proto/buildlink3.mk"
119: . include "../../x11/xorgproto/buildlink3.mk"
120: .else
121: MESON_ARGS+= -Dglx=disabled
1.68 nia 122: MESON_ARGS+= -Dgallium-vdpau=false
1.1 bjs 123: .endif
1.77 nia 124:
125: #
126: # Wayland support
127: #
128: .if !empty(PKG_OPTIONS:Mwayland)
129: MESA_PLATFORMS+= wayland
130: PLIST.wayland= yes
131: . include "../../devel/wayland/buildlink3.mk"
132: . include "../../devel/wayland-protocols/buildlink3.mk"
133: .endif
CVSweb <webmaster@jp.NetBSD.org>