void-packages/srcpkgs/libGL/template

202 lines
6.1 KiB
Plaintext
Raw Normal View History

# Template build file for 'libGL'.
pkgname=libGL
2015-02-07 08:38:56 +01:00
version=10.4.4
2015-01-12 17:12:36 +01:00
revision=1
wrksrc="Mesa-${version}"
build_style=gnu-configure
2013-08-28 09:14:52 +02:00
configure_args="--enable-glx-tls --enable-shared-glapi --enable-gbm
--enable-gles1 --enable-gles2 --enable-egl --enable-vdpau
--disable-gallium-egl --enable-xvmc --enable-osmesa --enable-texture-float
2014-07-22 00:42:13 +02:00
--with-egl-platforms=x11,drm,wayland"
short_desc="Graphics library similar to SGI's OpenGL"
maintainer="Juan RP <xtraeme@gmail.com>"
2011-06-14 15:17:59 +02:00
homepage="http://www.mesa3d.org/"
license="MIT, LGPL-2.1"
distfiles="ftp://ftp.freedesktop.org/pub/mesa/${version}/MesaLib-${version}.tar.bz2"
2015-02-07 08:38:56 +01:00
checksum=f18a967e9c4d80e054b2fdff8c130ce6e6d1f8eecfc42c9f354f8628d8b4df1c
2012-10-09 09:35:58 +02:00
2014-02-07 06:55:07 +01:00
hostmakedepends="
2014-07-22 00:42:13 +02:00
automake libtool flex pkg-config llvm libxml2-python wayland-devel"
2014-02-07 06:55:07 +01:00
makedepends="
2014-03-05 18:30:09 +01:00
glproto dri2proto>=2.1 dri3proto presentproto libXext-devel libXxf86vm-devel
libudev-devel libdrm-devel expat-devel talloc-devel libvdpau-devel libva-devel
2014-03-05 18:30:09 +01:00
libXdamage-devel libXvMC-devel>=1.0.6 libxshmfence-devel wayland-devel
2014-06-06 06:34:45 +02:00
elfutils-devel ncurses-devel zlib-devel libffi-devel"
replaces="MesaLib>=0 mesa-swraster-dri>=0"
conf_files="/etc/drirc"
2014-02-07 06:55:07 +01:00
# Set subpackages manually to set proper rdeps in 32bit pkgs.
subpackages="libglapi libgbm libEGL libGLES libOSMesa libwayland-egl"
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"
configure_args+=" --enable-xa --enable-dri3 --enable-nine"
configure_args+=" --enable-opencl --enable-opencl-icd --enable-r600-llvm-compiler"
hostmakedepends+=" clang libclc-git"
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
;;
armv6l*)
# Enable Videocore IV and swrast for RaspberryPi
configure_args+=" --with-gallium-drivers=swrast,vc4"
configure_args+=" --with-dri-drivers=swrast"
configure_args+=" --disable-xa --enable-nine"
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
# -devel must be the last one for proper order.
subpackages+=" MesaLib-devel"
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
2012-10-09 09:35:58 +02:00
pre_configure() {
2013-08-28 09:14:52 +02:00
NOCONFIGURE=1 ./autogen.sh
2014-02-07 06:55:07 +01:00
libtoolize -f
2012-10-09 09:35:58 +02:00
}
post_install() {
vmkdir usr/lib/xorg/modules/extensions
ln -s libglx-xorg.so ${DESTDIR}/usr/lib/xorg/modules/extensions/libglx.so
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
;;
armv6l*)
ln -s gallium_drv_video.so ${DESTDIR}/usr/lib/dri/vc4_drv_video.so
;;
esac
}
libglapi_package() {
replaces="MesaLib-devel<10.4.1_2"
depends="libudev"
short_desc="Free implementation of the GL API - shared library"
pkg_install() {
vmove "usr/lib/libglapi.so*"
}
}
libgbm_package() {
replaces="MesaLib-devel<10.4.1_2"
short_desc="Mesa Generic buffer management API - runtime"
pkg_install() {
vmove "usr/lib/libgbm.so*"
}
}
libEGL_package() {
replaces="MesaLib-devel<10.4.1_2"
short_desc="Free implementation of the EGL API - runtime"
pkg_install() {
vmove "usr/lib/libEGL*.so*"
}
}
libGLES_package() {
replaces="MesaLib-devel<10.4.1_2"
depends="libudev"
short_desc="Free implementation of the OpenGL|ES 1.x and 2.x API"
pkg_install() {
vmove "usr/lib/libGLES*.so*"
}
}
libOSMesa_package() {
replaces="MesaLib-devel<10.4.1_2"
short_desc="Mesa Off-Screen interface library"
pkg_install() {
vmove "usr/lib/libOSMesa.so*"
}
}
libwayland-egl_package() {
replaces="MesaLib-devel<10.4.1_2"
short_desc="Free implementation of the EGL API - wayland runtime"
pkg_install() {
vmove "usr/lib/libwayland-egl.so*"
}
}
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}
libGLES>=${version}_${revision} libEGL>=${version}_${revision}
libOSMesa>=${version}_${revision} libgbm>=${version}_${revision}
2014-02-07 06:55:07 +01: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 22:47:00 +02:00
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove usr/lib/pkgconfig
}
}
2014-02-07 06:55:07 +01:00
libxatracker_package() {
replaces="MesaLib-devel<10.4.1_2"
2014-02-07 06:55:07 +01:00
short_desc="Mesa XA tracker interface library"
pkg_install() {
vmove "usr/lib/libxatracker*.so*"
2014-02-07 06:55:07 +01: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*"
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 09:14:52 +02: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)"
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"
pkg_install() {
vmove "usr/lib/xorg/modules/drivers/vmwgfx*"
vmove usr/lib/gallium-pipe/pipe_vmwgfx.so
}
}
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)"
depends="libclc libOpenCL"
2014-07-22 00:42:13 +02:00
pkg_install() {
vmove etc/OpenCL
vmove "usr/lib/lib*OpenCL*"
2014-07-22 00:42:13 +02:00
}
}