From 64e02ccb1fcd7dfa70e1ef0e8b53dc29ea53bc32 Mon Sep 17 00:00:00 2001 From: LionHeartP Date: Thu, 8 May 2025 21:58:58 +0300 Subject: [PATCH] mesa: add mesa-compat and rebuild wine-staging --- .../Mesa-MLAA-License-Clarification-Email.txt | 117 +++++++++++++++++ baseos/mesa-compat/mesa-compat.spec | 122 ++++++++++++++++++ baseos/wine-staging/wine-staging.spec | 19 +-- 3 files changed, 249 insertions(+), 9 deletions(-) create mode 100644 baseos/mesa-compat/Mesa-MLAA-License-Clarification-Email.txt create mode 100644 baseos/mesa-compat/mesa-compat.spec diff --git a/baseos/mesa-compat/Mesa-MLAA-License-Clarification-Email.txt b/baseos/mesa-compat/Mesa-MLAA-License-Clarification-Email.txt new file mode 100644 index 0000000..30bdf2e --- /dev/null +++ b/baseos/mesa-compat/Mesa-MLAA-License-Clarification-Email.txt @@ -0,0 +1,117 @@ + +Subject: RE: Question about Mesa MLAA license +From: Jorge Jimenez +Date: 01/08/2013 12:50 PM +To: Tom Callaway +CC: "jorge@iryoku.com" + +Yes to both questions. + +Thanks, +Jorge + +From: Tom Callaway +Sent: January 8, 2013 6:49 PM +To: Jorge Jimenez +CC: jorge@iryoku.com +Subject: Re: Question about Mesa MLAA license + +On 01/08/2013 12:39 PM, Jorge Jimenez wrote: +> Hi Tom, +> +> What we meant with that is that we made an exception for clause 2. +> Instead of clause 2, in the case of the Mesa project, you have to name +> the technique Jimenez's MLAA in the config options of Mesa. We did that +> just to allow them to solve license issues. This exception should be for +> the Mesa project, and any project using Mesa, like Fedora. +> +> We want to widespread usage of our MLAA, so we want to avoid any kind of +> license complications. Hope current one is good for Fedora, if not +> please tell, and we'll see what we can do! + +Okay, a few more questions: + +* If Fedora decides to simply reproduce the quoted statement: +"Uses Jimenez's MLAA. Copyright (C) 2010 by Jorge Jimenez, Belen Masia, +Jose I. Echevarria, Fernando Navarro and Diego Gutierrez." + +Specifically, if this is done as part of documentation included with +Mesa, is that sufficient to meet clause 2 even if the Mesa config option +is not set as described in your exception? + +* Currently, the Mesa config option for MLAA says: "Morphological +anti-aliasing based on Jimenez\' MLAA. 0 to disable, 8 for default +quality". Is this in compliance with your exception? + +Thanks again, + +~tom + +== +Fedora Project + +Subject: RE: Question about Mesa MLAA license +From: Jorge Jimenez +Date: 01/08/2013 12:39 PM +To: "jorge@iryoku.com" , Tom Callaway + +Hi Tom, + +What we meant with that is that we made an exception for clause 2. +Instead of clause 2, in the case of the Mesa project, you have to name +the technique Jimenez's MLAA in the config options of Mesa. We did that +just to allow them to solve license issues. This exception should be for +the Mesa project, and any project using Mesa, like Fedora. + +We want to widespread usage of our MLAA, so we want to avoid any kind of +license complications. Hope current one is good for Fedora, if not +please tell, and we'll see what we can do! + +Cheers, +Jorge + +From: Tom Callaway +Sent: January 8, 2013 6:30 PM +To: jorge@iryoku.com +Subject: Question about Mesa MLAA license + +Jorge, + +Thanks for all of your fantastic graphics work! I have been auditing +Fedora (a popular distribution of Linux) for license compliance and I +came across your MLAA code in Mesa. + +The license says: + + * 2. Redistributions in binary form must reproduce the following +statement: + * + * "Uses Jimenez's MLAA. Copyright (C) 2010 by Jorge Jimenez, Belen Masia, + * Jose I. Echevarria, Fernando Navarro and Diego Gutierrez." + * + * Only for use in the Mesa project, this point 2 is filled by naming the + * technique Jimenez's MLAA in the Mesa config options. + +That wording is unclear. When you say "Only for use in the Mesa +project...", it seems like you could either be saying: + +- This code may only be used as part of Mesa. + +OR + +- In Mesa, you can comply with clause 2 by simply selecting "Jimenez's +MLAA" in the Mesa config options. + +***** + +If the first item is true, then we may have to remove the MLAA code from +Fedora's copy of Mesa. However, looking at the license on your SMAA +code, I do not believe it to be the case. Please let me know either way! + +Thanks in advance, + +Tom Callaway +Fedora Legal + +== +Fedora Project diff --git a/baseos/mesa-compat/mesa-compat.spec b/baseos/mesa-compat/mesa-compat.spec new file mode 100644 index 0000000..552d1ea --- /dev/null +++ b/baseos/mesa-compat/mesa-compat.spec @@ -0,0 +1,122 @@ +%global origname mesa + +Name: %{origname}-compat +Summary: Mesa graphics libraries - legacy compatibility libraries +%global ver 25.0.4 +Version: %{lua:ver = string.gsub(rpm.expand("%{ver}"), "-", "~"); print(ver)} +Release: %autorelease +License: MIT AND BSD-3-Clause AND SGI-B-2.0 +URL: http://www.mesa3d.org + +Source0: https://archive.mesa3d.org/mesa-%{ver}.tar.xz +# src/gallium/auxiliary/postprocess/pp_mlaa* have an ... interestingly worded license. +# Source1 contains email correspondence clarifying the license terms. +# Fedora opts to ignore the optional part of clause 2 and treat that code as 2 clause BSD. +Source1: Mesa-MLAA-License-Clarification-Email.txt + +BuildRequires: meson >= 1.3.0 +BuildRequires: gcc +BuildRequires: gcc-c++ +BuildRequires: gettext +%if 0%{?with_hardware} +BuildRequires: kernel-headers +%endif +BuildRequires: pkgconfig(expat) +BuildRequires: pkgconfig(zlib) >= 1.2.3 +BuildRequires: pkgconfig(libzstd) +BuildRequires: bison +BuildRequires: flex +BuildRequires: pkgconfig(libelf) +BuildRequires: llvm-devel >= 7.0.0 +BuildRequires: libdrm-devel +BuildRequires: python3-devel +BuildRequires: python3-mako +BuildRequires: python3-pycparser +BuildRequires: python3-pyyaml + +%description +%{summary}. + +%package libOSMesa +Summary: Mesa offscreen rendering libraries +Provides: libOSMesa +Provides: libOSMesa%{?_isa} +# New things should not rely on this as this library is dead upstream +Provides: deprecated() + +%description libOSMesa +%{summary}. + +%package libOSMesa-devel +Summary: Mesa offscreen rendering development package +Requires: %{name}-libOSMesa%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} +# New things should not rely on this as this library is dead upstream +Provides: deprecated() + +%description libOSMesa-devel +%{summary}. + +%prep +%autosetup -n %{origname}-%{ver} -p1 +cp %{SOURCE1} docs/ + +%build +# We've gotten a report that enabling LTO for mesa breaks some games. See +# https://bugzilla.redhat.com/show_bug.cgi?id=1862771 for details. +# Disable LTO for now +%define _lto_cflags %{nil} + +%meson \ + -Dplatforms= \ + -Dosmesa=true \ + -Dgallium-drivers=llvmpipe \ + -Dgallium-vdpau=disabled \ + -Dgallium-va=disabled \ + -Dgallium-xa=disabled \ + -Dgallium-nine=false \ + -Dgallium-opencl=disabled \ + -Dgallium-rusticl=false \ + -Dvulkan-drivers= \ + -Dshared-glapi=enabled \ + -Dgles1=disabled \ + -Dgles2=disabled \ + -Dopengl=true \ + -Dgbm=disabled \ + -Dglvnd=disabled \ + -Dglx=disabled \ + -Degl=disabled \ + -Dllvm=enabled \ + -Dshared-llvm=enabled \ + -Dvalgrind=disabled \ + -Dbuild-tests=false \ + -Dmesa-clc=auto \ + -Dmicrosoft-clc=disabled \ + -Dxlib-lease=disabled \ + -Dandroid-libbacktrace=disabled \ + -Dlibunwind=disabled \ + -Dlmsensors=disabled \ +%ifarch %{ix86} + -Dglx-read-only-text=true \ +%endif + %{nil} +%meson_build + +%install +%meson_install + +# trim some garbage, the mesa base package handles these +rm -rf %{buildroot}%{_datadir}/drirc.d +rm -rf %{buildroot}%{_includedir}/GL/gl*.h +rm -rf %{buildroot}%{_includedir}/KHR + +%files libOSMesa +%{_libdir}/libOSMesa.so.8* +%files libOSMesa-devel +%dir %{_includedir}/GL +%{_includedir}/GL/osmesa.h +%{_libdir}/libOSMesa.so +%{_libdir}/pkgconfig/osmesa.pc + +%changelog +* Thu Apr 24 2025 Neal Gompa - 25.0.4-1 +- Initial split from mesa for compat libraries (rhbz#2362203) diff --git a/baseos/wine-staging/wine-staging.spec b/baseos/wine-staging/wine-staging.spec index 77c4db3..dbab7e7 100644 --- a/baseos/wine-staging/wine-staging.spec +++ b/baseos/wine-staging/wine-staging.spec @@ -31,7 +31,7 @@ Name: %pkg Version: %ver -Release: 1 +Release: 2 Epoch: 2 Summary: WINE Is Not An Emulator - runs MS Windows programs License: LGPLv2+ @@ -91,7 +91,7 @@ BuildRequires: giflib-devel BuildRequires: ImageMagick-devel BuildRequires: libpcap-devel BuildRequires: libXxf86dga-devel -BuildRequires: mesa-libOSMesa-devel +BuildRequires: mesa-compat-libOSMesa-devel BuildRequires: libgphoto2-devel BuildRequires: libusb1-devel BuildRequires: alsa-lib-devel @@ -157,16 +157,16 @@ Requires: %dlopenreq dbus-1 Requires: %dlopenreq fontconfig Requires: %dlopenreq freetype Requires: %dlopenreq gnutls -# Requires: %dlopenreq gsm -# Requires: %dlopenreq jpeg +# Requires: %%dlopenreq gsm +# Requires: %%dlopenreq jpeg Requires: %dlopenreq krb5 Requires: %dlopenreq ncurses Requires: %dlopenreq odbc Requires: %dlopenreq OSMesa -# Requires: %dlopenreq png +# Requires: %%dlopenreq png Requires: %dlopenreq sane Requires: %dlopenreq SDL2 -# Requires: %dlopenreq tiff +# Requires: %%dlopenreq tiff Requires: %dlopenreq v4l1 Requires: %dlopenreq vulkan Requires: %dlopenreq Xcomposite @@ -175,8 +175,9 @@ Requires: %dlopenreq Xi Requires: %dlopenreq Xinerama Requires: %dlopenreq Xrandr Requires: %dlopenreq Xrender -# Requires: %dlopenreq xslt +# Requires: %%dlopenreq xslt Requires: %dlopenreq Xxf86vm +Requires: mesa-compat-libOSMesa %if 0%{?fedora_version} Suggests: sane-frontends %endif @@ -335,10 +336,10 @@ install -p -m 0644 tools/wine/wine.pl.UTF-8.man "%{buildroot}/usr/share/man/pl.U %{_datadir}/applications/*.desktop %dir %{_datadir}/wine/fonts %{_datadir}/wine/fonts/* -# %{_datadir}/wine/color/* +#%%{_datadir}/wine/color/* %{_bindir}/wine -#%{_bindir}/wine-preloader +#%%{_bindir}/wine-preloader %{_mandir}/man?/wine.?* %lang(de) %{_mandir}/de.UTF-8/man?/wine.?* %lang(fr) %{_mandir}/fr.UTF-8/man?/wine.?* -- knotmirror 0.0.1