summaryrefslogtreecommitdiff
path: root/media-libs/mesa/mesa-9999.ebuild
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-06-09 09:27:03 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-06-09 09:27:03 +0100
commitcb3e8c6af7661fbcafdcacc7e0ecdfb610d098fa (patch)
tree047fc92023c520d07f13ec5ac96e094d1b312a7a /media-libs/mesa/mesa-9999.ebuild
parent7b9f15840068dfaeea5684f8a1af1fe460dfa14c (diff)
gentoo resync : 09.06.2018
Diffstat (limited to 'media-libs/mesa/mesa-9999.ebuild')
-rw-r--r--media-libs/mesa/mesa-9999.ebuild283
1 files changed, 117 insertions, 166 deletions
diff --git a/media-libs/mesa/mesa-9999.ebuild b/media-libs/mesa/mesa-9999.ebuild
index 70702be097dc..65c767803a3c 100644
--- a/media-libs/mesa/mesa-9999.ebuild
+++ b/media-libs/mesa/mesa-9999.ebuild
@@ -3,16 +3,9 @@
EAPI=6
-EGIT_REPO_URI="https://anongit.freedesktop.org/git/mesa/mesa.git"
-
-if [[ ${PV} = 9999 ]]; then
- GIT_ECLASS="git-r3"
- EXPERIMENTAL="true"
-fi
-
PYTHON_COMPAT=( python2_7 )
-inherit autotools llvm multilib-minimal python-any-r1 pax-utils ${GIT_ECLASS}
+inherit llvm meson multilib-minimal pax-utils python-any-r1
OPENGL_DIR="xorg-x11"
@@ -21,8 +14,10 @@ MY_P="${P/_/-}"
DESCRIPTION="OpenGL-like graphic library for Linux"
HOMEPAGE="https://www.mesa3d.org/ https://mesa.freedesktop.org/"
-if [[ $PV == 9999 ]]; then
- SRC_URI=""
+if [[ ${PV} == 9999 ]]; then
+ EGIT_REPO_URI="https://gitlab.freedesktop.org/mesa/mesa.git"
+ EXPERIMENTAL="true"
+ inherit git-r3
else
SRC_URI="https://mesa.freedesktop.org/archive/${MY_P}.tar.xz"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris"
@@ -30,7 +25,10 @@ fi
LICENSE="MIT"
SLOT="0"
-RESTRICT="!bindist? ( bindist )"
+RESTRICT="
+ !bindist? ( bindist )
+ !test? ( test )
+"
RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi"
VIDEO_CARDS="${RADEON_CARDS} freedreno i915 i965 imx intel nouveau vc4 virgl vivante vmware"
@@ -39,9 +37,9 @@ for card in ${VIDEO_CARDS}; do
done
IUSE="${IUSE_VIDEO_CARDS}
- bindist +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 gles2 unwind
- +llvm +nptl opencl osmesa pax_kernel openmax pic selinux vaapi valgrind
- vdpau vulkan wayland xvmc xa"
+ bindist +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 gles2 +llvm
+ lm_sensors +nptl opencl osmesa pax_kernel openmax pic selinux test unwind
+ vaapi valgrind vdpau vulkan wayland xvmc xa"
REQUIRED_USE="
d3d9? ( dri3 gallium )
@@ -88,37 +86,40 @@ RDEPEND="
>=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
>=x11-libs/libxcb-1.13:=[${MULTILIB_USEDEP}]
x11-libs/libXfixes:=[${MULTILIB_USEDEP}]
- unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] )
- llvm? (
- video_cards_radeonsi? (
- virtual/libelf:0=[${MULTILIB_USEDEP}]
+ gallium? (
+ unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] )
+ llvm? (
+ video_cards_radeonsi? (
+ virtual/libelf:0=[${MULTILIB_USEDEP}]
+ )
+ video_cards_r600? (
+ virtual/libelf:0=[${MULTILIB_USEDEP}]
+ )
+ video_cards_radeon? (
+ virtual/libelf:0=[${MULTILIB_USEDEP}]
+ )
)
- video_cards_r600? (
- virtual/libelf:0=[${MULTILIB_USEDEP}]
+ lm_sensors? ( sys-apps/lm_sensors:= )
+ opencl? (
+ app-eselect/eselect-opencl
+ dev-libs/libclc
+ virtual/libelf:0=[${MULTILIB_USEDEP}]
+ )
+ openmax? (
+ >=media-libs/libomxil-bellagio-0.9.3:=[${MULTILIB_USEDEP}]
+ x11-misc/xdg-utils
)
- video_cards_radeon? (
- virtual/libelf:0=[${MULTILIB_USEDEP}]
+ vaapi? (
+ >=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
+ video_cards_nouveau? ( !<=x11-libs/libva-vdpau-driver-0.7.4-r3 )
)
+ vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
+ xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
)
- opencl? (
- app-eselect/eselect-opencl
- dev-libs/libclc
- virtual/libelf:0=[${MULTILIB_USEDEP}]
- )
- openmax? (
- >=media-libs/libomxil-bellagio-0.9.3:=[${MULTILIB_USEDEP}]
- x11-misc/xdg-utils
- )
- vaapi? (
- >=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
- video_cards_nouveau? ( !<=x11-libs/libva-vdpau-driver-0.7.4-r3 )
- )
- vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
wayland? (
- >=dev-libs/wayland-1.11.0:=[${MULTILIB_USEDEP}]
+ >=dev-libs/wayland-1.15.0:=[${MULTILIB_USEDEP}]
>=dev-libs/wayland-protocols-1.8
)
- xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}]
video_cards_intel? (
@@ -215,17 +216,12 @@ DEPEND="${RDEPEND}
opencl? (
>=sys-devel/gcc-4.6
)
+ sys-devel/bison
+ sys-devel/flex
sys-devel/gettext
virtual/pkgconfig
valgrind? ( dev-util/valgrind )
x11-base/xorg-proto
- vulkan? (
- $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]")
- )
-"
-[[ ${PV} == 9999 ]] && DEPEND+="
- sys-devel/bison
- sys-devel/flex
$(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]")
"
@@ -236,7 +232,7 @@ QA_WX_LOAD="
x86? (
!pic? (
usr/lib*/libglapi.so.0.0.0
- usr/lib*/libGLESv1_CM.so.1.1.0
+ usr/lib*/libGLESv1_CM.so.1.0.0
usr/lib*/libGLESv2.so.2.0.0
usr/lib*/libGL.so.1.2.0
usr/lib*/libOSMesa.so.8.0.0
@@ -269,55 +265,46 @@ pkg_setup() {
python-any-r1_pkg_setup
}
-src_prepare() {
- eapply_user
- [[ ${PV} == 9999 ]] && eautoreconf
-}
-
multilib_src_configure() {
- local myconf
+ local emesonargs=()
if use classic; then
- # Configurable DRI drivers
- driver_enable swrast
-
# Intel code
- driver_enable video_cards_i915 i915
- driver_enable video_cards_i965 i965
+ dri_driver_enable video_cards_i915 i915
+ dri_driver_enable video_cards_i965 i965
if ! use video_cards_i915 && \
! use video_cards_i965; then
- driver_enable video_cards_intel i915 i965
+ dri_driver_enable video_cards_intel i915 i965
fi
# Nouveau code
- driver_enable video_cards_nouveau nouveau
+ dri_driver_enable video_cards_nouveau nouveau
# ATI code
- driver_enable video_cards_r100 radeon
- driver_enable video_cards_r200 r200
+ dri_driver_enable video_cards_r100 r100
+ dri_driver_enable video_cards_r200 r200
if ! use video_cards_r100 && \
- ! use video_cards_r200; then
- driver_enable video_cards_radeon radeon r200
+ ! use video_cards_r200; then
+ dri_driver_enable video_cards_radeon r100 r200
fi
fi
if use egl; then
- myconf+=" --with-platforms=x11,surfaceless$(use wayland && echo ",wayland")$(use gbm && echo ",drm")"
+ emesonargs+=( -Dplatforms=x11,surfaceless$(use wayland && echo ",wayland")$(use gbm && echo ",drm") )
fi
if use gallium; then
- myconf+="
- $(use_enable d3d9 nine)
- $(use_enable llvm)
- $(use_enable openmax omx-bellagio)
- $(use_enable vaapi va)
- $(use_enable vdpau)
- $(use_enable xa)
- $(use_enable xvmc)
- "
- use vaapi && myconf+=" --with-va-libdir=/usr/$(get_libdir)/va/drivers"
-
- gallium_enable swrast
+ emesonargs+=(
+ $(meson_use d3d9 gallium-nine)
+ $(meson_use llvm)
+ -Dgallium-omx=$(usex openmax bellagio disabled)
+ $(meson_use vaapi gallium-vaapi)
+ $(meson_use vdpau gallium-vdpau)
+ $(meson_use xa gallium-xa)
+ $(meson_use xvmc gallium-xvmc)
+ )
+ use vaapi && emesonargs+=( -Dva-libs-path=/usr/$(get_libdir)/va/drivers )
+
gallium_enable video_cards_vc4 vc4
gallium_enable video_cards_vivante etnaviv
gallium_enable video_cards_vmware svga
@@ -333,17 +320,16 @@ multilib_src_configure() {
gallium_enable video_cards_r600 r600
gallium_enable video_cards_radeonsi radeonsi
if ! use video_cards_r300 && \
- ! use video_cards_r600; then
+ ! use video_cards_r600; then
gallium_enable video_cards_radeon r300 r600
fi
gallium_enable video_cards_freedreno freedreno
# opencl stuff
if use opencl; then
- myconf+="
- $(use_enable opencl)
- --with-clang-libdir="${EPREFIX}/usr/lib"
- "
+ emesonargs+=(
+ -Dgallium-opencl="$(usex opencl standalone disabled)"
+ )
fi
gallium_enable video_cards_virgl virgl
@@ -351,55 +337,59 @@ multilib_src_configure() {
if use vulkan; then
vulkan_enable video_cards_i965 intel
- vulkan_enable video_cards_radeonsi radeon
+ vulkan_enable video_cards_radeonsi amd
fi
# x86 hardened pax_kernel needs glx-rts, bug 240956
if [[ ${ABI} == x86 ]]; then
- myconf+=" $(use_enable pax_kernel glx-read-only-text)"
+ emesonargs+=( $(meson_use pax_kernel glx-read-only-text) )
fi
# on abi_x86_32 hardened we need to have asm disable
if [[ ${ABI} == x86* ]] && use pic; then
- myconf+=" --disable-asm"
+ emesonargs+=( -Dasm=false )
fi
if use gallium; then
- myconf+=" $(use_enable osmesa gallium-osmesa)"
+ GALLIUM_DRIVERS+="swrast "
+ emesonargs+=( -Dosmesa=$(usex osmesa gallium none) )
else
- myconf+=" $(use_enable osmesa)"
+ DRI_DRIVERS+="swrast "
+ emesonargs+=( -Dosmesa=$(usex osmesa classic none) )
fi
- # build fails with BSD indent, bug #428112
- use userland_GNU || export INDENT=cat
-
- ECONF_SOURCE="${S}" \
- econf \
- --enable-dri \
- --enable-glx \
- --enable-shared-glapi \
- $(use_enable !bindist texture-float) \
- $(use_enable d3d9 nine) \
- $(use_enable debug) \
- $(use_enable dri3) \
- $(use_enable egl) \
- $(use_enable gbm) \
- $(use_enable gles1) \
- $(use_enable gles2) \
- $(use_enable nptl glx-tls) \
- $(use_enable unwind libunwind) \
- --enable-valgrind=$(usex valgrind auto no) \
- --enable-llvm-shared-libs \
- --disable-opencl-icd \
- --with-dri-drivers=${DRI_DRIVERS} \
- --with-gallium-drivers=${GALLIUM_DRIVERS} \
- --with-vulkan-drivers=${VULKAN_DRIVERS} \
- PYTHON2="${PYTHON}" \
- ${myconf}
+ driver_list() {
+ arr=($(printf "%s\n" "$@" | sort -u | tr '\n' ','))
+ echo "${arr: : -1}"
+ }
+
+ emesonargs+=(
+ $(meson_use test build-tests)
+ -Dglx=dri
+ -Dshared-glapi=true
+ $(meson_use !bindist texture-float)
+ $(meson_use d3d9 gallium-nine)
+ $(meson_use dri3)
+ $(meson_use egl)
+ $(meson_use gbm)
+ $(meson_use gles1)
+ $(meson_use gles2)
+ $(meson_use unwind libunwind)
+ $(meson_use lm_sensors lmsensors)
+ -Dvalgrind=$(usex valgrind auto false)
+ -Ddri-drivers=$(driver_list ${DRI_DRIVERS})
+ -Dgallium-drivers=$(driver_list ${GALLIUM_DRIVERS})
+ -Dvulkan-drivers=$(driver_list ${VULKAN_DRIVERS})
+ )
+ meson_src_configure
+}
+
+multilib_src_compile() {
+ meson_src_compile
}
multilib_src_install() {
- emake install DESTDIR="${D}"
+ meson_src_install
if use opencl; then
ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching"
@@ -424,7 +414,6 @@ multilib_src_install() {
}
multilib_src_install_all() {
- find "${ED}" -name '*.la' -delete
einstalldocs
if use !bindist; then
@@ -433,14 +422,7 @@ multilib_src_install_all() {
}
multilib_src_test() {
- if use llvm; then
- local llvm_tests='lp_test_arit lp_test_arit lp_test_blend lp_test_blend lp_test_conv lp_test_conv lp_test_format lp_test_format lp_test_printf lp_test_printf'
- pushd src/gallium/drivers/llvmpipe >/dev/null || die
- emake ${llvm_tests}
- pax-mark m ${llvm_tests}
- popd >/dev/null || die
- fi
- emake check
+ meson_src_test
}
pkg_postinst() {
@@ -478,54 +460,23 @@ pkg_prerm() {
# $1 - VIDEO_CARDS flag
# other args - names of DRI drivers to enable
-# TODO: avoid code duplication for a more elegant implementation
-driver_enable() {
- case $# in
- # for enabling unconditionally
- 1)
- DRI_DRIVERS+=",$1"
- ;;
- *)
- if use $1; then
- shift
- for i in $@; do
- DRI_DRIVERS+=",${i}"
- done
- fi
- ;;
- esac
+dri_driver_enable() {
+ if use $1; then
+ shift
+ DRI_DRIVERS+="$@ "
+ fi
}
gallium_enable() {
- case $# in
- # for enabling unconditionally
- 1)
- GALLIUM_DRIVERS+=",$1"
- ;;
- *)
- if use $1; then
- shift
- for i in $@; do
- GALLIUM_DRIVERS+=",${i}"
- done
- fi
- ;;
- esac
+ if use $1; then
+ shift
+ GALLIUM_DRIVERS+="$@ "
+ fi
}
vulkan_enable() {
- case $# in
- # for enabling unconditionally
- 1)
- VULKAN_DRIVERS+=",$1"
- ;;
- *)
- if use $1; then
- shift
- for i in $@; do
- VULKAN_DRIVERS+=",${i}"
- done
- fi
- ;;
- esac
+ if use $1; then
+ shift
+ VULKAN_DRIVERS+="$@ "
+ fi
}