2015-05-07 14:12:08 +02:00
|
|
|
# Template build file for 'libGL'.
|
2014-12-08 08:58:12 +01:00
|
|
|
pkgname=libGL
|
2015-08-13 05:07:20 +02:00
|
|
|
version=10.6.4
|
2015-05-24 16:08:52 +02:00
|
|
|
revision=1
|
2015-03-07 20:38:08 +01:00
|
|
|
wrksrc="mesa-${version}"
|
2011-10-24 14:14:47 +02:00
|
|
|
build_style=gnu-configure
|
2015-05-15 07:33:40 +02:00
|
|
|
configure_args="--enable-shared-glapi --enable-gbm
|
2014-12-14 16:51:10 +01:00
|
|
|
--enable-gles1 --enable-gles2 --enable-egl --enable-vdpau
|
2015-03-07 20:38:08 +01:00
|
|
|
--enable-xvmc --enable-osmesa --enable-texture-float
|
2014-07-22 00:42:13 +02:00
|
|
|
--with-egl-platforms=x11,drm,wayland"
|
2008-10-02 07:36:10 +02:00
|
|
|
short_desc="Graphics library similar to SGI's OpenGL"
|
2015-04-10 09:16:30 +02:00
|
|
|
maintainer="Juan RP <xtraeme@voidlinux.eu>"
|
2011-06-14 15:17:59 +02:00
|
|
|
homepage="http://www.mesa3d.org/"
|
|
|
|
license="MIT, LGPL-2.1"
|
2015-03-07 20:38:08 +01:00
|
|
|
distfiles="ftp://ftp.freedesktop.org/pub/mesa/${version}/mesa-${version}.tar.xz"
|
2015-08-13 05:07:20 +02:00
|
|
|
checksum=8f5ac103f0f503de2f7a985b0df349bd4ecdfe7f51c714be146fa5a9a3c07b77
|
2012-10-09 09:35:58 +02:00
|
|
|
|
2014-02-07 06:55:07 +01:00
|
|
|
hostmakedepends="
|
2015-03-27 10:50:40 +01:00
|
|
|
automake libtool flex pkg-config llvm python-Mako libxml2-python wayland-devel"
|
2014-02-07 06:55:07 +01:00
|
|
|
makedepends="
|
2015-03-27 10:50:40 +01:00
|
|
|
glproto dri2proto dri3proto presentproto libXext-devel libXxf86vm-devel
|
2014-12-15 14:51:26 +01:00
|
|
|
libudev-devel libdrm-devel expat-devel talloc-devel libvdpau-devel libva-devel
|
2015-03-27 10:50:40 +01:00
|
|
|
libXdamage-devel libXvMC-devel libxshmfence-devel wayland-devel
|
2015-03-07 20:38:08 +01:00
|
|
|
elfutils-devel ncurses-devel zlib-devel libffi-devel libressl-devel"
|
2014-12-08 08:58:12 +01:00
|
|
|
conf_files="/etc/drirc"
|
2014-02-07 06:55:07 +01:00
|
|
|
|
2014-07-23 15:46:32 +02:00
|
|
|
# Set subpackages manually to set proper rdeps in 32bit pkgs.
|
2014-12-08 08:58:12 +01:00
|
|
|
subpackages="libglapi libgbm libEGL libGLES libOSMesa libwayland-egl"
|
2014-07-23 15:46:32 +02:00
|
|
|
|
2014-02-07 06:55:07 +01: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-12-14 16:51:10 +01:00
|
|
|
configure_args+=" --enable-xa --enable-dri3 --enable-nine"
|
2014-07-23 09:45:52 +02:00
|
|
|
configure_args+=" --enable-opencl --enable-opencl-icd --enable-r600-llvm-compiler"
|
2014-11-22 19:13:47 +01:00
|
|
|
hostmakedepends+=" clang libclc-git"
|
2014-07-23 15:46:32 +02:00
|
|
|
subpackages+=" libxatracker mesa-ati-dri mesa-intel-dri mesa-nouveau-dri"
|
|
|
|
subpackages+=" mesa-vmwgfx-dri mesa-opencl"
|
2014-02-07 06:55:07 +01:00
|
|
|
;;
|
2015-04-25 08:33:03 +02:00
|
|
|
armv[67]l*)
|
2014-12-14 16:48:02 +01:00
|
|
|
# Enable Videocore IV and swrast for RaspberryPi
|
|
|
|
configure_args+=" --with-gallium-drivers=swrast,vc4"
|
|
|
|
configure_args+=" --with-dri-drivers=swrast"
|
2014-12-14 16:51:10 +01:00
|
|
|
configure_args+=" --disable-xa --enable-nine"
|
2014-12-14 16:48:02 +01:00
|
|
|
subpackages+=" mesa-vc4-dri"
|
|
|
|
;;
|
2014-02-07 06:55:07 +01:00
|
|
|
*)
|
|
|
|
# Enable swrast driver.
|
|
|
|
configure_args+=" --with-gallium-drivers=swrast"
|
|
|
|
configure_args+=" --with-dri-drivers=swrast"
|
|
|
|
configure_args+=" --disable-xa"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2014-08-25 17:53:09 +02:00
|
|
|
# -devel must be the last one for proper order.
|
|
|
|
subpackages+=" MesaLib-devel"
|
|
|
|
|
2014-03-06 20:53:00 +01:00
|
|
|
case "$XBPS_TARGET_MACHINE" in
|
2014-04-05 11:56:42 +02:00
|
|
|
i686*) configure_args+=" --with-dri-driverdir=/usr/lib32/xorg/modules/drivers";;
|
2014-03-06 20:53:00 +01:00
|
|
|
*) configure_args+=" --with-dri-driverdir=/usr/lib/xorg/modules/drivers";;
|
|
|
|
esac
|
2015-05-15 07:33:40 +02:00
|
|
|
case "$XBPS_TARGET_MACHINE" in
|
|
|
|
# Disable TLS with musl: https://bugs.freedesktop.org/show_bug.cgi?id=35268
|
2015-06-15 16:20:36 +02:00
|
|
|
# Disable D3D9 state tracker: needs fpu_control.h
|
|
|
|
*-musl) configure_args+=" --disable-glx-tls --disable-nine";;
|
2015-05-15 07:33:40 +02:00
|
|
|
*) configure_args+=" --enable-glx-tls";;
|
|
|
|
esac
|
2014-03-06 20:53:00 +01:00
|
|
|
|
2012-11-17 15:04:12 +01:00
|
|
|
|
2012-10-09 09:35:58 +02:00
|
|
|
pre_configure() {
|
2014-02-07 06:55:07 +01:00
|
|
|
libtoolize -f
|
2015-03-07 20:38:08 +01:00
|
|
|
NOCONFIGURE=1 ./autogen.sh
|
2012-10-09 09:35:58 +02:00
|
|
|
}
|
2013-04-12 09:01:46 +02:00
|
|
|
|
|
|
|
post_install() {
|
2014-03-06 20:53:00 +01:00
|
|
|
vmkdir usr/lib/xorg/modules/extensions
|
2014-03-07 14:20:32 +01:00
|
|
|
ln -s libglx-xorg.so ${DESTDIR}/usr/lib/xorg/modules/extensions/libglx.so
|
2014-12-15 14:51:26 +01:00
|
|
|
case "$XBPS_TARGET_MACHINE" in
|
|
|
|
i686*|x86_64*)
|
|
|
|
for f in r200 r300 r600 radeonsi svga nouveau; do
|
|
|
|
ln -s gallium_drv_video.so ${DESTDIR}/usr/lib/dri/${f}_drv_video.so
|
|
|
|
done
|
|
|
|
;;
|
2015-04-25 08:33:03 +02:00
|
|
|
armv[67]l*)
|
2014-12-15 14:51:26 +01:00
|
|
|
ln -s gallium_drv_video.so ${DESTDIR}/usr/lib/dri/vc4_drv_video.so
|
|
|
|
;;
|
|
|
|
esac
|
2013-04-12 09:01:46 +02:00
|
|
|
}
|
|
|
|
|
2014-04-09 08:58:49 +02:00
|
|
|
libglapi_package() {
|
|
|
|
depends="libudev"
|
|
|
|
short_desc="Free implementation of the GL API - shared library"
|
2013-04-12 09:01:46 +02:00
|
|
|
pkg_install() {
|
2015-01-07 08:44:22 +01:00
|
|
|
vmove "usr/lib/libglapi.so*"
|
2013-04-12 09:01:46 +02:00
|
|
|
}
|
|
|
|
}
|
2014-07-23 15:46:32 +02:00
|
|
|
libgbm_package() {
|
|
|
|
short_desc="Mesa Generic buffer management API - runtime"
|
|
|
|
pkg_install() {
|
2015-01-07 08:44:22 +01:00
|
|
|
vmove "usr/lib/libgbm.so*"
|
2014-07-23 15:46:32 +02:00
|
|
|
}
|
|
|
|
}
|
2014-04-09 08:58:49 +02:00
|
|
|
libEGL_package() {
|
|
|
|
short_desc="Free implementation of the EGL API - runtime"
|
2013-04-12 09:01:46 +02:00
|
|
|
pkg_install() {
|
2015-01-07 08:44:22 +01:00
|
|
|
vmove "usr/lib/libEGL*.so*"
|
2013-04-12 09:01:46 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
libGLES_package() {
|
2014-04-09 08:58:49 +02:00
|
|
|
depends="libudev"
|
2013-04-12 09:01:46 +02:00
|
|
|
short_desc="Free implementation of the OpenGL|ES 1.x and 2.x API"
|
|
|
|
pkg_install() {
|
2015-01-07 08:44:22 +01:00
|
|
|
vmove "usr/lib/libGLES*.so*"
|
2013-04-12 09:01:46 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
libOSMesa_package() {
|
|
|
|
short_desc="Mesa Off-Screen interface library"
|
|
|
|
pkg_install() {
|
2015-01-07 08:44:22 +01:00
|
|
|
vmove "usr/lib/libOSMesa.so*"
|
2013-04-12 09:01:46 +02:00
|
|
|
}
|
|
|
|
}
|
2013-06-21 11:44:36 +02:00
|
|
|
libwayland-egl_package() {
|
|
|
|
short_desc="Free implementation of the EGL API - wayland runtime"
|
|
|
|
pkg_install() {
|
2015-01-07 08:44:22 +01:00
|
|
|
vmove "usr/lib/libwayland-egl.so*"
|
2013-06-21 11:44:36 +02:00
|
|
|
}
|
|
|
|
}
|
2013-04-12 09:01:46 +02:00
|
|
|
MesaLib-devel_package() {
|
2014-03-10 09:32:39 +01: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
|
2014-09-05 01:23:54 +02:00
|
|
|
libGL>=${version}_${revision}
|
2013-10-15 17:18:22 +02:00
|
|
|
libGLES>=${version}_${revision} libEGL>=${version}_${revision}
|
|
|
|
libOSMesa>=${version}_${revision} libgbm>=${version}_${revision}
|
2014-02-07 06:55:07 +01:00
|
|
|
libwayland-egl>=${version}_${revision}"
|
2015-05-09 08:42:46 +02:00
|
|
|
case "$XBPS_TARGET_MACHINE" in
|
|
|
|
i686*|x86_64*) depends+=" libxatracker>=${version}_${revision}";;
|
|
|
|
esac
|
2013-05-21 22:47:00 +02:00
|
|
|
short_desc+=" - development files"
|
2013-04-12 09:01:46 +02:00
|
|
|
pkg_install() {
|
|
|
|
vmove usr/include
|
|
|
|
vmove usr/lib/pkgconfig
|
|
|
|
}
|
|
|
|
}
|
2014-02-07 06:55:07 +01:00
|
|
|
libxatracker_package() {
|
|
|
|
short_desc="Mesa XA tracker interface library"
|
|
|
|
pkg_install() {
|
2015-01-07 08:44:22 +01:00
|
|
|
vmove "usr/lib/libxatracker*.so*"
|
2014-02-07 06:55:07 +01:00
|
|
|
}
|
|
|
|
}
|
2013-04-12 09:01:46 +02:00
|
|
|
mesa-ati-dri_package() {
|
|
|
|
short_desc="Mesa DRI drivers for ATI GPUs"
|
|
|
|
pkg_install() {
|
|
|
|
vmove "usr/lib/libXvMCr[36]00.so*"
|
|
|
|
vmove "usr/lib/vdpau/libvdpau_r[36]00.so*"
|
2013-08-28 09:14:52 +02:00
|
|
|
vmove "usr/lib/vdpau/libvdpau_radeon*.so*"
|
2013-10-15 17:18:22 +02:00
|
|
|
vmove "usr/lib/xorg/modules/drivers/radeon*"
|
|
|
|
vmove "usr/lib/xorg/modules/drivers/r[236]00*"
|
2013-04-12 09:01:46 +02:00
|
|
|
vmove "usr/lib/gallium-pipe/pipe_r[36]00.so"
|
2013-08-28 09:14:52 +02:00
|
|
|
vmove usr/lib/gallium-pipe/pipe_radeonsi.so
|
2015-03-07 20:38:08 +01:00
|
|
|
vmove usr/lib/dri/r*
|
2013-04-12 09:01:46 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
mesa-intel-dri_package() {
|
|
|
|
short_desc="Mesa DRI drivers for Intel GPUs"
|
|
|
|
pkg_install() {
|
2013-10-15 17:18:22 +02:00
|
|
|
vmove "usr/lib/xorg/modules/drivers/i9[16]5_dri.*"
|
2013-04-12 09:01:46 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
mesa-nouveau-dri_package() {
|
|
|
|
short_desc="Mesa DRI drivers for NVIDIA GPUs (nouveau dri)"
|
|
|
|
pkg_install() {
|
|
|
|
vmove "usr/lib/libXvMCnouveau.so*"
|
|
|
|
vmove "usr/lib/vdpau/libvdpau_nouveau.so*"
|
2013-10-15 17:18:22 +02:00
|
|
|
vmove "usr/lib/xorg/modules/drivers/nouveau*"
|
2013-04-12 09:01:46 +02:00
|
|
|
vmove usr/lib/gallium-pipe/pipe_nouveau.so
|
2015-03-07 20:38:08 +01:00
|
|
|
vmove usr/lib/dri/nouveau*
|
2013-04-12 09:01:46 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
mesa-vmwgfx-dri_package() {
|
|
|
|
short_desc="Mesa DRI drivers for VMware"
|
|
|
|
pkg_install() {
|
2013-10-15 17:18:22 +02:00
|
|
|
vmove "usr/lib/xorg/modules/drivers/vmwgfx*"
|
2013-04-12 09:01:46 +02:00
|
|
|
vmove usr/lib/gallium-pipe/pipe_vmwgfx.so
|
2015-03-07 20:38:08 +01:00
|
|
|
vmove usr/lib/dri/svga*
|
2013-04-12 09:01:46 +02:00
|
|
|
}
|
|
|
|
}
|
2014-12-14 16:48:02 +01:00
|
|
|
mesa-vc4-dri_package() {
|
|
|
|
short_desc="Mesa DRI drivers for Videocore IV GPU"
|
|
|
|
pkg_install() {
|
|
|
|
vmove "usr/lib/xorg/modules/drivers/vc4*"
|
|
|
|
}
|
|
|
|
}
|
2014-07-22 00:42:13 +02:00
|
|
|
mesa-opencl_package() {
|
|
|
|
short_desc="Mesa implementation of OpenCL (r600+ only)"
|
2014-11-15 19:33:10 +01:00
|
|
|
depends="libclc libOpenCL"
|
2014-07-22 00:42:13 +02:00
|
|
|
pkg_install() {
|
2014-07-23 09:45:52 +02:00
|
|
|
vmove etc/OpenCL
|
2014-08-25 17:53:09 +02:00
|
|
|
vmove "usr/lib/lib*OpenCL*"
|
2014-07-22 00:42:13 +02:00
|
|
|
}
|
|
|
|
}
|