Skip to content

Instantly share code, notes, and snippets.

@ChristophHaag
Last active April 27, 2018 16:57
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ChristophHaag/11f6e7ef577d6f35a2debd64963fdbdf to your computer and use it in GitHub Desktop.
Save ChristophHaag/11f6e7ef577d6f35a2debd64963fdbdf to your computer and use it in GitHub Desktop.
PKGBUILD mesa git for tegra
pkgname=mesa-full-tegra
pkgver=r100838.c9b153fea7
_realver=18.0
pkgrel=1
pkgdesc="Full Mesa 3D graphics library with all its components, built from the git master branch. Compiles tegra"
arch=(armv7h)
url="http://mesa3d.org/"
license=('LGPL')
depends=('libdrm' 'dri2proto' 'glproto' 'libxxf86vm' 'libxdamage' 'expat>=2.0.1' 'libxmu' 'talloc' 'llvm' 'wayland' 'libxvmc' 'python2-mako' 'libxcb')
makedepends=('pkgconfig' 'imake' 'xorg-server-devel' 'meson')
provides=("'mesa-git' 'mesa-dri' 'opencl-mesa' mesa-libgl=${_realver}" "libgl=${_realver}" "mesa=${_realver}" 'libglapi' 'libegl' 'libgles' 'libgbm' 'khrplatform-devel')
conflicts=('libgl' 'mesa' 'mesa-full-i915g' 'libglapi' 'libegl' 'libgles' 'khrplatform-devel')
source=("git+https://github.com/mesa3d/mesa.git")
md5sums=('SKIP')
export LANG=en_US.utf8 # meson sometimes doesn't like other locales
prepare() {
cd mesa
meson --prefix="/usr/" \
--libdir="lib" \
-Dbuildtype=release \
-Dplatforms=x11,drm,wayland \
-Ddri-drivers= \
-Dvulkan-drivers= \
-Dgallium-drivers=nouveau,tegra \
-Dgles1=true \
-Dgles2=true \
-Degl=true \
-Dshared-glapi=true \
-Dgallium-extra-hud=false \
-Dgallium-nine=false \
-Dtexture-float=true \
-Dgallium-vdpau=false \
-Dgallium-va=false \
-Dgallium-omx=disabled \
-Dlibunwind=false \
build
}
build() {
msg "Starting make..."
cd mesa
ninja -C build
}
package() {
cd mesa
DESTDIR="${pkgdir}" ninja -C build install
install -m755 -d "${pkgdir}/usr/lib/xorg/modules/extensions"
rm -f "$pkgdir"/usr/include/vulkan/vk_platform.h
rm -f "$pkgdir"/usr/include/vulkan/vulkan.h
}
pkgver() {
cd mesa
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment