]> git.pld-linux.org Git - packages/crossmingw32-libffi.git/blame - crossmingw32-libffi.spec
- BR: crossmingw32-gcc
[packages/crossmingw32-libffi.git] / crossmingw32-libffi.spec
CommitLineData
5a3544d1
JB
1Summary: Foreign Function Interface library (cross MinGW32 version)
2Summary(pl.UTF-8): Biblioteka Foreign Function Interface (wersja skrośna MinGW32)
3Name: crossmingw32-libffi
489d0a33 4Version: 3.4.2
b0eab7af 5Release: 1
5a3544d1
JB
6License: MIT-like
7Group: Libraries
489d0a33
JB
8#Source0Download: https://github.com/libffi/libffi/releases/
9Source0: https://github.com/libffi/libffi/releases/download/v%{version}/libffi-%{version}.tar.gz
10# Source0-md5: 294b921e6cf9ab0fbaea4b639f8fdbe8
b0eab7af 11URL: http://www.sourceware.org/libffi/
2de770b6 12BuildRequires: crossmingw32-gcc
5a3544d1
JB
13BuildRequires: texinfo
14Requires: crossmingw32-runtime
15BuildRoot: %{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
41The libffi library provides a portable, high level programming
42interface to various calling conventions. This allows a programmer to
43call any function specified by a call interface description at
44run-time.
45
46Ffi stands for Foreign Function Interface. A foreign function
47interface is the popular name for the interface that allows code
48written in one language to call code written in another language. The
49libffi library really only provides the lowest, machine dependent
50layer of a fully featured foreign function interface. A layer must
51exist above libffi that handles type conversions for values passed
52between the two languages.
53
54This package contains the cross version for MinGW32.
55
56%description -l pl.UTF-8
57Biblioteka libffi dostarcza przenośny, wysokopoziomowy interfejs do
58różnych konwencji wywołań funkcji. Pozwala to programiście wywołać
59dowolną funkcję podaną przez opis interfejsu wywołania w czasie
60działania programu.
61
62FFI to skrót od Foreign Function Interface, czyli interfejsu do obcych
63funkcji. Jest to potoczna nazwa interfejsu pozwalającego programowi
64napisanemu w jednym języku wywoływać kod napisany w innym języku.
65Biblioteka libffi daje tylko najniższą, zależną od maszyny warstwę
66pełnego interfejsu. Potrzebne są wyższe warstwy do obsługi konwersji
67typów dla wartości przekazywanych pomiędzy różnymi językami.
68
69Ten pakiet zawiera wersję skrośną dla MinGW32.
70
71%package static
72Summary: Static libffi library (cross MinGW32 version)
73Summary(pl.UTF-8): Statyczna biblioteka libffi (wersja skrośna MinGW32)
74Group: Development/Libraries
75Requires: %{name} = %{version}-%{release}
76
77%description static
78Static libffi library (cross MinGW32 version).
79
80%description static -l pl.UTF-8
81Statyczna biblioteka libffi (wersja skrośna MinGW32).
82
83%package dll
84Summary: Foreign Function Interface DLL library for Windows
85Summary(pl.UTF-8): Biblioteka DLL Foreign Function Interface dla Windows
86Group: Applications/Emulators
87Requires: wine
88
89%description dll
90Foreign Function Interface DLL library for Windows.
91
92%description dll -l pl.UTF-8
93Biblioteka 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
106rm -rf $RPM_BUILD_ROOT
107
108%{__make} install \
109 DESTDIR=$RPM_BUILD_ROOT
110
111install -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
122rm -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
This page took 0.06846 seconds and 4 git commands to generate.