wok-next view qt5/receipt @ rev 20046
up: avidemux, palemoon
author | Xander Ziiryanoff <psychomaniak@xakep.ru> |
---|---|
date | Mon Oct 23 08:40:19 2017 +0200 (2017-10-23) |
parents | |
children | 26b78719991d |
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 -skip qtwebengine &&
76 make &&
77 make INSTALL_ROOT=$install install || exit 1
79 # find $install$QT5PREFIX/lib/pkgconfig -name '*.pc' \
80 # -exec perl -pi -e "s, -L$PWD/?\S+,,g" {} \; &&
81 # find $install$QT5PREFIX/ -name qt_lib_bootstrap_private.pri \
82 # -exec sed -i -e "s:$PWD/qtbase:/$QT5PREFIX/lib/:g" {} \; &&
83 find $install$QT5PREFIX/ -name '*.prl' \
84 -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' '{}' \;
86 QT5BINDIR=$QT5PREFIX/bin
88 install -v -dm755 $install/usr/share/pixmaps/
90 install -v -Dm644 qttools/src/assistant/assistant/images/assistant-128.png $install/usr/share/pixmaps/assistant-qt5.png
91 install -v -Dm644 qttools/src/designer/src/designer/images/designer.png $install/usr/share/pixmaps/designer-qt5.png
92 install -v -Dm644 qttools/src/linguist/linguist/images/icons/linguist-128-32.png $install/usr/share/pixmaps/linguist-qt5.png
93 install -v -Dm644 qttools/src/qdbus/qdbusviewer/images/qdbusviewer-128.png $install/usr/share/pixmaps/qdbusviewer-qt5.png
95 mkdir -p $install/usr/share/applications
96 for i in $stuff/apps/*.desktop.in; do
97 sed "s|@QT5BINDIR@|$QT5BINDIR|" $i > $install/usr/share/applications/$(basename $i .in)
98 done
100 for file in moc uic rcc qmake lconvert lrelease lupdate; do
101 if [ "$QT5BINDIR" == '/usr/bin' ]; then
102 ln -sfvn $file $install/usr/bin/$file-qt5
103 else
104 ln -sfvn $QT5BINDIR/$file $install/usr/bin/$file-qt5
105 fi
106 done
108 # tweak permissions
109 find $install -type f -perm 664 -exec chmod 644 '{}' \;
110 find $install -type f -perm 775 -exec chmod 755 '{}' \;
111 }
113 genpkg_rules() {
114 # How to split Qt5?
115 # It contains: 41 executables in bin/, 61 different libraries in lib/,
116 # 27 folders in plugins/, 27 languages in translations/.
117 # 156 packages for Qt5? It's a bit too much, isn't it?
118 #
119 # Let's deep into $src...
120 # Each folder here is a module (with rare exceptions). 41 pieces.
121 # Let use these folders as a landmark to make Qt5 packages.
122 # Each folder may contain: executables (examine bin/ subfolder), libraries
123 # (lib/), plugins (plugins/), and qml (not sure what is it, but examine
124 # qml/ subfolder). Note, some qml directories may be shared across different
125 # Qt5 packages, so add only sub(-sub(-sub))-folders that contain "qmldir"
126 # inside it.
127 #
128 # Let's begin.
129 #
130 case $PACKAGE in
131 qt5)
132 COOKOPTS="!pixmaps !menus"
133 DEPENDS="$SPLIT";;
134 qt5-locale-*)
135 la=${PACKAGE#qt5-locale-}
136 copy *_$la.qm
137 case $la in
138 ar) lo='Arabic';; ca) lo='Catalan';;
139 cs) lo='Czech';; da) lo='Danish';;
140 de) lo='German';; en) lo='English';;
141 es) lo='Spanish';; fa) lo='Persian';;
142 fi) lo='Finnish';; fr) lo='French';;
143 gl) lo='Galician';; he) lo='Hebrew';;
144 hu) lo='Hungarian';; it) lo='Italian';;
145 ja) lo='Japanese';; ko) lo='Korean';;
146 lt) lo='Lithuanian';; lv) lo='Latvian';;
147 pl) lo='Polish';; pt) lo='Portuguese';;
148 ru) lo='Russian';; sk) lo='Slovak';;
149 sl) lo='Slovenian';; sv) lo='Swedish';;
150 uk) lo='Ukrainian';; zh_CN) lo='Chinese simplified';;
151 zh_TW) lo='Chinese traditional';;
152 esac
153 CAT="localization|$lo locale"
154 DEPENDS=" ";;
155 qt5-doc)
156 copy doc/
157 CAT="docs|documentation"
158 DEPENDS="qt5-base";;
159 qt5-dev)
160 copy @dev qt5/include/ mkspecs/ *.cmake *.prl qmake.conf
161 # Binaries from qt5-base:
162 copy fixqt4headers.pl moc moc-qt5 qdbuscpp2xml qdbusxml2cpp qlalr \
163 qmake qmake-qt5 rcc rcc-qt5 syncqt.pl uic uic-qt5 \
164 builtins.qmltypes
165 DEPENDS="qt5";;
166 qt5-base-gtk3)
167 copy libqgtk3.so
168 CAT="development|GTK+3 theme support"
169 DEPENDS="qt5-base atk cairo gdk-pixbuf glib gtk+3 mesa17 pango \
170 xorg-libX11 xorg-libXext";;
171 *)
172 # examine folders in $src to understand what we need to copy from $install
173 examine="$src/qt${PACKAGE#qt5-}"
175 unset binaries libraries plugins qml
177 # output "base names" of files found in bin/ subfolder
178 [ -d "$examine/bin" ] &&
179 binaries=$(find $examine/bin -type f | awk -F/ '{print $NF}')
181 # the same thing with lib/
182 [ -d "$examine/lib" ] &&
183 libraries=$(find $examine/lib -name '*.so' | awk -F/ '{print $NF}')
185 # libraries in plugins/ sub-folder
186 [ -d "$examine/plugins" ] &&
187 plugins=$(find $examine/plugins -name '*.so' | awk -F/ '{print $NF}')
189 # libraries in qml/ sub-folder
190 [ -d "$examine/qml" ] &&
191 qml=$(cd $examine; find ./qml -name 'qmldir' | sed 's|^./||; s|qmldir$||')
193 copy $binaries $plugins $(
194 for i in $libraries; do echo "$i*"; done
195 for i in $qml; do echo $i; done)
196 ;;
197 esac
198 case $PACKAGE in
199 qt5-3d)
200 CAT="development|3D module"
201 DEPENDS="qt5-base qt5-declarative qt5-gamepad mesa17 zlib";;
202 qt5-base)
203 # Move binaries (that required for compiling the packages) to qt5-dev
204 rm -r $fs/usr/bin
206 # Move to qt5-base-gtk3 because only it depends on GTK3 and friends
207 rm $fs/usr/lib/qt5/plugins/platformthemes/libqgtk3.so
209 CAT="development|Base module"
210 DEPENDS="dbus eudev fontconfig freetype glib icu libcrypto libcups \
211 libdrm libharfbuzz libicu libinput libjpeg-turbo libpng16 \
212 libsqlite3 libssl libxkbcommon mesa17 mesa17-libegl mesa17-libgbm \
213 mtdev tslib xorg-libICE xorg-libSM xorg-libX11 xorg-libXext \
214 xorg-libXi xorg-libxcb zlib";;
215 qt5-canvas3d)
216 CAT="development|Canvas3D module"
217 DEPENDS="qt5-base qt5-declarative mesa17";;
218 qt5-charts)
219 CAT="development|Charts module"
220 DEPENDS="qt5-base qt5-declarative mesa17";;
221 qt5-connectivity)
222 CAT="development|Connectivity module"
223 DEPENDS="qt5-base qt5-declarative mesa17";;
224 qt5-datavis3d)
225 CAT="development|DataVisualization module"
226 DEPENDS="qt5-base qt5-declarative mesa17";;
227 qt5-declarative)
228 CAT="development|Declarative module"
229 DEPENDS="qt5-base qt5-remoteobjects qt5-xmlpatterns mesa17";;
230 qt5-gamepad)
231 CAT="development|Gamepad module"
232 DEPENDS="qt5-base qt5-declarative eudev mesa17";;
233 qt5-graphicaleffects)
234 CAT="development|GraphicalEffects module"
235 DEPENDS="qt5-base qt5-declarative mesa17";;
236 qt5-imageformats)
237 CAT="development|imageformats module"
238 DEPENDS="qt5-base mesa17 tiff";;
239 qt5-location)
240 CAT="development|Location module"
241 DEPENDS="qt5-base qt5-declarative icu libcrypto libicu libssl \
242 mesa17 zlib";;
243 qt5-multimedia)
244 CAT="development|Multimedia module"
245 DEPENDS="qt5-base qt5-declarative alsa-lib glib gst1-plugins-base \
246 gstreamer1 mesa17";;
247 qt5-networkauth)
248 CAT="development|NetworkAuth module"
249 DEPENDS="qt5-base mesa17";;
250 qt5-purchasing)
251 CAT="development|Purchasing module"
252 DEPENDS="qt5-base qt5-declarative mesa17";;
253 qt5-quickcontrols)
254 CAT="development|QuickControls module"
255 DEPENDS="qt5-base qt5-declarative mesa17";;
256 qt5-quickcontrols2)
257 CAT="development|QuickControls2 module"
258 DEPENDS="qt5-base qt5-declarative mesa17";;
259 qt5-remoteobjects)
260 rm -r $fs/usr/lib/qt5/ # interception with qt5-declarative
261 CAT="development|RemoteObjects module"
262 DEPENDS="qt5-base";;
263 qt5-script)
264 CAT="development|Script module"
265 DEPENDS="qt5-base mesa17";;
266 qt5-scxml)
267 CAT="development|SCXML module"
268 DEPENDS="qt5-base qt5-declarative";;
269 qt5-sensors)
270 CAT="development|Sensors module"
271 DEPENDS="qt5-base qt5-declarative mesa17";;
272 qt5-serialbus)
273 CAT="development|SerialBus module"
274 DEPENDS="qt5-base qt5-serialport";;
275 qt5-serialport)
276 CAT="development|SerialPort module"
277 DEPENDS="qt5-base eudev";;
278 qt5-speech)
279 CAT="development|Speech module"
280 DEPENDS="qt5-base";;
281 qt5-svg)
282 CAT="development|SVG module"
283 DEPENDS="qt5-base mesa17 zlib";;
284 qt5-tools)
285 copy applications/ pixmaps/ phrasebooks/ lconvert-qt5 lrelease-qt5 \
286 lupdate-qt5
287 CAT="development|Tools module"
288 DEPENDS="qt5-base qt5-declarative mesa17";;
289 qt5-virtualkeyboard)
290 CAT="development|VirtualKeyboard module"
291 DEPENDS="qt5-base qt5-declarative qt5-svg mesa17 xorg-libxcb";;
292 qt5-wayland)
293 CAT="development|Wayland module"
294 DEPENDS="qt5-base qt5-declarative fontconfig freetype glib \
295 libxkbcommon mesa17 mesa17-libegl mesa17-libwayland-egl wayland \
296 xorg-libX11 xorg-libXcomposite xorg-libXext";;
297 qt5-webchannel)
298 CAT="development|WebChannel module"
299 DEPENDS="qt5-base qt5-declarative mesa17";;
300 qt5-websockets)
301 CAT="development|WebSockets module"
302 DEPENDS="qt5-base qt5-declarative";;
303 qt5-x11extras)
304 CAT="development|X11Extras module"
305 DEPENDS="qt5-base mesa17";;
306 qt5-xmlpatterns)
307 CAT="development|XmlPatterns module"
308 DEPENDS="qt5-base";;
309 esac
310 }