From a49f691f4989c6273ceec6f293a6b3013bb16696 Mon Sep 17 00:00:00 2001 From: Luca Weiss Date: Tue, 14 May 2019 17:21:02 +0200 Subject: [PATCH] temp/mesa: fix symlink, refactor, split dri-kmsro (!362) Fix missing symlink for the first driver in mv_dri() (caused by "shift" at the wrong position). Build freedreno for arm only, not for all arches. Lima is for rendering and sun4i-drm (part of kmsro) for the display, so split it into its own subpackage and use it in device-pine-*. [ci:skip-build]: ollieparanoid made sure, that this builds. This won't finish in time in CI. --- device/device-pine-a64lts/APKBUILD | 4 +- device/device-pine-dontbeevil/APKBUILD | 4 +- temp/mesa/APKBUILD | 89 +++++++++++++------------- 3 files changed, 49 insertions(+), 48 deletions(-) diff --git a/device/device-pine-a64lts/APKBUILD b/device/device-pine-a64lts/APKBUILD index 32256b402..c69cca7d5 100644 --- a/device/device-pine-a64lts/APKBUILD +++ b/device/device-pine-a64lts/APKBUILD @@ -2,13 +2,13 @@ pkgname="device-pine-a64lts" pkgdesc="PINE A64-LTS" pkgver=0.2 -pkgrel=1 +pkgrel=2 url="https://postmarketos.org" license="MIT" arch="aarch64" options="!check !archcheck" subpackages="$pkgname-nonfree-firmware:nonfree_firmware" -depends="postmarketos-base linux-postmarketos-allwinner u-boot-pine64 uboot-tools mesa mesa-dri-lima" +depends="postmarketos-base linux-postmarketos-allwinner u-boot-pine64 uboot-tools mesa mesa-dri-lima mesa-dri-kmsro" makedepends="devicepkg-dev" source=" deviceinfo diff --git a/device/device-pine-dontbeevil/APKBUILD b/device/device-pine-dontbeevil/APKBUILD index 90adc8835..c483fab11 100644 --- a/device/device-pine-dontbeevil/APKBUILD +++ b/device/device-pine-dontbeevil/APKBUILD @@ -2,13 +2,13 @@ pkgname="device-pine-dontbeevil" pkgdesc="PINE64 PinePhone Don't be evil devkit" pkgver=0.1 -pkgrel=4 +pkgrel=5 url="https://postmarketos.org" license="MIT" arch="aarch64" options="!check !archcheck" subpackages="$pkgname-weston $pkgname-x11 $pkgname-nonfree-firmware:nonfree_firmware" -depends="postmarketos-base linux-postmarketos-allwinner u-boot-pine64 uboot-tools mesa mesa-dri-lima" +depends="postmarketos-base linux-postmarketos-allwinner u-boot-pine64 uboot-tools mesa mesa-dri-lima mesa-dri-kmsro" makedepends="devicepkg-dev" source=" deviceinfo diff --git a/temp/mesa/APKBUILD b/temp/mesa/APKBUILD index c0838a0a2..98bd00354 100644 --- a/temp/mesa/APKBUILD +++ b/temp/mesa/APKBUILD @@ -5,20 +5,15 @@ pkgname=mesa pkgver=9999 _pkgver=19.1.0-rc1 -pkgrel=3 +pkgrel=4 pkgdesc="[${_pkgver}] Mesa DRI OpenGL library" url="https://www.mesa3d.org" arch="armhf armv7 aarch64" license="MIT SGI-B-2.0 BSL-1.0" subpackages=" $pkgname-dev - $pkgname-dri-swrast:_dri - $pkgname-dri-nouveau:_dri - $pkgname-dri-freedreno:_dri - $pkgname-dri-virtio:_dri $pkgname-glapi $pkgname-egl $pkgname-gl $pkgname-gles $pkgname-osmesa $pkgname-gbm $pkgname-xatracker - " depends_dev=" libdrm-dev @@ -67,27 +62,32 @@ replaces="mesa-dricore" _dri_driverdir=/usr/lib/dri _dri_driverdir_x11=/usr/lib/xorg/modules/dri _dri_drivers="nouveau" -_gallium_drivers="swrast,freedreno,virgl,nouveau" -_vulkan_drivers="" +_gallium_drivers="swrast,virgl,nouveau" +subpackages="$subpackages + $pkgname-dri-swrast:_dri + $pkgname-dri-virgl:_dri + $pkgname-dri-nouveau:_dri" case "$CARCH" in x86*) _dri_drivers="${_dri_drivers},i915,i965" _gallium_drivers="${_gallium_drivers},svga" _vulkan_drivers="${_vulkan_drivers},amd,intel" - subpackages="$subpackages \ + subpackages="$subpackages $pkgname-dri-intel:_dri \ $pkgname-dri-vmwgfx:_dri" ;; armhf|aarch64) - _gallium_drivers="${_gallium_drivers},vc4,kmsro,etnaviv,tegra,panfrost,lima" + _gallium_drivers="${_gallium_drivers},kmsro,vc4,freedreno,panfrost,etnaviv,tegra,lima" _vulkan_drivers="${_vulkan_drivers}" - subpackages="$subpackages $pkgname-dri-vc4:_dri - $pkgname-dri-etnaviv:_dri - $pkgname-dri-imx:_dri - $pkgname-dri-tegra:_dri - $pkgname-dri-lima:_dri - $pkgname-dri-panfrost:_dri" + subpackages="$subpackages + $pkgname-dri-kmsro:_dri + $pkgname-dri-vc4:_dri + $pkgname-dri-freedreno:_dri + $pkgname-dri-panfrost:_dri + $pkgname-dri-etnaviv:_dri + $pkgname-dri-tegra:_dri + $pkgname-dri-lima:_dri" ;; esac builddir="$srcdir/mesa-$pkgname-$_pkgver" @@ -183,10 +183,9 @@ _mv_dri() { while [ $# -gt 0 ]; do mv "$pkgdir"/$_dri_driverdir/${1}.so \ "$subpkgdir"/$_dri_driverdir/ - shift - ln -s $_dri_driverdir/${1}.so \ "$subpkgdir"/$_dri_driverdir_x11/${1}.so + shift done } @@ -227,45 +226,47 @@ _dri() { pkgdesc="[${_pkgver}] Mesa DRI driver for $n" case $n in + swrast) + _mv_dri swrast_dri kms_swrast_dri \ + && _mv_gpipe swrast + ;; intel) _mv_dri i915_dri i965_dri ;; - freedreno) - _mv_dri msm_dri kgsl_dri - ;; - swrast) - _mv_dri swrast_dri kms_swrast_dri && _mv_gpipe swrast - ;; - vc4) - _mv_dri vc4_dri - ;; - vmwgfx) - _mv_dri vmwgfx_dri && _mv_gpipe vmwgfx - ;; - virtio) - _mv_dri virtio_gpu_dri - ;; - etnaviv) - _mv_dri etnaviv_dri - ;; - imx) - _mv_dri imx-drm_dri - ;; - tegra) - _mv_dri tegra_dri - ;; nouveau) _mv_dri nouveau_dri nouveau_vieux_dri \ && _mv_vdpau nouveau \ && _mv_gpipe nouveau \ && _mv_va nouveau ;; - lima) - _mv_dri lima_dri sun4i-drm_dri + vmwgfx) + _mv_dri vmwgfx_dri \ + && _mv_gpipe vmwgfx + ;; + freedreno) + _mv_dri msm_dri kgsl_dri + ;; + virgl) + _mv_dri virtio_gpu_dri + ;; + vc4) + _mv_dri vc4_dri ;; panfrost) _mv_dri panfrost_dri ;; + etnaviv) + _mv_dri armada-drm_dri imx-drm_dri etnaviv_dri + ;; + tegra) + _mv_dri tegra_dri + ;; + kmsro) + _mv_dri exynos_dri hx8357d_dri ili9225_dri ili9341_dri meson_dri mi0283qt_dri pl111_dri repaper_dri rockchip_dri st7586 st7735r sun4i-drm_dri + ;; + lima) + _mv_dri lima_dri + ;; esac }