libffi.spec 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. ##
  2. ## libffi.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2014 OpenPKG Foundation e.V. <http://openpkg.net/>
  4. ##
  5. ## Permission to use, copy, modify, and distribute this software for
  6. ## any purpose with or without fee is hereby granted, provided that
  7. ## the above copyright notice and this permission notice appear in all
  8. ## copies.
  9. ##
  10. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  11. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  12. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  13. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  14. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  15. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  16. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  17. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  18. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  19. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  20. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  21. ## SUCH DAMAGE.
  22. ##
  23. # package information
  24. Name: libffi
  25. Summary: Foreign Function Interface (FFI) Library
  26. URL: http://sourceware.org/libffi/
  27. Vendor: GNU, RedHat
  28. Packager: OpenPKG Foundation e.V.
  29. Distribution: OpenPKG Community
  30. Class: EVAL
  31. Group: Compiler
  32. License: LGPL
  33. Version: 3.1
  34. Release: 20140929
  35. # list of sources
  36. Source0: ftp://sourceware.org/pub/libffi/libffi-%{version}.tar.gz
  37. Patch0: libffi.patch
  38. # build information
  39. BuildPreReq: OpenPKG, openpkg >= 20100101, gcc, make
  40. PreReq: OpenPKG, openpkg >= 20100101
  41. %description
  42. Compilers for high level languages generate code that follows
  43. certain conventions. These conventions are necessary, in part, for
  44. separate compilation to work. One such convention is the "calling
  45. convention". The "calling convention" is a set of assumptions
  46. made by the compiler about where function arguments will be found
  47. on entry to a function. A "calling convention" also specifies
  48. where the return value for a function is found. Some programs
  49. may not know at the time of compilation what arguments are to be
  50. passed to a function. For instance, an interpreter may be told at
  51. run-time about the number and types of arguments used to call a
  52. given function. Libffi can be used in such programs to provide a
  53. bridge from the interpreter program to compiled code.
  54. The libffi library provides a portable, high level programming
  55. interface to various calling conventions. This allows a programmer
  56. to call any function specified by a call interface description at
  57. run-time. Ffi stands for Foreign Function Interface. A foreign
  58. function interface is the popular name for the interface that
  59. allows code written in one language to call code written in another
  60. language. The libffi library really only provides the lowest,
  61. machine dependent layer of a fully featured foreign function
  62. interface. A layer must exist above libffi that handles type
  63. conversions for values passed between the two languages.
  64. %track
  65. prog libffi = {
  66. version = %{version}
  67. url = ftp://sourceware.org/pub/libffi/
  68. regex = libffi-(__VER__)\.tar\.gz
  69. }
  70. %prep
  71. %setup -q
  72. %patch -p0
  73. %build
  74. CC="%{l_cc}" \
  75. CFLAGS="%{l_cflags -O}" \
  76. CPPFLAGS="%{l_cppflags}" \
  77. LDFLAGS="%{l_ldflags}" \
  78. ./configure \
  79. --prefix=%{l_prefix} \
  80. --mandir=%{l_prefix}/man \
  81. --infodir=%{l_prefix}/info \
  82. --includedir=%{l_prefix}/include \
  83. --disable-shared
  84. %{l_make} %{l_mflags}
  85. %install
  86. %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
  87. rm -f $RPM_BUILD_ROOT%{l_prefix}/info/dir
  88. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  89. %files -f files
  90. %clean