mesa: reorganize dri subpackages by megadrivers instead of vendors

Mesa dri drivers for different vendors are actually hard links to
the same file, called a `megadriver`, so they are better grouped
in the same subpackage. This solves issues when stripping debug info.
This commit is contained in:
Stefano Ragni 2019-11-11 20:55:57 +01:00 committed by Juan RP
parent 9222ae62f2
commit 18e22ce3af
8 changed files with 156 additions and 123 deletions

1
srcpkgs/mesa-XvMC Symbolic link
View File

@ -0,0 +1 @@
mesa

1
srcpkgs/mesa-dri Symbolic link
View File

@ -0,0 +1 @@
mesa

1
srcpkgs/mesa-vaapi Symbolic link
View File

@ -0,0 +1 @@
mesa

1
srcpkgs/mesa-vdpau Symbolic link
View File

@ -0,0 +1 @@
mesa

1
srcpkgs/mesa-vulkan-intel Symbolic link
View File

@ -0,0 +1 @@
mesa

1
srcpkgs/mesa-vulkan-radeon Symbolic link
View File

@ -0,0 +1 @@
mesa

View File

@ -0,0 +1,15 @@
This patch is needed to retain the master .so, so that only that filename is
stripped while the related hard links are excluded.
diff --git bin/install_megadrivers.py bin/install_megadrivers.py
index 470137e..7d56def 100644
--- bin/install_megadrivers.py
+++ bin/install_megadrivers.py
@@ -71,7 +71,7 @@ def main():
os.chdir(ret)
# Remove meson-created master .so and symlinks
- os.unlink(master)
+ #os.unlink(master)
name, ext = os.path.splitext(master)
while ext != '.so':
if os.path.lexists(name):

View File

@ -1,7 +1,7 @@
# Template file for 'mesa'
pkgname=mesa
version=19.3.1
revision=1
revision=2
wrksrc="mesa-${version}"
build_style=meson
configure_args="-Dglvnd=true -Dshared-glapi=true -Dgbm=true -Degl=true
@ -46,8 +46,10 @@ i686*|x86_64*)
configure_args+=" -Dvulkan-overlay-layer=true"
hostmakedepends+=" clang"
makedepends+=" libclc-git"
subpackages+=" libxatracker mesa-ati-dri mesa-intel-dri mesa-nouveau-dri"
subpackages+=" mesa-vmwgfx-dri mesa-opencl mesa-vulkan-overlay-layer"
subpackages+=" libxatracker mesa-opencl mesa-dri mesa-vaapi mesa-vdpau"
subpackages+=" mesa-XvMC mesa-vulkan-intel mesa-vulkan-radeon mesa-vulkan-overlay-layer"
# Transitional dummy packages
subpackages+=" mesa-ati-dri mesa-intel-dri mesa-nouveau-dri mesa-vmwgfx-dri"
;;
ppc*)
# Enable all ppc drivers.
@ -63,14 +65,18 @@ ppc*)
esac
hostmakedepends+=" clang"
makedepends+=" libclc-git"
subpackages+=" mesa-opencl mesa-dri mesa-vaapi mesa-vdpau mesa-XvMC mesa-vulkan-radeon"
subpackages+=" mesa-vulkan-overlay-layer"
# Transitional dummy packages
subpackages+=" mesa-ati-dri mesa-nouveau-dri"
subpackages+=" mesa-opencl mesa-vulkan-overlay-layer"
;;
aarch64*)
# Enable all ARM drivers
configure_args+=" -Dgallium-drivers=etnaviv,freedreno,kmsro,lima,panfrost,nouveau,swrast,tegra,v3d,vc4"
configure_args+=" -Dvulkan-drivers= -Ddri-drivers="
configure_args+=" -Dgallium-xa=false -Ddri3=true"
subpackages+=" mesa-dri mesa-vaapi mesa-vdpau mesa-XvMC"
# Transitional dummy packages
subpackages+=" mesa-kmsro-dri mesa-tegra-dri mesa-nouveau-dri mesa-v3d-dri mesa-vc4-dri"
subpackages+=" mesa-etnaviv-dri mesa-freedreno-dri mesa-lima-dri mesa-panfrost-dri"
;;
@ -78,6 +84,8 @@ armv7l*)
configure_args+=" -Dgallium-drivers=etnaviv,freedreno,kmsro,lima,panfrost,swrast,vc4"
configure_args+=" -Dvulkan-drivers= -Ddri-drivers= -Dgallium-xvmc=false"
configure_args+=" -Dgallium-xa=false -Dgallium-vdpau=false -Dgallium-va=false"
subpackages+=" mesa-dri"
# Transitional dummy packages
subpackages+=" mesa-etnaviv-dri mesa-freedreno-dri mesa-kmsro-dri mesa-lima-dri mesa-panfrost-dri mesa-vc4-dri"
;;
*)
@ -86,6 +94,7 @@ armv7l*)
configure_args+=" -Ddri-drivers= -Dvulkan-drivers= -Dgallium-va=false"
configure_args+=" -Dgallium-vdpau=false -Dgallium-xvmc=false"
configure_args+=" -Dgallium-xa=false"
subpackages+=" mesa-dri"
;;
esac
@ -107,7 +116,6 @@ esac
case "$XBPS_TARGET_MACHINE" in
# Disable TLS with musl: https://gitlab.freedesktop.org/mesa/mesa/issues/966
# TODO: maybe this is handled by libglvnd now
*-musl) configure_args+=" -Duse-elf-tls=false";;
*) configure_args+=" -Dglx=dri";;
esac
@ -179,145 +187,77 @@ libxatracker_package() {
}
}
mesa-ati-dri_package() {
short_desc="Mesa DRI drivers for ATI GPUs"
mesa-opencl_package() {
short_desc="Mesa implementation of OpenCL (r600+ only)"
depends="libclc libOpenCL"
pkg_install() {
vmove etc/OpenCL
vmove "usr/lib/libMesaOpenCL.so.*"
}
}
mesa-dri_package() {
short_desc="Mesa DRI drivers"
depends="mesa-${version}_${revision}"
lib32files="/usr/share/vulkan/icd.d/radeon_icd.i686.json"
nostrip_files="armada-drm_dri.so etnaviv_dri.so exynos_dri.so
hx8357d_dri.so i915_dri.so i965_dri.so ili9225_dri.so ili9341_dri.so
imx-drm_dri.so kgsl_dri.so kms_swrast_dri.so lima_dri.so meson_dri.so
mi0283qt_dri.so msm_dri.so mxsfb-drm_dri.so nouveau_dri.so
nouveau_vieux_dri.so panfrost_dri.so pl111_dri.so r200_dri.so
r300_dri.so r600_dri.so radeon_dri.so radeonsi_dri.so repaper_dri.so
rockchip_dri.so st7586_dri.so st7735r_dri.so stm_dri.so
sun4i-drm_dri.so swrast_dri.so tegra_dri.so v3d_dri.so vc4_dri.so
virtio_gpu_dri.so vmwgfx_dri.so"
pkg_install() {
vmove "usr/lib/libXvMCr[36]00.so.*"
vmove "usr/lib/vdpau/libvdpau_r[36]00.so*"
vmove "usr/lib/vdpau/libvdpau_radeon*.so*"
vmove "usr/lib/xorg/modules/drivers/radeon*"
vmove "usr/lib/xorg/modules/drivers/r[236]00*"
vmove usr/lib/dri/r*
vmove "usr/share/vulkan/icd.d/radeon_icd*.json"
vmove "usr/lib/libvulkan_radeon.so"
vmove "usr/lib/gallium-pipe/pipe_r[36]00.so"
vmove usr/lib/gallium-pipe/pipe_radeonsi.so
vmove "usr/lib/xorg/modules/drivers";
if [ -d "$DESTDIR/usr/lib/gallium-pipe" ]; then
vmove "usr/lib/gallium-pipe/pipe_*.so"
fi
}
}
mesa-etnaviv-dri_package() {
short_desc="Mesa DRI drivers for Vivante GPUs"
depends="mesa-${verison}_${revision}"
mesa-vaapi_package() {
short_desc="Mesa VA-API drivers"
nostrip_files="nouveau_drv_video.so r600_drv_video.so radeonsi_drv_video.so"
pkg_install() {
vmove "usr/lib/xorg/modules/drivers/etnaviv*"
vmove "usr/lib/dri/*_drv_video.so"
}
}
mesa-freedreno-dri_package() {
short_desc="Mesa DRI drivers for Adreno GPUs"
depends="mesa-${verison}_${revision}"
mesa-vdpau_package() {
short_desc="Mesa VDPAU drivers"
nostrip_files="libvdpau_r300.so.1.0.0 libvdpau_r600.so.1.0.0
libvdpau_radeonsi.so.1.0.0 libvdpau_nouveau.so.1.0.0"
noshlibprovides=yes # manually set them in case they are needed
pkg_install() {
vmove "usr/lib/xorg/modules/drivers/msm*"
vmove "usr/lib/xorg/modules/drivers/kgsl*"
vmove "usr/lib/vdpau/libvdpau_*"
}
}
mesa-intel-dri_package() {
short_desc="Mesa DRI drivers for Intel GPUs"
depends="mesa-${version}_${revision}"
mesa-XvMC_package() {
short_desc="Mesa XvMC drivers"
nostrip_files="libXvMCnouveau.so.1.0.0 libXvMCr600.so.1.0.0"
noshlibprovides=yes # manually set them in case they are needed
pkg_install() {
vmove "usr/lib/libXvMC*"
}
}
mesa-vulkan-intel_package() {
short_desc="Mesa Intel Vulkan driver"
lib32files="/usr/share/vulkan/icd.d/intel_icd.i686.json"
pkg_install() {
vmove "usr/lib/xorg/modules/drivers/i9[16]5_dri.*"
vmove "usr/share/vulkan/icd.d/intel_icd*.json"
vmove "usr/lib/libvulkan_intel.so"
}
}
mesa-kmsro-dri_package() {
short_desc="KMS Render-only Mesa DRI drivers"
depends="mesa-${version}_${revision}"
mesa-vulkan-radeon_package() {
short_desc="Mesa Radeon Vulkan driver"
lib32files="/usr/share/vulkan/icd.d/radeon_icd.i686.json"
pkg_install() {
vmove "usr/lib/xorg/modules/drivers/armada*"
vmove "usr/lib/xorg/modules/drivers/exynos*"
vmove "usr/lib/xorg/modules/drivers/hx8357d*"
vmove "usr/lib/xorg/modules/drivers/ili9225*"
vmove "usr/lib/xorg/modules/drivers/ili9341*"
vmove "usr/lib/xorg/modules/drivers/imx*"
vmove "usr/lib/xorg/modules/drivers/meson*"
vmove "usr/lib/xorg/modules/drivers/mi0283qt*"
vmove "usr/lib/xorg/modules/drivers/mxsfb*"
vmove "usr/lib/xorg/modules/drivers/pl111*"
vmove "usr/lib/xorg/modules/drivers/repaper*"
vmove "usr/lib/xorg/modules/drivers/rockchip*"
vmove "usr/lib/xorg/modules/drivers/st7586*"
vmove "usr/lib/xorg/modules/drivers/st7735r*"
vmove "usr/lib/xorg/modules/drivers/stm*"
vmove "usr/lib/xorg/modules/drivers/sun4i*"
}
}
mesa-lima-dri_package() {
short_desc="Mesa DRI drivers for ARM Mali GPUs (Utgard)"
depends="mesa-${verison}_${revision}"
pkg_install() {
vmove "usr/lib/xorg/modules/drivers/lima*"
}
}
mesa-nouveau-dri_package() {
short_desc="Mesa DRI drivers for NVIDIA GPUs (nouveau dri)"
depends="mesa-${version}_${revision}"
pkg_install() {
vmove "usr/lib/libXvMCnouveau.so.*"
vmove "usr/lib/vdpau/libvdpau_nouveau.so*"
vmove "usr/lib/xorg/modules/drivers/nouveau*"
vmove "usr/lib/dri/nouveau*"
case "$XBPS_TARGET_MACHINE" in
aarch64*) ;;
*) vmove usr/lib/gallium-pipe/pipe_nouveau.so ;;
esac
}
}
mesa-panfrost-dri_package() {
short_desc="Mesa DRI drivers for ARM Mali GPUs (Midgard/Bifrost)"
depends="mesa-${verison}_${revision}"
pkg_install() {
vmove "usr/lib/xorg/modules/drivers/panfrost*"
}
}
mesa-vmwgfx-dri_package() {
short_desc="Mesa DRI drivers for VMware"
depends="mesa-${version}_${revision}"
pkg_install() {
vmove "usr/lib/xorg/modules/drivers/vmwgfx*"
vmove usr/lib/gallium-pipe/pipe_vmwgfx.so
}
}
mesa-v3d-dri_package() {
short_desc="Mesa DRI drivers for Videocore VI GPU"
depends="mesa-${verison}_${revision}"
pkg_install() {
vmove "usr/lib/xorg/modules/drivers/v3d*"
}
}
mesa-vc4-dri_package() {
short_desc="Mesa DRI drivers for Videocore IV GPU"
depends="mesa-${version}_${revision}"
pkg_install() {
vmove "usr/lib/xorg/modules/drivers/vc4*"
}
}
mesa-opencl_package() {
short_desc="Mesa implementation of OpenCL (r600+ only)"
depends="libclc libOpenCL mesa-${version}_${revision}"
pkg_install() {
vmove etc/OpenCL
vmove "usr/lib/libMesaOpenCL*"
}
}
mesa-tegra-dri_package() {
short_desc="Mesa DRI drivers for Tegra GPU"
depends="mesa-nouveau-dri-${version}_${revision}"
pkg_install() {
vmove "usr/lib/xorg/modules/drivers/tegra*"
vmove "usr/share/vulkan/icd.d/radeon_icd*.json"
vmove "usr/lib/libvulkan_radeon.so"
}
}
@ -328,3 +268,75 @@ mesa-vulkan-overlay-layer_package() {
vmove usr/share/vulkan/explicit_layer.d/VkLayer_MESA_overlay.json
}
}
mesa-ati-dri_package() {
build_style=meta
short_desc="Mesa DRI drivers for ATI GPUs (transitional dummy package)"
depends="mesa-dri mesa-vaapi mesa-vdpau mesa-XvMC mesa-vulkan-radeon"
}
mesa-etnaviv-dri_package() {
build_style=meta
short_desc="Mesa DRI drivers for Vivante GPUs (transitional dummy package)"
depends="mesa-dri"
}
mesa-freedreno-dri_package() {
build_style=meta
short_desc="Mesa DRI drivers for Adreno GPUs (transitional dummy package)"
depends="mesa-dri"
}
mesa-intel-dri_package() {
build_style=meta
short_desc="Mesa DRI drivers for Intel GPUs (transitional dummy package)"
depends="mesa-dri mesa-vulkan-intel"
}
mesa-kmsro-dri_package() {
build_style=meta
short_desc="KMS Render-only Mesa DRI drivers (transitional dummy package)"
depends="mesa-dri"
}
mesa-lima-dri_package() {
build_style=meta
short_desc="Mesa DRI drivers for Mali GPUs (Utgard) (transitional dummy package)"
depends="mesa-dri"
}
mesa-nouveau-dri_package() {
build_style=meta
short_desc="Mesa DRI drivers for NVIDIA GPUs (transitional dummy package)"
depends="mesa-dri mesa-vaapi mesa-vdpau mesa-XvMC"
}
mesa-panfrost-dri_package() {
build_style=meta
short_desc="Mesa DRI drivers for Mali GPUs (Midgard/Bifrost) (dummy package)"
depends="mesa-dri"
}
mesa-tegra-dri_package() {
build_style=meta
short_desc="Mesa DRI drivers for Tegra GPU (transitional dummy package)"
depends="mesa-dri"
}
mesa-v3d-dri_package() {
build_style=meta
short_desc="Mesa DRI drivers for Videocore VI GPU (transitional dummy package)"
depends="mesa-dri"
}
mesa-vmwgfx-dri_package() {
build_style=meta
short_desc="Mesa DRI drivers for VMware (transitional dummy package)"
depends="mesa-dri"
}
mesa-vc4-dri_package() {
build_style=meta
short_desc="Mesa DRI drivers for Videocore IV GPU (transitional dummy package)"
depends="mesa-dri"
}