|
|
|
@ -1,25 +1,24 @@
|
|
|
|
|
%bcond_with bootstrap
|
|
|
|
|
|
|
|
|
|
%global multilib_arches %{ix86} x86_64
|
|
|
|
|
%global multilib_arches %{ix86} ppc ppc64 ppc64p7 s390 s390x x86_64
|
|
|
|
|
|
|
|
|
|
Name: libffi
|
|
|
|
|
Version: 3.4.2
|
|
|
|
|
Release: 8%{?dist}
|
|
|
|
|
Version: 3.1
|
|
|
|
|
Release: 24%{?dist}
|
|
|
|
|
Summary: A portable foreign function interface library
|
|
|
|
|
|
|
|
|
|
Group: System Environment/Libraries
|
|
|
|
|
License: MIT
|
|
|
|
|
URL: http://sourceware.org/libffi
|
|
|
|
|
|
|
|
|
|
Source0: https://github.com/libffi/libffi/releases/download/v3.4.2/libffi-3.4.2.tar.gz
|
|
|
|
|
Source0: ftp://sourceware.org/pub/libffi/libffi-%{version}.tar.gz
|
|
|
|
|
Source1: ffi-multilib.h
|
|
|
|
|
Source2: ffitarget-multilib.h
|
|
|
|
|
Patch1: libffi-3.4.2-rh2152228.patch
|
|
|
|
|
|
|
|
|
|
BuildRequires: make
|
|
|
|
|
BuildRequires: gcc
|
|
|
|
|
%if %{without bootstrap}
|
|
|
|
|
BuildRequires: gcc-c++
|
|
|
|
|
BuildRequires: dejagnu
|
|
|
|
|
%endif
|
|
|
|
|
Patch0: libffi-3.1-fix-include-path.patch
|
|
|
|
|
Patch1: libffi-3.1-fix-exec-stack.patch
|
|
|
|
|
Patch2: libffi-aarch64-rhbz1174037.patch
|
|
|
|
|
Patch3: libffi-3.1-aarch64-fix-exec-stack.patch
|
|
|
|
|
Patch5: libffi-3.1-closures-Create-temporary-file-with-O_TMPFILE-and-O_.patch
|
|
|
|
|
Patch6: libffi-3.1-libffi_tmpdir.patch
|
|
|
|
|
Patch7: libffi-3.1-memfd.patch
|
|
|
|
|
Patch8: libffi-3.1-rh2014228.patch
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
Compilers for high level languages generate code that follow certain
|
|
|
|
@ -48,36 +47,40 @@ layer of a fully featured foreign function interface. A layer must
|
|
|
|
|
exist above `libffi' that handles type conversions for values passed
|
|
|
|
|
between the two languages.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%package devel
|
|
|
|
|
Summary: Development files for %{name}
|
|
|
|
|
Group: Development/Libraries
|
|
|
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
|
|
Requires: pkgconfig
|
|
|
|
|
Requires(post): /sbin/install-info
|
|
|
|
|
Requires(preun): /sbin/install-info
|
|
|
|
|
|
|
|
|
|
%description devel
|
|
|
|
|
The %{name}-devel package contains libraries and header files for
|
|
|
|
|
developing applications that use %{name}.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%setup -q
|
|
|
|
|
%patch1 -p1
|
|
|
|
|
%patch0 -p1 -b .fixpath
|
|
|
|
|
%patch1 -p1 -b .execstack
|
|
|
|
|
%patch2 -p1 -b .aarch64
|
|
|
|
|
%patch3 -p1 -b .aarch64execstack
|
|
|
|
|
%patch5 -p1
|
|
|
|
|
%patch6 -p1
|
|
|
|
|
%patch7 -p1
|
|
|
|
|
%patch8 -p1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%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
|
|
|
|
|
# We need to get these fixes into Fedora before we can reeanble them.
|
|
|
|
|
%configure --disable-static --disable-exec-static-tramp
|
|
|
|
|
%make_build
|
|
|
|
|
|
|
|
|
|
%check
|
|
|
|
|
%if %{without bootstrap}
|
|
|
|
|
%make_build check
|
|
|
|
|
%endif
|
|
|
|
|
export CFLAGS="%{build_cflags} -Wa,--generate-missing-build-notes=yes"
|
|
|
|
|
%configure --disable-static
|
|
|
|
|
make %{?_smp_mflags}
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
%make_install
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
make install DESTDIR=$RPM_BUILD_ROOT
|
|
|
|
|
find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
|
|
|
|
|
rm -f $RPM_BUILD_ROOT%{_infodir}/dir
|
|
|
|
|
|
|
|
|
@ -93,94 +96,65 @@ mkdir -p $RPM_BUILD_ROOT%{_includedir}
|
|
|
|
|
# can have both a 32- and 64-bit version of the library, and they each need
|
|
|
|
|
# their own correct-but-different versions of the headers to be usable.
|
|
|
|
|
for i in ffi ffitarget; do
|
|
|
|
|
mv $RPM_BUILD_ROOT%{_includedir}/$i.h $RPM_BUILD_ROOT%{_includedir}/$i-${basearch}.h
|
|
|
|
|
mv $RPM_BUILD_ROOT%{_libdir}/libffi-%{version}/include/$i.h $RPM_BUILD_ROOT%{_includedir}/$i-${basearch}.h
|
|
|
|
|
done
|
|
|
|
|
install -m644 %{SOURCE1} $RPM_BUILD_ROOT%{_includedir}/ffi.h
|
|
|
|
|
install -m644 %{SOURCE2} $RPM_BUILD_ROOT%{_includedir}/ffitarget.h
|
|
|
|
|
%else
|
|
|
|
|
mv $RPM_BUILD_ROOT%{_libdir}/libffi-%{version}/include/{ffi,ffitarget}.h $RPM_BUILD_ROOT%{_includedir}
|
|
|
|
|
%endif
|
|
|
|
|
rm -rf $RPM_BUILD_ROOT%{_libdir}/libffi-%{version}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%ldconfig_scriptlets
|
|
|
|
|
|
|
|
|
|
%post devel
|
|
|
|
|
/sbin/install-info --info-dir=%{_infodir} %{_infodir}/libffi.info.gz || :
|
|
|
|
|
|
|
|
|
|
%preun devel
|
|
|
|
|
if [ $1 = 0 ] ;then
|
|
|
|
|
/sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/libffi.info.gz || :
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%files
|
|
|
|
|
%{!?_licensedir:%global license %%doc}
|
|
|
|
|
%license LICENSE
|
|
|
|
|
%doc README.md
|
|
|
|
|
%{_libdir}/libffi.so.8
|
|
|
|
|
%{_libdir}/libffi.so.8.1.0
|
|
|
|
|
%doc README
|
|
|
|
|
%{_libdir}/*.so.*
|
|
|
|
|
|
|
|
|
|
%files devel
|
|
|
|
|
%{_libdir}/pkgconfig/*.pc
|
|
|
|
|
%{_includedir}/ffi*.h
|
|
|
|
|
%{_libdir}/*.so
|
|
|
|
|
%{_mandir}/man3/*.gz
|
|
|
|
|
%{_infodir}/libffi.info.*
|
|
|
|
|
%{_infodir}/libffi.info.gz
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|
* Fri Apr 07 2023 DJ Delorie <dj@redhat.com> - 3.4.2-8
|
|
|
|
|
* Wed Nov 16 2022 DJ Delorie <dj@redhat.com> - 3.1-24
|
|
|
|
|
- Use /etc/sysconfig/libffi-force-shared-memory-check-first to
|
|
|
|
|
override selinux permissions check for shared memory access (#2152228)
|
|
|
|
|
|
|
|
|
|
* Thu Aug 26 2021 Carlos O'Donell <codonell@redhat.com> - 3.4.2-7
|
|
|
|
|
- Remove compat-libffi3.1 subpackage to complete SONAME transition.
|
|
|
|
|
Related: rhbz#1891914
|
|
|
|
|
|
|
|
|
|
* Wed Aug 18 2021 Carlos O'Donell <carlos@redhat.com> - 3.4.2-6
|
|
|
|
|
- Rebuilt for libffi 3.4.2 SONAME transition. Related: rhbz#1891914
|
|
|
|
|
|
|
|
|
|
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 3.4.2-5
|
|
|
|
|
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
|
|
|
|
|
Related: rhbz#1991688
|
|
|
|
|
|
|
|
|
|
* Thu Jul 29 2021 Carlos O'Donell <carlos@redhat.com> - 3.4.2-4
|
|
|
|
|
- Drop pkgconf support for compat-libffi3.1.
|
|
|
|
|
|
|
|
|
|
* Tue Jul 27 2021 Carlos O'Donell <carlos@redhat.com> - 3.4.2-3
|
|
|
|
|
- Add temporary compat-libffi3.1 for library transition.
|
|
|
|
|
|
|
|
|
|
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.4.2-2
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Mon Jun 28 2021 Carlos O'Donell <carlos@redhat.com> - 3.4.2-1
|
|
|
|
|
- Rebase to libffi 3.4.2.
|
|
|
|
|
|
|
|
|
|
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 3.1-29
|
|
|
|
|
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
|
|
|
|
|
|
|
|
|
|
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.1-28
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Wed Dec 02 2020 Carlos O'Donell <carlos@redhat.com> - 3.1-27
|
|
|
|
|
- Use make macros
|
|
|
|
|
- https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro
|
|
|
|
|
|
|
|
|
|
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.1-26
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Thu Apr 30 2020 DJ Delorie <idj@redhat.com> - 3.1-25
|
|
|
|
|
- Add $LIBFFI_TMPDIR environment variable support (#1667620)
|
|
|
|
|
|
|
|
|
|
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.1-24
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
|
|
|
|
override selinux permissions check for shared memory access (#2014228)
|
|
|
|
|
|
|
|
|
|
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.1-23
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
|
|
|
|
* Fri Nov 19 2021 DJ Delorie <dj@redhat.com> - 3.1-23
|
|
|
|
|
- Use memfd_create() to allocate closures (#1875340)
|
|
|
|
|
|
|
|
|
|
* Tue Jul 9 2019 Florian Weimer <fweimer@redhat.com> - 3.1-22
|
|
|
|
|
- Run test suite during build (#1727088)
|
|
|
|
|
* Wed May 6 2020 DJ Delorie <dj@redhat.com> - 3.1-22
|
|
|
|
|
- Add $LIBFFI_TMPDIR environment variable support (#1723951)
|
|
|
|
|
|
|
|
|
|
* Wed Jun 19 2019 Anthony Green <green@redhat.com> - 3.1-21
|
|
|
|
|
- Fix license tag
|
|
|
|
|
* Thu Aug 1 2019 DJ Delorie <dj@redhat.com> - 3.1-21
|
|
|
|
|
- Revert 1652930 until 1721569 can be fixed (#1652930)
|
|
|
|
|
|
|
|
|
|
* Wed Apr 24 2019 Björn Esser <besser82@fedoraproject.org> - 3.1-20
|
|
|
|
|
- Remove hardcoded gzip suffix from GNU info pages
|
|
|
|
|
* Fri Jun 14 2019 DJ Delorie <dj@redhat.com> - 3.1-20
|
|
|
|
|
- closures: Create temporary file with O_TMPFILE and O_CLOEXEC (#1720600)
|
|
|
|
|
|
|
|
|
|
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.1-19
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
|
|
|
|
* Fri Jun 14 2019 Florian Weimer <fweimer@redhat.com> - 3.1-19
|
|
|
|
|
- aarch64: Flush code alias mapping after creating closure (#1652930)
|
|
|
|
|
|
|
|
|
|
* Sun Jul 22 2018 Peter Robinson <pbrobinson@fedoraproject.org> 3.1-28
|
|
|
|
|
- Fix FTBFS
|
|
|
|
|
* Tue Nov 27 2018 Severin Gehwolf <sgehwolf@redhat.com> - 3.1-18
|
|
|
|
|
- Compile with -Wa,--generate-missing-build-notes=yes
|
|
|
|
|
|
|
|
|
|
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.1-17
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
|
|
|
|
* Fri Aug 10 2018 Severin Gehwolf <sgehwolf@redhat.com> - 3.1-17
|
|
|
|
|
- Fix declared license: BSD => MIT.
|
|
|
|
|
|
|
|
|
|
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.1-16
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
|
|
|
|