225 lines
6.4 KiB
Text
225 lines
6.4 KiB
Text
# Template build file for 'MesaLib'.
|
|
pkgname=MesaLib
|
|
version=10.2.4
|
|
revision=11
|
|
wrksrc="Mesa-${version}"
|
|
build_style=gnu-configure
|
|
configure_args="--enable-glx-tls --enable-shared-glapi --enable-gbm
|
|
--enable-gles1 --enable-gles2 --enable-openvg --enable-egl --enable-vdpau
|
|
--enable-gallium-egl --enable-xvmc --enable-osmesa --enable-texture-float
|
|
--with-egl-platforms=x11,drm,wayland"
|
|
short_desc="Graphics library similar to SGI's OpenGL"
|
|
maintainer="Juan RP <xtraeme@gmail.com>"
|
|
homepage="http://www.mesa3d.org/"
|
|
license="MIT, LGPL-2.1"
|
|
distfiles="ftp://ftp.freedesktop.org/pub/mesa/${version}/${pkgname}-${version}.tar.bz2"
|
|
checksum=06a2341244eb85c283f59f70161e06ded106f835ed9b6be1ef0243bd9344811a
|
|
|
|
hostmakedepends="
|
|
automake libtool flex pkg-config llvm libxml2-python wayland-devel"
|
|
makedepends="
|
|
glproto dri2proto>=2.1 dri3proto presentproto libXext-devel libXxf86vm-devel
|
|
libudev-devel libdrm-devel expat-devel talloc-devel libvdpau-devel
|
|
libXdamage-devel libXvMC-devel>=1.0.6 libxshmfence-devel wayland-devel
|
|
elfutils-devel ncurses-devel zlib-devel libffi-devel"
|
|
|
|
# Set subpackages manually to set proper rdeps in 32bit pkgs.
|
|
subpackages="libglapi libgbm libEGL libGL libGLES libOpenVG libOSMesa
|
|
libwayland-egl MesaLib-devel mesa-swraster-dri"
|
|
|
|
case "$XBPS_TARGET_MACHINE" in
|
|
i686*|x86_64*)
|
|
# Enable all x86 drivers.
|
|
configure_args+=" --with-gallium-drivers=r300,r600,radeonsi,svga,swrast,nouveau"
|
|
configure_args+=" --with-dri-drivers=i915,i965,r200,radeon,nouveau,swrast"
|
|
configure_args+=" --enable-xa --enable-dri3"
|
|
configure_args+=" --enable-opencl --enable-opencl-icd --enable-r600-llvm-compiler"
|
|
hostmakedepends+=" clang libclc-devel-git"
|
|
subpackages+=" libxatracker mesa-ati-dri mesa-intel-dri mesa-nouveau-dri"
|
|
subpackages+=" mesa-vmwgfx-dri mesa-opencl"
|
|
;;
|
|
*)
|
|
# Enable swrast driver.
|
|
configure_args+=" --with-gallium-drivers=swrast"
|
|
configure_args+=" --with-dri-drivers=swrast"
|
|
configure_args+=" --disable-xa"
|
|
;;
|
|
esac
|
|
|
|
case "$XBPS_TARGET_MACHINE" in
|
|
i686*) configure_args+=" --with-dri-driverdir=/usr/lib32/xorg/modules/drivers";;
|
|
*) configure_args+=" --with-dri-driverdir=/usr/lib/xorg/modules/drivers";;
|
|
esac
|
|
|
|
replaces="MesaLib-git>=0"
|
|
conf_files="/etc/drirc"
|
|
|
|
pre_configure() {
|
|
NOCONFIGURE=1 ./autogen.sh
|
|
libtoolize -f
|
|
}
|
|
|
|
post_install() {
|
|
vmkdir usr/lib/xorg/modules/extensions
|
|
ln -s libglx-xorg.so ${DESTDIR}/usr/lib/xorg/modules/extensions/libglx.so
|
|
}
|
|
|
|
libglapi_package() {
|
|
depends="libudev"
|
|
short_desc="Free implementation of the GL API - shared library"
|
|
replaces="libglapi-git>=0"
|
|
pkg_install() {
|
|
vmove "usr/lib/libglapi.so.*"
|
|
}
|
|
}
|
|
|
|
libgbm_package() {
|
|
short_desc="Mesa Generic buffer management API - runtime"
|
|
replaces="libgbm-git>=0"
|
|
pkg_install() {
|
|
vmove "usr/lib/libgbm.so.*"
|
|
vmove usr/lib/gbm/gbm_gallium_drm.so
|
|
}
|
|
}
|
|
|
|
libEGL_package() {
|
|
short_desc="Free implementation of the EGL API - runtime"
|
|
replaces="libEGL-git>=0"
|
|
pkg_install() {
|
|
vmove "usr/lib/libEGL*.so.*"
|
|
}
|
|
}
|
|
|
|
libGLES_package() {
|
|
depends="libudev"
|
|
short_desc="Free implementation of the OpenGL|ES 1.x and 2.x API"
|
|
replaces="libGLES-git>=0"
|
|
pkg_install() {
|
|
vmove "usr/lib/libGLES*.so.*"
|
|
}
|
|
}
|
|
|
|
libGL_package() {
|
|
depends="libudev"
|
|
short_desc="Free implementation of the OpenGL API - GLX runtime"
|
|
replaces="libGL-git>=0"
|
|
pkg_install() {
|
|
vmove "usr/lib/libGL.so.*"
|
|
vmove usr/lib/xorg/modules/extensions
|
|
}
|
|
}
|
|
|
|
libOpenVG_package() {
|
|
short_desc="Free implementation of the OpenVG API - runtime"
|
|
replaces="libOpenVG-git>=0"
|
|
pkg_install() {
|
|
vmove "usr/lib/libOpenVG.so.*"
|
|
}
|
|
}
|
|
|
|
libOSMesa_package() {
|
|
short_desc="Mesa Off-Screen interface library"
|
|
replaces="libOSMesa-git>=0"
|
|
pkg_install() {
|
|
vmove "usr/lib/libOSMesa.so.*"
|
|
}
|
|
}
|
|
|
|
libwayland-egl_package() {
|
|
short_desc="Free implementation of the EGL API - wayland runtime"
|
|
replaces="libwayland-egl-git>=0"
|
|
pkg_install() {
|
|
vmove "usr/lib/libwayland-egl.so.*"
|
|
vmove usr/lib/egl
|
|
}
|
|
}
|
|
|
|
MesaLib-devel_package() {
|
|
depends="glproto dri2proto>=2.1 dri3proto presentproto libxshmfence-devel
|
|
libXext-devel libXxf86vm-devel libXdamage-devel expat-devel
|
|
libXfixes-devel libX11-devel libxcb-devel libdrm-devel>=2.4.39
|
|
libGL>=${version}_${revision} libOpenVG>=${version}_${revision}
|
|
libGLES>=${version}_${revision} libEGL>=${version}_${revision}
|
|
libOSMesa>=${version}_${revision} libgbm>=${version}_${revision}
|
|
libwayland-egl>=${version}_${revision}"
|
|
if [ "$XBPS_TARGET_MACHINE" = "i686" -o "$XBPS_TARGET_MACHINE" = "x86_64" ]; then
|
|
depends+=" libxatracker>=${version}_${revision}"
|
|
fi
|
|
replaces="MesaLib-devel-git>=0"
|
|
short_desc+=" - development files"
|
|
pkg_install() {
|
|
vmove usr/include
|
|
vmove usr/lib/pkgconfig
|
|
vmove "usr/lib/*.so"
|
|
}
|
|
}
|
|
|
|
mesa-swraster-dri_package() {
|
|
short_desc="Mesa DRI drivers for the Software Rasterizer"
|
|
replaces="mesa-swraster-dri-git>=0"
|
|
pkg_install() {
|
|
vmove "usr/lib/xorg/modules/drivers/swrast*"
|
|
vmove "usr/lib/gallium-pipe/pipe_swrast.so"
|
|
}
|
|
}
|
|
|
|
libxatracker_package() {
|
|
short_desc="Mesa XA tracker interface library"
|
|
replaces="libxatracker-git>=0"
|
|
pkg_install() {
|
|
vmove "usr/lib/libxatracker*.so.*"
|
|
}
|
|
}
|
|
|
|
mesa-ati-dri_package() {
|
|
short_desc="Mesa DRI drivers for ATI GPUs"
|
|
replaces="mesa-ati-dri-git>=0"
|
|
pkg_install() {
|
|
vmove "usr/lib/libXvMCr[36]00.so*"
|
|
vmove "usr/lib/vdpau/libvdpau_r[36]00.so*"
|
|
vmove "usr/lib/vdpau/libvdpau_radeon*.so*"
|
|
vmove "usr/lib/xorg/modules/drivers/radeon*"
|
|
vmove "usr/lib/xorg/modules/drivers/r[236]00*"
|
|
vmove "usr/lib/gallium-pipe/pipe_r[36]00.so"
|
|
vmove usr/lib/gallium-pipe/pipe_radeonsi.so
|
|
}
|
|
}
|
|
|
|
mesa-intel-dri_package() {
|
|
short_desc="Mesa DRI drivers for Intel GPUs"
|
|
replaces="mesa-intel-dri-git>=0"
|
|
pkg_install() {
|
|
vmove "usr/lib/xorg/modules/drivers/i9[16]5_dri.*"
|
|
}
|
|
}
|
|
|
|
mesa-nouveau-dri_package() {
|
|
short_desc="Mesa DRI drivers for NVIDIA GPUs (nouveau dri)"
|
|
replaces="mesa-nouveau-dri-git>=0"
|
|
pkg_install() {
|
|
vmove "usr/lib/libXvMCnouveau.so*"
|
|
vmove "usr/lib/vdpau/libvdpau_nouveau.so*"
|
|
vmove "usr/lib/xorg/modules/drivers/nouveau*"
|
|
vmove usr/lib/gallium-pipe/pipe_nouveau.so
|
|
}
|
|
}
|
|
|
|
mesa-vmwgfx-dri_package() {
|
|
short_desc="Mesa DRI drivers for VMware"
|
|
replaces="mesa-vmwgfx-dri-git>=0"
|
|
pkg_install() {
|
|
vmove "usr/lib/xorg/modules/drivers/vmwgfx*"
|
|
vmove usr/lib/gallium-pipe/pipe_vmwgfx.so
|
|
}
|
|
}
|
|
|
|
mesa-opencl_package() {
|
|
short_desc="Mesa implementation of OpenCL (r600+ only)"
|
|
depends="libclc-r600 libOpenCL"
|
|
replaces="mesa-opencl-git>=0"
|
|
pkg_install() {
|
|
vmove etc/OpenCL
|
|
vmove "/usr/lib/lib*OpenCL*"
|
|
mv ${XBPS_DESTDIR}/MesaLib-devel-${version}/usr/lib/lib*OpenCL.so ${PKGDESTDIR}/usr/lib
|
|
}
|
|
}
|