PKGBUILDs/extra/mesa/PKGBUILD

218 lines
8 KiB
Bash
Raw Normal View History

2012-03-13 20:41:09 +00:00
# $Id: PKGBUILD 153287 2012-03-12 20:52:14Z andyrtr $
# Maintainer: Jan de Groot <jgc@archlinux.org>
# Maintainer: Andreas Radke <andyrtr@archlinux.org>
2012-03-13 20:41:09 +00:00
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - Removed DRI and Gallium3D drivers/packages for chipsets that don't exist in our ARM devices (intel, radeon, VMware svga).
# - Build v7h with -O1 instead of -O2
pkgbase=mesa
2012-05-20 17:21:46 +00:00
pkgname=('mesa' 'libgl' 'osmesa' 'libglapi' 'libgbm' 'libgles' 'libegl' 'khrplatform-devel')
2011-03-03 18:06:38 +00:00
#_git=true
2012-03-13 20:41:09 +00:00
_gitdate=20111031
2011-03-03 18:06:38 +00:00
_git=false
if [ "${_git}" = "true" ]; then
2012-03-13 20:41:09 +00:00
pkgver=7.10.99.git20110709
#pkgver=7.11
2011-03-03 18:06:38 +00:00
else
2013-01-24 02:54:55 +00:00
pkgver=9.0.2
2011-03-03 18:06:38 +00:00
fi
2012-10-14 16:42:59 +00:00
pkgrel=1
2011-01-31 17:23:45 +00:00
arch=('i686' 'x86_64')
2012-10-14 16:42:59 +00:00
makedepends=('glproto>=1.4.16' 'libdrm>=2.4.39' 'libxxf86vm>=1.1.2' 'libxdamage>=1.1.3' 'expat>=2.1.0' 'libx11>=1.5.0' 'libxt>=1.1.3'
'gcc-libs>=4.7.1-6' 'dri2proto>=2.8' 'python2' 'libxml2' 'imake' 'llvm' 'systemd' 'libvdpau>=0.5')
url="http://mesa3d.sourceforge.net"
license=('custom')
2012-10-14 16:42:59 +00:00
options=('!libtool')
2012-11-18 07:58:12 +00:00
source=(LICENSE)
2011-03-03 18:06:38 +00:00
if [ "${_git}" = "true" ]; then
2011-08-04 21:41:18 +00:00
# mesa git shot from 7.11 branch - see for state: http://cgit.freedesktop.org/mesa/mesa/commit/?h=7.11&id=1ae00c5960af83bea9545a18a1754bad83d5cbd0
#source=(${source[@]} 'ftp://ftp.archlinux.org/other/mesa/mesa-1ae00c5960af83bea9545a18a1754bad83d5cbd0.tar.bz2')
2012-03-13 20:41:09 +00:00
source=(${source[@]} "MesaLib-git${_gitdate}.zip"::"http://cgit.freedesktop.org/mesa/mesa/snapshot/mesa-ef9f16f6322a89fb699fbe3da868b10f9acaef98.tar.bz2")
2011-03-03 18:06:38 +00:00
else
2011-11-19 18:56:00 +00:00
source=(${source[@]} "ftp://ftp.freedesktop.org/pub/mesa/${pkgver}/MesaLib-${pkgver}.tar.bz2"
2012-03-13 20:41:09 +00:00
#source=(${source[@]} "ftp://ftp.freedesktop.org/pub/mesa/8.0/MesaLib-8.0-rc2.tar.bz2"
2011-11-19 18:56:00 +00:00
#source=(${source[@]} "MesaLib-git${_gitdate}.zip"::"http://cgit.freedesktop.org/mesa/mesa/snapshot/mesa-4464ee1a9aa3745109cee23531e3fb2323234d07.tar.bz2"
2011-11-19 19:01:15 +00:00
)
2011-03-03 18:06:38 +00:00
fi
2013-01-24 02:54:55 +00:00
md5sums=('dc45d1192203e418163e0017640e1cfc'
2012-11-18 07:58:12 +00:00
'97d6554c05ea7449398afe3a0ede7018')
build() {
2011-08-04 21:41:18 +00:00
cd ${srcdir}/?esa-*
2012-06-02 18:22:07 +00:00
2012-03-13 20:41:09 +00:00
[ "${CARCH}" = "armv7h" ] && CFLAGS=`echo $CFLAGS | sed -e 's/-O2/-O1/'` && CXXFLAGS="$CFLAGS"
2012-10-14 16:42:59 +00:00
COMMONOPTS="--prefix=/usr \
--sysconfdir=/etc \
--with-dri-driverdir=/usr/lib/xorg/modules/dri \
2012-03-13 23:56:41 +00:00
--with-dri-drivers=swrast \
2011-08-04 21:41:18 +00:00
--with-gallium-drivers=swrast \
--enable-gallium-llvm \
2012-08-31 16:25:10 +00:00
--enable-egl \
2012-05-20 17:21:46 +00:00
--enable-gallium-egl \
2012-08-31 16:25:10 +00:00
--with-egl-platforms=x11,drm \
2012-05-20 17:21:46 +00:00
--enable-shared-glapi \
--enable-gbm \
--enable-glx-tls \
2012-03-13 20:41:09 +00:00
--enable-dri \
--enable-glx \
--enable-osmesa \
2011-03-03 18:06:38 +00:00
--enable-gles1 \
--enable-gles2 \
2011-08-04 21:41:18 +00:00
--enable-texture-float \
2012-10-14 16:42:59 +00:00
--enable-xa "
if [ "${_git}" = "true" ]; then
./autogen.sh \
$COMMONOPTS
else
autoreconf -vfi
./configure \
$COMMONOPTS
fi
make
}
2012-10-14 16:42:59 +00:00
package_libglapi() {
depends=('glibc')
pkgdesc="free implementation of the GL API -- shared library. The Mesa GL API module is responsible for dispatching all the gl* functions"
make -C ${srcdir}/?esa-*/src/mapi/shared-glapi DESTDIR="${pkgdir}" install
install -m755 -d "${pkgdir}/usr/share/licenses/libglapi"
install -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/libglapi/"
}
package_libgl() {
2012-10-14 16:42:59 +00:00
depends=('libdrm>=2.4.39' 'libxxf86vm>=1.1.2' 'libxdamage>=1.1.3' 'expat>=2.1.0' 'libglapi' 'gcc-libs')
pkgdesc="Mesa 3-D graphics library and DRI software rasterizer"
2012-10-14 16:42:59 +00:00
# fix linking because of splitted package
make -C ${srcdir}/?esa-*/src/mapi/shared-glapi DESTDIR="${pkgdir}" install
# libGL & libdricore
make -C ${srcdir}/?esa-*/src/glx DESTDIR="${pkgdir}" install
make -C ${srcdir}/?esa-*/src/mesa/libdricore DESTDIR="${pkgdir}" install
# fix linking because of splitted package - cleanup
make -C ${srcdir}/?esa-*/src/mapi/shared-glapi DESTDIR="${pkgdir}" uninstall
2011-11-01 23:32:47 +00:00
make -C ${srcdir}/?esa-*/src/gallium/targets/dri-swrast DESTDIR="${pkgdir}" install
2012-03-13 20:41:09 +00:00
2012-10-14 16:42:59 +00:00
# See FS#26284
install -m755 -d "${pkgdir}/usr/lib/xorg/modules/extensions"
ln -s libglx.xorg "${pkgdir}/usr/lib/xorg/modules/extensions/libglx.so"
install -m755 -d "${pkgdir}/usr/share/licenses/libgl"
2011-07-09 01:07:48 +00:00
install -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/libgl/"
}
2012-10-14 16:42:59 +00:00
package_mesa() {
# check also gl.pc
depends=('libgl' 'libx11>=1.5.0' 'libxext>=1.3.1' 'libxdamage' 'libxfixes' 'libxcb' 'libxxf86vm')
optdepends=('opengl-man-pages: for the OpenGL API man pages')
pkgdesc="Mesa 3-D graphics libraries and include files"
make -C ${srcdir}/?esa-*/src/mesa DESTDIR="${pkgdir}" install-glHEADERS
make -C ${srcdir}/?esa-*/src/mesa/drivers/dri DESTDIR="${pkgdir}" install-driincludeHEADERS
make -C ${srcdir}/?esa-*/src/mesa DESTDIR="${pkgdir}" install-pkgconfigDATA
make -C ${srcdir}/?esa-*/src/mesa/drivers/dri DESTDIR="${pkgdir}" install-pkgconfigDATA
make -C ${srcdir}/?esa-*/src/mesa/drivers/dri/common DESTDIR="${pkgdir}" install-sysconfDATA
2012-11-18 17:36:58 +00:00
#make -C ${srcdir}/?esa-*/src/gallium/targets/xa-vmwgfx DESTDIR="${pkgdir}" install
2012-10-14 16:42:59 +00:00
install -m755 -d "${pkgdir}/usr/share/licenses/mesa"
install -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/mesa/"
}
2012-03-13 20:41:09 +00:00
package_osmesa() {
2012-10-14 16:42:59 +00:00
depends=('libglapi' 'gcc-libs')
2012-03-13 20:41:09 +00:00
optdepends=('opengl-man-pages: for the OpenGL API man pages')
pkgdesc="Mesa 3D off-screen rendering library"
2012-10-14 16:42:59 +00:00
# fix linking because of splitted package
make -C ${srcdir}/?esa-*/src/mapi/shared-glapi DESTDIR="${pkgdir}" install
2011-08-04 21:41:18 +00:00
2012-10-14 16:42:59 +00:00
make -C ${srcdir}/?esa-*/src/mesa/drivers/osmesa DESTDIR="${pkgdir}" install
2011-08-04 21:41:18 +00:00
2012-10-14 16:42:59 +00:00
# fix linking because of splitted package - cleanup
make -C ${srcdir}/?esa-*/src/mapi/shared-glapi DESTDIR="${pkgdir}" uninstall
install -m755 -d "${pkgdir}/usr/share/licenses/osmesa"
install -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/osmesa/"
2011-08-04 21:41:18 +00:00
}
2012-05-20 17:21:46 +00:00
package_libgbm() {
2012-10-14 16:42:59 +00:00
depends=('systemd' 'libglapi' 'libdrm')
2012-05-20 17:21:46 +00:00
pkgdesc="Mesa gbm library"
2012-10-14 16:42:59 +00:00
# fix linking because of splitted package
make -C ${srcdir}/?esa-*/src/mapi/shared-glapi DESTDIR="${pkgdir}" install
make -C ${srcdir}/?esa-*/src/gbm DESTDIR="${pkgdir}" install
# fix linking because of splitted package - cleanup
make -C ${srcdir}/?esa-*/src/mapi/shared-glapi DESTDIR="${pkgdir}" uninstall
2012-05-20 17:21:46 +00:00
install -m755 -d "${pkgdir}/usr/share/licenses/libgbm"
install -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/libgbm/"
}
2011-03-03 18:06:38 +00:00
package_libgles() {
2012-10-14 16:42:59 +00:00
depends=('libglapi' 'libdrm' 'khrplatform-devel')
2011-03-03 18:06:38 +00:00
pkgdesc="Mesa GLES libraries and headers"
2012-10-14 16:42:59 +00:00
# fix linking because of splitted package
make -C ${srcdir}/?esa-*/src/mapi/shared-glapi DESTDIR="${pkgdir}" install
make -C ${srcdir}/?esa-*/src/mapi/es1api DESTDIR="${pkgdir}" install
make -C ${srcdir}/?esa-*/src/mapi/es2api DESTDIR="${pkgdir}" install
# fix linking because of splitted package - cleanup
make -C ${srcdir}/?esa-*/src/mapi/shared-glapi DESTDIR="${pkgdir}" uninstall
2011-03-03 18:06:38 +00:00
install -m755 -d "${pkgdir}/usr/share/licenses/libgles"
2011-07-09 01:07:48 +00:00
install -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/libgles/"
2011-03-03 18:06:38 +00:00
}
package_libegl() {
2012-10-14 16:42:59 +00:00
# check also egl.pc
depends=('libx11' 'libxext' 'libxdamage' 'libxfixes' 'libxxf86vm' 'libxcb' 'libgbm' 'khrplatform-devel')
2011-08-04 21:41:18 +00:00
pkgdesc="Mesa EGL libraries and headers"
2011-03-03 18:06:38 +00:00
2012-10-14 16:42:59 +00:00
make -C ${srcdir}/?esa-*/src/gallium/targets/egl-static DESTDIR="${pkgdir}" install
2011-03-03 18:06:38 +00:00
install -m755 -d "${pkgdir}/usr/share/doc/libegl"
2012-10-14 16:42:59 +00:00
install -m644 ${srcdir}/?esa-*/docs/egl.html "${pkgdir}/usr/share/doc/libegl/"
# fix linking because of splitted package
make -C ${srcdir}/?esa-*/src/mapi/shared-glapi DESTDIR="${pkgdir}" install
make -C ${srcdir}/?esa-*/src/gbm DESTDIR="${pkgdir}" install
make -C ${srcdir}/?esa-*/src/egl DESTDIR="${pkgdir}" install
# fix linking because of splitted package - cleanup
make -C ${srcdir}/?esa-*/src/gbm DESTDIR="${pkgdir}" uninstall
make -C ${srcdir}/?esa-*/src/mapi/shared-glapi DESTDIR="${pkgdir}" uninstall
2011-03-03 18:06:38 +00:00
install -m755 -d "${pkgdir}/usr/share/licenses/libegl"
2011-07-09 01:07:48 +00:00
install -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/libegl/"
2012-10-14 16:42:59 +00:00
# fix file conflicts
rm -rf ${pkgdir}/usr/include/KHR
2011-03-03 18:06:38 +00:00
}
2011-07-09 01:07:48 +00:00
2011-11-19 18:56:00 +00:00
package_khrplatform-devel() {
pkgdesc="Khronos platform development package"
install -m755 -d "${pkgdir}/usr/include/KHR"
2012-10-14 16:42:59 +00:00
install -m644 ${srcdir}/?esa-*/include/KHR/khrplatform.h "${pkgdir}/usr/include/KHR/"
2011-11-19 18:56:00 +00:00
install -m755 -d "${pkgdir}/usr/share/licenses/khrplatform-devel"
install -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/khrplatform-devel/"
}