/
directfb.spec
367 lines (313 loc) · 9.34 KB
/
directfb.spec
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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
%define oname DirectFB
%define api 1.7
%define major 7
%define libdirectfb %mklibname %{name} %{api} %{major}
%define libdirect %mklibname direct %{api} %{major}
%define libppdfb %mklibname ++dfb %{api} %{major}
%define libfusion %mklibname fusion %{api} %{major}
%define libfusiondale %mklibname fusiondale %{api} %{major}
%define libfusionsound %mklibname fusionsound %{api} %{major}
%define libuniquewm %mklibname uniquewm %{api} %{major}
%define libdivine %mklibname divine %{api} %{major}
%define libsawman %mklibname sawman %{api} %{major}
%define libdavinci %mklibname davinci_cx64 0
%define devname %mklibname %{name} %{api} -d
# Multiple applications support
# Requires fusion kernel module
%define build_multi 0
%{?_without_multi: %{expand: %%global build_multi 0}}
%{?_with_multi: %{expand: %%global build_multi 1}}
%define Werror_cflags %nil
Summary: Hardware graphics acceleration library
Name: directfb
Version: 1.7.7
Release: 5
License: LGPLv2+
Group: System/Libraries
URL: http://www.directfb.org/
# Do not use source archive from github because it lack of flux and almost no one packge it. Use tarball instead.
# Looks like directfb website is no longer owned by original developers, so use latest tarball from other safe place sources.buildroot.net
#Source0: https://github.com/deniskropp/DirectFB/archive/DIRECTFB_%{oversion}/%{oname}-DIRECTFB_%{oversion}.tar.gz
Source0: http://sources.buildroot.net/%{oname}-%{version}.tar.gz
# from Debian
Patch0: 03_link_static_sysfs.patch
Patch1: DirectFB-1.6.1-link-static-ar.patch
# Explicitly link with -lm. Was failing only on x86_64, but not on i586,
# apparently because -O3 was generating code to bypass libm on i586.
Patch3: DirectFB-1.2.7-sincos-x86_64.patch
# remove common linkage of x11 system and x11 input driver
# it makes directfb segfault
# (this is a workaround, not a proper upstreamable fix)
Patch4: DirectFB-1.4.2-x11-linkage.patch
# from Debian #401296, 93_fix_unicode_key_handling.patch
Patch6: DirectFB-1.4.2-unicode.patch
Patch7: DirectFB-1.7.3-svg-includedir.patch
Patch8: DirectFB-1.6.1-zlib.patch
Patch9: DirectFB-missing.patch
Patch10: DirectFB-1.6.1-gcc-atomics-on-arm.patch
Patch11: DirectFB-1.6.3-atomic-fix-compiler-error-when-building-for-thumb2.patch
Patch12: DirectFB-ffmpeg.patch
Patch13: DirectFB-1.7.4-uniquewm-compile-fixes.patch
Patch14: directfb-1.7.6-compile.patch
Conflicts: %mklibname directfb -d < 1.7
BuildRequires: pkgconfig(bzip2)
BuildRequires: pkgconfig(libjpeg)
BuildRequires: pkgconfig(libmng)
BuildRequires: sysfsutils-devel
BuildRequires: pkgconfig(egl)
BuildRequires: pkgconfig(gl)
BuildRequires: pkgconfig(libdrm)
BuildRequires: pkgconfig(freetype2)
BuildRequires: pkgconfig(gbm)
BuildRequires: pkgconfig(glesv2)
BuildRequires: pkgconfig(gstreamer-app-1.0)
BuildRequires: pkgconfig(alsa)
BuildRequires: pkgconfig(vorbisfile)
BuildRequires: pkgconfig(mad)
BuildRequires: pkgconfig(libcddb)
BuildRequires: pkgconfig(jasper)
BuildRequires: pkgconfig(libdrm)
#BuildRequires: pkgconfig(libkms)
BuildRequires: pkgconfig(libpng)
BuildRequires: pkgconfig(libsvg-cairo)
BuildRequires: pkgconfig(libtiff-4)
BuildRequires: pkgconfig(libvncserver)
#BuildRequires: pkgconfig(swfdec-0.8)
BuildRequires: pkgconfig(tslib)
BuildRequires: pkgconfig(vdpau)
BuildRequires: pkgconfig(x11)
BuildRequires: pkgconfig(xext)
BuildRequires: pkgconfig(xproto)
BuildRequires: pkgconfig(zlib)
BuildRequires: pkgconfig(libwebp)
%if %{build_multi}
BuildRequires: fusion-devel >= 3.0
%endif
%description
DirectFB hardware graphics acceleration - libraries.
%package -n %{libdirectfb}
Summary: Shared library part of %{oname}
Group: System/Libraries
%description -n %{libdirectfb}
DirectFB hardware graphics acceleration - libraries.
This package contains the %{oname} shared library and interface modules.
It's required for running apps based on %{oname}.
%package -n %{libdirect}
Summary: The direct library, a part of directfb
Group: System/Libraries
%description -n %{libdirect}
The direct library, a part of directfb
%package -n %{libuniquewm}
Summary: The uniquewm library, a part of directfb
Group: System/Libraries
%description -n %{libuniquewm}
The fusion library, a part of directfb
%package -n %{libppdfb}
Summary: The ++dfb library, a part of directfb
Group: System/Libraries
%description -n %{libppdfb}
The ++dfb library, a part of directfb
%package -n %{libfusion}
Summary: The fusion library, a part of directfb
Group: System/Libraries
%description -n %{libfusion}
The fusion library, a part of directfb
%package -n %{libfusiondale}
Summary: The fusiondale library, a part of directfb
Group: System/Libraries
%description -n %{libfusiondale}
The fusiondale library, a part of directfb
%package -n %{libfusionsound}
Summary: The fusionsound library, a part of directfb
Group: System/Libraries
%description -n %{libfusionsound}
The fusionsound library, a part of directfb
%package -n %{libdivine}
Summary: The divine library, a part of directfb
Group: System/Libraries
%description -n %{libdivine}
The divine library, a part of directfb
%package -n %{libsawman}
Summary: The sawman library, a part of directfb
Group: System/Libraries
%description -n %{libsawman}
The sawman library, a part of directfb
%package -n %{libdavinci}
Summary: The davinci library, a part of directfb
Group: System/Libraries
%description -n %{libdavinci}
The davinci library, a part of directfb
%package -n %{devname}
Group: Development/C
Summary: Header files for compiling DirectFB applications
Requires: %{libdirectfb} = %{version}-%{release}
Provides: %{name}-devel = %{version}-%{release}
%description -n %{devname}
DirectFB header files for building applications based on %{oname}.
%package doc
Summary: DirectFB - documentation
Group: Books/Computer books
%description doc
DirectFB documentation and examples.
%prep
%setup -qn %{oname}-%{version}
%patch0 -p1 -b .sysfs~
%patch1 -p1 -b .link-static-ar~
%patch3 -p1
%patch4 -p1 -b .x11-linkage~
%patch6 -p1 -b .unicode~
%patch7 -p1 -b .svgdir~
%patch8 -p1 -b .zlib~
%patch9 -p1
%patch10 -p1 -b .atomic~
%patch11 -p1 -b .thumb~
%patch12 -p1 -b .ffmpeg~
%patch13 -p1 -b .uniquewm~
%patch14 -p1 -b .compile~
#A reminder of what not to do to include files....
# Needed for Qt 5 as of Qt 5.0.1:
#sed -e '/define __typeof/d' -i lib/direct/os/linux/glibc/types.h
#find . -name "*.h" |xargs sed -i -e 's,__typeof__,typeof,g'
autoreconf -if
%build
%global optflags %{optflags} -Ofast -w
export CC=gcc
export CXX=g++
%configure \
--disable-maintainer-mode \
--enable-shared \
--disable-fast-install \
--disable-debug \
--enable-zlib \
--enable-x11 \
--enable-x11vdpau \
--enable-text \
--enable-gettid \
--enable-network \
--enable-dynload \
--enable-multicore \
--enable-divine \
--disable-one \
--disable-voodoo \
--disable-pure-voodoo \
--enable-fusionsound \
--enable-fusiondale \
--enable-fs-ieee-floats \
--enable-unique \
--enable-sawman \
--disable-pvr2d \
--disable-egl \
--enable-idirectfbgl-egl \
--enable-devmem \
--enable-fbdev \
--enable-sdl \
--enable-vnc \
--enable-mesa \
--enable-drmkms \
--enable-jpeg \
--enable-zlib \
--enable-mng \
--enable-gstreamer \
--enable-gif \
--enable-tiff \
--enable-imlib2 \
--enable-pnm \
--enable-svg \
--enable-mpeg2 \
--enable-bmp \
--enable-jpeg2000 \
--enable-openquicktime \
--enable-avifile \
--enable-libmpeg3 \
--enable-flash \
--enable-xine \
--enable-xine-vdpau \
--disable-swfdec \
--enable-ffmpeg \
--enable-freetype \
--enable-video4linux2 \
--enable-webp \
--enable-linotype \
--with-fs-drivers=all \
--with-timidity \
--with-wave \
--with-vorbis \
--with-mad \
--with-cdda \
--with-gfxdrivers=all \
--with-inputdrivers=all \
--with-smooth-scaling \
--with-dither-rgb16=advanced \
--with-dither=advanced \
%ifarch %{ix86}
--disable-mmx \
--disable-sse \
%endif
%if %build_multi
--enable-multi
%else
--disable-multi
%endif
%make_build LIBS="-lbz2 -ldl -pthread -lpthread"
%install
%make_install
%files
%ifarch %{arm}
%{_bindir}/c64xdump
%endif
%{_bindir}/dfb*
%{_bindir}/directfb*
%{_bindir}/mkd*
%{_bindir}/pxa3xx_dump
%{_bindir}/fddump
%{_bindir}/fdmaster
%{_bindir}/fsdump
%{_bindir}/fsmaster
%{_bindir}/fsplay
%{_bindir}/fsvolume
%{_bindir}/spooky
%{_bindir}/swmdump
%{_bindir}/uwmdump
%{_datadir}/%{name}-%{version}
%{_libdir}/%{name}-%{api}-%{major}
%files -n %{devname}
%{_bindir}/directfb-config
%{_includedir}/directfb
%{_includedir}/directfb-internal
%{_includedir}/divine
%{_includedir}/fusiondale
%{_includedir}/fusionsound
%{_includedir}/fusionsound-internal
%{_includedir}/sawman
%{_includedir}/++dfb
%doc %{_mandir}/man1/directfb-csource.1*
%doc %{_mandir}/man1/dfbg.1*
%doc %{_mandir}/man5/directfbrc.5*
%{_libdir}/pkgconfig/*
%{_libdir}/lib*.so
%files -n %{libdirectfb}
%{_libdir}/libdirectfb-%{api}.so.%{major}*
%files -n %{libdirect}
%{_libdir}/libdirect-%{api}.so.%{major}*
%files -n %{libppdfb}
%{_libdir}/lib++dfb-%{api}.so.%{major}*
%files -n %{libfusion}
%{_libdir}/libfusion-%{api}.so.%{major}*
%files -n %{libfusiondale}
%{_libdir}/libfusiondale-%{api}.so.%{major}*
%files -n %{libfusionsound}
%{_libdir}/libfusionsound-%{api}.so.%{major}*
%files -n %{libuniquewm}
%{_libdir}/libuniquewm-%{api}.so.%{major}*
%files -n %{libdivine}
%{_libdir}/libdivine-%{api}.so.%{major}*
%files -n %{libsawman}
%{_libdir}/libsawman-%{api}.so.%{major}*
%ifarch %{arm}
%files -n %{libdavinci}
%{_libdir}/libdavinci_c64x.so.0
%{_libdir}/libdavinci_c64x.so.0.0.0
%endif
%files doc
%doc docs/html/*.html
%doc README* AUTHORS NEWS TODO