| 1 | Name:           libffi | 
|---|
| 2 | Version:        3.0.11 | 
|---|
| 3 | Release:        1%{?dist} | 
|---|
| 4 | Summary:        A portable foreign function interface library | 
|---|
| 5 |  | 
|---|
| 6 | Group:          System Environment/Libraries | 
|---|
| 7 | License:        BSD | 
|---|
| 8 | URL:            http://sourceware.org/libffi | 
|---|
| 9 | Source0:        http://sourceware.org/libffi/libffi-%{version}.tar.gz | 
|---|
| 10 | BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) | 
|---|
| 11 |  | 
|---|
| 12 | %description | 
|---|
| 13 | Compilers for high level languages generate code that follow certain | 
|---|
| 14 | conventions.  These conventions are necessary, in part, for separate | 
|---|
| 15 | compilation to work.  One such convention is the "calling convention". | 
|---|
| 16 | The calling convention is a set of assumptions made by the compiler | 
|---|
| 17 | about where function arguments will be found on entry to a function.  A | 
|---|
| 18 | calling convention also specifies where the return value for a function | 
|---|
| 19 | is found. | 
|---|
| 20 |  | 
|---|
| 21 | Some programs may not know at the time of compilation what arguments | 
|---|
| 22 | are to be passed to a function.  For instance, an interpreter may be | 
|---|
| 23 | told at run-time about the number and types of arguments used to call a | 
|---|
| 24 | given function.  `Libffi' can be used in such programs to provide a | 
|---|
| 25 | bridge from the interpreter program to compiled code. | 
|---|
| 26 |  | 
|---|
| 27 | The `libffi' library provides a portable, high level programming | 
|---|
| 28 | interface to various calling conventions.  This allows a programmer to | 
|---|
| 29 | call any function specified by a call interface description at run time. | 
|---|
| 30 |  | 
|---|
| 31 | FFI stands for Foreign Function Interface.  A foreign function | 
|---|
| 32 | interface is the popular name for the interface that allows code | 
|---|
| 33 | written in one language to call code written in another language.  The | 
|---|
| 34 | `libffi' library really only provides the lowest, machine dependent | 
|---|
| 35 | layer of a fully featured foreign function interface.  A layer must | 
|---|
| 36 | exist above `libffi' that handles type conversions for values passed | 
|---|
| 37 | between the two languages. | 
|---|
| 38 |  | 
|---|
| 39 |  | 
|---|
| 40 | %package        devel | 
|---|
| 41 | Summary:        Development files for %{name} | 
|---|
| 42 | Group:          Development/Libraries | 
|---|
| 43 | Requires:       %{name} = %{version}-%{release} | 
|---|
| 44 | Requires:       pkgconfig | 
|---|
| 45 |  | 
|---|
| 46 | %description    devel | 
|---|
| 47 | The %{name}-devel package contains libraries and header files for | 
|---|
| 48 | developing applications that use %{name}. | 
|---|
| 49 |  | 
|---|
| 50 |  | 
|---|
| 51 | %prep | 
|---|
| 52 | %setup -q | 
|---|
| 53 |  | 
|---|
| 54 |  | 
|---|
| 55 | %build | 
|---|
| 56 | export CONFIG_SHELL="/@unixroot/usr/bin/sh.exe" | 
|---|
| 57 | export LDFLAGS="-Zbin-files -Zhigh-mem -Zomf -Zargs-wild -Zargs-resp" | 
|---|
| 58 | export LIBS="-lurpo -lmmap" | 
|---|
| 59 | %configure \ | 
|---|
| 60 | --disable-static \ | 
|---|
| 61 | "--cache-file=%{_topdir}/cache/%{name}-%{_target_cpu}.cache" | 
|---|
| 62 | make %{?_smp_mflags} | 
|---|
| 63 |  | 
|---|
| 64 |  | 
|---|
| 65 | %install | 
|---|
| 66 | rm -rf $RPM_BUILD_ROOT | 
|---|
| 67 | make install DESTDIR=$RPM_BUILD_ROOT | 
|---|
| 68 | find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';' | 
|---|
| 69 | rm -f $RPM_BUILD_ROOT%{_infodir}/dir | 
|---|
| 70 |  | 
|---|
| 71 |  | 
|---|
| 72 | %clean | 
|---|
| 73 | rm -rf $RPM_BUILD_ROOT | 
|---|
| 74 |  | 
|---|
| 75 | %files | 
|---|
| 76 | %defattr(-,root,root,-) | 
|---|
| 77 | %doc LICENSE README | 
|---|
| 78 | #%{_libdir}/*.so.* | 
|---|
| 79 |  | 
|---|
| 80 | %files devel | 
|---|
| 81 | %defattr(-,root,root,-) | 
|---|
| 82 | %{_libdir}/pkgconfig/*.pc | 
|---|
| 83 | %{_libdir}/%{name}-%{version} | 
|---|
| 84 | %{_libdir}/*.a | 
|---|
| 85 | %{_mandir}/man3/* | 
|---|
| 86 | %{_infodir}/libffi.info | 
|---|
| 87 |  | 
|---|
| 88 | %changelog | 
|---|
| 89 | * Sat Oct 27 2012 yd | 
|---|
| 90 | - initial unixroot build. | 
|---|