]>
Commit | Line | Data |
---|---|---|
2ddcaa5b JB |
1 | # |
2 | # Conditional build: | |
bb114a76 | 3 | %bcond_without static_libs # static library |
1a9af4b8 JB |
4 | %bcond_with mmx # MMX instructions |
5 | %bcond_with sse # SSE instructions | |
6 | %bcond_with sse2 # SSE2 instructions in CIE,two-table,ycbcr modules, sse2-* modules | |
7 | # sse4.1, avx2, f16c are optional (in separate modules) | |
8 | # sse2 is runtime-detected, but whole files are compiled with -msse2, so it's not optional | |
2ddcaa5b | 9 | # |
1a9af4b8 JB |
10 | %ifarch pentium2 pentium3 pentium4 athlon %{x8664} x32 |
11 | %define with_mmx 1 | |
12 | %endif | |
13 | %ifarch pentium3 pentium4 %{x8664} x32 | |
14 | %define with_sse 1 | |
15 | %endif | |
16 | %ifarch pentium4 %{x8664} x32 | |
17 | %define with_sse2 1 | |
18 | %endif | |
afa57aa4 | 19 | Summary: Library for pixel-format agnosticism |
2a41f84a | 20 | Summary(pl.UTF-8): Biblioteka niezależności od formatu piksela |
afa57aa4 | 21 | Name: babl |
be30d991 | 22 | Version: 0.1.74 |
bb114a76 | 23 | Release: 1 |
84fad386 | 24 | License: LGPL v3+ |
c5542464 | 25 | Group: Libraries |
1a9af4b8 | 26 | Source0: https://download.gimp.org/pub/babl/0.1/%{name}-%{version}.tar.xz |
be30d991 | 27 | # Source0-md5: d032853f2678bc95054c39d4f02045c1 |
1a9af4b8 | 28 | Patch0: %{name}-modules.patch |
afa57aa4 | 29 | URL: http://www.gegl.org/babl/ |
1a9af4b8 JB |
30 | BuildRequires: meson >= 0.50.0 |
31 | BuildRequires: ninja >= 1.5 | |
32 | BuildRequires: rpmbuild(macros) >= 1.736 | |
33 | BuildRequires: tar >= 1:1.22 | |
34 | BuildRequires: xz | |
35 | %{?with_mmx:Requires: cpuinfo(mmx)} | |
36 | %{?with_sse:Requires: cpuinfo(sse)} | |
37 | %{?with_sse:Requires: cpuinfo(sse2)} | |
afa57aa4 | 38 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
39 | ||
40 | %description | |
41 | Babl is a dynamic, any to any, pixel format conversion library. It | |
42 | provides conversions between the myriad of buffer types images can be | |
43 | stored in. Babl doesn't only help with existing pixel formats, but | |
44 | also facilitates creation of new and uncommon ones. | |
45 | ||
2a41f84a JB |
46 | %description -l pl.UTF-8 |
47 | Babl to biblioteka dynamicznych przekształceń między dowolnymi | |
48 | formatami pikseli. Udostępnia konwersje między wieloma różnymi typami | |
49 | buforów obrazów. Babl nie tylko pomaga przy istniejących formatach | |
50 | pikseli, ale także ułatwia tworzenie nowych i niestandardowych. | |
51 | ||
afa57aa4 | 52 | %package devel |
53 | Summary: Header files for babl library | |
54 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki babl | |
55 | Group: Development/Libraries | |
2a41f84a | 56 | Requires: %{name} = %{version}-%{release} |
7cbe63d1 | 57 | Obsoletes: vala-babl < 0.1.12 |
afa57aa4 | 58 | |
59 | %description devel | |
60 | Header files for babl library. | |
61 | ||
62 | %description devel -l pl.UTF-8 | |
63 | Pliki nagłówkowe biblioteki babl. | |
64 | ||
65 | %package static | |
66 | Summary: Static babl library | |
67 | Summary(pl.UTF-8): Statyczna biblioteka babl | |
68 | Group: Development/Libraries | |
69 | Requires: %{name}-devel = %{version}-%{release} | |
70 | ||
71 | %description static | |
72 | Static babl library. | |
73 | ||
74 | %description static -l pl.UTF-8 | |
75 | Statyczna biblioteka babl. | |
76 | ||
2ddcaa5b JB |
77 | %package -n vala-babl |
78 | Summary: Vala API for babl library | |
79 | Summary(pl.UTF-8): API języka Vala dla biblioteki babl | |
80 | Group: Development/Libraries | |
81 | Requires: %{name}-devel = %{version}-%{release} | |
82 | Requires: vala | |
83 | ||
84 | %description -n vala-babl | |
85 | Vala API for babl library. | |
86 | ||
87 | %description -n vala-babl -l pl.UTF-8 | |
88 | API języka Vala dla biblioteki babl. | |
89 | ||
afa57aa4 | 90 | %prep |
91 | %setup -q | |
1a9af4b8 | 92 | %patch0 -p1 |
afa57aa4 | 93 | |
94 | %build | |
1a9af4b8 JB |
95 | %meson build \ |
96 | %{!?with_mmx:-Denable-mmx=false} \ | |
97 | %{!?with_sse:-Denable-sse=false} \ | |
98 | %{!?with_sse2:-Denable-sse2=false} | |
99 | ||
100 | %ninja_build -C build | |
afa57aa4 | 101 | |
102 | %install | |
103 | rm -rf $RPM_BUILD_ROOT | |
104 | ||
1a9af4b8 | 105 | %ninja_install -C build |
067734f3 | 106 | |
afa57aa4 | 107 | %clean |
108 | rm -rf $RPM_BUILD_ROOT | |
109 | ||
110 | %post -p /sbin/ldconfig | |
111 | %postun -p /sbin/ldconfig | |
112 | ||
113 | %files | |
114 | %defattr(644,root,root,755) | |
1a9af4b8 | 115 | %doc AUTHORS MAINTAINERS NEWS TODO |
44d1c6ca AM |
116 | %attr(755,root,root) %{_libdir}/libbabl-0.1.so.*.*.* |
117 | %attr(755,root,root) %ghost %{_libdir}/libbabl-0.1.so.0 | |
1a9af4b8 | 118 | %{_libdir}/girepository-1.0/Babl-0.1.typelib |
44d1c6ca | 119 | %dir %{_libdir}/babl-0.1 |
35584e15 | 120 | %attr(755,root,root) %{_libdir}/babl-0.1/*.so |
9a2c082b JB |
121 | |
122 | %files devel | |
123 | %defattr(644,root,root,755) | |
124 | %doc docs/{*.html,*.css} | |
44d1c6ca | 125 | %attr(755,root,root) %{_libdir}/libbabl-0.1.so |
44d1c6ca | 126 | %{_includedir}/babl-0.1 |
1a9af4b8 | 127 | %{_datadir}/gir-1.0/Babl-0.1.gir |
9a2c082b JB |
128 | %{_pkgconfigdir}/babl.pc |
129 | ||
bb114a76 | 130 | %if %{with static_libs} |
9a2c082b JB |
131 | %files static |
132 | %defattr(644,root,root,755) | |
44d1c6ca | 133 | %{_libdir}/libbabl-0.1.a |
bb114a76 | 134 | %endif |
2ddcaa5b | 135 | |
bb114a76 | 136 | %if 0 |
2ddcaa5b JB |
137 | %files -n vala-babl |
138 | %defattr(644,root,root,755) | |
139 | %{_datadir}/vala/vapi/babl-0.1.vapi | |
140 | %endif |