%define name libffi %define version 2.0 %define snapshot 20010609 %define release 0.1mdk Summary: Foreign Function Interface Name: %{name} Version: %{version} Release: %{release} License: GPL Epoch: 20010610 Url: http://sources.redhat.com/libffi/ Group: Development/C Source: %{name}-%{snapshot}.tar.bz2 Patch0: %{name}-nogcc3.patch.bz2 Patch1: %{name}-ia64-mozilla.patch.bz2 Buildroot: %{_tmppath}/%{name}-%version-root %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 essentially 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. The libffi library provides a portable, high level programming interface to various calling conventions. This allows a programmer to call any function specified by a call interface description at run time. Ffi stands for Foreign Function Interface. A foreign function interface is the popular name for the interface that allows code written in one language to call code written in another language. The libffi library really only provides the lowest, machine dependent 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 -n %{name}-devel Summary: Development headers and static library for %{name} Group: Development/C Provides: %{name}-devel = %{version}-%{release} Obsoletes: %{name} Provides: %{name} %description -n %{name}-devel This package contains the development headers and the static library for libffi. The libffi library provides a portable, high level programming interface to various calling conventions. This allows a programmer to call any function specified by a call interface description at run time. %prep %setup -q -n %{name}-%{snapshot} %patch0 -p0 -b .nogcc3 %ifarch ia64 %patch1 -p0 -b .mozia64 %endif %build mkdir obj cd obj CFLAGS="$RPM_OPT_FLAGS" \ ../configure %{_target_platform} --disable-shared --prefix=%{_prefix} %make %install rm -rf $RPM_BUILD_ROOT cp mkinstalldirs libffi cd obj/%{_target_platform}/libffi mkdir -p $RPM_BUILD_ROOT %makeinstall %clean rm -rf $RPM_BUILD_ROOT %files -n %{name}-devel %defattr(-,root,root) %doc ChangeLog README %_libdir/* %_includedir/* %changelog * Thu Nov 1 2001 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 2.0-0.1mdk - Actually, this is a 2.00 development snapshot - Improve libffi-devel description and summary - Fix configure invocation and install process for all arches - Patch1: Additions for Mozilla IA-64 support from David Mosberger * Fri Oct 26 2001 Stew Benedict <sbenedict@mandrakesoft.com> 20010609-3mdk - modify spec for PPC build - quiet %setup * Thu Oct 18 2001 Daouda LO <daouda@mandrakesoft.com> 20010609-2mdk - spec cleanups. - rename libffi to libffi-devel * Fri Jun 29 2001 Daouda Lo <daouda@mandrakesoft.com> 20010609-1mdk - release - spec cleanups * Fri Oct 28 2000 David BAUDENS <baudens@mandrakesoft.com> 1.20-1mdk - First spec for Linux-Mandrake distribution. Needed if you want to be able to build kaffe on PPC.