]>
Commit | Line | Data |
---|---|---|
5a3544d1 JB |
1 | Summary: Foreign Function Interface library (cross MinGW32 version) |
2 | Summary(pl.UTF-8): Biblioteka Foreign Function Interface (wersja skrośna MinGW32) | |
3 | Name: crossmingw32-libffi | |
ebf7f957 | 4 | Version: 3.4.4 |
b0eab7af | 5 | Release: 1 |
5a3544d1 JB |
6 | License: MIT-like |
7 | Group: Libraries | |
489d0a33 JB |
8 | #Source0Download: https://github.com/libffi/libffi/releases/ |
9 | Source0: https://github.com/libffi/libffi/releases/download/v%{version}/libffi-%{version}.tar.gz | |
ebf7f957 | 10 | # Source0-md5: 0da1a5ed7786ac12dcbaf0d499d8a049 |
b0eab7af | 11 | URL: http://www.sourceware.org/libffi/ |
2de770b6 | 12 | BuildRequires: crossmingw32-gcc |
5a3544d1 JB |
13 | BuildRequires: texinfo |
14 | Requires: crossmingw32-runtime | |
15 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
16 | ||
17 | %define no_install_post_strip 1 | |
b0eab7af | 18 | %define _enable_debug_packages 0 |
5a3544d1 JB |
19 | |
20 | %define target i386-mingw32 | |
21 | %define target_platform i386-pc-mingw32 | |
22 | ||
23 | %define _sysprefix /usr | |
24 | %define _prefix %{_sysprefix}/%{target} | |
25 | %define _libdir %{_prefix}/lib | |
26 | %define _pkgconfigdir %{_prefix}/lib/pkgconfig | |
27 | %define _dlldir /usr/share/wine/windows/system | |
28 | %define __cc %{target}-gcc | |
79252b16 | 29 | %define __pkgconfig_provides %{nil} |
45be55f5 | 30 | %define __pkgconfig_requires %{nil} |
5a3544d1 JB |
31 | |
32 | %ifnarch %{ix86} | |
33 | # arch-specific flags (like alpha's -mieee) are not valid for i386 gcc | |
34 | %define optflags -O2 | |
35 | %endif | |
a39e0238 JB |
36 | # -z options are invalid for mingw linker, most of -f options are Linux-specific |
37 | %define filterout_ld -Wl,-z,.* | |
38 | %define filterout_c -f[-a-z0-9=]* | |
5a3544d1 JB |
39 | |
40 | %description | |
41 | The libffi library provides a portable, high level programming | |
42 | interface to various calling conventions. This allows a programmer to | |
43 | call any function specified by a call interface description at | |
44 | run-time. | |
45 | ||
46 | Ffi stands for Foreign Function Interface. A foreign function | |
47 | interface is the popular name for the interface that allows code | |
48 | written in one language to call code written in another language. The | |
49 | libffi library really only provides the lowest, machine dependent | |
50 | layer of a fully featured foreign function interface. A layer must | |
51 | exist above libffi that handles type conversions for values passed | |
52 | between the two languages. | |
53 | ||
54 | This package contains the cross version for MinGW32. | |
55 | ||
56 | %description -l pl.UTF-8 | |
57 | Biblioteka libffi dostarcza przenośny, wysokopoziomowy interfejs do | |
58 | różnych konwencji wywołań funkcji. Pozwala to programiście wywołać | |
59 | dowolną funkcję podaną przez opis interfejsu wywołania w czasie | |
60 | działania programu. | |
61 | ||
62 | FFI to skrót od Foreign Function Interface, czyli interfejsu do obcych | |
63 | funkcji. Jest to potoczna nazwa interfejsu pozwalającego programowi | |
64 | napisanemu w jednym języku wywoływać kod napisany w innym języku. | |
65 | Biblioteka libffi daje tylko najniższą, zależną od maszyny warstwę | |
66 | pełnego interfejsu. Potrzebne są wyższe warstwy do obsługi konwersji | |
67 | typów dla wartości przekazywanych pomiędzy różnymi językami. | |
68 | ||
69 | Ten pakiet zawiera wersję skrośną dla MinGW32. | |
70 | ||
71 | %package static | |
72 | Summary: Static libffi library (cross MinGW32 version) | |
73 | Summary(pl.UTF-8): Statyczna biblioteka libffi (wersja skrośna MinGW32) | |
74 | Group: Development/Libraries | |
75 | Requires: %{name} = %{version}-%{release} | |
76 | ||
77 | %description static | |
78 | Static libffi library (cross MinGW32 version). | |
79 | ||
80 | %description static -l pl.UTF-8 | |
81 | Statyczna biblioteka libffi (wersja skrośna MinGW32). | |
82 | ||
83 | %package dll | |
84 | Summary: Foreign Function Interface DLL library for Windows | |
85 | Summary(pl.UTF-8): Biblioteka DLL Foreign Function Interface dla Windows | |
86 | Group: Applications/Emulators | |
87 | Requires: wine | |
88 | ||
89 | %description dll | |
90 | Foreign Function Interface DLL library for Windows. | |
91 | ||
92 | %description dll -l pl.UTF-8 | |
93 | Biblioteka DLL Foreign Function Interface dla Windows. | |
94 | ||
95 | %prep | |
96 | %setup -q -n libffi-%{version} | |
97 | ||
98 | %build | |
5a3544d1 JB |
99 | %configure \ |
100 | --target=%{target} \ | |
101 | --host=%{target} | |
102 | ||
103 | %{__make} | |
104 | ||
105 | %install | |
106 | rm -rf $RPM_BUILD_ROOT | |
107 | ||
108 | %{__make} install \ | |
109 | DESTDIR=$RPM_BUILD_ROOT | |
110 | ||
111 | install -d $RPM_BUILD_ROOT%{_dlldir} | |
b0eab7af | 112 | %{__mv} $RPM_BUILD_ROOT%{_prefix}/bin/*.dll $RPM_BUILD_ROOT%{_dlldir} |
5a3544d1 JB |
113 | |
114 | %if 0%{!?debug:1} | |
115 | %{target}-strip --strip-unneeded -R.comment -R.note $RPM_BUILD_ROOT%{_dlldir}/*.dll | |
116 | %{target}-strip -g -R.comment -R.note $RPM_BUILD_ROOT%{_libdir}/*.a | |
117 | %endif | |
118 | ||
119 | %{__rm} -r $RPM_BUILD_ROOT{%{_mandir},%{_infodir}} | |
120 | ||
121 | %clean | |
122 | rm -rf $RPM_BUILD_ROOT | |
123 | ||
124 | %files | |
125 | %defattr(644,root,root,755) | |
b0eab7af | 126 | %doc ChangeLog* LICENSE README.md |
5a3544d1 JB |
127 | %{_libdir}/libffi.dll.a |
128 | %{_libdir}/libffi.la | |
b0eab7af JB |
129 | %{_includedir}/ffi.h |
130 | %{_includedir}/ffitarget.h | |
5a3544d1 JB |
131 | %{_pkgconfigdir}/libffi.pc |
132 | ||
133 | %files static | |
134 | %defattr(644,root,root,755) | |
135 | %{_libdir}/libffi.a | |
136 | ||
137 | %files dll | |
138 | %defattr(644,root,root,755) | |
489d0a33 | 139 | %{_dlldir}/libffi-8.dll |