summaryrefslogtreecommitdiff
path: root/graphene.spec
blob: 1ab92577bfd2df598fc3b474102b3a15552f36eb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
# NOTE: despite some comments in configure, SSE2 is not selected at runtime;
# SSE2 option seems to change the ABI of library
#
# Conditional build:
%bcond_without	static_libs	# static library
%bcond_without	introspection	# gobject introspection
%bcond_with	sse2		# x86 SSE2 fast paths
%bcond_without	armneon		# ARM NEON fast paths

%ifarch pentium4 %{x8664}
%define	with_sse2	1
%endif
Summary:	Graphene - a thin layer of types for graphic libraries
Summary(pl.UTF-8):	Graphene - cienka warstwa typów dla bibliotek graficznych
Name:		graphene
Version:	1.10.2
Release:	1
License:	MIT
Group:		Libraries
Source0:	http://ftp.gnome.org/pub/GNOME/sources/graphene/1.10/%{name}-%{version}.tar.xz
# Source0-md5:	a2c26c4f44a02ca053e0e9afb63cc94c
Patch0:		%{name}-gir.patch
URL:		https://github.com/ebassi/graphene
%if %{with sse2} || %{with armneon}
BuildRequires:	gcc >= 6:4.9
%else
BuildRequires:	gcc >= 5:3.2
%endif
BuildRequires:	glib2-devel >= 1:2.40.0
%{?with_introspection:BuildRequires:	gobject-introspection-devel >= 1.41.0}
BuildRequires:	gtk-doc >= 1.20
BuildRequires:	meson >= 0.50.1
BuildRequires:	ninja >= 1.5
BuildRequires:	pkgconfig
BuildRequires:	python3 >= 1:3
BuildRequires:	rpmbuild(macros) >= 1.736
BuildRequires:	tar >= 1:1.22
BuildRequires:	xz
Requires:	glib2 >= 1:2.40.0
BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)

%description
Graphene provides a small set of mathematical types needed to
implement graphic libraries that deal with 2D and 3D transformations
and projections.

%description -l pl.UTF-8
Graphene udostępnia mały zestaw typów matematycznych potrzebnych przy
implementowaniu bibliotek graficznych wykonujących przekształcenia i
rzuty 2D oraz 3D.

%package devel
Summary:	Header files for Graphene library
Summary(pl.UTF-8):	Pliki nagłówkowe biblioteki Graphene
Group:		Development/Libraries
Requires:	%{name} = %{version}-%{release}
Requires:	glib2-devel >= 1:2.40.0

%description devel
Header files for Graphene library.

%description devel -l pl.UTF-8
Pliki nagłówkowe biblioteki Graphene.

%package static
Summary:	Static Graphene library
Summary(pl.UTF-8):	Statyczna biblioteka Graphene
Group:		Development/Libraries
Requires:	%{name}-devel = %{version}-%{release}

%description static
Static Graphene library.

%description static -l pl.UTF-8
Statyczna biblioteka Graphene.

%package apidocs
Summary:	API documentation for Graphene library
Summary(pl.UTF-8):	Dokumentacja API biblioteki Graphene
Group:		Documentation
BuildArch:	noarch

%description apidocs
API documentation for Graphene library.

%description apidocs -l pl.UTF-8
Dokumentacja API biblioteki Graphene.

%prep
%setup -q
%patch0 -p1

%build
%meson build \
	%{!?with_armneon:-Darm_neon=false} \
	-Dgtk_doc=true \
	%{!?with_introspection:-Dintrospection=false} \
	%{!?with_sse2:-Dsse2=false} \
	-Dtests=false

%meson_build -C build

%install
rm -rf $RPM_BUILD_ROOT

%meson_install -C build

%clean
rm -rf $RPM_BUILD_ROOT

%post	-p /sbin/ldconfig
%postun	-p /sbin/ldconfig

%files
%defattr(644,root,root,755)
%doc LICENSE.txt README.md
%attr(755,root,root) %{_libdir}/libgraphene-1.0.so.*.*.*
%attr(755,root,root) %ghost %{_libdir}/libgraphene-1.0.so.0
%if %{with introspection}
%{_libdir}/girepository-1.0/Graphene-1.0.typelib
%endif

%files devel
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/libgraphene-1.0.so
%{_includedir}/graphene-1.0
%dir %{_libdir}/graphene-1.0
%{_libdir}/graphene-1.0/include
%if %{with introspection}
%{_datadir}/gir-1.0/Graphene-1.0.gir
%endif
%{_pkgconfigdir}/graphene-1.0.pc
%{_pkgconfigdir}/graphene-gobject-1.0.pc

%if %{with static_libs}
%files static
%defattr(644,root,root,755)
%{_libdir}/libgraphene-1.0.a
%endif

%files apidocs
%defattr(644,root,root,755)
%{_gtkdocdir}/graphene