wok-next view qt5/receipt @ rev 20158

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