Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Arch Linux AUR PKGBUILD for lib32-mesa-git
# Maintainer: Jesse Jaara <gmail.com: jesse.jaara>
# Contributor: Kristian Klausen <hotmail.com: klausenbusk>
# Contributor: Egon Ashrafinia <gmail.com: e.ashrafinia>
# Contributor: Tavian Barnes <gmail.com: tavianator>
# Contributor: Jan de Groot <archlinux.org: jgc>
# Contributor: Andreas Radke <archlinux.org: andyrtr>
# Contributor: Thomas Dziedzic <gmail: gostrc>
# Contributor: Antti "Tera" Oja <gmail.com: antti.bofh>
# Contributor: Diego Jose <gmail.com: diegoxter1006>
pkgbase=lib32-mesa-git
pkgname=lib32-mesa-git
true && pkgname=('lib32-ati-dri-git' 'lib32-intel-dri-git' \
'lib32-nouveau-dri-git' 'lib32-svga-dri-git'\
'lib32-mesa-git' 'lib32-mesa-libgl-git')
pkgver=9.2_devel.56723
pkgrel=1
arch=('i686' 'x86_64')
_llvm=$(pacman -Qq | egrep --max-count=1 'lib32-llvm-amdgpu-git|lib32-llvm-amdgpu-svn|lib32-llvm-r600-svn' || echo lib32-llvm-amdgpu-snapshot)
makedepends=('git' 'glproto' 'lib32-libdrm' 'lib32-libxxf86vm'
'lib32-libxdamage' 'lib32-expat' 'lib32-libx11'
'lib32-libxt' 'gcc-multilib' 'dri2proto' 'python2'
'lib32-libxml2' 'imake' 'lib32-talloc' 'lib32-libvdpau'
"$_llvm" 'patchelf')
url="http://mesa3d.sourceforge.net"
license=('custom')
options=(!libtool)
source=('mesa::git+http://anongit.freedesktop.org/git/mesa/mesa.git#branch=master' 'LICENSE')
sha512sums=('SKIP' '25da77914dded10c1f432ebcbf29941124138824ceecaf1367b3deedafaecabc082d463abcfa3d15abff59f177491472b505bcb5ba0c4a51bb6b93b4721a23c2')
pkgver() {
cd "mesa"
echo $(grep --max-count=1 "PACKAGE_VERSION=" Makefile.am | cut -f2 -d = | tr "-" "_" | tr -d ' ').$(git rev-list --count HEAD)
}
build() {
export CC="gcc -m32"
export CXX="g++ -m32"
export PKG_CONFIG_PATH="/usr/lib32/pkgconfig"
export LLVM_CONFIG="/usr/bin/llvm-config32"
cd "${srcdir}/mesa"
#################
# Apply patches
#################
msg "Applying patches..."
local i patches
for i in "${source[@]}"; do
i=${i##*/}
[[ $i =~ .*\.patch$ ]] && patches=("${patches[@]}" "$srcdir/$i")
[[ ${i%.*} =~ .*\.patch$ ]] && patches=("${patches[@]}" "$srcdir/${i%.*}")
done
shopt -s nullglob
for i in "${patches[@]}" "$startdir/patches/"*; do
msg2 "Applying ${i##*/}..."
patch -Np1 -i "$i" || (error "Applying ${i##*/} failed" && return 1)
done
shopt -u nullglob
./autogen.sh --prefix=/usr \
--sysconfdir=/etc \
--with-dri-driverdir=/usr/lib32/xorg/modules/dri \
--with-gallium-drivers=r300,r600,radeonsi,nouveau,svga,swrast \
--with-dri-drivers=i915,i965,r200,radeon,nouveau,swrast \
--enable-gallium-llvm \
--enable-r600-llvm-compiler \
--with-llvm-shared-libs \
--enable-egl \
--enable-gallium-egl\
--with-egl-platforms=x11,drm \
--enable-shared-glapi \
--enable-gbm \
--enable-glx-tls \
--enable-dri \
--enable-glx \
--enable-osmesa \
--enable-gles1 \
--enable-gles2 \
--enable-texture-float \
--enable-xa \
--enable-vdpau \
--enable-32-bit \
--libdir=/usr/lib32
make
# fake installation
mkdir -p "${srcdir}/fakeinstall"
make DESTDIR="${srcdir}/fakeinstall" install
}
package_lib32-ati-dri-git () {
pkgdesc="32bit Mesa drivers for AMD/ATI Radeon"
depends=("lib32-mesa-libgl=$(cut -f-2 -d . <<< ${pkgver/_/-})" 'lib32-elfutils')
conflicts=('lib32-ati-dri' 'xf86-video-ati<6.9.0-6')
provides=('lib32-ati-dri')
install -m755 -d "${pkgdir}"/usr/lib32/vdpau/
mv -v "${srcdir}"/fakeinstall/usr/lib32/vdpau/libvdpau_{r300,r600,radeonsi}.* \
"${pkgdir}"/usr/lib32/vdpau/
install -m755 -d "${pkgdir}"/usr/lib32/xorg/modules/dri
mv -v "${srcdir}"/fakeinstall/usr/lib32/xorg/modules/dri/{r200,r300,r600,radeon,radeonsi}_dri.so \
"${pkgdir}"/usr/lib32/xorg/modules/dri/
install -m755 -d "${pkgdir}"/usr/lib32/gallium-pipe
mv -v "${srcdir}"/fakeinstall/usr/lib32/gallium-pipe/pipe_{r300,r600,radeonsi}* \
"${pkgdir}"/usr/lib32/gallium-pipe/
install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}"
install -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/"
}
package_lib32-intel-dri-git () {
pkgdesc="32bit Mesa drivers for Intel"
depends=("lib32-mesa-libgl=$(cut -f-2 -d . <<< ${pkgver/_/-})")
conflicts=('lib32-intel-dri')
provides=('lib32-intel-dri')
install -m755 -d "${pkgdir}"/usr/lib32/xorg/modules/dri
mv -v "${srcdir}"/fakeinstall/usr/lib32/xorg/modules/dri/{i915,i965}_dri.so \
"${pkgdir}"/usr/lib32/xorg/modules/dri/
install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}"
install -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/"
}
package_lib32-nouveau-dri-git () {
pkgdesc="32bit Mesa drivers for Nouveau"
depends=("lib32-mesa-libgl=$(cut -f-2 -d . <<< ${pkgver/_/-})")
conflicts=('lib32-nouveau-dri')
provides=('lib32-nouveau-dri')
install -m755 -d "${pkgdir}"/usr/lib32/vdpau/
mv -v "${srcdir}"/fakeinstall/usr/lib32/vdpau/libvdpau_nouveau.* \
"${pkgdir}"/usr/lib32/vdpau/
install -m755 -d "${pkgdir}"/usr/lib32/xorg/modules/dri
mv -v "${srcdir}"/fakeinstall/usr/lib32/xorg/modules/dri/nouveau_{dri,vieux_dri}.so \
"${pkgdir}"/usr/lib32/xorg/modules/dri/
install -m755 -d "${pkgdir}"/usr/lib32/gallium-pipe
mv -v "${srcdir}"/fakeinstall/usr/lib32/gallium-pipe/pipe_nouveau* \
"${pkgdir}"/usr/lib32/gallium-pipe/
install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}"
install -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/"
}
package_lib32-svga-dri-git () {
pkgdesc="Gallium3D VMware guest GL driver"
depends=('lib32-gcc-libs' 'lib32-libdrm' 'lib32-expat' 'lib32-libffi')
conflicts=('lib32-svga-dri')
provides=('lib32-svga-dri')
install -m755 -d "${pkgdir}"/usr/lib32/xorg/modules/dri
mv -v "${srcdir}"/fakeinstall/usr/lib32/xorg/modules/dri/vmwgfx_dri.so \
"${pkgdir}"/usr/lib32/xorg/modules/dri/
install -m755 -d "${pkgdir}"/usr/lib32/gallium-pipe
mv -v "${srcdir}"/fakeinstall/usr/lib32/gallium-pipe/pipe_vmwgfx* \
"${pkgdir}"/usr/lib32/gallium-pipe/
install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}"
install -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/"
}
package_lib32-mesa-git () {
pkgdesc="an open-source implementation of the OpenGL specification"
depends=("mesa=$(cut -f-2 -d . <<< ${pkgver/_/-})" 'lib32-libdrm' "$_llvm" 'lib32-expat' 'lib32-libvdpau' 'lib32-libxxf86vm' 'lib32-libxdamage' 'lib32-systemd')
optdepends=('opengl-man-pages: for the OpenGL API man pages')
provides=("lib32-mesa=$(cut -f-2 -d . <<< ${pkgver/_/-})" 'lib32-libglapi' 'lib32-osmesa' 'lib32-libgbm' 'lib32-libgles' 'lib32-libegl' 'lib32-khrplatform-devel')
conflicts=('lib32-mesa' 'lib32-libglapi' 'lib32-osmesa' 'lib32-libgbm' 'lib32-libgles' 'lib32-libegl' 'lib32-khrplatform-devel')
replaces=('lib32-libglapi' 'lib32-osmesa' 'lib32-libgbm' 'lib32-libgles' 'lib32-libegl' 'lib32-khrplatform-devel')
mv -v "${srcdir}"/fakeinstall/* "${pkgdir}"
# rename libgl.so to not conflict with blobs - may break gl.pc ?
mv "${pkgdir}"/usr/lib32/libGL.so.1.2.0 "${pkgdir}"/usr/lib32/mesa-libGL.so.1.2.0
rm "${pkgdir}"/usr/lib32/libGL.so{,.1}
rm -r "${pkgdir}"/usr/include
# remove drirc, it is provided by mesa-git
rm "${pkgdir}"/etc/drirc
install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}"
install -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/"
}
package_lib32-mesa-libgl-git () {
pkgdesc="Mesa 3-D graphics library"
depends=("lib32-mesa=$(cut -f-2 -d . <<< ${pkgver/_/-})")
provides=("lib32-mesa-libgl=$(cut -f-2 -d . <<< ${pkgver/_/-})" "lib32-libgl=$(cut -f-2 -d . <<< ${pkgver/_/-})")
conflicts=('lib32-mesa-libgl')
replaces=('lib32-libgl')
# See FS#26284
install -m755 -d "${pkgdir}/usr/lib32/xorg/modules/extensions"
ln -s libglx.xorg "${pkgdir}/usr/lib32/xorg/modules/extensions/libglx.so"
ln -s mesa-libGL.so.1.2.0 "${pkgdir}/usr/lib32/libGL.so"
ln -s mesa-libGL.so.1.2.0 "${pkgdir}/usr/lib32/libGL.so.1"
ln -s mesa-libGL.so.1.2.0 "${pkgdir}/usr/lib32/libGL.so.1.2.0"
install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}"
install -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.