]>
Commit | Line | Data |
---|---|---|
b0f59df1 JB |
1 | Summary: Pixel manipulation library - cross Mingw32 |
2 | Summary(pl.UTF-8): Biblioteka operacji na pikselach - wersja skrośna Mingw32 | |
3 | Name: crossmingw32-pixman | |
c0036c04 | 4 | Version: 0.18.2 |
b0f59df1 JB |
5 | Release: 1 |
6 | License: MIT | |
7 | Group: Development/Libraries | |
8 | Source0: http://xorg.freedesktop.org/archive/individual/lib/pixman-%{version}.tar.bz2 | |
c0036c04 | 9 | # Source0-md5: 8f0c47bbb12a0d9c0d14242596bf6bf9 |
7921815b | 10 | Patch0: pixman-no_pkgconfig.patch |
ffd42c07 | 11 | Patch1: pixman-notls.patch |
b0f59df1 JB |
12 | URL: http://xorg.freedesktop.org/ |
13 | BuildRequires: autoconf >= 2.57 | |
14 | BuildRequires: automake | |
15 | BuildRequires: crossmingw32-gcc | |
b0f59df1 JB |
16 | BuildRequires: libtool |
17 | BuildRequires: sed >= 4.0 | |
18 | Requires: crossmingw32-runtime | |
19 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
20 | ||
21 | %define no_install_post_strip 1 | |
22 | ||
23 | %define target i386-mingw32 | |
24 | %define target_platform i386-pc-mingw32 | |
25 | ||
26 | %define _sysprefix /usr | |
27 | %define _prefix %{_sysprefix}/%{target} | |
28 | %define _libdir %{_prefix}/lib | |
29 | %define _pkgconfigdir %{_prefix}/lib/pkgconfig | |
30 | %define _dlldir /usr/share/wine/windows/system | |
31 | %define __cc %{target}-gcc | |
32 | %define __cxx %{target}-g++ | |
33 | ||
6f3319a2 JB |
34 | %ifnarch %{ix86} |
35 | # arch-specific flags (like alpha's -mieee) are not valid for i386 gcc | |
36 | %define optflags -O2 | |
37 | %endif | |
38 | # -z options are invalid for mingw linker | |
39 | %define filterout_ld -Wl,-z,.* | |
40 | ||
b0f59df1 JB |
41 | %description |
42 | pixman is a pixel manipulation library. | |
43 | ||
44 | This package contains the cross version for Win32. | |
45 | ||
46 | %description -l pl.UTF-8 | |
47 | pixman to biblioteka do operacji na pikselach. | |
48 | ||
49 | Ten pakiet zawiera wersję skrośną dla Win32. | |
50 | ||
51 | %package static | |
52 | Summary: Static pixman library (cross mingw32 version) | |
53 | Summary(pl.UTF-8): Statyczna biblioteka pixman (wersja skrośna mingw32) | |
54 | Group: Development/Libraries | |
55 | Requires: %{name} = %{version}-%{release} | |
56 | ||
57 | %description static | |
58 | Static pixman library (cross mingw32 version). | |
59 | ||
60 | %description static -l pl.UTF-8 | |
61 | Statyczna biblioteka pixman (wersja skrośna mingw32). | |
62 | ||
63 | %package dll | |
64 | Summary: DLL pixman library for Windows | |
65 | Summary(pl.UTF-8): Biblioteka DLL pixman dla Windows | |
66 | Group: Applications/Emulators | |
67 | Requires: wine | |
68 | ||
69 | %description dll | |
70 | DLL pixman library for Windows. | |
71 | ||
72 | %description dll -l pl.UTF-8 | |
73 | Biblioteka DLL pixman dla Windows. | |
74 | ||
75 | %prep | |
76 | %setup -q -n pixman-%{version} | |
7921815b | 77 | %patch0 -p1 |
ffd42c07 | 78 | %patch1 -p1 |
b0f59df1 JB |
79 | |
80 | # disable gtk-based test | |
81 | :> test/Makefile.am | |
82 | # needed to build dll | |
83 | sed -i -e 's/^libpixman_1_la_LDFLAGS =/& -no-undefined/' pixman/Makefile.am | |
84 | ||
85 | %build | |
86 | %{__libtoolize} | |
87 | %{__aclocal} | |
88 | %{__autoconf} | |
89 | %{__autoheader} | |
90 | %{__automake} | |
91 | %configure \ | |
ffd42c07 | 92 | CPPFLAGS="%{rpmcppflags} -DPIXMAN_NO_TLS" \ |
b0f59df1 | 93 | --target=%{target} \ |
ffd42c07 JB |
94 | --host=%{target} \ |
95 | --disable-silent-rules | |
b0f59df1 JB |
96 | |
97 | %{__make} | |
98 | ||
99 | %install | |
100 | rm -rf $RPM_BUILD_ROOT | |
101 | ||
102 | %{__make} install \ | |
103 | DESTDIR=$RPM_BUILD_ROOT | |
104 | ||
7921815b JB |
105 | sed -i -e 's#<pixman-version.h>#<pixman-1/pixman-version.h>#g' $RPM_BUILD_ROOT%{_includedir}/pixman-1/pixman.h |
106 | ||
b0f59df1 JB |
107 | install -d $RPM_BUILD_ROOT%{_dlldir} |
108 | mv -f $RPM_BUILD_ROOT%{_prefix}/bin/*.dll $RPM_BUILD_ROOT%{_dlldir} | |
109 | ||
110 | %if 0%{!?debug:1} | |
111 | %{target}-strip --strip-unneeded -R.comment -R.note $RPM_BUILD_ROOT%{_dlldir}/*.dll | |
112 | %{target}-strip -g -R.comment -R.note $RPM_BUILD_ROOT%{_libdir}/*.a | |
113 | %endif | |
114 | ||
115 | %clean | |
116 | rm -rf $RPM_BUILD_ROOT | |
117 | ||
118 | %files | |
119 | %defattr(644,root,root,755) | |
120 | %doc README TODO | |
121 | %{_libdir}/libpixman-1.dll.a | |
122 | %{_libdir}/libpixman-1.la | |
123 | %{_includedir}/pixman-1 | |
124 | %{_pkgconfigdir}/pixman-1.pc | |
125 | ||
126 | %files static | |
127 | %defattr(644,root,root,755) | |
128 | %{_libdir}/libpixman-1.a | |
129 | ||
130 | %files dll | |
131 | %defattr(644,root,root,755) | |
132 | %{_dlldir}/libpixman-1-*.dll |