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