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
|
# Maintainer: Michael Manley <[email protected]>
# Contributor: Pawel 'l0ner' Soltys <[email protected]>
# Contributor: Calvin Morrison <[email protected]>
# Contributor: David C. Rankin <drankinatty at gmail dot com>
pkgbase=tde-tqt3
pkgname=("$pkgbase" "${pkgbase}-docs")
pkgver=14.0.5
pkgrel=1
pkgdesc="The TQt3 gui toolkit - based on TDE upstream Qt3"
arch=('i686' 'x86_64')
url="http://scm.trinitydesktop.org/scm/git/tqt3"
license=('GPL')
groups=('tde-core')
options=('staticlibs' 'libtool' '!emptydirs' '!strip')
makedepends=('libcups'
'libiodbc'
'libxi'
'postgresql-9.6'
'mariadb'
'unixodbc'
'libmng'
'xorg-xrandr'
'libxft')
source=("http://mirror.ppa.trinitydesktop.org/trinity/releases/R${pkgver}/dependencies/tqt3-R${pkgver}.tar.bz2")
md5sums=('26b4a59e1f2c24807658503e5ed6ab27')
_prefix="/opt/trinity/tqt3"
build() {
cd ${srcdir}/dependencies/tqt3
# These are probably arch-specific. They were present in old qt3
# PKGBULD, they were present in kdemod3 PKGBUILD, they are present
# here.
sed -i 's|-cp -P -f|-cp -L -f|' qmake/Makefile.unix
sed -i "s|-O2|$CXXFLAGS|" mkspecs/linux-g++/qmake.conf
sed -i "s|-O2|$CXXFLAGS|" mkspecs/linux-g++-32/qmake.conf
sed -i "s|-O2|$CXXFLAGS|" mkspecs/linux-g++-64/qmake.conf
sed -i "s|-I. |$CXXFLAGS -I. |" qmake/Makefile.unix
## Fix commits 4412d295 and 18696899 that broke tqca-tls building
# by changing mkspecs/linux-g++-64/qmake.conf to include ../lib64.
# Just change all lib64 paths back to lib since Arch doesn't use lib64
sed -i 's|lib64|lib|g' mkspecs/linux-g++-64/qmake.conf
# auto license acceptance
sed -i "s|read acceptance|acceptance=yes|" configure
msg "Setting enviroment variables..."
export QTDIR="${srcdir}/dependencies/tqt3"
export PATH=${QTDIR}/bin:${PATH}
export LD_LIBRARY_PATH=${QTDIR}/lib:${LD_LIBRARY_PATH}
export QMAKESPEC=$QTDIR/mkspecs/linux-g++
if [ "$CARCH" = "x86_64" ]; then
export ARCH="-64"
else unset ARCH
fi
# Remove useless to us mkspecs
rm -rf mkspecs/{*aix*,*bsd*,cygwin*,dgux*,darwin*,hpux*,hurd*,irix*,lynxos*,macx*,qnx*,reliant*,sco*,solaris*,tru64*,unixware*,win32*}
msg "Starting configure..."
./configure \
-prefix ${_prefix} \
-sysconfdir /etc/tqt \
-I/usr/include/mysql \
-I/usr/include/postgresql/server \
-I/usr/include/libiodbc \
-I/usr/include/freetype2 \
-I/usr/include/tirpc \
-lpq \
-lmysqlclient \
-L/usr/lib/mysql \
-qt-gif \
-system-zlib \
-system-libpng \
-system-libjpeg \
-system-libmng \
-plugin-imgfmt-png \
-plugin-imgfmt-jpeg \
-plugin-imgfmt-mng \
-plugin-sql-mysql \
-plugin-sql-psql \
-plugin-sql-sqlite \
-plugin-sql-odbc \
-platform linux-g++${ARCH} \
-no-exceptions \
-thread \
-dlopen-opengl \
-no-ipv6
# 64bit fixes pulled from extras/qt3 PKGBUILD
# this is Arch-specific
# fix /opt/qt/lib path
[ "$CARCH" = "x86_64" ] && sed -i "s|/opt/qt/lib64|/opt/qt/lib|g" ${QTDIR}/src/Makefile
[ "$CARCH" = "x86_64" ] && sed -i "s|/opt/qt/lib64|/opt/qt/lib|g" ${QTDIR}/tools/designer/designer/Makefile
[ "$CARCH" = "x86_64" ] && sed -i "s|/opt/qt/lib64|/opt/qt/lib|g" ${QTDIR}/tools/designer/editor/Makefile
[ "$CARCH" = "x86_64" ] && sed -i "s|/opt/qt/lib64|/opt/qt/lib|g" ${QTDIR}/tools/assistant/lib/Makefile
[ "$CARCH" = "x86_64" ] && sed -i "s|/opt/qt/lib64|/opt/qt/lib|g" ${QTDIR}/tools/designer/uilib/Makefile
msg "--- \$CARCH is $CARCH ---"
msg "Building - $pkgbase..."
cd "${QTDIR}"
# build rest, but without tutorials and examples
# of you want them, remove sub-tools
make sub-tools
}
## split package for tqt3
package_tde-tqt3() {
pkgdesc="The TQt3 gui toolkit - based on TDE upstream Qt3 - git version"
depends=('libjpeg-turbo'
'libmng'
'libmariadbclient'
'libpng'
'libxcursor'
'libxft'
'libxinerama'
'libxmu'
'libxrandr'
'mesa'
'postgresql-9.6')
optdepends=('cups: The CUPS Printing System - for printing support'
'postgresql-9.6: A sophisticated object-relational DBMS - databse support'
'unixodbc: ODBC API for linux - databse support'
'mariadb: A fast SQL database server - databse support')
provides=('qt3' 'tqt3')
replaces=('qt3' 'qt3-enhanced' 'trinity-tqt3')
options=('staticlibs' 'libtool' '!emptydirs' '!strip')
groups=('tde-core')
install='tqt3.install'
msg "Packaging - $pkgname-$pkgver"
cd "${QTDIR}"
make INSTALL_ROOT="$pkgdir" install
## remove doc as it is now in a split package tde-tqt3-doc
rm -r "${pkgdir}${_prefix}/doc"
# install link the apps provided by qt3 so we don't collide with
# qt4 and can run them.
# New links providing old package functionality (however 3rd party packages unlikely to build
# unless updated to use new name references. Can drop this if it doesn't work.
ln -sf "${_prefix}/bin/tqassistant" "${pkgdir}${_prefix}/bin/assistant"
ln -sf "${_prefix}/bin/tqdesigner" "${pkgdir}${_prefix}/bin/designer"
ln -sf "${_prefix}/bin/tqlinguist" "${pkgdir}${_prefix}/bin/linguist"
ln -sf "${_prefix}/bin/tqlrelease" "${pkgdir}${_prefix}/bin/lrelease"
ln -sf "${_prefix}/bin/tqlupdate" "${pkgdir}${_prefix}/bin/lupdate"
ln -sf "${_prefix}/bin/tqmoc" "${pkgdir}${_prefix}/bin/moc"
ln -sf "${_prefix}/bin/tqmake" "${pkgdir}${_prefix}/bin/qmake"
ln -sf "${_prefix}/bin/tqtconfig" "${pkgdir}${_prefix}/bin/qtconfig"
ln -sf "${_prefix}/bin/tquic" "${pkgdir}${_prefix}/bin/uic"
# Build ld.so.conf file
install -d -m755 "${pkgdir}/etc/ld.so.conf.d/"
echo "${_prefix}/lib" >> "${pkgdir}/etc/ld.so.conf.d/${pkgbase#*-}.conf"
msg "Cleaning package..."
# remove any link to the compiled libraries present in
# $srcdir, which won't be present in non-building system.
sed -i "s|-L${srcdir}/${pkgbase#*-}/lib ||g" "${pkgdir}${_prefix}"/lib/*.prl
# missing include "qglobal.h" in include/qtimer.h fix
sed -i 's/define TQTIMER_H/&\n#include "ntqglobal.h"/' "${pkgdir}${_prefix}/include/ntqtimer.h"
}
## split package for tqt3 documentation
package_tde-tqt3-docs() {
pkgdesc="TQt3 gui toolkit documentation - based on TDE upstream Qt3 - git version"
provides=('tqt3-docs')
groups=('tde-docs')
msg "Packaging - $pkgname-$pkgver"
## install doc pages which are missed by make install
## convenient for a split package
install -d -m755 "${pkgdir}${_prefix}/doc/"
cp -r "${QTDIR}/doc" "${pkgdir}${_prefix}"
}
|