From e5e8991f7910fff80f250faeee4c4880203682e6 Mon Sep 17 00:00:00 2001 From: Bart Ribbers Date: Tue, 11 Jun 2019 11:37:56 +0200 Subject: [PATCH] temp/mesa: fix install prefix, enable release optimizations (!431) The description below is a quote from Brian Masney in #296. The pmOS mesa packages need to have -Db_ndebug=true passed to the meson build so that debug assertions and extra validations are disabled to improve overall system performance. See [1] for more details. Fedora also recently made this change: [2] This change, along with using the master branch of mesa, gets the Freedreno driver working properly with X11 on the Nexus 5 and presumably other A3XX-based systems. --buildtype=release should also be passed to meson for extra optimizations. See the thread [3] for more details. [1] https://gitlab.freedesktop.org/mesa/mesa/blob/master/docs/meson.html#L321 [2] https://bugzilla.redhat.com/show_bug.cgi?id=1692426. [3] https://lists.freedesktop.org/archives/mesa-dev/2019-June/219960.html [ci:skip-build]: already built successfully in CI --- temp/mesa/APKBUILD | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/temp/mesa/APKBUILD b/temp/mesa/APKBUILD index 1953ee8ba..3d05e9904 100644 --- a/temp/mesa/APKBUILD +++ b/temp/mesa/APKBUILD @@ -2,7 +2,7 @@ pkgname=mesa pkgver=9999 _pkgver=19.1.0-rc1 -pkgrel=5 +pkgrel=6 pkgdesc="[${_pkgver}] Mesa DRI OpenGL library" url="https://www.mesa3d.org" arch="armhf armv7 aarch64" @@ -91,8 +91,6 @@ builddir="$srcdir/mesa-$pkgname-$_pkgver" build() { - cd "$builddir" - export CFLAGS="$CFLAGS -D_XOPEN_SOURCE=700" mkdir "$builddir"/build meson -Ddri-search-path="$_dri_driverdir" \ @@ -109,13 +107,14 @@ build() { -Dosmesa=gallium \ -Dgbm=true \ -Dglx-tls=false \ - -Dprefix="$pkgdir"/usr "$builddir"/build + -Db_ndebug=true \ + -Dprefix=/usr "$builddir"/build \ + --buildtype=release ninja -C "$builddir"/build } package() { - cd "$builddir" - ninja -C "$builddir"/build install + DESTDIR="$pkgdir" ninja -C "$builddir"/build install } egl() {