From 5fe6fcf39fc1ee909acb2eaa942b75524065b411 Mon Sep 17 00:00:00 2001 From: David Abdurachmanov Date: Tue, 26 Nov 2024 16:10:11 +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 | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/libffi.spec b/libffi.spec index 87590b8..679cdc3 100644 --- a/libffi.spec +++ b/libffi.spec @@ -4,7 +4,7 @@ Name: libffi Version: 3.4.6 -Release: 3%{?dist} +Release: 3.0.riscv64%{?dist} Summary: A portable foreign function interface library # No license change for 3.4.6 # The following SPDX licenses are extracted from the sources using @@ -107,7 +107,11 @@ 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 +%configure \ + %ifarch riscv64 + --libdir=%{_libdir} \ + %endif + --disable-static %make_build %check @@ -139,6 +143,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 @@ -155,6 +167,9 @@ install -m644 %{SOURCE2} $RPM_BUILD_ROOT%{_includedir}/ffitarget.h %{_infodir}/libffi.info.* %changelog +* Tue Nov 26 2024 David Abdurachmanov 3.4.6-3.0.riscv64 +- Fix libdir for riscv64 + * Wed Aug 21 2024 Carlos O'Donell 3.4.6-3 - Fix AArch64 BTI enablement issues (#2305877)