wok-next view qt5/receipt @ rev 20056

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