rev |
line source |
al@19988
|
1 # SliTaz package receipt v2.
|
al@19988
|
2
|
al@19988
|
3 PACKAGE="qt5"
|
al@19988
|
4 VERSION="5.9.1"
|
al@19988
|
5 CATEGORY="meta"
|
al@19988
|
6 SHORT_DESC="Cross-platform application framework"
|
al@19988
|
7 MAINTAINER="al.bobylev@gmail.com"
|
al@19988
|
8 LICENSE="LGPL3 GPL3"
|
al@19988
|
9 WEB_SITE="https://www.qt.io/"
|
al@19988
|
10 LFS="http://www.linuxfromscratch.org/blfs/view/stable/x/qt5.html"
|
al@19988
|
11
|
al@19988
|
12 TARBALL="qt-everywhere-opensource-src-$VERSION.tar.xz"
|
al@19988
|
13 WGET_URL="https://download.qt.io/archive/qt/${VERSION%.*}/$VERSION/single/$TARBALL"
|
al@19988
|
14
|
psychomaniak@20086
|
15 PATCH="Do-not-make-lack-of-SSE2-support-on-x86-32-fatal.patch"
|
psychomaniak@20086
|
16 PATCH_URL="https://anonscm.debian.org/cgit/pkg-kde/qt/qtdeclarative.git/plain/debian/patches/"
|
psychomaniak@20086
|
17
|
al@19988
|
18 BUILD_DEPENDS="dbus-dev eudev-dev zlib-dev glib-dev icu-dev pcre-dev \
|
al@20502
|
19 openssl-dev sqlite3-dev xorg-libxcb-dev mesa-dev freetype-dev fontconfig-dev \
|
al@19988
|
20 libinput-dev harfbuzz-dev libjpeg-turbo-dev libpng16-dev tslib-dev \
|
al@19988
|
21 xorg-libX11-dev libxkbcommon-dev xorg-libXrender-dev cups-dev \
|
al@19988
|
22 xorg-libXcomposite-dev alsa-lib-dev gst1-plugins-base-dev gtk+3-dev"
|
al@19988
|
23 # Name split packages according to sources structure, for example:
|
al@19988
|
24 # $src/qtgamepad/ -> qt5-gamepad
|
al@19988
|
25 SPLIT="qt5-3d qt5-base qt5-base-gtk3 \
|
al@19988
|
26 qt5-canvas3d qt5-charts qt5-connectivity \
|
al@19988
|
27 qt5-datavis3d qt5-declarative qt5-gamepad \
|
al@19988
|
28 qt5-graphicaleffects qt5-imageformats qt5-location \
|
al@19988
|
29 qt5-multimedia qt5-networkauth qt5-purchasing \
|
al@19988
|
30 qt5-quickcontrols qt5-quickcontrols2 qt5-remoteobjects \
|
al@19988
|
31 qt5-script qt5-scxml qt5-sensors \
|
al@19988
|
32 qt5-serialbus qt5-serialport qt5-speech \
|
al@19988
|
33 qt5-svg qt5-tools qt5-virtualkeyboard \
|
al@19988
|
34 qt5-wayland qt5-webchannel qt5-websockets \
|
psychomaniak@20182
|
35 qt5-x11extras qt5-xmlpatterns qt5-base-egl \
|
al@19988
|
36 \
|
al@19988
|
37 qt5-locale-ar qt5-locale-ca qt5-locale-cs qt5-locale-da \
|
al@19988
|
38 qt5-locale-de qt5-locale-en qt5-locale-es qt5-locale-fa \
|
al@19988
|
39 qt5-locale-fi qt5-locale-fr qt5-locale-gl qt5-locale-he \
|
al@19988
|
40 qt5-locale-hu qt5-locale-it qt5-locale-ja qt5-locale-ko \
|
al@19988
|
41 qt5-locale-lt qt5-locale-lv qt5-locale-pl qt5-locale-pt \
|
al@19988
|
42 qt5-locale-ru qt5-locale-sk qt5-locale-sl qt5-locale-sv \
|
al@19988
|
43 qt5-locale-uk qt5-locale-zh_CN qt5-locale-zh_TW \
|
al@19988
|
44 \
|
al@19988
|
45 qt5-doc qt5-dev"
|
al@19988
|
46
|
al@19988
|
47 compile_rules() {
|
al@20514
|
48 fix math
|
al@19988
|
49 export QT5PREFIX=/usr # or /opt/qt5
|
al@19988
|
50 if [ "$QT5PREFIX" == '/usr' ]; then
|
al@19988
|
51 QT5OPTS="\
|
al@19988
|
52 -archdatadir /usr/lib/qt5 \
|
al@19988
|
53 -bindir /usr/bin \
|
al@19988
|
54 -plugindir /usr/lib/qt5/plugins \
|
al@19988
|
55 -importdir /usr/lib/qt5/imports \
|
al@19988
|
56 -headerdir /usr/include/qt5 \
|
al@19988
|
57 -datadir /usr/share/qt5 \
|
al@19988
|
58 -docdir /usr/share/doc/qt5 \
|
al@19988
|
59 -translationdir /usr/share/qt5/translations \
|
al@19988
|
60 -examplesdir /usr/share/doc/qt5/examples \
|
al@19988
|
61 "
|
al@19988
|
62 fi
|
al@19988
|
63
|
al@19988
|
64 echo "INCLUDEPATH += /usr/include/openssl-1.0" >> qtbase/src/network/network.pro
|
al@19988
|
65 export OPENSSL_LIBS='-L/usr/lib/openssl-1.0 -lssl -lcrypto'
|
al@19988
|
66
|
al@20513
|
67 [ -s $SRC/$PATCH ] || wget -O $SRC/$PATCH $PATCH_URL$PATCH
|
psychomaniak@20086
|
68 cd $src/qtdeclarative
|
al@20513
|
69 cp $SRC/$PATCH ./$PATCH
|
psychomaniak@20086
|
70 patch -p1 -i $PATCH
|
psychomaniak@20086
|
71 cd ..
|
psychomaniak@20086
|
72
|
al@20513
|
73 # Build qmake (and all following things with it) using existing CFLAGS and LDFLAGS
|
al@20513
|
74 sed -i -e "s|^\(QMAKE_CFLAGS_RELEASE.*\)|\1 $CFLAGS -DQT_MATH_H_DEFINES_MACROS=1|" \
|
al@20513
|
75 qtbase/mkspecs/common/gcc-base.conf
|
al@20513
|
76 sed -i -e "s|^\(QMAKE_LFLAGS_RELEASE.*\)|\1 $LDFLAGS|" \
|
al@20513
|
77 qtbase/mkspecs/common/g++-unix.conf
|
al@20513
|
78
|
al@20513
|
79 # Fix missing private includes https://bugreports.qt.io/browse/QTBUG-37417
|
al@20513
|
80 sed -e '/CMAKE_NO_PRIVATE_INCLUDES\ \=\ true/d' -i \
|
al@20513
|
81 qtbase/mkspecs/features/create_cmake.prf
|
al@20513
|
82
|
al@19988
|
83 ./configure \
|
al@19988
|
84 -prefix $QT5PREFIX \
|
al@19988
|
85 $QT5OPTS \
|
al@19988
|
86 -sysconfdir /etc/xdg \
|
al@19988
|
87 -confirm-license \
|
al@19988
|
88 -opensource \
|
al@19988
|
89 -dbus-linked \
|
al@19988
|
90 -openssl-linked \
|
al@19988
|
91 -system-harfbuzz \
|
al@19988
|
92 -system-sqlite \
|
al@19988
|
93 -nomake examples \
|
al@19988
|
94 -no-rpath \
|
psychomaniak@20056
|
95 -no-sse2 \
|
al@19988
|
96 -skip qtwebengine &&
|
al@19988
|
97 make &&
|
al@19988
|
98 make INSTALL_ROOT=$install install || exit 1
|
al@19988
|
99
|
al@19988
|
100 # find $install$QT5PREFIX/lib/pkgconfig -name '*.pc' \
|
al@19988
|
101 # -exec perl -pi -e "s, -L$PWD/?\S+,,g" {} \; &&
|
al@19988
|
102 # find $install$QT5PREFIX/ -name qt_lib_bootstrap_private.pri \
|
al@19988
|
103 # -exec sed -i -e "s:$PWD/qtbase:/$QT5PREFIX/lib/:g" {} \; &&
|
al@19988
|
104 find $install$QT5PREFIX/ -name '*.prl' \
|
al@19988
|
105 -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' '{}' \;
|
al@19988
|
106
|
al@19988
|
107 QT5BINDIR=$QT5PREFIX/bin
|
al@19988
|
108
|
al@19988
|
109 install -v -dm755 $install/usr/share/pixmaps/
|
al@19988
|
110
|
al@19988
|
111 install -v -Dm644 qttools/src/assistant/assistant/images/assistant-128.png $install/usr/share/pixmaps/assistant-qt5.png
|
al@19988
|
112 install -v -Dm644 qttools/src/designer/src/designer/images/designer.png $install/usr/share/pixmaps/designer-qt5.png
|
al@19988
|
113 install -v -Dm644 qttools/src/linguist/linguist/images/icons/linguist-128-32.png $install/usr/share/pixmaps/linguist-qt5.png
|
al@19988
|
114 install -v -Dm644 qttools/src/qdbus/qdbusviewer/images/qdbusviewer-128.png $install/usr/share/pixmaps/qdbusviewer-qt5.png
|
al@19988
|
115
|
al@19988
|
116 mkdir -p $install/usr/share/applications
|
al@19988
|
117 for i in $stuff/apps/*.desktop.in; do
|
al@19988
|
118 sed "s|@QT5BINDIR@|$QT5BINDIR|" $i > $install/usr/share/applications/$(basename $i .in)
|
al@19988
|
119 done
|
al@19988
|
120
|
al@19988
|
121 for file in moc uic rcc qmake lconvert lrelease lupdate; do
|
al@19988
|
122 if [ "$QT5BINDIR" == '/usr/bin' ]; then
|
al@19988
|
123 ln -sfvn $file $install/usr/bin/$file-qt5
|
al@19988
|
124 else
|
al@19988
|
125 ln -sfvn $QT5BINDIR/$file $install/usr/bin/$file-qt5
|
al@19988
|
126 fi
|
al@19988
|
127 done
|
al@19988
|
128
|
al@19988
|
129 # tweak permissions
|
al@19988
|
130 find $install -type f -perm 664 -exec chmod 644 '{}' \;
|
al@19988
|
131 find $install -type f -perm 775 -exec chmod 755 '{}' \;
|
al@19988
|
132 }
|
al@19988
|
133
|
al@19988
|
134 genpkg_rules() {
|
al@19988
|
135 # How to split Qt5?
|
al@19988
|
136 # It contains: 41 executables in bin/, 61 different libraries in lib/,
|
al@19988
|
137 # 27 folders in plugins/, 27 languages in translations/.
|
al@19988
|
138 # 156 packages for Qt5? It's a bit too much, isn't it?
|
al@19988
|
139 #
|
al@19988
|
140 # Let's deep into $src...
|
al@19988
|
141 # Each folder here is a module (with rare exceptions). 41 pieces.
|
al@19988
|
142 # Let use these folders as a landmark to make Qt5 packages.
|
al@19988
|
143 # Each folder may contain: executables (examine bin/ subfolder), libraries
|
al@19988
|
144 # (lib/), plugins (plugins/), and qml (not sure what is it, but examine
|
al@19988
|
145 # qml/ subfolder). Note, some qml directories may be shared across different
|
al@19988
|
146 # Qt5 packages, so add only sub(-sub(-sub))-folders that contain "qmldir"
|
al@19988
|
147 # inside it.
|
al@19988
|
148 #
|
al@19988
|
149 # Let's begin.
|
al@19988
|
150 #
|
al@19988
|
151 case $PACKAGE in
|
al@19988
|
152 qt5)
|
al@19988
|
153 COOKOPTS="!pixmaps !menus"
|
al@19988
|
154 DEPENDS="$SPLIT";;
|
al@19988
|
155 qt5-locale-*)
|
al@19988
|
156 la=${PACKAGE#qt5-locale-}
|
al@19988
|
157 copy *_$la.qm
|
al@19988
|
158 case $la in
|
al@19988
|
159 ar) lo='Arabic';; ca) lo='Catalan';;
|
al@19988
|
160 cs) lo='Czech';; da) lo='Danish';;
|
al@19988
|
161 de) lo='German';; en) lo='English';;
|
al@19988
|
162 es) lo='Spanish';; fa) lo='Persian';;
|
al@19988
|
163 fi) lo='Finnish';; fr) lo='French';;
|
al@19988
|
164 gl) lo='Galician';; he) lo='Hebrew';;
|
al@19988
|
165 hu) lo='Hungarian';; it) lo='Italian';;
|
al@19988
|
166 ja) lo='Japanese';; ko) lo='Korean';;
|
al@19988
|
167 lt) lo='Lithuanian';; lv) lo='Latvian';;
|
al@19988
|
168 pl) lo='Polish';; pt) lo='Portuguese';;
|
al@19988
|
169 ru) lo='Russian';; sk) lo='Slovak';;
|
al@19988
|
170 sl) lo='Slovenian';; sv) lo='Swedish';;
|
al@19988
|
171 uk) lo='Ukrainian';; zh_CN) lo='Chinese simplified';;
|
al@19988
|
172 zh_TW) lo='Chinese traditional';;
|
al@19988
|
173 esac
|
al@19988
|
174 CAT="localization|$lo locale"
|
al@19988
|
175 DEPENDS=" ";;
|
al@19988
|
176 qt5-doc)
|
al@19988
|
177 copy doc/
|
al@19988
|
178 CAT="docs|documentation"
|
al@19988
|
179 DEPENDS="qt5-base";;
|
al@19988
|
180 qt5-dev)
|
al@19988
|
181 copy @dev qt5/include/ mkspecs/ *.cmake *.prl qmake.conf
|
al@19988
|
182 # Binaries from qt5-base:
|
al@19988
|
183 copy fixqt4headers.pl moc moc-qt5 qdbuscpp2xml qdbusxml2cpp qlalr \
|
al@19988
|
184 qmake qmake-qt5 rcc rcc-qt5 syncqt.pl uic uic-qt5 \
|
al@19988
|
185 builtins.qmltypes
|
al@19988
|
186 DEPENDS="qt5";;
|
al@19988
|
187 qt5-base-gtk3)
|
al@19988
|
188 copy libqgtk3.so
|
al@19988
|
189 CAT="development|GTK+3 theme support"
|
al@20502
|
190 DEPENDS="qt5-base atk cairo gdk-pixbuf glib gtk+3 mesa pango \
|
al@19988
|
191 xorg-libX11 xorg-libXext";;
|
psychomaniak@20182
|
192 qt5-base-egl)
|
psychomaniak@20189
|
193 copy libQt5Egl*so*
|
psychomaniak@20182
|
194 CAT="development|EGL libs"
|
al@20502
|
195 DEPENDS="qt5-base mesa mesa-libegl mesa-libgbm" ;;
|
al@19988
|
196 *)
|
al@19988
|
197 # examine folders in $src to understand what we need to copy from $install
|
al@19988
|
198 examine="$src/qt${PACKAGE#qt5-}"
|
al@19988
|
199
|
al@19988
|
200 unset binaries libraries plugins qml
|
al@19988
|
201
|
al@19988
|
202 # output "base names" of files found in bin/ subfolder
|
al@19988
|
203 [ -d "$examine/bin" ] &&
|
al@19988
|
204 binaries=$(find $examine/bin -type f | awk -F/ '{print $NF}')
|
al@19988
|
205
|
al@19988
|
206 # the same thing with lib/
|
al@19988
|
207 [ -d "$examine/lib" ] &&
|
al@19988
|
208 libraries=$(find $examine/lib -name '*.so' | awk -F/ '{print $NF}')
|
al@19988
|
209
|
al@19988
|
210 # libraries in plugins/ sub-folder
|
al@19988
|
211 [ -d "$examine/plugins" ] &&
|
al@19988
|
212 plugins=$(find $examine/plugins -name '*.so' | awk -F/ '{print $NF}')
|
al@19988
|
213
|
al@19988
|
214 # libraries in qml/ sub-folder
|
al@19988
|
215 [ -d "$examine/qml" ] &&
|
al@19988
|
216 qml=$(cd $examine; find ./qml -name 'qmldir' | sed 's|^./||; s|qmldir$||')
|
al@19988
|
217
|
al@19988
|
218 copy $binaries $plugins $(
|
al@19988
|
219 for i in $libraries; do echo "$i*"; done
|
al@19988
|
220 for i in $qml; do echo $i; done)
|
al@19988
|
221 ;;
|
al@19988
|
222 esac
|
al@19988
|
223 case $PACKAGE in
|
al@19988
|
224 qt5-3d)
|
al@19988
|
225 CAT="development|3D module"
|
al@20502
|
226 DEPENDS="qt5-base qt5-declarative qt5-gamepad mesa zlib";;
|
psychomaniak@20182
|
227
|
al@19988
|
228 qt5-base)
|
al@19988
|
229 # Move binaries (that required for compiling the packages) to qt5-dev
|
al@19988
|
230 rm -r $fs/usr/bin
|
al@19988
|
231
|
al@19988
|
232 # Move to qt5-base-gtk3 because only it depends on GTK3 and friends
|
al@19988
|
233 rm $fs/usr/lib/qt5/plugins/platformthemes/libqgtk3.so
|
al@19988
|
234
|
psychomaniak@20182
|
235 # Move to qt5-base-egl
|
psychomaniak@20182
|
236 rm -f $fs/usr/lib/libQt5Egl*
|
psychomaniak@20182
|
237
|
al@19988
|
238 CAT="development|Base module"
|
al@20453
|
239 DEPENDS="dbus eudev fontconfig freetype glib icu openssl libcups \
|
al@19988
|
240 libdrm libharfbuzz libicu libinput libjpeg-turbo libpng16 \
|
al@20502
|
241 libsqlite3 libxkbcommon libxkbcommon-x11 mesa \
|
al@19988
|
242 mtdev tslib xorg-libICE xorg-libSM xorg-libX11 xorg-libXext \
|
psychomaniak@20182
|
243 xorg-libXi xorg-libxcb zlib libatomic";;
|
al@19988
|
244 qt5-canvas3d)
|
al@19988
|
245 CAT="development|Canvas3D module"
|
al@20502
|
246 DEPENDS="qt5-base qt5-declarative mesa";;
|
al@19988
|
247 qt5-charts)
|
al@19988
|
248 CAT="development|Charts module"
|
al@20502
|
249 DEPENDS="qt5-base qt5-declarative mesa";;
|
al@19988
|
250 qt5-connectivity)
|
al@19988
|
251 CAT="development|Connectivity module"
|
al@20502
|
252 DEPENDS="qt5-base qt5-declarative mesa";;
|
al@19988
|
253 qt5-datavis3d)
|
al@19988
|
254 CAT="development|DataVisualization module"
|
al@20502
|
255 DEPENDS="qt5-base qt5-declarative mesa";;
|
al@19988
|
256 qt5-declarative)
|
al@19988
|
257 CAT="development|Declarative module"
|
al@20502
|
258 DEPENDS="qt5-base qt5-remoteobjects qt5-xmlpatterns mesa";;
|
al@19988
|
259 qt5-gamepad)
|
al@19988
|
260 CAT="development|Gamepad module"
|
al@20502
|
261 DEPENDS="qt5-base qt5-declarative eudev mesa";;
|
al@19988
|
262 qt5-graphicaleffects)
|
al@19988
|
263 CAT="development|GraphicalEffects module"
|
al@20502
|
264 DEPENDS="qt5-base qt5-declarative mesa";;
|
al@19988
|
265 qt5-imageformats)
|
al@19988
|
266 CAT="development|imageformats module"
|
al@20502
|
267 DEPENDS="qt5-base mesa tiff";;
|
al@19988
|
268 qt5-location)
|
al@19988
|
269 CAT="development|Location module"
|
al@20453
|
270 DEPENDS="qt5-base qt5-declarative icu openssl libicu openssl \
|
al@20502
|
271 mesa zlib";;
|
al@19988
|
272 qt5-multimedia)
|
al@19988
|
273 CAT="development|Multimedia module"
|
al@19988
|
274 DEPENDS="qt5-base qt5-declarative alsa-lib glib gst1-plugins-base \
|
al@20502
|
275 gstreamer1 mesa";;
|
al@19988
|
276 qt5-networkauth)
|
al@19988
|
277 CAT="development|NetworkAuth module"
|
al@20502
|
278 DEPENDS="qt5-base mesa";;
|
al@19988
|
279 qt5-purchasing)
|
al@19988
|
280 CAT="development|Purchasing module"
|
al@20502
|
281 DEPENDS="qt5-base qt5-declarative mesa";;
|
al@19988
|
282 qt5-quickcontrols)
|
al@19988
|
283 CAT="development|QuickControls module"
|
al@20502
|
284 DEPENDS="qt5-base qt5-declarative mesa";;
|
al@19988
|
285 qt5-quickcontrols2)
|
al@19988
|
286 CAT="development|QuickControls2 module"
|
al@20502
|
287 DEPENDS="qt5-base qt5-declarative mesa";;
|
al@19988
|
288 qt5-remoteobjects)
|
al@19988
|
289 rm -r $fs/usr/lib/qt5/ # interception with qt5-declarative
|
al@19988
|
290 CAT="development|RemoteObjects module"
|
al@19988
|
291 DEPENDS="qt5-base";;
|
al@19988
|
292 qt5-script)
|
al@19988
|
293 CAT="development|Script module"
|
al@20502
|
294 DEPENDS="qt5-base mesa";;
|
al@19988
|
295 qt5-scxml)
|
al@19988
|
296 CAT="development|SCXML module"
|
al@19988
|
297 DEPENDS="qt5-base qt5-declarative";;
|
al@19988
|
298 qt5-sensors)
|
al@19988
|
299 CAT="development|Sensors module"
|
al@20502
|
300 DEPENDS="qt5-base qt5-declarative mesa";;
|
al@19988
|
301 qt5-serialbus)
|
al@19988
|
302 CAT="development|SerialBus module"
|
al@19988
|
303 DEPENDS="qt5-base qt5-serialport";;
|
al@19988
|
304 qt5-serialport)
|
al@19988
|
305 CAT="development|SerialPort module"
|
al@19988
|
306 DEPENDS="qt5-base eudev";;
|
al@19988
|
307 qt5-speech)
|
al@19988
|
308 CAT="development|Speech module"
|
al@19988
|
309 DEPENDS="qt5-base";;
|
al@19988
|
310 qt5-svg)
|
al@19988
|
311 CAT="development|SVG module"
|
al@20502
|
312 DEPENDS="qt5-base mesa zlib";;
|
al@19988
|
313 qt5-tools)
|
al@19988
|
314 copy applications/ pixmaps/ phrasebooks/ lconvert-qt5 lrelease-qt5 \
|
al@19988
|
315 lupdate-qt5
|
al@19988
|
316 CAT="development|Tools module"
|
al@20502
|
317 DEPENDS="qt5-base qt5-declarative mesa";;
|
al@19988
|
318 qt5-virtualkeyboard)
|
al@19988
|
319 CAT="development|VirtualKeyboard module"
|
al@20502
|
320 DEPENDS="qt5-base qt5-declarative qt5-svg mesa xorg-libxcb";;
|
al@19988
|
321 qt5-wayland)
|
al@19988
|
322 CAT="development|Wayland module"
|
al@19988
|
323 DEPENDS="qt5-base qt5-declarative fontconfig freetype glib \
|
al@20502
|
324 libxkbcommon mesa mesa-libegl mesa-libwayland-egl wayland \
|
al@19988
|
325 xorg-libX11 xorg-libXcomposite xorg-libXext";;
|
al@19988
|
326 qt5-webchannel)
|
al@19988
|
327 CAT="development|WebChannel module"
|
al@20502
|
328 DEPENDS="qt5-base qt5-declarative mesa";;
|
al@19988
|
329 qt5-websockets)
|
al@19988
|
330 CAT="development|WebSockets module"
|
al@19988
|
331 DEPENDS="qt5-base qt5-declarative";;
|
al@19988
|
332 qt5-x11extras)
|
al@19988
|
333 CAT="development|X11Extras module"
|
al@20502
|
334 DEPENDS="qt5-base mesa";;
|
al@19988
|
335 qt5-xmlpatterns)
|
al@19988
|
336 CAT="development|XmlPatterns module"
|
al@19988
|
337 DEPENDS="qt5-base";;
|
al@19988
|
338 esac
|
al@19988
|
339 }
|