Commit 2a822bf7 authored by Taner Tas's avatar Taner Tas Committed by Natanael Copa

main/mesa: Upgrade to 18.0.1

* Clarify license
* Fix typo related with enabling vulkan drivers
* Add subpackages for ati and intel vulkan drivers
* Enable vc4 on aarch64
* Enable vaapi drivers, include them into corresponding mesa-dri packages
* Re-arrange configure options for easy reading
* --disable-asm and --enable_glx_rts options enabled on x86 only.
  * x86 build fails during packaging if asm enabled (TEXTREL)
  * since mesa has its own method to detect cross-compile environment, asm should not be disabled globally.
* Remove -j1 from package()
* Modernize APKBUILD
parent 574825b1
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=mesa
pkgver=17.3.6
pkgrel=1
pkgver=18.0.1
pkgrel=0
pkgdesc="Mesa DRI OpenGL library"
url="http://www.mesa3d.org"
arch="all"
license="LGPL"
license="MIT SGI-B-2.0 BSL-1.0"
subpackages="$pkgname-dev
$pkgname-dri-ati:_dri
$pkgname-dri-nouveau:_dri
......@@ -15,6 +15,7 @@ subpackages="$pkgname-dev
$pkgname-glapi $pkgname-egl $pkgname-gl $pkgname-gles
$pkgname-xatracker $pkgname-osmesa $pkgname-gbm
$pkgname-libwayland-egl:_wayland
$pkgname-vulkan-ati:_vulkan
"
_llvmver=5
depends_dev="libdrm-dev dri2proto libxext-dev libxdamage-dev libxcb-dev glproto
......@@ -23,7 +24,7 @@ makedepends="$depends_dev expat-dev xextproto python3 libxt-dev makedepend
talloc-dev py3-libxml2 flex bison llvm$_llvmver-dev eudev-dev libvdpau-dev
libxvmc-dev gettext zlib-dev wayland-dev libelf-dev py-mako
autoconf automake libtool libxxf86vm-dev libx11-dev libxfixes-dev
wayland-protocols"
wayland-protocols libva-dev"
source="https://mesa.freedesktop.org/archive/mesa-$pkgver.tar.xz
glx_ro_text_segm.patch
musl-fixes.patch
......@@ -37,19 +38,20 @@ _dri_drivers="r200,radeon,nouveau,swrast"
_gallium_drivers="r300,r600,radeonsi,nouveau,freedreno,swrast,virgl"
_vulkan_drivers="radeon"
builddir="$srcdir/mesa-$pkgver"
_arch_opts=
case "$CARCH" in
x86*)
_dri_drivers="${_dri_drivers},i915,i965"
_gallium_drivers="${_gallium_drivers},svga"
_vulcan_drivers="$_vulcan_drivers,intel"
subpackages="$subpackages $pkgname-dri-intel:_dri $pkgname-dri-vmwgfx:_dri"
_vulkan_drivers="$_vulkan_drivers,intel"
subpackages="$subpackages $pkgname-dri-intel:_dri $pkgname-dri-vmwgfx:_dri $pkgname-vulkan-intel:_vulkan"
_arch_opts="--enable-dri3"
case "$CARCH" in
x86) _arch_opts="$_arch_opts --enable-glx-rts --disable-asm";;
esac
;;
arm*)
armhf|aarch64)
_gallium_drivers="${_gallium_drivers},vc4"
case "$CARCH" in
armhf) CFLAGS="$CFLAGS -mfpu=neon";;
......@@ -59,11 +61,7 @@ esac
prepare() {
cd "$builddir"
for i in $source; do
case $i in
*.patch) msg $i; patch -p1 -i "$srcdir"/$i;;
esac
done
default_prepare
libtoolize --force \
&& aclocal \
&& automake --add-missing \
......@@ -80,36 +78,35 @@ build() {
--prefix=/usr \
--sysconfdir=/etc \
--with-dri-driverdir=$_dri_driverdir \
--disable-asm \
--disable-xvmc \
--enable-glx-rts \
--with-gallium-drivers=${_gallium_drivers} \
--with-dri-drivers=${_dri_drivers} \
--with-vulcan-drivers=${_vulkan_drivers} \
--with-vulkan-drivers=${_vulkan_drivers} \
--with-llvm-prefix=/usr/lib/llvm$_llvmver \
--with-platforms=x11,drm,wayland \
--enable-llvm \
--enable-llvm-shared-libs \
--with-platforms=x11,drm,wayland \
--enable-shared-glapi \
--enable-gbm \
--disable-glx-tls \
--disable-nine \
--enable-dri \
--enable-glx \
--enable-osmesa \
--enable-gallium-osmesa \
--enable-gles1 \
--enable-gles2 \
--enable-egl \
--enable-texture-float \
--enable-xa \
--enable-vdpau \
--enable-va \
--disable-xvmc \
--disable-glx-tls \
--disable-nine \
$_arch_opts
make
}
package() {
cd "$builddir"
make -j1 DESTDIR="$pkgdir" install
make DESTDIR="$pkgdir" install
}
egl() {
......@@ -197,6 +194,25 @@ _mv_gpipe() {
# done
}
_mv_vulkan() {
local i
install -d "$subpkgdir"/usr/lib
install -d "$subpkgdir"/usr/share/vulkan/icd.d
for i in "$@"; do
mv "$pkgdir"/usr/lib/libvulkan_${i}.so "$subpkgdir"/usr/lib/
mv "$pkgdir"/usr/share/vulkan/icd.d/${i}* "$subpkgdir"/usr/share/vulkan/icd.d/
done
}
_mv_va() {
local i
install -d "$subpkgdir"/usr/lib/dri
for i in "$@"; do
mv "$pkgdir"/usr/lib/dri/${i}_drv_video.so \
"$subpkgdir"/usr/lib/dri/
done
}
_dri() {
local n=${subpkgname##*-dri-}
pkgdesc="Mesa DRI driver for $n"
......@@ -205,7 +221,8 @@ _dri() {
ati)
_mv_dri radeon_dri r200_dri r300_dri r600_dri radeonsi_dri \
&& _mv_vdpau r300 r600 radeonsi \
&& _mv_gpipe r300 r600
&& _mv_gpipe r300 r600 \
&& _mv_va r600 radeonsi
;;
intel)
_mv_dri i915_dri i965_dri
......@@ -213,7 +230,8 @@ _dri() {
nouveau)
_mv_dri nouveau_dri nouveau_vieux_dri \
&& _mv_vdpau nouveau \
&& _mv_gpipe nouveau
&& _mv_gpipe nouveau \
&& _mv_va nouveau
;;
freedreno)
_mv_dri msm_dri kgsl_dri
......@@ -237,8 +255,19 @@ _wayland() {
mv "$pkgdir"/usr/lib/libwayland-egl.so.* "$subpkgdir"/usr/lib/
}
sha512sums="5164ed5a1d3d25031b712a9f443f0e467a29b2bca0a1aa11324ed5c10279411979c9c7482825053926a813e76c58b78a3439c7c81fcd51a7808f53977080828f mesa-17.3.6.tar.xz
_vulkan() {
local n=${subpkgname##*-vulkan-}
pkgdesc="Mesa Vulkan API driver for $n"
case $n in
ati)
_mv_vulkan radeon ;;
intel)
_mv_vulkan intel ;;
esac
}
sha512sums="b0d610904b6f179a27b42aee5f479339e341926915cdc6adb08ac999a4a12539abc3776577e86af83e10381d9703ef1bca70bab81b43daf2c000622c9c3612d2 mesa-18.0.1.tar.xz
c3d4804ebc24c7216e4c9d4995fb92e116be7f478024b44808ee134a4c93bb51d1f66fe5fb6eca254f124c4abf6f81272b027824b3e2650a9607818bf793035a glx_ro_text_segm.patch
163498ac0deaaa9ce19a1e12a8a6f3ab4b90fc97e0b65b25d595c0a01201a5daacb063614c53c26d7958e1daccfa94e3e313c83a8cdc04e29a56891230707bec musl-fixes.patch
9f7a050f09571a2b17098d495b82e2e85b293fb7285e7d6d7c3c48cd4220a1bdcc61a7321ba78dd14860939ecabe7e89b32d6110f3728f793273e1e26b78a553 musl-fixes.patch
f206c965b60131563ce920341042bdbd6911efe9e9d8edb5422c2c3490b42e903eb2260ba9549184c76a2f4692908706641818609c535efb9ed16f00ee4f6889 musl-fix-includes.patch
3409483217dbec732286e628e268e1e8cd392b7e8efb13c7651b38e6563aa5a4988279efb029096dcd092ebe7a92eece103014ed420d2b242eab8d0237f056fd drmdeps.patch"
......@@ -9,14 +9,3 @@
#include "pipe/p_compiler.h"
#include "pipe/p_state.h"
--- ./src/util/u_endian.h.orig
+++ ./src/util/u_endian.h
@@ -27,7 +27,7 @@
#ifndef U_ENDIAN_H
#define U_ENDIAN_H
-#if defined(__GLIBC__) || defined(ANDROID) || defined(__CYGWIN__)
+#if defined(__linux__) || defined(ANDROID) || defined(__CYGWIN__)
#include <endian.h>
#if __BYTE_ORDER == __LITTLE_ENDIAN
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment