From 82232c2d17a58267cce764bf0d5a26044433af0b Mon Sep 17 00:00:00 2001 From: Juan RP Date: Sun, 1 Dec 2019 15:58:24 +0100 Subject: [PATCH] mesa: renamed from libGL; switch to glvnd by default. Based on work by Stefano Ragni on #16497 Tested on x86_64-musl with and without elogind, as well as with or without root rights on intel. --- srcpkgs/MesaLib-devel | 2 +- srcpkgs/libEGL | 1 - srcpkgs/libGLES | 1 - srcpkgs/libOSMesa | 2 +- srcpkgs/libgbm | 2 +- srcpkgs/libglapi | 2 +- srcpkgs/libxatracker | 2 +- srcpkgs/mesa-ati-dri | 2 +- srcpkgs/mesa-intel-dri | 2 +- srcpkgs/mesa-nouveau-dri | 2 +- srcpkgs/mesa-opencl | 2 +- srcpkgs/mesa-tegra-dri | 2 +- srcpkgs/mesa-vc4-dri | 2 +- srcpkgs/mesa-vmwgfx-dri | 2 +- .../patches/add-use-elf-tls.patch | 0 .../patches/fix-build-ppc64.patch | 0 .../patches/fix-i686-cross.patch | 0 .../patches/fix-libXvMC-versioning.patch | 0 .../{libGL => mesa}/patches/musl-endian.patch | 0 .../patches/musl-stacksize.patch | 0 srcpkgs/{libGL => mesa}/patches/musl.patch | 0 .../{libGL => mesa}/patches/ppc-auxval.patch | 0 srcpkgs/{libGL => mesa}/template | 47 ++++++++----------- srcpkgs/{libGL => mesa}/update | 0 24 files changed, 32 insertions(+), 41 deletions(-) delete mode 120000 srcpkgs/libEGL delete mode 120000 srcpkgs/libGLES rename srcpkgs/{libGL => mesa}/patches/add-use-elf-tls.patch (100%) rename srcpkgs/{libGL => mesa}/patches/fix-build-ppc64.patch (100%) rename srcpkgs/{libGL => mesa}/patches/fix-i686-cross.patch (100%) rename srcpkgs/{libGL => mesa}/patches/fix-libXvMC-versioning.patch (100%) rename srcpkgs/{libGL => mesa}/patches/musl-endian.patch (100%) rename srcpkgs/{libGL => mesa}/patches/musl-stacksize.patch (100%) rename srcpkgs/{libGL => mesa}/patches/musl.patch (100%) rename srcpkgs/{libGL => mesa}/patches/ppc-auxval.patch (100%) rename srcpkgs/{libGL => mesa}/template (90%) rename srcpkgs/{libGL => mesa}/update (100%) diff --git a/srcpkgs/MesaLib-devel b/srcpkgs/MesaLib-devel index 5ef01dc565..1ad1bbec7a 120000 --- a/srcpkgs/MesaLib-devel +++ b/srcpkgs/MesaLib-devel @@ -1 +1 @@ -libGL \ No newline at end of file +mesa \ No newline at end of file diff --git a/srcpkgs/libEGL b/srcpkgs/libEGL deleted file mode 120000 index 5ef01dc565..0000000000 --- a/srcpkgs/libEGL +++ /dev/null @@ -1 +0,0 @@ -libGL \ No newline at end of file diff --git a/srcpkgs/libGLES b/srcpkgs/libGLES deleted file mode 120000 index 5ef01dc565..0000000000 --- a/srcpkgs/libGLES +++ /dev/null @@ -1 +0,0 @@ -libGL \ No newline at end of file diff --git a/srcpkgs/libOSMesa b/srcpkgs/libOSMesa index 5ef01dc565..1ad1bbec7a 120000 --- a/srcpkgs/libOSMesa +++ b/srcpkgs/libOSMesa @@ -1 +1 @@ -libGL \ No newline at end of file +mesa \ No newline at end of file diff --git a/srcpkgs/libgbm b/srcpkgs/libgbm index 5ef01dc565..1ad1bbec7a 120000 --- a/srcpkgs/libgbm +++ b/srcpkgs/libgbm @@ -1 +1 @@ -libGL \ No newline at end of file +mesa \ No newline at end of file diff --git a/srcpkgs/libglapi b/srcpkgs/libglapi index 5ef01dc565..1ad1bbec7a 120000 --- a/srcpkgs/libglapi +++ b/srcpkgs/libglapi @@ -1 +1 @@ -libGL \ No newline at end of file +mesa \ No newline at end of file diff --git a/srcpkgs/libxatracker b/srcpkgs/libxatracker index 5ef01dc565..1ad1bbec7a 120000 --- a/srcpkgs/libxatracker +++ b/srcpkgs/libxatracker @@ -1 +1 @@ -libGL \ No newline at end of file +mesa \ No newline at end of file diff --git a/srcpkgs/mesa-ati-dri b/srcpkgs/mesa-ati-dri index 5ef01dc565..1ad1bbec7a 120000 --- a/srcpkgs/mesa-ati-dri +++ b/srcpkgs/mesa-ati-dri @@ -1 +1 @@ -libGL \ No newline at end of file +mesa \ No newline at end of file diff --git a/srcpkgs/mesa-intel-dri b/srcpkgs/mesa-intel-dri index 5ef01dc565..1ad1bbec7a 120000 --- a/srcpkgs/mesa-intel-dri +++ b/srcpkgs/mesa-intel-dri @@ -1 +1 @@ -libGL \ No newline at end of file +mesa \ No newline at end of file diff --git a/srcpkgs/mesa-nouveau-dri b/srcpkgs/mesa-nouveau-dri index 5ef01dc565..1ad1bbec7a 120000 --- a/srcpkgs/mesa-nouveau-dri +++ b/srcpkgs/mesa-nouveau-dri @@ -1 +1 @@ -libGL \ No newline at end of file +mesa \ No newline at end of file diff --git a/srcpkgs/mesa-opencl b/srcpkgs/mesa-opencl index 5ef01dc565..1ad1bbec7a 120000 --- a/srcpkgs/mesa-opencl +++ b/srcpkgs/mesa-opencl @@ -1 +1 @@ -libGL \ No newline at end of file +mesa \ No newline at end of file diff --git a/srcpkgs/mesa-tegra-dri b/srcpkgs/mesa-tegra-dri index 5ef01dc565..1ad1bbec7a 120000 --- a/srcpkgs/mesa-tegra-dri +++ b/srcpkgs/mesa-tegra-dri @@ -1 +1 @@ -libGL \ No newline at end of file +mesa \ No newline at end of file diff --git a/srcpkgs/mesa-vc4-dri b/srcpkgs/mesa-vc4-dri index 5ef01dc565..1ad1bbec7a 120000 --- a/srcpkgs/mesa-vc4-dri +++ b/srcpkgs/mesa-vc4-dri @@ -1 +1 @@ -libGL \ No newline at end of file +mesa \ No newline at end of file diff --git a/srcpkgs/mesa-vmwgfx-dri b/srcpkgs/mesa-vmwgfx-dri index 5ef01dc565..1ad1bbec7a 120000 --- a/srcpkgs/mesa-vmwgfx-dri +++ b/srcpkgs/mesa-vmwgfx-dri @@ -1 +1 @@ -libGL \ No newline at end of file +mesa \ No newline at end of file diff --git a/srcpkgs/libGL/patches/add-use-elf-tls.patch b/srcpkgs/mesa/patches/add-use-elf-tls.patch similarity index 100% rename from srcpkgs/libGL/patches/add-use-elf-tls.patch rename to srcpkgs/mesa/patches/add-use-elf-tls.patch diff --git a/srcpkgs/libGL/patches/fix-build-ppc64.patch b/srcpkgs/mesa/patches/fix-build-ppc64.patch similarity index 100% rename from srcpkgs/libGL/patches/fix-build-ppc64.patch rename to srcpkgs/mesa/patches/fix-build-ppc64.patch diff --git a/srcpkgs/libGL/patches/fix-i686-cross.patch b/srcpkgs/mesa/patches/fix-i686-cross.patch similarity index 100% rename from srcpkgs/libGL/patches/fix-i686-cross.patch rename to srcpkgs/mesa/patches/fix-i686-cross.patch diff --git a/srcpkgs/libGL/patches/fix-libXvMC-versioning.patch b/srcpkgs/mesa/patches/fix-libXvMC-versioning.patch similarity index 100% rename from srcpkgs/libGL/patches/fix-libXvMC-versioning.patch rename to srcpkgs/mesa/patches/fix-libXvMC-versioning.patch diff --git a/srcpkgs/libGL/patches/musl-endian.patch b/srcpkgs/mesa/patches/musl-endian.patch similarity index 100% rename from srcpkgs/libGL/patches/musl-endian.patch rename to srcpkgs/mesa/patches/musl-endian.patch diff --git a/srcpkgs/libGL/patches/musl-stacksize.patch b/srcpkgs/mesa/patches/musl-stacksize.patch similarity index 100% rename from srcpkgs/libGL/patches/musl-stacksize.patch rename to srcpkgs/mesa/patches/musl-stacksize.patch diff --git a/srcpkgs/libGL/patches/musl.patch b/srcpkgs/mesa/patches/musl.patch similarity index 100% rename from srcpkgs/libGL/patches/musl.patch rename to srcpkgs/mesa/patches/musl.patch diff --git a/srcpkgs/libGL/patches/ppc-auxval.patch b/srcpkgs/mesa/patches/ppc-auxval.patch similarity index 100% rename from srcpkgs/libGL/patches/ppc-auxval.patch rename to srcpkgs/mesa/patches/ppc-auxval.patch diff --git a/srcpkgs/libGL/template b/srcpkgs/mesa/template similarity index 90% rename from srcpkgs/libGL/template rename to srcpkgs/mesa/template index c84356d536..d67e2c32db 100644 --- a/srcpkgs/libGL/template +++ b/srcpkgs/mesa/template @@ -1,10 +1,10 @@ -# Template file for 'libGL' -pkgname=libGL +# Template file for 'mesa' +pkgname=mesa version=19.2.5 -revision=1 +revision=2 wrksrc="mesa-${version}" build_style=meson -configure_args="-Dshared-glapi=true -Dgbm=true -Degl=true +configure_args="-Dglvnd=true -Dshared-glapi=true -Dgbm=true -Degl=true -Dgallium-vdpau=true -Dgallium-xvmc=true -Dosmesa=gallium -Dgles1=true -Dgles2=true -Dgallium-va=true -Dlmsensors=true -Dplatforms=x11,drm,$(vopt_if wayland wayland,)surfaceless -Dllvm=true @@ -15,7 +15,8 @@ makedepends="elfutils-devel expat-devel libXdamage-devel libXvMC-devel libXxf86vm-devel libatomic-devel libdrm-devel libffi-devel libva-devel libvdpau-devel libxshmfence-devel ncurses-devel talloc-devel zlib-devel $(vopt_if wayland 'wayland-devel wayland-protocols') llvm - libsensors-devel libXrandr-devel" + libsensors-devel libXrandr-devel libglvnd-devel" +depends="libglvnd" short_desc="Graphics library similar to SGI's OpenGL" maintainer="Orphaned " license="MIT, LGPL-2.1-or-later" @@ -28,7 +29,10 @@ build_options="wayland" build_options_default="wayland" # Set subpackages manually to set proper rdeps in 32bit pkgs. -subpackages="libglapi libgbm libEGL libGLES libOSMesa" +subpackages="libglapi libgbm libOSMesa" + +# Replace old mesa pkgs, superseded by libglvnd. +replaces="libGL>=10_1<19.2.5_2 libEGL>=10_1<19.2.5_2 libGLES>=10_1<19.2.5_2" case "$XBPS_TARGET_MACHINE" in i686*|x86_64*) @@ -99,6 +103,7 @@ esac case "$XBPS_TARGET_MACHINE" in # Disable TLS with musl: https://bugs.freedesktop.org/show_bug.cgi?id=35268 + # TODO: maybe this is handled by libglvnd now *-musl) configure_args+=" -Duse-elf-tls=false";; *) configure_args+=" -Dglx=dri";; esac @@ -115,8 +120,6 @@ post_configure() { post_install() { vlicense docs/license.html - vmkdir usr/lib/xorg/modules/extensions - ln -s libglx-xorg.so ${DESTDIR}/usr/lib/xorg/modules/extensions/libglx.so case "$XBPS_TARGET_MACHINE" in i686*) vsed -e 's#/usr/lib/#/usr/lib32/#g' \ @@ -140,20 +143,6 @@ libgbm_package() { } } -libEGL_package() { - short_desc="Free implementation of the EGL API - runtime" - pkg_install() { - vmove "usr/lib/libEGL*.so.*" - } -} - -libGLES_package() { - short_desc="Free implementation of the OpenGL|ES 1.x and 2.x API" - pkg_install() { - vmove "usr/lib/libGLES*.so.*" - } -} - libOSMesa_package() { short_desc="Mesa Off-Screen interface library" pkg_install() { @@ -164,9 +153,8 @@ libOSMesa_package() { MesaLib-devel_package() { depends="xorgproto libxshmfence-devel libXext-devel libXxf86vm-devel libXdamage-devel expat-devel libXfixes-devel libX11-devel libxcb-devel - libdrm-devel libGL>=${version}_${revision} libEGL>=${version}_${revision} - libOSMesa>=${version}_${revision} libgbm>=${version}_${revision} - libGLES>=${version}_${revision}" + libdrm-devel libglvnd-devel + libOSMesa>=${version}_${revision} libgbm>=${version}_${revision}" case "$XBPS_TARGET_MACHINE" in i686*|x86_64*) depends+=" libxatracker>=${version}_${revision}";; esac @@ -187,6 +175,7 @@ libxatracker_package() { mesa-ati-dri_package() { short_desc="Mesa DRI drivers for ATI GPUs" + depends="mesa-${version}_${revision}" lib32files="/usr/share/vulkan/icd.d/radeon_icd.i686.json" pkg_install() { vmove "usr/lib/libXvMCr[36]00.so.*" @@ -204,6 +193,7 @@ mesa-ati-dri_package() { mesa-intel-dri_package() { short_desc="Mesa DRI drivers for Intel GPUs" + depends="mesa-${version}_${revision}" lib32files="/usr/share/vulkan/icd.d/intel_icd.i686.json" pkg_install() { vmove "usr/lib/xorg/modules/drivers/i9[16]5_dri.*" @@ -214,6 +204,7 @@ mesa-intel-dri_package() { 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*" @@ -228,6 +219,7 @@ mesa-nouveau-dri_package() { 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 @@ -236,6 +228,7 @@ mesa-vmwgfx-dri_package() { 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*" } @@ -243,7 +236,7 @@ mesa-vc4-dri_package() { mesa-opencl_package() { short_desc="Mesa implementation of OpenCL (r600+ only)" - depends="libclc libOpenCL" + depends="libclc libOpenCL mesa-${version}_${revision}" pkg_install() { vmove etc/OpenCL vmove "usr/lib/libMesaOpenCL*" @@ -252,7 +245,7 @@ mesa-opencl_package() { mesa-tegra-dri_package() { short_desc="Mesa DRI drivers for Tegra GPU" - depends="mesa-nouveau-dri" + depends="mesa-nouveau-dri-${version}_${revision}" pkg_install() { vmove "usr/lib/xorg/modules/drivers/tegra*" } diff --git a/srcpkgs/libGL/update b/srcpkgs/mesa/update similarity index 100% rename from srcpkgs/libGL/update rename to srcpkgs/mesa/update