]>
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 | |
9 | # | |
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 | |
4c5fe2b6 JB |
16 | Version: 1.2.10 |
17 | Release: 1 | |
c61b6a12 JB |
18 | License: MIT |
19 | Group: Libraries | |
4c5fe2b6 JB |
20 | Source0: http://ftp.gnome.org/pub/GNOME/sources/graphene/1.2/%{name}-%{version}.tar.xz |
21 | # Source0-md5: 07b2a7b84e993370fc8915a92a34d7e6 | |
22 | Patch0: %{name}-gcc.patch | |
c61b6a12 JB |
23 | URL: https://github.com/ebassi/graphene |
24 | BuildRequires: glib2-devel >= 1:2.40.0 | |
25 | %{?with_introspection:BuildRequires: gobject-introspection-devel >= 1.41.0} | |
26 | BuildRequires: gtk-doc >= 1.20 | |
27 | BuildRequires: autoconf >= 2.63 | |
28 | BuildRequires: automake >= 1:1.11 | |
29 | BuildRequires: libtool >= 2:2.2.6 | |
30 | BuildRequires: pkgconfig | |
4c5fe2b6 JB |
31 | BuildRequires: tar >= 1:1.22 |
32 | BuildRequires: xz | |
c61b6a12 JB |
33 | Requires: glib2 >= 1:2.40.0 |
34 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
35 | ||
36 | %description | |
37 | Graphene provides a small set of mathematical types needed to | |
38 | implement graphic libraries that deal with 2D and 3D transformations | |
39 | and projections. | |
40 | ||
41 | %description -l pl.UTF-8 | |
42 | Graphene udostępnia mały zestaw typów matematycznych potrzebnych przy | |
43 | implementowaniu bibliotek graficznych wykonujących przekształcenia i | |
44 | rzuty 2D oraz 3D. | |
45 | ||
46 | %package devel | |
47 | Summary: Header files for Graphene library | |
48 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki Graphene | |
49 | Group: Development/Libraries | |
50 | Requires: %{name} = %{version}-%{release} | |
51 | Requires: glib2-devel >= 1:2.40.0 | |
52 | ||
53 | %description devel | |
54 | Header files for Graphene library. | |
55 | ||
56 | %description devel -l pl.UTF-8 | |
57 | Pliki nagłówkowe biblioteki Graphene. | |
58 | ||
59 | %package static | |
60 | Summary: Static Graphene library | |
61 | Summary(pl.UTF-8): Statyczna biblioteka Graphene | |
62 | Group: Development/Libraries | |
63 | Requires: %{name}-devel = %{version}-%{release} | |
64 | ||
65 | %description static | |
66 | Static Graphene library. | |
67 | ||
68 | %description static -l pl.UTF-8 | |
69 | Statyczna biblioteka Graphene. | |
70 | ||
4c5fe2b6 JB |
71 | %package apidocs |
72 | Summary: API documentation for Graphene library | |
73 | Summary(pl.UTF-8): Dokumentacja API biblioteki Graphene | |
74 | Group: Documentation | |
75 | ||
76 | %description apidocs | |
77 | API documentation for Graphene library. | |
78 | ||
79 | %description apidocs -l pl.UTF-8 | |
80 | Dokumentacja API biblioteki Graphene. | |
81 | ||
c61b6a12 JB |
82 | %prep |
83 | %setup -q | |
84 | %patch0 -p1 | |
c61b6a12 JB |
85 | |
86 | %build | |
87 | %{__gtkdocize} | |
88 | %{__libtoolize} | |
89 | %{__aclocal} -I build/autotools | |
90 | %{__autoconf} | |
91 | %{__autoheader} | |
92 | %{__automake} | |
93 | %configure \ | |
94 | %{!?with_armneon:--disable-arm-neon} \ | |
4c5fe2b6 | 95 | %{!?with_introspection:--disable-introspection} \ |
c61b6a12 JB |
96 | --disable-silent-rules \ |
97 | %{!?with_sse2:--disable-sse2} \ | |
4c5fe2b6 JB |
98 | %{?with_static_libs:--enable-static} \ |
99 | --with-html-dir=%{_gtkdocdir} | |
c61b6a12 JB |
100 | %{__make} |
101 | ||
102 | %install | |
103 | rm -rf $RPM_BUILD_ROOT | |
104 | ||
105 | %{__make} install \ | |
106 | DESTDIR=$RPM_BUILD_ROOT | |
107 | ||
108 | # obsoleted by pkg-config | |
109 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libgraphene-1.0.la | |
110 | ||
111 | %clean | |
112 | rm -rf $RPM_BUILD_ROOT | |
113 | ||
114 | %post -p /sbin/ldconfig | |
115 | %postun -p /sbin/ldconfig | |
116 | ||
117 | %files | |
118 | %defattr(644,root,root,755) | |
4c5fe2b6 | 119 | %doc ChangeLog |
c61b6a12 JB |
120 | %attr(755,root,root) %{_libdir}/libgraphene-1.0.so.*.*.* |
121 | %attr(755,root,root) %ghost %{_libdir}/libgraphene-1.0.so.0 | |
4c5fe2b6 JB |
122 | %if %{with introspection} |
123 | %{_libdir}/girepository-1.0/Graphene-1.0.typelib | |
124 | %endif | |
c61b6a12 JB |
125 | |
126 | %files devel | |
127 | %defattr(644,root,root,755) | |
128 | %attr(755,root,root) %{_libdir}/libgraphene-1.0.so | |
129 | %{_includedir}/graphene-1.0 | |
4c5fe2b6 JB |
130 | %dir %{_libdir}/graphene-1.0 |
131 | %{_libdir}/graphene-1.0/include | |
132 | %if %{with introspection} | |
133 | %{_datadir}/gir-1.0/Graphene-1.0.gir | |
134 | %endif | |
c61b6a12 JB |
135 | %{_pkgconfigdir}/graphene-1.0.pc |
136 | %{_pkgconfigdir}/graphene-gobject-1.0.pc | |
137 | ||
138 | %if %{with static_libs} | |
139 | %files static | |
140 | %defattr(644,root,root,755) | |
141 | %{_libdir}/libgraphene-1.0.a | |
142 | %endif | |
4c5fe2b6 JB |
143 | |
144 | %files apidocs | |
145 | %defattr(644,root,root,755) | |
146 | %{_gtkdocdir}/graphene |