summaryrefslogtreecommitdiffstats
path: root/redhat/dependencies/tqt3/tqt3-14.0.0.spec
blob: 7796ab6475733c73c463f0bf4f056c956179524b (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
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
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
%define tde_version 14.0.0

# Always install under standard prefix
%define tde_prefix /usr
%define tde_bindir %{tde_prefix}/bin
%define tde_datadir %{tde_prefix}/share
%define tde_includedir %{tde_prefix}/include
%define tde_libdir %{tde_prefix}/%{_lib}

# The following QT4 packages should NOT be installed to
# allow QT3 compilation (please uninstall them prior to compile)
#  qt
#  qt-sqlite
#  qt-mysql
#  qt-x11
#  qt-devel
# ...maybe others !!!!

Name:		trinity-tqt3
Version:	3.5.0
Release:	%{?!preversion:1}%{?preversion:0_%{preversion}}%{?dist}%{?_variant}
Summary:	The shared library for the Trinity Qt 3 GUI toolkit

License:	QPL or GPLv2 or GPLv3
Group:		System Environment/Libraries
BuildRoot:	%{_tmppath}/%{name}-%{tde_version}-%{release}-root-%(%{__id_u} -n)
Url:		http://www.trinitydesktop.org

Prefix:		%{tde_prefix}

Source0: %{name}-%{tde_version}%{?preversion:~%{preversion}}.tar.gz

# [tqt3] Build shared libraries
Patch1:		tqt3-14.0.0-shared_lib.patch
# [tqt3] Fix FTBFS
Patch2:		tqt3-14.0.0-fix_ftbfs.patch

BuildRequires: desktop-file-utils
BuildRequires: libmng-devel
BuildRequires: glibc-devel
BuildRequires: libjpeg-devel
BuildRequires: libpng-devel
BuildRequires: zlib-devel
BuildRequires: giflib-devel
BuildRequires: perl
BuildRequires: sed
BuildRequires: findutils
BuildRequires: cups-devel
BuildRequires: tar
BuildRequires: freetype-devel
BuildRequires: fontconfig-devel
BuildRequires: gcc-c++
BuildRequires: libuuid-devel
BuildRequires: glib2-devel

# NAS support
%if 0%{?fedora} || 0%{?mgaversion} || 0%{?mdkversion} || 0%{?suse_version}
%define with_nas 1
BuildRequires: nas-devel
%endif

# Xrender support
%if 0%{?rhel} || 0%{?fedora}
BuildRequires: libXrender-devel
%endif
%if 0%{?mdkversion} || 0%{?mgaversion}
BuildRequires: libxrender-devel
%endif

# Xrandr support
%if 0%{?rhel} || 0%{?fedora}
BuildRequires: libXrandr-devel
%endif
%if 0%{?mdkversion} || 0%{?mgaversion}
BuildRequires: libxrandr-devel
%endif

# Xcursor support
%if 0%{?rhel} || 0%{?fedora}
BuildRequires: libXcursor-devel
%endif
%if 0%{?mdkversion} || 0%{?mgaversion}
BuildRequires: libxcursor-devel
%endif

# Xinerama support
%if 0%{?rhel} || 0%{?fedora}
BuildRequires: libXinerama-devel
%endif
%if 0%{?mdkversion} || 0%{?mgaversion}
BuildRequires: libxinerama-devel
%endif

# Xft support
%if 0%{?rhel} || 0%{?fedora}
BuildRequires: libXft-devel
%endif
%if 0%{?mdkversion} || 0%{?mgaversion}
BuildRequires: libxft-devel
%endif

# Xext support
%if 0%{?rhel} || 0%{?fedora}
BuildRequires: libXext-devel
%endif
%if 0%{?mdkversion} || 0%{?mgaversion}
BuildRequires: libxext-devel
%endif

# X11 support
%if 0%{?rhel} || 0%{?fedora}
BuildRequires: libX11-devel
%endif
%if 0%{?mdkversion} || 0%{?mgaversion}
BuildRequires: libx11-devel
%endif

# SM support
%if 0%{?rhel} || 0%{?fedora}
BuildRequires: libSM-devel
%endif
%if 0%{?mdkversion} || 0%{?mgaversion}
BuildRequires: libsm-devel
%endif

# ICE support
%if 0%{?rhel} || 0%{?fedora}
BuildRequires: libICE-devel
%endif
%if 0%{?mdkversion} || 0%{?mgaversion}
BuildRequires: libice-devel
%endif

# XT support
%if 0%{?rhel} || 0%{?fedora}
BuildRequires: libXt-devel
%endif

# XMU support
%if 0%{?rhel} || 0%{?fedora}
BuildRequires: libXmu-devel
%endif
%if 0%{?mdkversion} || 0%{?mgaversion}
BuildRequires: libxmu-devel
%endif

# XI support
%if 0%{?rhel} || 0%{?fedora}
BuildRequires: libXi-devel
%endif

# Xorg support
%if 0%{?rhel} || 0%{?fedora}
BuildRequires: xorg-x11-proto-devel
%endif

# MESA support
%if 0%{?rhel} || 0%{?fedora}
BuildRequires: mesa-libGL-devel
BuildRequires: mesa-libGLU-devel
%endif
%if 0%{?mdkversion} || 0%{?mgaversion}
BuildRequires: mesaglu-devel
%endif

BuildRequires: desktop-file-utils
BuildRequires: mysql-devel
BuildRequires: postgresql-devel
BuildRequires: unixODBC-devel
BuildRequires: sqlite-devel

# Firebird support
%if 0%{?mdkversion} || 0%{?mgaversion}
%define with_ibase 1
BuildRequires:	firebird-devel
%endif

# x86_64 specific stuff
%if "%{_lib}" != "lib"
%if 0%{?mdkversion} || ( 0%{?mgaversion} && 0%{?mgaversion} <= 2)
BuildRequires: linux32
%else
BuildRequires: util-linux
%endif
%endif

Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig
Requires: coreutils
Requires: fontconfig >= 2.0
Requires: /etc/ld.so.conf.d

%description
TQt is a GUI software toolkit which simplifies the task of writing and
maintaining GUI (Graphical User Interface) applications
for the X Window System.

TQt is written in C++ and is fully object-oriented.

This package contains the shared library needed to run TQt 3
applications, as well as the README files for TQt 3.

%post
/sbin/ldconfig || :

%postun
/sbin/ldconfig || :

%files
%defattr(-,root,root,-)
%doc FAQ LICENSE* README* changes*
%dir %{tde_libdir}/tqt3/plugins
%dir %{tde_libdir}/tqt3/plugins/sqldrivers
#%dir %{tde_libdir}/tqt3/plugins/styles
%{tde_datadir}/tqt3/translations/
%dir %{tde_libdir}/tqt3/plugins/designer
%{tde_libdir}/tqt3/plugins/designer/libcppeditor.so
%{tde_libdir}/tqt3/plugins/designer/libdlgplugin.so
%{tde_libdir}/tqt3/plugins/designer/libgladeplugin.so
%{tde_libdir}/tqt3/plugins/designer/libkdevdlgplugin.so
%{tde_libdir}/tqt3/plugins/designer/librcplugin.so
%{tde_libdir}/tqt3/plugins/designer/libwizards.so
%dir %{tde_libdir}/tqt3/plugins/imageformats
%{tde_libdir}/tqt3/plugins/imageformats/libqmng.so
%dir %{tde_libdir}/tqt3/plugins/inputmethods
%{tde_libdir}/tqt3/plugins/inputmethods/libqimsw-multi.so
%{tde_libdir}/tqt3/plugins/inputmethods/libqimsw-none.so
%{tde_libdir}/tqt3/plugins/inputmethods/libqsimple.so
%{tde_libdir}/tqt3/plugins/inputmethods/libqxim.so
%{tde_libdir}/libtqt-mt.so.3
%{tde_libdir}/libtqt-mt.so.3.5
%{tde_libdir}/libtqt-mt.so.3.5.0
%{tde_libdir}/libtqt-mt.la
%{tde_libdir}/libtqui.so.1
%{tde_libdir}/libtqui.so.1.0
%{tde_libdir}/libtqui.so.1.0.0
%{tde_libdir}/libdesignercore.so.1
%{tde_libdir}/libdesignercore.so.1.0
%{tde_libdir}/libdesignercore.so.1.0.0
%{tde_libdir}/libeditor.so.1
%{tde_libdir}/libeditor.so.1.0
%{tde_libdir}/libeditor.so.1.0.0
%{tde_libdir}/libqassistantclient.so.1
%{tde_libdir}/libqassistantclient.so.1.0
%{tde_libdir}/libqassistantclient.so.1.0.0

##########

%package config
Summary: Graphical configuration tool for programs using TQt 3
Group: User Interface/Desktops
Requires: %{name} = %{version}-%{release}

%description config
TQt is a GUI software toolkit which simplifies the task of writing and
maintaining GUI (Graphical User Interface) applications
for the X Window System.

TQt is written in C++ and is fully object-oriented.

This package contains a graphical configuration tool for programs using TQt 3.

%files config
%defattr(-,root,root,-)
%{tde_bindir}/tqtconfig

##########

%package devel
Summary: Development files for the TQt 3 GUI toolkit
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}

%description devel
The %{name}-devel package contains the files necessary to develop
applications using the TQt GUI toolkit: the header files, the TQt meta
object compiler.

Install %{name}-devel if you want to develop GUI applications using the TQt 3
toolkit.

%files devel
%defattr(-,root,root,-)
%{tde_bindir}/conv2ui
%{tde_bindir}/qvfb
%{tde_bindir}/tqmoc
%{tde_bindir}/tquic
%{tde_bindir}/findtr
%{tde_bindir}/qt20fix
%{tde_bindir}/qtrename140
%{tde_bindir}/tqassistant
%{tde_bindir}/qm2ts
%{tde_bindir}/tqmake
%{tde_bindir}/tqembed
%{tde_bindir}/tqlinguist
%{tde_bindir}/tqlupdate
%{tde_bindir}/tqlrelease
%{tde_bindir}/createcw
%{tde_bindir}/makeqpf
%{tde_bindir}/mergetr
%{tde_bindir}/msg2qm
%{tde_datadir}/tqt3/mkspecs/
%{tde_datadir}/tqt3/phrasebooks/
%{tde_includedir}/tqt3/
%{tde_libdir}/libdesignercore.prl
%{tde_libdir}/libdesignercore.so
%{tde_libdir}/libeditor.prl
%{tde_libdir}/libeditor.so
%{tde_libdir}/libqassistantclient.prl
%{tde_libdir}/libqassistantclient.so
%{tde_libdir}/libtqt-mt.so
%{tde_libdir}/libtqt-mt.prl
%{tde_libdir}/libtqui.so
%{tde_libdir}/libtqui.prl
%{tde_libdir}/pkgconfig/tqt-mt.pc


%post devel
/sbin/ldconfig || :

%postun devel
/sbin/ldconfig || :

##########

%package devel-docs
Summary: Documentation for the TQt 3 GUI toolkit
Group: Development/Libraries
Requires: %{name}-devel = %{version}-%{release}

%description devel-docs
The %{name}-devel-docs package contains the man pages, the HTML documentation and
example programs for TQt 3.

%files devel-docs
%defattr(-,root,root,-)
%doc examples
%doc tutorial
%{tde_datadir}/tqt3/doc/html/

##########

%package ODBC
Summary: ODBC drivers for TQt 3's SQL classes
Group: System Environment/Libraries
Requires: %{name} = %{version}-%{release}

%description ODBC
ODBC driver for TQt 3's SQL classes (QSQL)

%files ODBC
%defattr(-,root,root,-)
%{tde_libdir}/tqt3/plugins/sqldrivers/libqsqlodbc.so

##########

%package MySQL
Summary: MySQL drivers for TQt 3's SQL classes
Group: System Environment/Libraries
Requires: %{name} = %{version}-%{release}

%description MySQL
MySQL driver for TQt 3's SQL classes (QSQL)

%files MySQL
%defattr(-,root,root,-)
%{tde_libdir}/tqt3/plugins/sqldrivers/libqsqlmysql.so

##########

%package PostgreSQL
Summary: PostgreSQL drivers for TQt 3's SQL classes
Group: System Environment/Libraries
Requires: %{name} = %{version}-%{release}

%description PostgreSQL
PostgreSQL driver for TQt 3's SQL classes (QSQL)

%files PostgreSQL
%defattr(-,root,root,-)
%{tde_libdir}/tqt3/plugins/sqldrivers/libqsqlpsql.so

##########

%package sqlite
Summary: sqlite drivers for TQt 3's SQL classes
Group: System Environment/Libraries
Requires: %{name} = %{version}-%{release}

%description sqlite
sqlite driver for TQt 3's SQL classes (QSQL)

%files sqlite
%defattr(-,root,root,-)
%{tde_libdir}/tqt3/plugins/sqldrivers/libqsqlite.so

##########

%if 0%{?with_ibase}
%package ibase
Summary: ibase drivers for TQt 3's SQL classes
Group: System Environment/Libraries
Requires: %{name} = %{version}-%{release}

%description ibase
ibase driver for TQt 3's SQL classes (QSQL)

%files ibase
%defattr(-,root,root,-)
%{tde_libdir}/tqt3/plugins/sqldrivers/libqsqlibase.so
%endif

##########

%package designer
Summary: In3erface designer (IDE) for the TQt 3 toolkit
Group: Development/Tools
Requires: %{name}-devel = %{version}-%{release}

%description designer
The %{name}-designer package contains an User Interface designer tool
for the TQt 3 toolkit.

%files designer
%defattr(-,root,root,-)
%{tde_bindir}/tqdesigner
%{tde_datadir}/tqt3/templates/

##########


%prep
%setup -q -n %{name}-%{tde_version}%{?preversion:~%{preversion}}
%patch1 -p1 -b .sharedlibs
%patch2 -p1 -b .ftbfs

%build
unset QTDIR QTINC QTLIB
export QTDIR=$(pwd)
export PATH=${QTDIR}/stripbin:${QTDIR}/bin:$PATH
export MANPATH=${QTDIR}/doc/man:$MANPATH
export LD_LIBRARY_PATH=${QTDIR}/lib:$LD_LIBRARY_PATH

# Checks for supplementary include dir
INCDIRS=""
for d in \
	%{_includedir}/fontconfig \
	%{_includedir}/pgsql/server \
	%{_includedir}/postgresql/server \
	%{_includedir}/Xft2 \
	%{_includedir}/Xft2/X11/Xft \
	%{_includedir}/mysql \
	%{_includedir}/libpng15 \
; do
	if [ -d "${d}" ]; then
		INCDIRS="${INCDIRS} -I${d}"
	fi
done

# Checks for supplementary library dirs
LIBDIRS=""
for d in \
	%{_libdir}/mysql \
	%{_libdir}/pgsql \
; do
	if [ -d "${d}" ]; then
		LIBDIRS="${LIBDIRS} -L${d}"
	fi
done

# build shared, threaded (default) libraries
echo yes | ./configure \
		${INCDIRS} \
		${LIBDIRS} \
		-L%{_libdir} \
		-prefix		"%{tde_prefix}"				\
		-libdir		"%{tde_libdir}" \
		-sysconfdir	"%{_sysconfdir}/tqt3"			\
		-datadir	"%{tde_datadir}/tqt3"		\
		-headerdir	"%{tde_includedir}/tqt3"		\
		-docdir		"%{tde_datadir}/tqt3/doc"		\
		-plugindir	"%{tde_libdir}/tqt3/plugins"		\
		-translationdir	"%{tde_datadir}/tqt3/translations"	\
						\
		-thread				\
		-shared				\
		-fast				\
		-no-exceptions			\
%if "%{_lib}" == "lib64"
		-platform linux-g++-64 \
%else
		-platform linux-g++ \
%endif
						\
		-nis				\
		-no-pch				\
		-cups				\
		-stl				\
		-ipv6				\
						\
		-sm				\
		-xshape				\
		-xinerama			\
		-xcursor			\
		-xrandr				\
		-xrender			\
		-xft				\
		-tablet				\
		-xkb				\
						\
		-system-zlib			\
		-system-libpng			\
		-system-libmng			\
		-system-libjpeg			\
		%{?with_nas:-system-nas-sound} %{?!with_nas:-no-nas-sound}		\
						\
		-enable-opengl			\
		-dlopen-opengl			\
						\
		-qt-gif				\
		-qt-imgfmt-png			\
		-qt-imgfmt-jpeg			\
		-plugin-imgfmt-mng		\
						\
		-plugin-sql-odbc		\
		-plugin-sql-psql		\
		-plugin-sql-mysql		\
		%{?with_ibase:-plugin-sql-ibase}		\
		-plugin-sql-sqlite		\
						\
		-lfontconfig			\
		-inputmethod			\
		-glibmainloop


# Fix bad headers
rm -rf include/ntqinputcontext.h include/ntqinputcontextfactory.h include/ntqinputcontextplugin.h
ln -s ../src/kernel/ntqinputcontext.h include/ntqinputcontext.h
ln -s ../src/inputmethod/ntqinputcontextfactory.h include/ntqinputcontextfactory.h
ln -s ../src/inputmethod/ntqinputcontextplugin.h include/ntqinputcontextplugin.h

# proceed
%__make %{?_smp_mflags} sub-src sub-plugins sub-tools

# build conv2ui
%__make -C tools/designer/tools/conv2ui

# build qvfb
%__make -C tools/qvfb

# fix .prl files
%__sed -i lib/*.prl -e "s|${QTDIR}|%{tde_datadir}/tqt3|g"

# fix QTDIR in 'qmake.conf'
%__sed -i mkspecs/*/qmake.conf \
  -e "s|^QMAKE_INCDIR_QT.*|QMAKE_INCDIR_QT		= /usr/include/tqt3|" \
  -e "s|\$(QTDIR)|/usr|g" \
  -e "s|-lqt|-ltqt|g"


%install
%__rm -rf %{buildroot}
export QTDIR=$(pwd)
export PATH=${QTDIR}/stripbin:${QTDIR}/bin:$PATH

%__make -C src INSTALL_ROOT=%{?buildroot} install_target
%__make INSTALL_ROOT=%{?buildroot} install
%__make INSTALL_ROOT=%{?buildroot} plugins-install

%__install -m755 bin/qtrename140 %{?buildroot}%{_bindir}
%__install -m755 bin/qt20fix %{?buildroot}%{_bindir}
%__install -m755 bin/findtr %{?buildroot}%{_bindir}

# install conv2ui
%__install -m755 bin/conv2ui %{?buildroot}%{_bindir}/conv2ui

# install qvfb
%__install -m755 tools/qvfb/qvfb %{?buildroot}%{_bindir}/qvfb


%clean
%__rm -rf %{buildroot}


%changelog
* Fri Jul 05 2013 Francois Andriot <francois.andriot@free.fr> - 3.5.0-1
- Initial build for TDE R14.0.0