2008-10-04 04:29:49 +00:00
|
|
|
# Template build file for 'MesaLib'.
|
|
|
|
pkgname=MesaLib
|
2014-07-20 09:59:32 +00:00
|
|
|
version=10.2.4
|
2014-07-23 13:46:32 +00:00
|
|
|
revision=6
|
2010-03-29 08:21:32 +00:00
|
|
|
wrksrc="Mesa-${version}"
|
2011-10-24 12:14:47 +00:00
|
|
|
build_style=gnu-configure
|
2013-08-28 07:14:52 +00:00
|
|
|
configure_args="--enable-glx-tls --enable-shared-glapi --enable-gbm
|
2014-02-07 05:55:07 +00:00
|
|
|
--enable-gles1 --enable-gles2 --enable-openvg --enable-egl --enable-vdpau
|
2012-10-09 07:35:58 +00:00
|
|
|
--enable-gallium-egl --enable-xvmc --enable-osmesa --enable-texture-float
|
2014-07-21 22:42:13 +00:00
|
|
|
--with-egl-platforms=x11,drm,wayland"
|
2008-10-02 05:36:10 +00:00
|
|
|
short_desc="Graphics library similar to SGI's OpenGL"
|
|
|
|
maintainer="Juan RP <xtraeme@gmail.com>"
|
2011-06-14 13:17:59 +00:00
|
|
|
homepage="http://www.mesa3d.org/"
|
|
|
|
license="MIT, LGPL-2.1"
|
2014-04-19 06:49:13 +00:00
|
|
|
distfiles="ftp://ftp.freedesktop.org/pub/mesa/${version}/${pkgname}-${version}.tar.bz2"
|
2014-07-20 09:59:32 +00:00
|
|
|
checksum=06a2341244eb85c283f59f70161e06ded106f835ed9b6be1ef0243bd9344811a
|
2012-10-09 07:35:58 +00:00
|
|
|
|
2014-02-07 05:55:07 +00:00
|
|
|
hostmakedepends="
|
2014-07-21 22:42:13 +00:00
|
|
|
automake libtool flex pkg-config llvm libxml2-python wayland-devel"
|
2014-02-07 05:55:07 +00:00
|
|
|
makedepends="
|
2014-03-05 17:30:09 +00:00
|
|
|
glproto dri2proto>=2.1 dri3proto presentproto libXext-devel libXxf86vm-devel
|
2014-03-06 19:53:00 +00:00
|
|
|
libudev-devel libdrm-devel expat-devel talloc-devel libvdpau-devel
|
2014-03-05 17:30:09 +00:00
|
|
|
libXdamage-devel libXvMC-devel>=1.0.6 libxshmfence-devel wayland-devel
|
2014-06-06 04:34:45 +00:00
|
|
|
elfutils-devel ncurses-devel zlib-devel libffi-devel"
|
2014-02-07 05:55:07 +00:00
|
|
|
|
2014-07-23 13:46:32 +00:00
|
|
|
# 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"
|
|
|
|
|
2014-02-07 05:55:07 +00:00
|
|
|
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"
|
2014-06-07 08:36:29 +00:00
|
|
|
configure_args+=" --enable-xa --enable-dri3"
|
2014-07-23 07:45:52 +00:00
|
|
|
configure_args+=" --enable-opencl --enable-opencl-icd --enable-r600-llvm-compiler"
|
2014-07-21 22:42:13 +00:00
|
|
|
hostmakedepends+=" clang libclc-devel-git"
|
2014-07-23 13:46:32 +00:00
|
|
|
subpackages+=" libxatracker mesa-ati-dri mesa-intel-dri mesa-nouveau-dri"
|
|
|
|
subpackages+=" mesa-vmwgfx-dri mesa-opencl"
|
2014-02-07 05:55:07 +00:00
|
|
|
;;
|
|
|
|
*)
|
|
|
|
# Enable swrast driver.
|
|
|
|
configure_args+=" --with-gallium-drivers=swrast"
|
|
|
|
configure_args+=" --with-dri-drivers=swrast"
|
|
|
|
configure_args+=" --disable-xa"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2014-03-06 19:53:00 +00:00
|
|
|
case "$XBPS_TARGET_MACHINE" in
|
2014-04-05 09:56:42 +00:00
|
|
|
i686*) configure_args+=" --with-dri-driverdir=/usr/lib32/xorg/modules/drivers";;
|
2014-03-06 19:53:00 +00:00
|
|
|
*) configure_args+=" --with-dri-driverdir=/usr/lib/xorg/modules/drivers";;
|
|
|
|
esac
|
|
|
|
|
2014-01-01 15:10:11 +00:00
|
|
|
conf_files="/etc/drirc"
|
2012-11-17 14:04:12 +00:00
|
|
|
|
2012-10-09 07:35:58 +00:00
|
|
|
pre_configure() {
|
2013-08-28 07:14:52 +00:00
|
|
|
NOCONFIGURE=1 ./autogen.sh
|
2014-02-07 05:55:07 +00:00
|
|
|
libtoolize -f
|
2012-10-09 07:35:58 +00:00
|
|
|
}
|
2013-04-12 07:01:46 +00:00
|
|
|
|
|
|
|
post_install() {
|
2014-03-06 19:53:00 +00:00
|
|
|
vmkdir usr/lib/xorg/modules/extensions
|
2014-03-07 13:20:32 +00:00
|
|
|
ln -s libglx-xorg.so ${DESTDIR}/usr/lib/xorg/modules/extensions/libglx.so
|
2013-04-12 07:01:46 +00:00
|
|
|
}
|
|
|
|
|
2014-04-09 06:58:49 +00:00
|
|
|
libglapi_package() {
|
|
|
|
depends="libudev"
|
|
|
|
short_desc="Free implementation of the GL API - shared library"
|
2013-04-12 07:01:46 +00:00
|
|
|
replaces="MesaLib<7.11_2"
|
|
|
|
pkg_install() {
|
2014-04-09 06:58:49 +00:00
|
|
|
vmove "usr/lib/libglapi.so.*"
|
2013-04-12 07:01:46 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-07-23 13:46:32 +00:00
|
|
|
libgbm_package() {
|
|
|
|
short_desc="Mesa Generic buffer management API - runtime"
|
|
|
|
replaces="MesaLib<9.0.2"
|
|
|
|
pkg_install() {
|
|
|
|
vmove "usr/lib/libgbm.so.*"
|
|
|
|
vmove usr/lib/gbm/gbm_gallium_drm.so
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-04-09 06:58:49 +00:00
|
|
|
libEGL_package() {
|
|
|
|
short_desc="Free implementation of the EGL API - runtime"
|
2013-04-12 07:01:46 +00:00
|
|
|
replaces="MesaLib<7.11_2"
|
|
|
|
pkg_install() {
|
2014-04-09 06:58:49 +00:00
|
|
|
vmove "usr/lib/libEGL*.so.*"
|
2013-04-12 07:01:46 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
libGLES_package() {
|
2014-04-09 06:58:49 +00:00
|
|
|
depends="libudev"
|
2013-04-12 07:01:46 +00:00
|
|
|
short_desc="Free implementation of the OpenGL|ES 1.x and 2.x API"
|
|
|
|
replaces="MesaLib<7.11_2"
|
|
|
|
pkg_install() {
|
2013-08-06 09:39:25 +00:00
|
|
|
vmove "usr/lib/libGLES*.so.*"
|
2013-04-12 07:01:46 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
libGL_package() {
|
2014-04-09 06:58:49 +00:00
|
|
|
depends="libudev"
|
2013-04-12 07:01:46 +00:00
|
|
|
short_desc="Free implementation of the OpenGL API - GLX runtime"
|
|
|
|
replaces="MesaLib<7.11_2"
|
|
|
|
pkg_install() {
|
2014-07-23 13:46:32 +00:00
|
|
|
vmove "usr/lib/libGL.so.*"
|
2014-03-06 19:53:00 +00:00
|
|
|
vmove usr/lib/xorg/modules/extensions
|
2013-04-12 07:01:46 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
libOpenVG_package() {
|
|
|
|
short_desc="Free implementation of the OpenVG API - runtime"
|
|
|
|
replaces="MesaLib<7.11_2"
|
|
|
|
pkg_install() {
|
2013-08-06 09:39:25 +00:00
|
|
|
vmove "usr/lib/libOpenVG.so.*"
|
2013-04-12 07:01:46 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
libOSMesa_package() {
|
|
|
|
short_desc="Mesa Off-Screen interface library"
|
|
|
|
replaces="MesaLib<7.11_2"
|
|
|
|
pkg_install() {
|
2013-08-06 09:39:25 +00:00
|
|
|
vmove "usr/lib/libOSMesa.so.*"
|
2013-04-12 07:01:46 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-06-21 09:44:36 +00:00
|
|
|
libwayland-egl_package() {
|
|
|
|
short_desc="Free implementation of the EGL API - wayland runtime"
|
|
|
|
pkg_install() {
|
2013-08-06 09:39:25 +00:00
|
|
|
vmove "usr/lib/libwayland-egl.so.*"
|
2013-06-21 09:44:36 +00:00
|
|
|
vmove usr/lib/egl
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-04-12 07:01:46 +00:00
|
|
|
MesaLib-devel_package() {
|
2014-03-10 08:32:39 +00:00
|
|
|
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
|
2013-10-15 15:18:22 +00:00
|
|
|
libGL>=${version}_${revision} libOpenVG>=${version}_${revision}
|
|
|
|
libGLES>=${version}_${revision} libEGL>=${version}_${revision}
|
|
|
|
libOSMesa>=${version}_${revision} libgbm>=${version}_${revision}
|
2014-02-07 05:55:07 +00:00
|
|
|
libwayland-egl>=${version}_${revision}"
|
|
|
|
if [ "$XBPS_TARGET_MACHINE" = "i686" -o "$XBPS_TARGET_MACHINE" = "x86_64" ]; then
|
|
|
|
depends+=" libxatracker>=${version}_${revision}"
|
|
|
|
fi
|
2013-05-21 20:47:00 +00:00
|
|
|
short_desc+=" - development files"
|
2013-04-12 07:01:46 +00:00
|
|
|
pkg_install() {
|
|
|
|
vmove usr/include
|
|
|
|
vmove usr/lib/pkgconfig
|
2013-08-06 09:39:25 +00:00
|
|
|
vmove "usr/lib/*.so"
|
2013-04-12 07:01:46 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-02-07 05:55:07 +00:00
|
|
|
mesa-swraster-dri_package() {
|
|
|
|
short_desc="Mesa DRI drivers for the Software Rasterizer"
|
|
|
|
replaces="MesaLib<9.0.2"
|
|
|
|
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="MesaLib<10.0.0_2"
|
|
|
|
pkg_install() {
|
|
|
|
vmove "usr/lib/libxatracker*.so.*"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-04-12 07:01:46 +00:00
|
|
|
mesa-ati-dri_package() {
|
|
|
|
short_desc="Mesa DRI drivers for ATI GPUs"
|
|
|
|
replaces="MesaLib<9.0.2"
|
|
|
|
pkg_install() {
|
|
|
|
vmove "usr/lib/libXvMCr[36]00.so*"
|
|
|
|
vmove "usr/lib/vdpau/libvdpau_r[36]00.so*"
|
2013-08-28 07:14:52 +00:00
|
|
|
vmove "usr/lib/vdpau/libvdpau_radeon*.so*"
|
2013-10-15 15:18:22 +00:00
|
|
|
vmove "usr/lib/xorg/modules/drivers/radeon*"
|
|
|
|
vmove "usr/lib/xorg/modules/drivers/r[236]00*"
|
2013-04-12 07:01:46 +00:00
|
|
|
vmove "usr/lib/gallium-pipe/pipe_r[36]00.so"
|
2013-08-28 07:14:52 +00:00
|
|
|
vmove usr/lib/gallium-pipe/pipe_radeonsi.so
|
2013-04-12 07:01:46 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
mesa-intel-dri_package() {
|
|
|
|
short_desc="Mesa DRI drivers for Intel GPUs"
|
|
|
|
pkg_install() {
|
2013-10-15 15:18:22 +00:00
|
|
|
vmove "usr/lib/xorg/modules/drivers/i9[16]5_dri.*"
|
2013-04-12 07:01:46 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
mesa-nouveau-dri_package() {
|
|
|
|
short_desc="Mesa DRI drivers for NVIDIA GPUs (nouveau dri)"
|
|
|
|
replaces="MesaLib<9.0.2"
|
|
|
|
pkg_install() {
|
|
|
|
vmove "usr/lib/libXvMCnouveau.so*"
|
|
|
|
vmove "usr/lib/vdpau/libvdpau_nouveau.so*"
|
2013-10-15 15:18:22 +00:00
|
|
|
vmove "usr/lib/xorg/modules/drivers/nouveau*"
|
2013-04-12 07:01:46 +00:00
|
|
|
vmove usr/lib/gallium-pipe/pipe_nouveau.so
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
mesa-vmwgfx-dri_package() {
|
|
|
|
short_desc="Mesa DRI drivers for VMware"
|
|
|
|
replaces="MesaLib<9.0.2"
|
|
|
|
pkg_install() {
|
2013-10-15 15:18:22 +00:00
|
|
|
vmove "usr/lib/xorg/modules/drivers/vmwgfx*"
|
2013-04-12 07:01:46 +00:00
|
|
|
vmove usr/lib/gallium-pipe/pipe_vmwgfx.so
|
|
|
|
}
|
|
|
|
}
|
2014-02-07 05:55:07 +00:00
|
|
|
|
2014-07-21 22:42:13 +00:00
|
|
|
mesa-opencl_package() {
|
|
|
|
short_desc="Mesa implementation of OpenCL (r600+ only)"
|
2014-07-23 07:50:47 +00:00
|
|
|
depends="libclc-r600 ocl-icd"
|
2014-07-21 22:42:13 +00:00
|
|
|
pkg_install() {
|
2014-07-23 07:45:52 +00:00
|
|
|
vmove etc/OpenCL
|
|
|
|
vmove "/usr/lib/lib*OpenCL*"
|
|
|
|
mv ${XBPS_DESTDIR}/MesaLib-devel-${version}/usr/lib/lib*OpenCL.so ${PKGDESTDIR}/usr/lib
|
2014-07-21 22:42:13 +00:00
|
|
|
}
|
|
|
|
}
|