diff --git a/libffi-3.4.4.tar.gz b/libffi-3.4.4.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..173ab92de0476b8d97418da1d04b8b1b46fb7875 Binary files /dev/null and b/libffi-3.4.4.tar.gz differ diff --git a/libffi.spec b/libffi.spec new file mode 100644 index 0000000000000000000000000000000000000000..38b330764f7ab11343097fa97f348eaf2eb9aa87 --- /dev/null +++ b/libffi.spec @@ -0,0 +1,102 @@ +%define anolis_release 2 + +%bcond_with bootstrap + +Name: libffi +Version: 3.4.4 +Release: %{anolis_release}%{?dist} +Summary: A portable foreign function interface library +License: MIT +URL: http://sourceware.org/libffi + +Source0: https://github.com/libffi/libffi/releases/download/v%{version}/%{name}-%{version}.tar.gz + +BuildRequires: make +BuildRequires: gcc +%if %{without bootstrap} +BuildRequires: gcc-c++ +BuildRequires: dejagnu +%endif + +%description +Compilers for high level languages generate code that follow certain +conventions. These conventions are necessary, in part, for separate +compilation to work. One such convention is the "calling convention". +The calling convention is a set of assumptions made by the compiler +about where function arguments will be found on entry to a function. A +calling convention also specifies where the return value for a function +is found. + +Some programs may not know at the time of compilation what arguments +are to be passed to a function. For instance, an interpreter may be +told at run-time about the number and types of arguments used to call a +given function. `Libffi' can be used in such programs to provide a +bridge from the interpreter program to compiled code. + +%package doc +Summary: Documentation files for %{name} +Requires: %{name} = %{version}-%{release} +BuildArch: noarch + +%description doc +The %{name}-doc package contains documentation files for %{name}. + +%package devel +Summary: Development files for %{name} +Requires: %{name} = %{version}-%{release} + +%description devel +The %{name}-devel package contains libraries and header files for +developing applications that use %{name}. + +%prep +%setup -q + +%build +# For now we disable the static templates to avoid ghc and +# gobject-introspection failures: +# https://gitlab.haskell.org/ghc/ghc/-/issues/20051 +# https://gitlab.gnome.org/GNOME/gobject-introspection/-/merge_requests/283 +%configure \ + %ifarch riscv64 + --libdir=%{_libdir} \ + %endif + --disable-static \ + --disable-exec-static-tramp +%make_build + +%check +%if %{without bootstrap} +%make_build check +%endif + +%install +%make_install + +%files +%license LICENSE +%{_libdir}/libffi.so.8 +%{_libdir}/libffi.so.8.* + +%files doc +%doc README.md + +%files devel +%{_libdir}/pkgconfig/*.pc +%{_includedir}/ffi*.h +%{_libdir}/*.so +%{_mandir}/man3/* +%{_infodir}/libffi.info.* + +%changelog +* Thu Nov 02 2023 Songsong Zhang - 3.4.4-2 +- Add RISC-V 64 support + +* Sat Dec 31 2022 Funda Wang - 3.4.4-1 +- New version 3.4.4 + +* Sun Oct 09 2022 mgb01105731 - 3.4.2-2 +- add doc package + +* Tue Mar 08 2022 liuzhilin - 3.4.2-1 +- Init for Anolis OS