wok-next view qt5/receipt @ rev 20465

Up LibreOffice (6.0.2), TiMidity++, jack, zstd (1.3.3)
author Aleksej Bobylev <al.bobylev@gmail.com>
date Wed Mar 07 23:09:42 2018 +0200 (2018-03-07)
parents b716559664e1
children c0521c689857
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 qt5-base-egl \
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 qt5-base-egl)
183 copy libQt5Egl*so*
184 CAT="development|EGL libs"
185 DEPENDS="qt5-base mesa17 mesa17-libegl mesa17-libgbm" ;;
186 *)
187 # examine folders in $src to understand what we need to copy from $install
188 examine="$src/qt${PACKAGE#qt5-}"
190 unset binaries libraries plugins qml
192 # output "base names" of files found in bin/ subfolder
193 [ -d "$examine/bin" ] &&
194 binaries=$(find $examine/bin -type f | awk -F/ '{print $NF}')
196 # the same thing with lib/
197 [ -d "$examine/lib" ] &&
198 libraries=$(find $examine/lib -name '*.so' | awk -F/ '{print $NF}')
200 # libraries in plugins/ sub-folder
201 [ -d "$examine/plugins" ] &&
202 plugins=$(find $examine/plugins -name '*.so' | awk -F/ '{print $NF}')
204 # libraries in qml/ sub-folder
205 [ -d "$examine/qml" ] &&
206 qml=$(cd $examine; find ./qml -name 'qmldir' | sed 's|^./||; s|qmldir$||')
208 copy $binaries $plugins $(
209 for i in $libraries; do echo "$i*"; done
210 for i in $qml; do echo $i; done)
211 ;;
212 esac
213 case $PACKAGE in
214 qt5-3d)
215 CAT="development|3D module"
216 DEPENDS="qt5-base qt5-declarative qt5-gamepad mesa17 zlib";;
218 qt5-base)
219 # Move binaries (that required for compiling the packages) to qt5-dev
220 rm -r $fs/usr/bin
222 # Move to qt5-base-gtk3 because only it depends on GTK3 and friends
223 rm $fs/usr/lib/qt5/plugins/platformthemes/libqgtk3.so
225 # Move to qt5-base-egl
226 rm -f $fs/usr/lib/libQt5Egl*
228 CAT="development|Base module"
229 DEPENDS="dbus eudev fontconfig freetype glib icu openssl libcups \
230 libdrm libharfbuzz libicu libinput libjpeg-turbo libpng16 \
231 libsqlite3 libxkbcommon libxkbcommon-x11 mesa17 \
232 mtdev tslib xorg-libICE xorg-libSM xorg-libX11 xorg-libXext \
233 xorg-libXi xorg-libxcb zlib libatomic";;
234 qt5-canvas3d)
235 CAT="development|Canvas3D module"
236 DEPENDS="qt5-base qt5-declarative mesa17";;
237 qt5-charts)
238 CAT="development|Charts module"
239 DEPENDS="qt5-base qt5-declarative mesa17";;
240 qt5-connectivity)
241 CAT="development|Connectivity module"
242 DEPENDS="qt5-base qt5-declarative mesa17";;
243 qt5-datavis3d)
244 CAT="development|DataVisualization module"
245 DEPENDS="qt5-base qt5-declarative mesa17";;
246 qt5-declarative)
247 CAT="development|Declarative module"
248 DEPENDS="qt5-base qt5-remoteobjects qt5-xmlpatterns mesa17";;
249 qt5-gamepad)
250 CAT="development|Gamepad module"
251 DEPENDS="qt5-base qt5-declarative eudev mesa17";;
252 qt5-graphicaleffects)
253 CAT="development|GraphicalEffects module"
254 DEPENDS="qt5-base qt5-declarative mesa17";;
255 qt5-imageformats)
256 CAT="development|imageformats module"
257 DEPENDS="qt5-base mesa17 tiff";;
258 qt5-location)
259 CAT="development|Location module"
260 DEPENDS="qt5-base qt5-declarative icu openssl libicu openssl \
261 mesa17 zlib";;
262 qt5-multimedia)
263 CAT="development|Multimedia module"
264 DEPENDS="qt5-base qt5-declarative alsa-lib glib gst1-plugins-base \
265 gstreamer1 mesa17";;
266 qt5-networkauth)
267 CAT="development|NetworkAuth module"
268 DEPENDS="qt5-base mesa17";;
269 qt5-purchasing)
270 CAT="development|Purchasing module"
271 DEPENDS="qt5-base qt5-declarative mesa17";;
272 qt5-quickcontrols)
273 CAT="development|QuickControls module"
274 DEPENDS="qt5-base qt5-declarative mesa17";;
275 qt5-quickcontrols2)
276 CAT="development|QuickControls2 module"
277 DEPENDS="qt5-base qt5-declarative mesa17";;
278 qt5-remoteobjects)
279 rm -r $fs/usr/lib/qt5/ # interception with qt5-declarative
280 CAT="development|RemoteObjects module"
281 DEPENDS="qt5-base";;
282 qt5-script)
283 CAT="development|Script module"
284 DEPENDS="qt5-base mesa17";;
285 qt5-scxml)
286 CAT="development|SCXML module"
287 DEPENDS="qt5-base qt5-declarative";;
288 qt5-sensors)
289 CAT="development|Sensors module"
290 DEPENDS="qt5-base qt5-declarative mesa17";;
291 qt5-serialbus)
292 CAT="development|SerialBus module"
293 DEPENDS="qt5-base qt5-serialport";;
294 qt5-serialport)
295 CAT="development|SerialPort module"
296 DEPENDS="qt5-base eudev";;
297 qt5-speech)
298 CAT="development|Speech module"
299 DEPENDS="qt5-base";;
300 qt5-svg)
301 CAT="development|SVG module"
302 DEPENDS="qt5-base mesa17 zlib";;
303 qt5-tools)
304 copy applications/ pixmaps/ phrasebooks/ lconvert-qt5 lrelease-qt5 \
305 lupdate-qt5
306 CAT="development|Tools module"
307 DEPENDS="qt5-base qt5-declarative mesa17";;
308 qt5-virtualkeyboard)
309 CAT="development|VirtualKeyboard module"
310 DEPENDS="qt5-base qt5-declarative qt5-svg mesa17 xorg-libxcb";;
311 qt5-wayland)
312 CAT="development|Wayland module"
313 DEPENDS="qt5-base qt5-declarative fontconfig freetype glib \
314 libxkbcommon mesa17 mesa17-libegl mesa17-libwayland-egl wayland \
315 xorg-libX11 xorg-libXcomposite xorg-libXext";;
316 qt5-webchannel)
317 CAT="development|WebChannel module"
318 DEPENDS="qt5-base qt5-declarative mesa17";;
319 qt5-websockets)
320 CAT="development|WebSockets module"
321 DEPENDS="qt5-base qt5-declarative";;
322 qt5-x11extras)
323 CAT="development|X11Extras module"
324 DEPENDS="qt5-base mesa17";;
325 qt5-xmlpatterns)
326 CAT="development|XmlPatterns module"
327 DEPENDS="qt5-base";;
328 esac
329 }