From: voidlinux-github@inbox.vuxu.org
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] [WIP] xbps-src, libGL: fix debug symbols generation for mesa libraries
Date: Wed, 23 Oct 2019 13:39:29 +0200 [thread overview]
Message-ID: <20191023113929.RuHbGq3T2b44VYECaGRK5hIAeSGuq-xYxf-QeP0mG3E@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-15683@inbox.vuxu.org>
[-- Attachment #1: Type: text/plain, Size: 1155 bytes --]
There is an updated pull request by st3r4g against master on the void-packages repository
https://github.com/st3r4g/void-packages mesa-fix-dbg
https://github.com/void-linux/void-packages/pull/15683
[WIP] xbps-src, libGL: fix debug symbols generation for mesa libraries
Aims to fix #12760 and #15104
I believe that two things must be addressed in order to fix the issue:
1. `xbps-src` must be aware of hard links when stripping debug symbols.
2. `libGL` must be reorganized by creating a subpackage for each "megadriver" that creates hard links (hard links to the same megadriver must be together in the same subpackage).
This is currently just a first step, I moved all the hard links to `libmesa_dri_drivers.so` to a new subpackage `mesa-dri` as a first example. Next would be to create a new subpackage for the aliases to `libgallium_dri.so` and so on, while also removing the current separation by vendors. The final result is going to be a pretty big change in the template structure, so let me know whether it's a good idea or not before I go on.
A patch file from https://github.com/void-linux/void-packages/pull/15683.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-mesa-fix-dbg-15683.patch --]
[-- Type: text/x-diff, Size: 10324 bytes --]
From cc0dbbfc3484506c6d49243fe33ebdce6980c815 Mon Sep 17 00:00:00 2001
From: Stefano Ragni <st3r4g@protonmail.com>
Date: Tue, 22 Oct 2019 00:50:52 +0200
Subject: [PATCH] libGL: reorganize subpackages by megadrivers
Many Mesa libraries are hard links to the same file, called a
`megadriver`, so they should be grouped in the same subpackage.
---
.../libGL/patches/no-unlink-megadrivers.patch | 13 ++
srcpkgs/libGL/template | 140 ++++++++++++------
srcpkgs/{mesa-ati-dri => mesa-dri} | 0
srcpkgs/{mesa-intel-dri => mesa-gallium-XvMC} | 0
.../{mesa-nouveau-dri => mesa-gallium-dri} | 0
.../{mesa-vmwgfx-dri => mesa-gallium-vdpau} | 0
srcpkgs/mesa-vulkan-intel | 1 +
srcpkgs/mesa-vulkan-radeon | 1 +
8 files changed, 109 insertions(+), 46 deletions(-)
create mode 100644 srcpkgs/libGL/patches/no-unlink-megadrivers.patch
rename srcpkgs/{mesa-ati-dri => mesa-dri} (100%)
rename srcpkgs/{mesa-intel-dri => mesa-gallium-XvMC} (100%)
rename srcpkgs/{mesa-nouveau-dri => mesa-gallium-dri} (100%)
rename srcpkgs/{mesa-vmwgfx-dri => mesa-gallium-vdpau} (100%)
create mode 120000 srcpkgs/mesa-vulkan-intel
create mode 120000 srcpkgs/mesa-vulkan-radeon
diff --git a/srcpkgs/libGL/patches/no-unlink-megadrivers.patch b/srcpkgs/libGL/patches/no-unlink-megadrivers.patch
new file mode 100644
index 00000000000..b11e857b9c7
--- /dev/null
+++ b/srcpkgs/libGL/patches/no-unlink-megadrivers.patch
@@ -0,0 +1,13 @@
+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):
diff --git a/srcpkgs/libGL/template b/srcpkgs/libGL/template
index 3ce62fe073f..825fc79e460 100644
--- a/srcpkgs/libGL/template
+++ b/srcpkgs/libGL/template
@@ -1,7 +1,7 @@
# Template file for 'libGL'
pkgname=libGL
version=19.2.1
-revision=1
+revision=2
wrksrc="mesa-${version}"
build_style=meson
configure_args="-Dshared-glapi=true -Dgbm=true -Degl=true
@@ -40,8 +40,9 @@ i686*|x86_64*)
configure_args+=" -Dgallium-opencl=icd"
hostmakedepends+=" clang"
makedepends+=" libclc-git"
- subpackages+=" libxatracker mesa-ati-dri mesa-intel-dri mesa-nouveau-dri"
- subpackages+=" mesa-vmwgfx-dri mesa-opencl"
+ subpackages+=" libxatracker mesa-dri mesa-gallium-dri"
+ subpackages+=" mesa-gallium-vdpau mesa-gallium-XvMC"
+ subpackages+=" mesa-vulkan-intel mesa-vulkan-radeon mesa-opencl"
;;
ppc*)
# Enable all ppc drivers.
@@ -56,21 +57,23 @@ ppc*)
esac
hostmakedepends+=" clang"
makedepends+=" libclc-git"
- subpackages+=" mesa-ati-dri mesa-nouveau-dri"
- subpackages+=" mesa-opencl"
+ subpackages+=" mesa-dri mesa-gallium-dri"
+ subpackages+=" mesa-gallium-vdpau mesa-gallium-XvMC"
+ subpackages+=" mesa-vulkan-radeon mesa-opencl"
;;
aarch64*)
configure_args+=" -Dgallium-drivers=nouveau,tegra,swrast,vc4"
configure_args+=" -Dvulkan-drivers= -Ddri-drivers="
configure_args+=" -Dgallium-xa=false -Ddri3=true"
- subpackages+=" mesa-tegra-dri mesa-nouveau-dri mesa-vc4-dri"
+ subpackages+=" mesa-gallium-dri mesa-gallium-vdpau mesa-gallium-XvMC"
+ subpackages+=" mesa-tegra-dri mesa-vc4-dri"
;;
armv7l*)
# Enable Videocore IV and swrast for RaspberryPi
configure_args+=" -Dgallium-drivers=swrast,vc4"
configure_args+=" -Dvulkan-drivers= -Ddri-drivers= -Dgallium-xvmc=false"
configure_args+=" -Dgallium-xa=false -Dgallium-vdpau=false -Dgallium-va=false"
- subpackages+=" mesa-vc4-dri"
+ subpackages+=" mesa-gallium-dri mesa-vc4-dri"
;;
*)
# Enable swrast driver.
@@ -78,6 +81,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-gallium-dri"
;;
esac
@@ -106,6 +110,7 @@ esac
post_install() {
vlicense docs/license.html
vmkdir usr/lib/xorg/modules/extensions
+# TODO: This file is not installed in musl
ln -s libglx-xorg.so ${DESTDIR}/usr/lib/xorg/modules/extensions/libglx.so
case "$XBPS_TARGET_MACHINE" in
i686*)
@@ -175,59 +180,95 @@ libxatracker_package() {
}
}
-mesa-ati-dri_package() {
- short_desc="Mesa DRI drivers for ATI GPUs"
- lib32files="/usr/share/vulkan/icd.d/radeon_icd.i686.json"
+mesa-dri_package() {
+ short_desc="Mesa classic DRI drivers"
+ nostrip_files="i915_dri.so i965_dri.so nouveau_vieux_dri.so r200_dri.so
+ radeon_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/i9[16]5_dri.so"
+ vmove "usr/lib/xorg/modules/drivers/nouveau_vieux_dri.so"
+ vmove "usr/lib/xorg/modules/drivers/r200_dri.so"
+ vmove "usr/lib/xorg/modules/drivers/radeon_dri.so"
+ vmove "usr/lib/xorg/modules/drivers/libmesa_dri_drivers.so"
}
}
-mesa-intel-dri_package() {
- short_desc="Mesa DRI drivers for Intel GPUs"
- lib32files="/usr/share/vulkan/icd.d/intel_icd.i686.json"
+mesa-gallium-dri_package() {
+ short_desc="Mesa Gallium DRI drivers"
+ nostrip_files="radeonsi_dri.so nouveau_dri.so swrast_dri.so
+ kms_swrast_dri.so r300_dri.so r600_dri.so vmwgfx_dri.so
+ virtio_gpu_dri.so"
+ nostrip_files+=" nouveau_drv_video.so r600_drv_video.so
+ radeonsi_drv_video.so"
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"
+ case "$XBPS_TARGET_MACHINE" in
+ i686*|x86_64*)
+ vmove "usr/lib/dri/*_drv_video.so"
+ vmove "usr/lib/gallium-pipe/pipe_*.so"
+ vmove "usr/lib/xorg/modules/drivers/nouveau_dri.so"
+ vmove "usr/lib/xorg/modules/drivers/r[36]00_dri.so"
+ vmove "usr/lib/xorg/modules/drivers/radeonsi_dri.so"
+ vmove "usr/lib/xorg/modules/drivers/virtio_gpu_dri.so"
+ vmove "usr/lib/xorg/modules/drivers/vmwgfx_dri.so"
+ ;;
+ aarch64*)
+ vmove "usr/lib/dri/*_drv_video.so"
+ vmove "usr/lib/xorg/modules/drivers/nouveau_dri.so"
+ ;;
+# TODO: the ppc*) case
+ esac
+ vmove "usr/lib/xorg/modules/drivers/*swrast_dri.so"
+ vmove "usr/lib/xorg/modules/drivers/libgallium_dri.so"
}
}
-mesa-nouveau-dri_package() {
- short_desc="Mesa DRI drivers for NVIDIA GPUs (nouveau dri)"
+mesa-gallium-vdpau_package() {
+ short_desc="Mesa Gallium VDPAU"
+ 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"
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
+ vmove "usr/lib/vdpau/libvdpau_*.so.*"
+# case "$XBPS_TARGET_MACHINE" in
+# i686*|x86_64*)
+# vmove "usr/lib/vdpau/libvdpau_*.so.*"
+# ;;
+# aarch64*)
+# vmove "usr/lib/vdpau/libvdpau_nouveau.so.*"
+# ;;
+# esac
}
}
-mesa-vmwgfx-dri_package() {
- short_desc="Mesa DRI drivers for VMware"
+mesa-gallium-XvMC_package() {
+ short_desc="Mesa Gallium XvMC"
+ nostrip_files="libXvMCnouveau.so.1.0.0 libXvMCr600.so.1.0.0"
pkg_install() {
- vmove "usr/lib/xorg/modules/drivers/vmwgfx*"
- vmove usr/lib/gallium-pipe/pipe_vmwgfx.so
+ vmove "usr/lib/libXvMC*.so.*"
+# case "$XBPS_TARGET_MACHINE" in
+# i686*|x86_64*)
+# vmove "usr/lib/libXvMC*.so.*"
+# ;;
+# aarch64*)
+# vmove "usr/lib/libXvMCnouveau.so.*"
+# esac
}
}
-mesa-vc4-dri_package() {
- short_desc="Mesa DRI drivers for Videocore IV GPU"
+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/vc4*"
+ vmove "usr/share/vulkan/icd.d/radeon_icd*.json"
+ vmove "usr/lib/libvulkan_radeon.so"
+ }
+}
+
+mesa-vulkan-intel_package() {
+ short_desc="Mesa Intel Vulkan driver"
+ lib32files="/usr/share/vulkan/icd.d/intel_icd.i686.json"
+ pkg_install() {
+ vmove "usr/share/vulkan/icd.d/intel_icd*.json"
+ vmove "usr/lib/libvulkan_intel.so"
}
}
@@ -236,13 +277,20 @@ mesa-opencl_package() {
depends="libclc libOpenCL"
pkg_install() {
vmove etc/OpenCL
- vmove "usr/lib/libMesaOpenCL*"
+ vmove "usr/lib/libMesaOpenCL.so.*"
+ }
+}
+
+mesa-vc4-dri_package() {
+ short_desc="Mesa DRI drivers for Videocore IV GPU"
+ pkg_install() {
+ vmove "usr/lib/xorg/modules/drivers/vc4*"
}
}
mesa-tegra-dri_package() {
- short_desc="Mesa DRI drivers for Tegra GPU"
- depends="mesa-nouveau-dri"
+ short_desc="Mesa Gallium DRI drivers for Tegra GPU"
+ depends="mesa-gallium-dri"
pkg_install() {
vmove "usr/lib/xorg/modules/drivers/tegra*"
}
diff --git a/srcpkgs/mesa-ati-dri b/srcpkgs/mesa-dri
similarity index 100%
rename from srcpkgs/mesa-ati-dri
rename to srcpkgs/mesa-dri
diff --git a/srcpkgs/mesa-intel-dri b/srcpkgs/mesa-gallium-XvMC
similarity index 100%
rename from srcpkgs/mesa-intel-dri
rename to srcpkgs/mesa-gallium-XvMC
diff --git a/srcpkgs/mesa-nouveau-dri b/srcpkgs/mesa-gallium-dri
similarity index 100%
rename from srcpkgs/mesa-nouveau-dri
rename to srcpkgs/mesa-gallium-dri
diff --git a/srcpkgs/mesa-vmwgfx-dri b/srcpkgs/mesa-gallium-vdpau
similarity index 100%
rename from srcpkgs/mesa-vmwgfx-dri
rename to srcpkgs/mesa-gallium-vdpau
diff --git a/srcpkgs/mesa-vulkan-intel b/srcpkgs/mesa-vulkan-intel
new file mode 120000
index 00000000000..5ef01dc565e
--- /dev/null
+++ b/srcpkgs/mesa-vulkan-intel
@@ -0,0 +1 @@
+libGL
\ No newline at end of file
diff --git a/srcpkgs/mesa-vulkan-radeon b/srcpkgs/mesa-vulkan-radeon
new file mode 120000
index 00000000000..5ef01dc565e
--- /dev/null
+++ b/srcpkgs/mesa-vulkan-radeon
@@ -0,0 +1 @@
+libGL
\ No newline at end of file
next prev parent reply other threads:[~2019-10-23 11:39 UTC|newest]
Thread overview: 73+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-21 23:34 [PR PATCH] " voidlinux-github
2019-10-22 9:20 ` [PR PATCH] [Updated] " voidlinux-github
2019-10-22 9:20 ` voidlinux-github
2019-10-22 9:30 ` voidlinux-github
2019-10-22 9:30 ` voidlinux-github
2019-10-22 10:15 ` [PR PATCH] [Updated] " voidlinux-github
2019-10-22 10:15 ` voidlinux-github
2019-10-22 15:17 ` voidlinux-github
2019-10-22 15:17 ` voidlinux-github
2019-10-22 22:30 ` voidlinux-github
2019-10-22 22:30 ` voidlinux-github
2019-10-22 23:32 ` voidlinux-github
2019-10-22 23:34 ` voidlinux-github
2019-10-22 23:39 ` voidlinux-github
2019-10-23 11:39 ` voidlinux-github [this message]
2019-10-23 11:39 ` [PR PATCH] [Updated] " voidlinux-github
2019-10-23 11:47 ` [WIP] " voidlinux-github
2019-10-23 11:48 ` voidlinux-github
2019-10-23 11:49 ` voidlinux-github
2019-10-23 11:55 ` voidlinux-github
2019-10-23 11:57 ` voidlinux-github
2019-10-23 15:19 ` [PR PATCH] [Updated] " voidlinux-github
2019-10-23 15:19 ` voidlinux-github
2019-10-23 15:26 ` voidlinux-github
2019-10-24 12:41 ` voidlinux-github
2019-10-24 12:41 ` voidlinux-github
2019-10-24 13:47 ` [PR PATCH] [Updated] " voidlinux-github
2019-10-24 13:47 ` voidlinux-github
2019-10-24 13:47 ` voidlinux-github
2019-10-26 12:56 ` [PR PATCH] [Updated] [RFC] libGL: reorganize dri drivers subpkgs (fixes debug info) voidlinux-github
2019-10-26 12:56 ` voidlinux-github
2019-10-26 13:01 ` voidlinux-github
2019-10-26 13:01 ` voidlinux-github
2019-10-26 13:03 ` voidlinux-github
2019-10-26 13:16 ` voidlinux-github
2019-10-26 13:17 ` voidlinux-github
2019-10-26 13:18 ` voidlinux-github
2019-10-27 6:17 ` voidlinux-github
2019-10-27 10:55 ` voidlinux-github
2019-10-27 10:58 ` voidlinux-github
2019-10-27 10:58 ` voidlinux-github
2019-10-27 11:00 ` voidlinux-github
2019-10-27 11:04 ` voidlinux-github
2019-10-27 11:07 ` voidlinux-github
2019-10-27 11:10 ` voidlinux-github
2019-10-27 11:23 ` voidlinux-github
2019-10-27 11:24 ` voidlinux-github
2019-10-27 11:34 ` voidlinux-github
2019-10-27 11:36 ` voidlinux-github
2019-10-27 11:51 ` [PR PATCH] [Updated] " voidlinux-github
2019-10-27 11:51 ` voidlinux-github
2019-10-27 12:00 ` voidlinux-github
2019-10-27 15:24 ` voidlinux-github
2019-11-02 10:14 ` voidlinux-github
2019-11-02 12:55 ` voidlinux-github
2019-11-10 10:15 ` voidlinux-github
2019-11-10 10:17 ` voidlinux-github
2019-11-10 10:36 ` voidlinux-github
2019-11-11 20:13 ` [PR PATCH] [Updated] " voidlinux-github
2019-11-11 20:19 ` voidlinux-github
2019-11-11 20:20 ` voidlinux-github
2019-11-11 20:21 ` voidlinux-github
2019-12-25 7:40 ` [RFC] mesa: " voidlinux-github
2019-12-25 7:41 ` voidlinux-github
2019-12-25 15:48 ` voidlinux-github
2019-12-25 19:05 ` [PR PATCH] [Closed]: " voidlinux-github
2019-12-27 17:03 ` voidlinux-github
2019-12-27 17:06 ` voidlinux-github
2019-12-27 17:06 ` voidlinux-github
2019-12-27 17:09 ` voidlinux-github
2019-12-27 17:53 ` voidlinux-github
2019-12-27 18:42 ` voidlinux-github
2019-12-27 18:42 ` voidlinux-github
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191023113929.RuHbGq3T2b44VYECaGRK5hIAeSGuq-xYxf-QeP0mG3E@z \
--to=voidlinux-github@inbox.vuxu.org \
--cc=ml@inbox.vuxu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).