aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Arnold <stephen.arnold42@gmail.com>2014-10-26 19:15:50 -0700
committerSteve Arnold <stephen.arnold42@gmail.com>2014-10-26 19:15:50 -0700
commit9ce01b49e72ea5f92563edbf6f1c7283beca70bf (patch)
treebd43d734caeb94428f2873b8ce71656b530f69b0 /media-libs
parentcleanup webkit and cairo a little (diff)
downloadarm-9ce01b49e72ea5f92563edbf6f1c7283beca70bf.tar.gz
arm-9ce01b49e72ea5f92563edbf6f1c7283beca70bf.tar.bz2
arm-9ce01b49e72ea5f92563edbf6f1c7283beca70bf.zip
mesa git updates for gles config
Diffstat (limited to 'media-libs')
-rw-r--r--media-libs/mesa/Manifest2
-rw-r--r--media-libs/mesa/mesa-9999.ebuild226
2 files changed, 147 insertions, 81 deletions
diff --git a/media-libs/mesa/Manifest b/media-libs/mesa/Manifest
index 4d5a1a3..54f0321 100644
--- a/media-libs/mesa/Manifest
+++ b/media-libs/mesa/Manifest
@@ -21,4 +21,4 @@ DIST MesaLib-10.2.4.tar.bz2 7128555 SHA256 06a2341244eb85c283f59f70161e06ded106f
DIST MesaLib-9.1.6.tar.bz2 6134267 SHA256 e632dff0acafad0a59dc208d16dedb37f7bd58f94c5d58c4b51912e41d005e3d SHA512 b23d0cc3515b56636f73c4d3247212f8c731c967f5ecf8c247a3bd359038ed374c23eb1bb0da17a9152f8b8d984acd134fa9823d9349285287e58676419b4d40 WHIRLPOOL 4e3c07c893060f77cade242d904c1ec4c1c2982b6b3d9ff188b3d809ad8592408c34bd71276f0e8dfa38bce58a82e146b25064cfa50d3ce6d52a7b69a694690a
EBUILD mesa-10.2.4.ebuild 14775 SHA256 48a17fca4d23f458d7964cb40560d7affcfafa11e946676dd79c2341469a4222 SHA512 64ce876a10966eb63e5d330c3a437773de08ef5d7fa1a267eebd53b7d49d670379a3fbf08fb079ce1d2583d8fa1044c459717975fea3d78067f6ed63b9b71604 WHIRLPOOL 51623b3495f6f0a6ca3b5a0e0a72707dbc813a3adc7edf8c9e3fd84e131477e60ca828470369eef05df07fd5c89d946d89c474109d8bd3e357ebed01d3c0cca1
EBUILD mesa-9.1.6-r100.ebuild 11215 SHA256 1d82be7ea0113b263ade762b21235d87c2732d1afdf7a945d4fe17adec80bd3b SHA512 89f35c0043818e4cb828c066b5759fa59ec528a7397b241a85075da15f66323be6b24ec4473e82f78164bf61788758cc226c6b79133d7de750e94d53bac8e659 WHIRLPOOL e77104786a5321ec122a753d2c68a68d797ed20e88d9b59032cc553fbfd5ef827795f7c276cde88e6e91326bf9afbc259c5c7b92f5bbd4888fe75ae027d5ab59
-EBUILD mesa-9999.ebuild 12333 SHA256 6733c8d85c45257323048c78d3f4306a61dc1d44e72912a4983cfe7cb6adddf4 SHA512 13769e461f9b27252e6eb310bb9132c4d6aafa0ec87f6354a3948e324775fbf9100f1277000f15cf46dfdde08e269f621e50e8d06300446e5efa8db5366bf2d6 WHIRLPOOL 3f883d3827fc030bbec89ac7ad9664d2874908b7a66bd04394ca3dc1865b69ec814ad46e8f34a6a953a294fb7b9d2196910898a54c6c07feee21175feb145fcf
+EBUILD mesa-9999.ebuild 14900 SHA256 ec9ab84543ae3096b38d292c112c3e91b0fb67ee40a39fd954a65b35d2d3f5a4 SHA512 f7dfd0655bacd949d356a4db5fb17922427b55d96b57d5a7d05f2083b7e8089bfbc3717b79b426fd4277f6c440081261fbd184a8ab4eb6dd2f94848317952ff3 WHIRLPOOL 2a0515a765ee110ae4b4cae8df9718001d099ceda49ef193ba50eaab359dcafdf1200d059aefa499cd3335e9683814a1f90d889cc2acb420ac79c3ffd7df72cb
diff --git a/media-libs/mesa/mesa-9999.ebuild b/media-libs/mesa/mesa-9999.ebuild
index 77710c9..889c3b3 100644
--- a/media-libs/mesa/mesa-9999.ebuild
+++ b/media-libs/mesa/mesa-9999.ebuild
@@ -4,16 +4,17 @@
EAPI=5
-EGIT_REPO_URI="http://anongit.freedesktop.org/git/mesa/mesa.git"
+EGIT_REPO_URI="git://anongit.freedesktop.org/mesa/mesa"
if [[ ${PV} = 9999* ]]; then
- GIT_ECLASS="git-2"
+ GIT_ECLASS="git-r3"
EXPERIMENTAL="true"
fi
PYTHON_COMPAT=( python{2_6,2_7} )
-inherit base autotools multilib flag-o-matic python-single-r1 toolchain-funcs ${GIT_ECLASS}
+inherit base autotools multilib multilib-minimal flag-o-matic \
+ python-any-r1 toolchain-funcs pax-utils ${GIT_ECLASS}
OPENGL_DIR="xorg-x11"
@@ -21,7 +22,7 @@ MY_PN="${PN/m/M}"
MY_P="${MY_PN}-${PV/_/-}"
MY_SRC_P="${MY_PN}Lib-${PV/_/-}"
-FOLDER="${PV/_rc*/}"
+FOLDER="${PV/.0/}"
DESCRIPTION="OpenGL-like graphic library for Linux"
HOMEPAGE="http://mesa3d.sourceforge.net/"
@@ -29,17 +30,16 @@ HOMEPAGE="http://mesa3d.sourceforge.net/"
#SRC_PATCHES="mirror://gentoo/${P}-gentoo-patches-01.tar.bz2"
if [[ $PV = 9999* ]]; then
SRC_URI="${SRC_PATCHES}"
- KEYWORDS=""
else
SRC_URI="ftp://ftp.freedesktop.org/pub/mesa/${FOLDER}/${MY_SRC_P}.tar.bz2
${SRC_PATCHES}"
- KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris"
fi
# The code is MIT/X11.
# GLES[2]/gl[2]{,ext,platform}.h are SGI-B-2.0
LICENSE="MIT SGI-B-2.0"
SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris"
INTEL_CARDS="i915 i965 ilo intel"
RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi"
@@ -49,21 +49,28 @@ for card in ${VIDEO_CARDS}; do
done
IUSE="${IUSE_VIDEO_CARDS}
- bindist +classic debug +egl +gallium gbm gles1 gles2 +llvm +nptl opencl
- openvg osmesa pax_kernel pic r600-llvm-compiler selinux vdpau
- wayland xvmc xa xorg kernel_FreeBSD"
+ bindist +classic debug +dri3 +egl +gallium +gbm gles1 gles2 +llvm +nptl
+ opencl openvg osmesa pax_kernel openmax pic r600-llvm-compiler selinux
+ vdpau wayland xvmc xa kernel_FreeBSD"
REQUIRED_USE="
llvm? ( gallium )
openvg? ( egl gallium )
- opencl? ( gallium r600-llvm-compiler )
+ opencl? (
+ gallium
+ llvm
+ video_cards_r600? ( r600-llvm-compiler )
+ video_cards_radeon? ( r600-llvm-compiler )
+ video_cards_radeonsi? ( r600-llvm-compiler )
+ )
+ openmax? ( gallium )
gles1? ( egl )
gles2? ( egl )
r600-llvm-compiler? ( gallium llvm || ( video_cards_r600 video_cards_radeonsi video_cards_radeon ) )
- wayland? ( egl )
+ wayland? ( egl gbm )
xa? ( gallium )
- xorg? ( gallium )
video_cards_freedreno? ( gallium )
+ video_cards_tegra? ( classic )
video_cards_intel? ( || ( classic gallium ) )
video_cards_i915? ( || ( classic gallium ) )
video_cards_i965? ( classic )
@@ -75,38 +82,56 @@ REQUIRED_USE="
video_cards_r300? ( gallium )
video_cards_r600? ( gallium )
video_cards_radeonsi? ( gallium llvm )
- video_cards_tegra? ( egl gallium gles1 gles2 )
video_cards_vmware? ( gallium )
+ ${PYTHON_REQUIRED_USE}
"
-LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.46"
+LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.56"
# keep correct libdrm and dri2proto dep
# keep blocks in rdepend for binpkg
RDEPEND="
!<x11-base/xorg-server-1.7
!<=x11-proto/xf86driproto-2.0.3
+ abi_x86_32? ( !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)] )
classic? ( app-admin/eselect-mesa )
gallium? ( app-admin/eselect-mesa )
>=app-admin/eselect-opengl-1.2.7
- dev-libs/expat
- gbm? ( virtual/udev )
- >=x11-libs/libX11-1.3.99.901
- x11-libs/libXdamage
- x11-libs/libXext
- x11-libs/libXxf86vm
- >=x11-libs/libxcb-1.8.1
+ >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
+ gbm? ( >=virtual/libudev-215:=[${MULTILIB_USEDEP}] )
+ dri3? ( >=virtual/libudev-215:=[${MULTILIB_USEDEP}] )
+ >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
+ >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
+ >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}]
+ >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
+ >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
+ >=x11-libs/libxcb-1.9.3:=[${MULTILIB_USEDEP}]
+ llvm? (
+ video_cards_radeonsi? ( || (
+ >=dev-libs/elfutils-0.155-r1:=[${MULTILIB_USEDEP}]
+ >=dev-libs/libelf-0.8.13-r2:=[${MULTILIB_USEDEP}]
+ ) )
+ video_cards_r600? ( || (
+ >=dev-libs/elfutils-0.155-r1:=[${MULTILIB_USEDEP}]
+ >=dev-libs/libelf-0.8.13-r2:=[${MULTILIB_USEDEP}]
+ ) )
+ !video_cards_r600? (
+ video_cards_radeon? ( || (
+ >=dev-libs/elfutils-0.155-r1:=[${MULTILIB_USEDEP}]
+ >=dev-libs/libelf-0.8.13-r2:=[${MULTILIB_USEDEP}]
+ ) )
+ )
+ >=sys-devel/llvm-3.3-r3:=[${MULTILIB_USEDEP}]
+ video_cards_radeonsi? ( >=sys-devel/llvm-3.4.2:=[${MULTILIB_USEDEP}] )
+ )
opencl? (
app-admin/eselect-opencl
dev-libs/libclc
)
- vdpau? ( >=x11-libs/libvdpau-0.4.1 )
- wayland? ( >=dev-libs/wayland-1.0.3 )
- xorg? (
- x11-base/xorg-server:=
- x11-libs/libdrm[libkms]
- )
- xvmc? ( >=x11-libs/libXvMC-1.0.6 )
- ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_tegra?,video_cards_vmware?]
+ openmax? ( >=media-libs/libomxil-bellagio-0.9.3:=[${MULTILIB_USEDEP}] )
+ vdpau? ( >=x11-libs/libvdpau-0.7:=[${MULTILIB_USEDEP}] )
+ wayland? ( >=dev-libs/wayland-1.2.0:=[${MULTILIB_USEDEP}] )
+ xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
+ ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_tegra?,video_cards_vmware?,${MULTILIB_USEDEP}]
"
for card in ${INTEL_CARDS}; do
RDEPEND="${RDEPEND}
@@ -121,29 +146,33 @@ for card in ${RADEON_CARDS}; do
done
DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
llvm? (
- >=sys-devel/llvm-3.4
r600-llvm-compiler? ( sys-devel/llvm[video_cards_radeon] )
video_cards_radeonsi? ( sys-devel/llvm[video_cards_radeon] )
)
opencl? (
- >=sys-devel/llvm-3.3-r1[video_cards_radeon]
- >=sys-devel/clang-3.3
+ >=sys-devel/llvm-3.4.2:=[${MULTILIB_USEDEP}]
+ >=sys-devel/clang-3.4.2:=[${MULTILIB_USEDEP}]
>=sys-devel/gcc-4.6
)
- ${PYTHON_DEPS}
- dev-libs/libxml2[python,${PYTHON_USEDEP}]
sys-devel/bison
sys-devel/flex
+ sys-devel/gettext
virtual/pkgconfig
- >=x11-proto/dri2proto-2.6
- >=x11-proto/glproto-1.4.15-r1
- >=x11-proto/xextproto-7.0.99.1
- x11-proto/xf86driproto
- x11-proto/xf86vidmodeproto
+ >=x11-proto/dri2proto-2.8-r1:=[${MULTILIB_USEDEP}]
+ dri3? (
+ >=x11-proto/dri3proto-1.0:=[${MULTILIB_USEDEP}]
+ >=x11-proto/presentproto-1.0:=[${MULTILIB_USEDEP}]
+ )
+ >=x11-proto/glproto-1.4.16-r1:=[${MULTILIB_USEDEP}]
+ >=x11-proto/xextproto-7.2.1-r1:=[${MULTILIB_USEDEP}]
+ >=x11-proto/xf86driproto-2.1.1-r1:=[${MULTILIB_USEDEP}]
+ >=x11-proto/xf86vidmodeproto-2.3.1-r1:=[${MULTILIB_USEDEP}]
"
S="${WORKDIR}/${MY_P}"
+EGIT_CHECKOUT_DIR=${S}
# It is slow without texrels, if someone wants slow
# mesa without texrels +pic use is worth the shot
@@ -156,12 +185,18 @@ pkg_setup() {
# workaround toc-issue wrt #386545
use ppc64 && append-flags -mminimal-toc
- python-single-r1_pkg_setup
+ # warning message for bug 459306
+ if use llvm && has_version sys-devel/llvm[!debug=]; then
+ ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
+ ewarn "detected! This can cause problems. For details, see bug 459306."
+ fi
+
+ python-any-r1_pkg_setup
}
src_unpack() {
default
- [[ $PV = 9999* ]] && git-2_src_unpack
+ [[ $PV = 9999* ]] && git-r3_src_unpack
}
src_prepare() {
@@ -173,31 +208,23 @@ src_prepare() {
epatch
fi
- # fix recent llvm changes that breaks mesa
- epatch "${FILESDIR}"/${P}-llvm-configure.patch
-
# fix for hardened pax_kernel, bug 240956
[[ ${PV} != 9999* ]] && epatch "${FILESDIR}"/glx_ro_text_segm.patch
- # add tegra patch from meas-grate repo (8 June, 2014)
- #use arm && epatch ${WORKDIR}/big-master-tegra.diff
-
# Solaris needs some recent POSIX stuff in our case
if [[ ${CHOST} == *-solaris* ]] ; then
sed -i -e "s/-DSVR4/-D_POSIX_C_SOURCE=200112L/" configure.ac || die
fi
- # Tests fail against python-3, bug #407887
- sed -i 's|/usr/bin/env python|/usr/bin/env python2|' src/glsl/tests/compare_ir || die
+ epatch "${FILESDIR}"/${PN}-10.2.4-optional-gl-headers.patch
base_src_prepare
eautoreconf
+ multilib_copy_sources
}
-src_configure() {
- use arm && append-cppflags -D__arm32__
-
+multilib_src_configure() {
local myconf
if use classic; then
@@ -222,21 +249,25 @@ src_configure() {
! use video_cards_r200; then
driver_enable video_cards_radeon radeon r200
fi
+
+ # experimental tegra driver
+ # from DEPENDS video_cards_tegra? ( classic )
+ #gallium_enable video_cards_tegra tegra
fi
if use egl; then
- myconf+="
- --with-egl-platforms=x11$(use wayland && echo ",wayland")$(use gbm && echo ",drm")
- $(use_enable gallium gallium-egl)
- "
+ myconf+="--with-egl-platforms=x11$(use wayland && echo ",wayland")$(use gbm && echo ",drm") "
fi
if use gallium; then
myconf+="
$(use_enable llvm gallium-llvm)
$(use_enable openvg)
+ $(use_enable openvg gallium-egl)
+ $(use_enable openmax omx)
$(use_enable r600-llvm-compiler)
$(use_enable vdpau)
+ $(use_enable xa)
$(use_enable xvmc)
"
gallium_enable swrast
@@ -263,11 +294,9 @@ src_configure() {
myconf+="
$(use_enable opencl)
--with-opencl-libdir="${EPREFIX}/usr/$(get_libdir)/OpenCL/vendors/mesa"
- --with-clang-libdir="${EPREFIX}/usr/$(get_libdir)"
+ --with-clang-libdir="${EPREFIX}/usr/lib"
"
fi
-
- gallium_enable video_cards_tegra tegra
fi
# x86 hardened pax_kernel needs glx-rts, bug 240956
@@ -277,6 +306,11 @@ src_configure() {
"
fi
+ # on abi_x86_32 hardened we need to have asm disable
+ if [[ ${ABI} == x86* ]] && use pic; then
+ myconf+=" --disable-asm"
+ fi
+
# build fails with BSD indent, bug #428112
use userland_GNU || export INDENT=cat
@@ -286,33 +320,22 @@ src_configure() {
--enable-shared-glapi \
$(use_enable !bindist texture-float) \
$(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 osmesa) \
- $(use_enable !pic asm) \
- $(use_enable xa) \
- $(use_enable xorg) \
+ --enable-llvm-shared-libs \
--with-dri-drivers=${DRI_DRIVERS} \
--with-gallium-drivers=${GALLIUM_DRIVERS} \
PYTHON2="${PYTHON}" \
${myconf}
}
-src_install() {
- base_src_install
-
- find "${ED}" -name '*.la' -exec rm -f {} + || die
-
- if use !bindist; then
- dodoc docs/patents.txt
- fi
-
- # Install config file for eselect mesa
- insinto /usr/share/mesa
- newins "${FILESDIR}/eselect-mesa.conf.9.2" eselect-mesa.conf
+multilib_src_install() {
+ emake install DESTDIR="${D}"
# Move libGL and others from /usr/lib to /usr/lib/opengl/blah/lib
# because user can eselect desired GL provider.
@@ -346,16 +369,14 @@ src_install() {
keepdir /usr/$(get_libdir)/dri
dodir /usr/$(get_libdir)/mesa
for x in ${gallium_drivers[@]}; do
- if [ -f "${S}/$(get_libdir)/gallium/${x}" ]; then
+ if [ -f "$(get_libdir)/gallium/${x}" ]; then
mv -f "${ED}/usr/$(get_libdir)/dri/${x}" "${ED}/usr/$(get_libdir)/dri/${x/_dri.so/g_dri.so}" \
|| die "Failed to move ${x}"
- insinto "/usr/$(get_libdir)/dri/"
- if [ -f "${S}/$(get_libdir)/${x}" ]; then
- insopts -m0755
- doins "${S}/$(get_libdir)/${x}"
- fi
fi
done
+ if use classic; then
+ emake -C "${BUILD_DIR}/src/mesa/drivers/dri" DESTDIR="${D}" install
+ fi
for x in "${ED}"/usr/$(get_libdir)/dri/*.so; do
if [ -f ${x} -o -L ${x} ]; then
mv -f "${x}" "${x/dri/mesa}" \
@@ -387,6 +408,36 @@ src_install() {
fi
eend $?
fi
+
+ if use openmax; then
+ echo "XDG_DATA_DIRS=\"${EPREFIX}/usr/share/mesa/xdg\"" > "${T}/99mesaxdgomx"
+ doenvd "${T}"/99mesaxdgomx
+ keepdir /usr/share/mesa/xdg
+ fi
+}
+
+multilib_src_install_all() {
+ prune_libtool_files --all
+ einstalldocs
+
+ if use !bindist; then
+ dodoc docs/patents.txt
+ fi
+
+ # Install config file for eselect mesa
+ insinto /usr/share/mesa
+ newins "${FILESDIR}/eselect-mesa.conf.9.2" eselect-mesa.conf
+}
+
+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
}
pkg_postinst() {
@@ -411,6 +462,15 @@ pkg_postinst() {
eselect opencl set --use-old ${PN}
fi
+ # run omxregister-bellagio to make the OpenMAX drivers known system-wide
+ if use openmax; then
+ ebegin "Registering OpenMAX drivers"
+ BELLAGIO_SEARCH_PATH="${EPREFIX}/usr/$(get_libdir)/libomxil-bellagio0" \
+ OMX_BELLAGIO_REGISTRY=${EPREFIX}/usr/share/mesa/xdg/.omxregister \
+ omxregister-bellagio
+ eend $?
+ fi
+
# warn about patent encumbered texture-float
if use !bindist; then
elog "USE=\"bindist\" was not set. Potentially patent encumbered code was"
@@ -432,6 +492,12 @@ pkg_postinst() {
fi
}
+pkg_prerm() {
+ if use openmax; then
+ rm "${EPREFIX}"/usr/share/mesa/xdg/.omxregister
+ fi
+}
+
# $1 - VIDEO_CARDS flag
# other args - names of DRI drivers to enable
# TODO: avoid code duplication for a more elegant implementation