diff --git a/libffi-3.4.2.tar.gz b/libffi-3.4.2.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..6752a27688d5817706e3d3f369478975f8a179e6 Binary files /dev/null and b/libffi-3.4.2.tar.gz differ diff --git a/libffi.spec b/libffi.spec new file mode 100644 index 0000000000000000000000000000000000000000..23f5dd7f40c69c36185646315910c91754856808 --- /dev/null +++ b/libffi.spec @@ -0,0 +1,86 @@ +%define anolis_release 1 + +%bcond_with bootstrap + +Name: libffi +Version: 3.4.2 +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/v3.4.2/libffi-3.4.2.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 devel +Summary: Development files for %{name} +Requires: %{name} = %{version}-%{release} +Requires: pkgconfig + +%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 --disable-static --disable-exec-static-tramp +%make_build + +%check +%if %{without bootstrap} +%make_build check +%endif + +%install +%make_install + +find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';' +rm -f $RPM_BUILD_ROOT%{_infodir}/dir + +mkdir -p $RPM_BUILD_ROOT%{_includedir} + +%ldconfig_scriptlets + +%files +%license LICENSE +%doc README.md +%{_libdir}/libffi.so.8 +%{_libdir}/libffi.so.8.1.0 + +%files devel +%{_libdir}/pkgconfig/*.pc +%{_includedir}/ffi*.h +%{_libdir}/*.so +%{_mandir}/man3/*.gz +%{_infodir}/libffi.info.* + +%changelog +* Tue Mar 08 2022 liuzhilin - 3.4.2-1 +- Init for Anolis OS