void-packages/srcpkgs/MesaLib/template

209 lines
5.6 KiB
Text
Raw Normal View History

# Template build file for 'MesaLib'.
pkgname=MesaLib
2014-03-05 17:30:09 +00:00
version=10.1.0
revision=4
wrksrc="Mesa-${version}"
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
--with-egl-platforms=drm,wayland"
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-03-05 17:30:09 +00:00
distfiles="ftp://ftp.freedesktop.org/pub/mesa/${version%.*}/${pkgname}-${version}.tar.bz2"
checksum=5941c3d4772a9f447f51569dfca48e01af98080bc996991d00a13f900dab2230
2012-10-09 07:35:58 +00:00
2014-02-07 05:55:07 +00:00
hostmakedepends="
automake libtool flex pkg-config llvm>=3.3 libxml2-python wayland-devel"
makedepends="
2014-03-05 17:30:09 +00:00
glproto dri2proto>=2.1 dri3proto presentproto libXext-devel libXxf86vm-devel
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
elfutils-devel ncurses-devel zlib-devel"
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"
configure_args+=" --enable-xa"
;;
*)
# 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+=" --libdir=/usr/lib32 --with-dri-driverdir=/usr/lib32/xorg/modules/drivers";;
*) configure_args+=" --with-dri-driverdir=/usr/lib/xorg/modules/drivers";;
esac
conf_files="/etc/drirc"
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
}
pre_install() {
vmkdir usr/lib32
ln -s lib32 ${DESTDIR}/usr/lib
}
post_install() {
vmkdir usr/lib/xorg/modules/extensions
ln -s libglx-xorg.so ${DESTDIR}/usr/lib/xorg/modules/extensions/libglx.so
}
libgbm_package() {
2013-10-05 08:14:29 +00:00
short_desc="Mesa Generic buffer management API - runtime"
replaces="MesaLib<9.0.2"
pkg_install() {
2013-08-06 09:39:25 +00:00
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="MesaLib<7.11_2"
pkg_install() {
2013-08-06 09:39:25 +00:00
vmove "usr/lib/libEGL*.so.*"
}
}
libglapi_package() {
short_desc="Free implementation of the GL API - shared library"
replaces="MesaLib<7.11_2"
pkg_install() {
2013-08-06 09:39:25 +00:00
vmove "usr/lib/libglapi.so.*"
}
}
libGLES_package() {
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.*"
}
}
libGL_package() {
short_desc="Free implementation of the OpenGL API - GLX runtime"
replaces="MesaLib<7.11_2"
pkg_install() {
2013-08-06 09:39:25 +00:00
vmove "usr/lib/libGL*.so.*"
vmove usr/lib/xorg/modules/extensions
}
}
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.*"
}
}
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.*"
}
}
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.*"
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}
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"
pkg_install() {
vmove usr/include
vmove usr/lib/pkgconfig
2013-08-06 09:39:25 +00:00
vmove "usr/lib/*.so"
}
}
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"
}
}
if [ "$XBPS_TARGET_MACHINE" = "i686" -o "$XBPS_TARGET_MACHINE" = "x86_64" ]; then
libxatracker_package() {
short_desc="Mesa XA tracker interface library"
replaces="MesaLib<10.0.0_2"
pkg_install() {
vmove "usr/lib/libxatracker*.so.*"
}
}
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*"
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"
2013-08-28 07:14:52 +00:00
vmove usr/lib/gallium-pipe/pipe_radeonsi.so
}
}
mesa-intel-dri_package() {
short_desc="Mesa DRI drivers for Intel GPUs"
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="MesaLib<9.0.2"
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="MesaLib<9.0.2"
pkg_install() {
vmove "usr/lib/xorg/modules/drivers/vmwgfx*"
vmove usr/lib/gallium-pipe/pipe_vmwgfx.so
}
}
2014-02-07 05:55:07 +00:00
fi # x86