Compare commits

...

4 Commits
master ... f19

Author SHA1 Message Date
Tom Callaway f60e7a732a fix wrapper headers 2013-05-28 16:18:48 -04:00
Tom Callaway 302e263019 make header files multilib safe 2013-05-27 15:56:14 -04:00
Tom Callaway 70e8154f14 fix include path (and .pc file). resolves bz727301 2013-05-25 22:18:38 -04:00
Anthony Green 62f7815545 update to 3.0.13 2013-03-22 14:10:54 -04:00
6 changed files with 121 additions and 4 deletions

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
libffi-3.0.9.tar.gz
/libffi-3.0.10.tar.gz
/libffi-3.0.11.tar.gz
/libffi-3.0.13.tar.gz

23
ffi-multilib.h Normal file
View File

@ -0,0 +1,23 @@
/* This file is here to prevent a file conflict on multiarch systems. */
#ifdef ffi_wrapper_h
#error "Do not define ffi_wrapper_h!"
#endif
#define ffi_wrapper_h
#if defined(__i386__)
#include "ffi-i386.h"
#elif defined(__powerpc64__)
#include "ffi-ppc64.h"
#elif defined(__powerpc__)
#include "ffi-ppc.h"
#elif defined(__s390x__)
#include "ffi-s390x.h"
#elif defined(__s390__)
#include "ffi-s390.h"
#elif defined(__x86_64__)
#include "ffi-x86_64.h"
#else
#error "The libffi-devel package is not usable with the architecture."
#endif
#undef ffi_wrapper_h

23
ffitarget-multilib.h Normal file
View File

@ -0,0 +1,23 @@
/* This file is here to prevent a file conflict on multiarch systems. */
#ifdef ffitarget_wrapper_h
#error "Do not define ffitarget_wrapper_h!"
#endif
#define ffitarget_wrapper_h
#if defined(__i386__)
#include "ffitarget-i386.h"
#elif defined(__powerpc64__)
#include "ffitarget-ppc64.h"
#elif defined(__powerpc__)
#include "ffitarget-ppc.h"
#elif defined(__s390x__)
#include "ffitarget-s390x.h"
#elif defined(__s390__)
#include "ffitarget-s390.h"
#elif defined(__x86_64__)
#include "ffitarget-x86_64.h"
#else
#error "The libffi-devel package is not usable with the architecture."
#endif
#undef ffitarget_wrapper_h

View File

@ -0,0 +1,34 @@
diff -up libffi-3.0.13/include/Makefile.am.fixpath libffi-3.0.13/include/Makefile.am
--- libffi-3.0.13/include/Makefile.am.fixpath 2013-05-25 22:11:25.983889342 -0400
+++ libffi-3.0.13/include/Makefile.am 2013-05-25 22:12:12.337890037 -0400
@@ -5,5 +5,5 @@ AUTOMAKE_OPTIONS=foreign
DISTCLEANFILES=ffitarget.h
EXTRA_DIST=ffi.h.in ffi_common.h
-includesdir = $(libdir)/@PACKAGE_NAME@-@PACKAGE_VERSION@/include
+includesdir = $(includedir)/
nodist_includes_HEADERS = ffi.h ffitarget.h
diff -up libffi-3.0.13/include/Makefile.in.fixpath libffi-3.0.13/include/Makefile.in
--- libffi-3.0.13/include/Makefile.in.fixpath 2013-05-25 22:12:56.259890696 -0400
+++ libffi-3.0.13/include/Makefile.in 2013-05-25 22:13:12.101890934 -0400
@@ -250,7 +250,7 @@ top_srcdir = @top_srcdir@
AUTOMAKE_OPTIONS = foreign
DISTCLEANFILES = ffitarget.h
EXTRA_DIST = ffi.h.in ffi_common.h
-includesdir = $(libdir)/@PACKAGE_NAME@-@PACKAGE_VERSION@/include
+includesdir = $(includedir)/
nodist_includes_HEADERS = ffi.h ffitarget.h
all: all-am
diff -up libffi-3.0.13/libffi.pc.in.fixpath libffi-3.0.13/libffi.pc.in
--- libffi-3.0.13/libffi.pc.in.fixpath 2013-05-25 22:14:21.037891968 -0400
+++ libffi-3.0.13/libffi.pc.in 2013-05-25 22:14:31.652892128 -0400
@@ -1,7 +1,7 @@
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
-includedir=${libdir}/@PACKAGE_NAME@-@PACKAGE_VERSION@/include
+includedir=@includedir@
Name: @PACKAGE_NAME@
Description: Library supporting Foreign Function Interfaces

View File

@ -1,6 +1,8 @@
%global multilib_arches %{ix86} ppc %{power64} s390 s390x x86_64
Name: libffi
Version: 3.0.11
Release: 2%{?dist}
Version: 3.0.13
Release: 4%{?dist}
Summary: A portable foreign function interface library
Group: System Environment/Libraries
@ -8,6 +10,10 @@ License: BSD
URL: http://sourceware.org/libffi
Source0: ftp://sourceware.org/pub/libffi/libffi-%{version}.tar.gz
# part of upstream commit 5feacad4
Source1: ffi-multilib.h
Source2: ffitarget-multilib.h
Patch0: libffi-3.0.13-fix-include-path.patch
# part of upstream commit 5feacad4
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%description
@ -53,6 +59,7 @@ developing applications that use %{name}.
%prep
%setup -q
%patch0 -p1 -b .fixpath
%build
@ -66,6 +73,23 @@ make install DESTDIR=$RPM_BUILD_ROOT
find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
rm -f $RPM_BUILD_ROOT%{_infodir}/dir
# Determine generic arch target name for multilib wrapper
basearch=%{_arch}
%ifarch %{ix86}
basearch=i386
%endif
%ifarch %{multilib_arches}
# Do header file switcheroo to avoid file conflicts on systems where you
# 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
done
install -m644 %{SOURCE1} $RPM_BUILD_ROOT%{_includedir}/ffi.h
install -m644 %{SOURCE2} $RPM_BUILD_ROOT%{_includedir}/ffitarget.h
%endif
%clean
rm -rf $RPM_BUILD_ROOT
@ -92,12 +116,24 @@ fi
%files devel
%defattr(-,root,root,-)
%{_libdir}/pkgconfig/*.pc
%{_libdir}/%{name}-%{version}
%{_includedir}/ffi*.h
%{_libdir}/*.so
%{_mandir}/man3/*.gz
%{_infodir}/libffi.info.gz
%changelog
* Tue May 28 2013 Tom Callaway <spot@fedoraproject.org> - 3.0.13-4
- fix typos in wrapper headers
* Mon May 27 2013 Tom Callaway <spot@fedoraproject.org> - 3.0.13-3
- make header files multilib safe
* Sat May 25 2013 Tom Callaway <spot@fedoraproject.org> - 3.0.13-2
- fix incorrect header pathing (and .pc file)
* Wed Mar 20 2013 Anthony Green <green@redhat.com> - 3.0.13-1
- update to 3.0.13
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0.11-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

View File

@ -1 +1 @@
f69b9693227d976835b4857b1ba7d0e3 libffi-3.0.11.tar.gz
45f3b6dbc9ee7c7dfbbbc5feba571529 libffi-3.0.13.tar.gz