From f9ceade8bbb1d0adea2e27759c5526beab9a62f9 Mon Sep 17 00:00:00 2001 From: David Abdurachmanov Date: Tue, 21 Feb 2023 09:43:38 +0200 Subject: [PATCH] Fix libdir for riscv64 The libraries are installed in lib64/lp64d instead of just lib64 directory. That breaks packaging. Signed-off-by: David Abdurachmanov --- libffi.spec | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/libffi.spec b/libffi.spec index d05099b..7b0e1ae 100644 --- a/libffi.spec +++ b/libffi.spec @@ -4,7 +4,7 @@ Name: libffi Version: 3.4.4 -Release: 2%{?dist} +Release: 2.0.riscv64%{?dist} Summary: A portable foreign function interface library License: MIT URL: http://sourceware.org/libffi @@ -65,7 +65,12 @@ developing applications that use %{name}. # https://gitlab.haskell.org/ghc/ghc/-/issues/20051 # https://gitlab.gnome.org/GNOME/gobject-introspection/-/merge_requests/283 # We need to get these fixes into Fedora before we can reeanble them. -%configure --disable-static --disable-exec-static-tramp +%configure \ + %ifarch riscv64 + --libdir=%{_libdir} \ + %endif + --disable-static \ + --disable-exec-static-tramp %make_build %check @@ -97,6 +102,14 @@ install -m644 %{SOURCE1} $RPM_BUILD_ROOT%{_includedir}/ffi.h install -m644 %{SOURCE2} $RPM_BUILD_ROOT%{_includedir}/ffitarget.h %endif +%ifarch riscv64 +# Print the content of buildroot +find $RPM_BUILD_ROOT +# Install libraries to a proper riscv64 libdir location +mv -v ${RPM_BUILD_ROOT}%{_libdir}/lp64d/* ${RPM_BUILD_ROOT}%{_libdir}/ +rm -rf ${RPM_BUILD_ROOT}%{_libdir}/lp64d +%endif + %ldconfig_scriptlets %files @@ -113,6 +126,9 @@ install -m644 %{SOURCE2} $RPM_BUILD_ROOT%{_includedir}/ffitarget.h %{_infodir}/libffi.info.* %changelog +* Tue Feb 21 2023 David Abdurachmanov - 3.4.4-2.0.riscv64 +- Fix libdir for riscv64 + * Thu Jan 19 2023 Fedora Release Engineering - 3.4.4-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild