]>
Commit | Line | Data |
---|---|---|
c61b6a12 JB |
1 | # NOTE: despite some comments in configure, SSE2 is not selected at runtime; |
2 | # SSE2 option seems to change the ABI of library | |
3 | # | |
4 | # Conditional build: | |
5 | %bcond_without static_libs # static library | |
4c5fe2b6 | 6 | %bcond_without introspection # gobject introspection |
c61b6a12 JB |
7 | %bcond_with sse2 # x86 SSE2 fast paths |
8 | %bcond_without armneon # ARM NEON fast paths | |
eba3a6e7 | 9 | |
c61b6a12 | 10 | %ifarch pentium4 %{x8664} |
4c5fe2b6 | 11 | %define with_sse2 1 |
c61b6a12 JB |
12 | %endif |
13 | Summary: Graphene - a thin layer of types for graphic libraries | |
14 | Summary(pl.UTF-8): Graphene - cienka warstwa typów dla bibliotek graficznych | |
15 | Name: graphene | |
09305cc3 | 16 | Version: 1.10.2 |
b676c95d | 17 | Release: 1 |
c61b6a12 JB |
18 | License: MIT |
19 | Group: Libraries | |
66288e3f | 20 | Source0: http://ftp.gnome.org/pub/GNOME/sources/graphene/1.10/%{name}-%{version}.tar.xz |
09305cc3 | 21 | # Source0-md5: a2c26c4f44a02ca053e0e9afb63cc94c |
4b7a3b52 | 22 | Patch0: %{name}-gir.patch |
c61b6a12 | 23 | URL: https://github.com/ebassi/graphene |
66288e3f | 24 | %if %{with sse2} || %{with armneon} |
4b7a3b52 | 25 | BuildRequires: gcc >= 6:4.9 |
d41a2c75 JB |
26 | %else |
27 | BuildRequires: gcc >= 5:3.2 | |
4b7a3b52 | 28 | %endif |
c61b6a12 JB |
29 | BuildRequires: glib2-devel >= 1:2.40.0 |
30 | %{?with_introspection:BuildRequires: gobject-introspection-devel >= 1.41.0} | |
31 | BuildRequires: gtk-doc >= 1.20 | |
66288e3f | 32 | BuildRequires: meson >= 0.50.1 |
d41a2c75 | 33 | BuildRequires: ninja >= 1.5 |
c61b6a12 | 34 | BuildRequires: pkgconfig |
09305cc3 | 35 | BuildRequires: python3 >= 1:3 |
66288e3f | 36 | BuildRequires: rpmbuild(macros) >= 1.736 |
4c5fe2b6 JB |
37 | BuildRequires: tar >= 1:1.22 |
38 | BuildRequires: xz | |
c61b6a12 JB |
39 | Requires: glib2 >= 1:2.40.0 |
40 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
41 | ||
42 | %description | |
43 | Graphene provides a small set of mathematical types needed to | |
44 | implement graphic libraries that deal with 2D and 3D transformations | |
45 | and projections. | |
46 | ||
47 | %description -l pl.UTF-8 | |
48 | Graphene udostępnia mały zestaw typów matematycznych potrzebnych przy | |
49 | implementowaniu bibliotek graficznych wykonujących przekształcenia i | |
50 | rzuty 2D oraz 3D. | |
51 | ||
52 | %package devel | |
53 | Summary: Header files for Graphene library | |
54 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki Graphene | |
55 | Group: Development/Libraries | |
56 | Requires: %{name} = %{version}-%{release} | |
57 | Requires: glib2-devel >= 1:2.40.0 | |
58 | ||
59 | %description devel | |
60 | Header files for Graphene library. | |
61 | ||
62 | %description devel -l pl.UTF-8 | |
63 | Pliki nagłówkowe biblioteki Graphene. | |
64 | ||
65 | %package static | |
66 | Summary: Static Graphene library | |
67 | Summary(pl.UTF-8): Statyczna biblioteka Graphene | |
68 | Group: Development/Libraries | |
69 | Requires: %{name}-devel = %{version}-%{release} | |
70 | ||
71 | %description static | |
72 | Static Graphene library. | |
73 | ||
74 | %description static -l pl.UTF-8 | |
75 | Statyczna biblioteka Graphene. | |
76 | ||
4c5fe2b6 JB |
77 | %package apidocs |
78 | Summary: API documentation for Graphene library | |
79 | Summary(pl.UTF-8): Dokumentacja API biblioteki Graphene | |
80 | Group: Documentation | |
eba3a6e7 | 81 | BuildArch: noarch |
4c5fe2b6 JB |
82 | |
83 | %description apidocs | |
84 | API documentation for Graphene library. | |
85 | ||
86 | %description apidocs -l pl.UTF-8 | |
87 | Dokumentacja API biblioteki Graphene. | |
88 | ||
c61b6a12 JB |
89 | %prep |
90 | %setup -q | |
91 | %patch0 -p1 | |
c61b6a12 JB |
92 | |
93 | %build | |
4b7a3b52 JB |
94 | %meson build \ |
95 | %{!?with_armneon:-Darm_neon=false} \ | |
96 | -Dgtk_doc=true \ | |
97 | %{!?with_introspection:-Dintrospection=false} \ | |
98 | %{!?with_sse2:-Dsse2=false} \ | |
99 | -Dtests=false | |
100 | ||
101 | %meson_build -C build | |
c61b6a12 JB |
102 | |
103 | %install | |
104 | rm -rf $RPM_BUILD_ROOT | |
105 | ||
4b7a3b52 | 106 | %meson_install -C build |
c61b6a12 JB |
107 | |
108 | %clean | |
109 | rm -rf $RPM_BUILD_ROOT | |
110 | ||
111 | %post -p /sbin/ldconfig | |
112 | %postun -p /sbin/ldconfig | |
113 | ||
114 | %files | |
115 | %defattr(644,root,root,755) | |
66288e3f | 116 | %doc LICENSE.txt README.md |
c61b6a12 JB |
117 | %attr(755,root,root) %{_libdir}/libgraphene-1.0.so.*.*.* |
118 | %attr(755,root,root) %ghost %{_libdir}/libgraphene-1.0.so.0 | |
4c5fe2b6 JB |
119 | %if %{with introspection} |
120 | %{_libdir}/girepository-1.0/Graphene-1.0.typelib | |
121 | %endif | |
c61b6a12 JB |
122 | |
123 | %files devel | |
124 | %defattr(644,root,root,755) | |
125 | %attr(755,root,root) %{_libdir}/libgraphene-1.0.so | |
126 | %{_includedir}/graphene-1.0 | |
4c5fe2b6 JB |
127 | %dir %{_libdir}/graphene-1.0 |
128 | %{_libdir}/graphene-1.0/include | |
129 | %if %{with introspection} | |
130 | %{_datadir}/gir-1.0/Graphene-1.0.gir | |
131 | %endif | |
c61b6a12 JB |
132 | %{_pkgconfigdir}/graphene-1.0.pc |
133 | %{_pkgconfigdir}/graphene-gobject-1.0.pc | |
134 | ||
135 | %if %{with static_libs} | |
136 | %files static | |
137 | %defattr(644,root,root,755) | |
138 | %{_libdir}/libgraphene-1.0.a | |
139 | %endif | |
4c5fe2b6 JB |
140 | |
141 | %files apidocs | |
142 | %defattr(644,root,root,755) | |
143 | %{_gtkdocdir}/graphene |