%define gittag 90a8635 %ifarch %{ix86} %global winepedir i386-windows %global winesodir i386-unix %bcond_with unity %endif %ifarch x86_64 %global winepedir x86_64-windows %global winesodir x86_64-unix %bcond_without unity #note unity need internet during build %endif Name: LatencyFleX Version: 0.1.1 Release: 8%{?gittag:~git%{gittag}}%{?dist} Summary: Vendor agnostic latency reduction middleware. An alternative to NVIDIA Reflex License: ASL 2.0 URL: https://github.com/ishitatsuyuki/LatencyFleX Source0: https://github.com/ishitatsuyuki/LatencyFleX/archive/refs/tags/%{name}-%{gittag}.tar.xz Source2: com.github.LatencyFleX.metainfo.xml BuildRequires: meson BuildRequires: cmake BuildRequires: gcc-c++ BuildRequires: vulkan-devel BuildRequires: vulkan-headers BuildRequires: vulkan-validation-layers-devel BuildRequires: wine-devel BuildRequires: vulkan-loader-headers %ifarch x86_64 %if %{with unity} BuildRequires: dotnet %endif BuildRequires: mingw64-gcc-c++ %endif %description Vendor agnostic latency reduction middleware. An alternative to NVIDIA Reflex %package wine Summary: LatencyFleX for wine Requires: %{name}%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} Requires: wine-filesystem %description wine LatencyFleX for wine %package unity Summary: LatencyFleX for unity Requires: %{name}-wine%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} Requires: wine-filesystem %description unity LatencyFleX for unity %package wine-static Summary: LatencyFleX static files for wine Requires: %{name}-wine%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} Requires: wine-filesystem %description wine-static LatencyFleX static files for wine %prep %autosetup -n %{name} %build %define _lto_cflags %{nil} %undefine _fortify_level cd layer %meson %meson_build %if %{with unity} # build wine cd wine # Required if the layer has not been installed globally export LIBRARY_PATH="$PWD/../redhat-linux-build/" %meson --cross cross-wine64.txt %meson_build unset CXXFLAGS unset LDFLAGS CXXFLAGS='-O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -mtune=generic -fasynchronous-unwind-tables' LDFLAGS=' -Wl,--as-needed ' export CXXFLAGS export LDFLAGS meson setup --buildtype=plain -Dprefix=%{_prefix} -Dlibdir=%{_libdir} --libexecdir=%{_libexecdir} --bindir=%{_bindir} --sbindir=%{_sbindir} --includedir=%{_includedir} --datadir=%{_datadir} --mandir=%{_mandir} --infodir=%{_infodir} --localedir=%{_localedir} --sysconfdir=%{_sysconfdir} --localstatedir=%{_localstatedir} --sharedstatedir=%{_sharedstatedir} --wrap-mode=nodownload --auto-features=enabled --cross cross-mingw64.txt . build_win meson compile -C build_win %{?_smp_mflags} --verbose ## Build unity cd .. cp -r unity unity2 cd unity dotnet build --configuration Release -p:UnityTarget=2019.3 -p:UnityRuntime=Mono LatencyFleX.csproj cd ../unity2 dotnet build --configuration Release -p:UnityTarget=2018.1 -p:UnityRuntime=Mono LatencyFleX.csproj %endif %install cd layer %meson_install cd wine %meson_install DESTDIR=%{buildroot} meson install -C build_win --no-rebuild %if %{with unity} mkdir -p %{buildroot}%{_libdir}/wine/%{winepedir}/unity/mono-2019.3 mkdir -p %{buildroot}%{_libdir}/wine/%{winepedir}/unity/mono-2018.1 cp -a ../unity/bin/Release/net35/LatencyFleX.dll %{buildroot}%{_libdir}/wine/%{winepedir}/unity/mono-2019.3/LatencyFleX.dll cp -a ../unity/bin/Release/net35/LatencyFleX.pdb %{buildroot}%{_libdir}/wine/%{winepedir}/unity/mono-2019.3/LatencyFleX.pdb cp -a ../unity2/bin/Release/net35/LatencyFleX.dll %{buildroot}%{_libdir}/wine/%{winepedir}/unity/mono-2018.1/LatencyFleX.dll cp -a ../unity2/bin/Release/net35/LatencyFleX.pdb %{buildroot}%{_libdir}/wine/%{winepedir}/unity/mono-2018.1/LatencyFleX.pdb %endif # install Appdata files mkdir -p %{buildroot}%{_metainfodir} install -pm 0644 %{SOURCE2} %{buildroot}%{_metainfodir} %files %license LICENSE %doc README.md %{_libdir}/liblatencyflex_layer.so %{_datadir}/vulkan/implicit_layer.d/latencyflex.json %{_metainfodir}/com.github.LatencyFleX.metainfo.xml %if %{with unity} %files wine %{_libdir}/wine/%{winesodir}/latencyflex_layer.so %{_libdir}/wine/%{winepedir}/latencyflex_layer.dll %{_libdir}/wine/%{winepedir}/latencyflex_wine.dll %files unity %{_libdir}/wine/%{winepedir}/unity/mono-2019.3/LatencyFleX.dll %{_libdir}/wine/%{winepedir}/unity/mono-2019.3/LatencyFleX.pdb %{_libdir}/wine/%{winepedir}/unity/mono-2018.1/LatencyFleX.dll %{_libdir}/wine/%{winepedir}/unity/mono-2018.1/LatencyFleX.pdb %files wine-static %{_libdir}/wine/%{winepedir}/latencyflex_layer.dll.a %{_libdir}/wine/%{winepedir}/latencyflex_wine.dll.a %endif %changelog * Sun Aug 11 2024 Artyom - 0.1.1-8~git90a8635 - rebuilt * Thu Nov 16 2023 Martin Nad - 0.1.1-7~git90a8635 - update to git 90a8635 * Thu Nov 16 2023 Martin Nad - 0.1.1-6~git73bcb07 - rebuilt * Sun Mar 05 2023 Martin Naď - 0.1.1-4~git0470806 - fix build * Sat Mar 04 2023 Martin Naď - 0.1.0-3~git0470806 - add unity dll files - fix winedir * Tue Feb 28 2023 Martin Naď - 0.1.1-2~git0470806 - build partial wine support - disable LTO breaks the library * Mon Feb 27 2023 Martin Naď - 0.1.1-1 - Initial Release - update to git 0470806