diff --git a/srcpkgs/mesa/patches/megadriver-symlinks.patch b/srcpkgs/mesa/patches/megadriver-symlinks.patch new file mode 100644 index 00000000000..c19c4271942 --- /dev/null +++ b/srcpkgs/mesa/patches/megadriver-symlinks.patch @@ -0,0 +1,25 @@ +This converts megadriver installation to use symlinks so that we do +not have to deal with skipping the strip stage for some files, as +a result simplifying our template greatly. + +--- a/bin/install_megadrivers.py ++++ b/bin/install_megadrivers.py +@@ -56,7 +56,7 @@ def main(): + if os.path.lexists(abs_driver): + os.unlink(abs_driver) + print('installing {} to {}'.format(args.megadriver, abs_driver)) +- os.link(master, abs_driver) ++ os.symlink(os.path.basename(master), abs_driver) + + try: + ret = os.getcwd() +@@ -71,8 +71,7 @@ def main(): + finally: + os.chdir(ret) + +- # Remove meson-created master .so and symlinks +- os.unlink(master) ++ # Remove meson-created symlinks + name, ext = os.path.splitext(master) + while ext != '.so': + if os.path.lexists(name): diff --git a/srcpkgs/mesa/patches/no-unlink-megadrivers.patch b/srcpkgs/mesa/patches/no-unlink-megadrivers.patch deleted file mode 100644 index acad4dd6390..00000000000 --- a/srcpkgs/mesa/patches/no-unlink-megadrivers.patch +++ /dev/null @@ -1,15 +0,0 @@ -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 ---- a/bin/install_megadrivers.py -+++ b/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/mesa/template b/srcpkgs/mesa/template index 37ba69371a4..6c3b705002c 100644 --- a/srcpkgs/mesa/template +++ b/srcpkgs/mesa/template @@ -1,7 +1,7 @@ # Template file for 'mesa' pkgname=mesa version=21.2.5 -revision=1 +revision=2 build_style=meson configure_args="-Dglvnd=true -Dshared-glapi=enabled -Dgbm=enabled -Degl=enabled -Dosmesa=true -Dgles1=enabled -Dgles2=enabled -Dglx=dri -Ddri3=enabled @@ -264,17 +264,15 @@ 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 libglvnd-devel - libOSMesa>=${version}_${revision} libgbm-devel>=${version}_${revision} - mesa>=${version}_${revision}" + depends="mesa>=${version}_${revision} libOSMesa>=${version}_${revision} + libgbm-devel>=${version}_${revision}" if [ "$_have_vmware" ]; then depends+=" libxatracker>=${version}_${revision}" fi if [ "$_have_opencl" ]; then depends+=" mesa-opencl>=${version}_${revision}" fi + depends+=" libdrm-devel libglvnd-devel" short_desc+=" - development files" pkg_install() { vmove usr/include @@ -304,6 +302,7 @@ mesa-opencl_package() { depends="libclc" pkg_install() { vmove etc/OpenCL + vmove usr/lib/gallium-pipe vmove "usr/lib/libMesaOpenCL.so.*" } } @@ -313,14 +312,7 @@ mesa-dri_package() { depends="mesa-${version}_${revision}" shlib_provides="libgallium_dri.so" # workaround for mesa-dri-32bit pkg_install() { - # Only strip each megadriver once, via its master filename - nostrip_files=$(find "${DESTDIR}/usr/lib/dri" \ - ! -name 'libmesa_dri_drivers.so' ! -name 'libgallium_dri.so' \ - -type f -printf '%f ') - vmove "usr/lib/dri" - if [ -d "$DESTDIR/usr/lib/gallium-pipe" ]; then - vmove "usr/lib/gallium-pipe/pipe_*.so" - fi + vmove usr/lib/dri } } @@ -328,8 +320,6 @@ mesa-vaapi_package() { short_desc="Mesa VA-API drivers" shlib_provides="libgallium_drv_video.so" # workaround for mesa-vaapi-32bit pkg_install() { - nostrip_files=$(find "${DESTDIR}/usr/lib/dri" \ - ! -name 'libgallium_drv_video.so' -type f -printf '%f ') vmove "usr/lib/dri/*_drv_video.so" } } @@ -337,8 +327,6 @@ mesa-vaapi_package() { mesa-vdpau_package() { short_desc="Mesa VDPAU drivers" pkg_install() { - nostrip_files=$(find "${DESTDIR}/usr/lib/vdpau" \ - ! -name 'libvdpau_gallium.so*' -type f -printf '%f ') vmove "usr/lib/vdpau/libvdpau_*" } } @@ -346,8 +334,6 @@ mesa-vdpau_package() { mesa-XvMC_package() { short_desc="Mesa XvMC drivers" pkg_install() { - nostrip_files=$(find "${DESTDIR}/usr/lib/libXvMC"* \ - ! -name 'libXvMCgallium.so' -type f -printf '%f ') vmove "usr/lib/libXvMC*" } }