wok-next view qt5/receipt @ rev 20636
Fix "can't execute '/usr/bin/update-mime-database': No such file or directory"
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Fri Apr 27 15:12:17 2018 +0300 (2018-04-27) |
parents | 30967bd5b948 |
children | f48456621a9d |
line source
1 # SliTaz package receipt v2.
3 PACKAGE="qt5"
4 VERSION="5.10.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-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 mesa-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'
65 #
66 # [ -s $SRC/$PATCH ] || wget -O $SRC/$PATCH $PATCH_URL$PATCH
67 # cd $src/qtdeclarative
68 # cp $SRC/$PATCH ./$PATCH
69 # patch -p1 -i $PATCH
70 # cd ..
71 #
72 # # Build qmake (and all following things with it) using existing CFLAGS and LDFLAGS
73 # sed -i -e "s|^\(QMAKE_CFLAGS_RELEASE.*\)|\1 $CFLAGS -DQT_MATH_H_DEFINES_MACROS=1|" \
74 # qtbase/mkspecs/common/gcc-base.conf
75 # sed -i -e "s|^\(QMAKE_LFLAGS_RELEASE.*\)|\1 $LDFLAGS|" \
76 # qtbase/mkspecs/common/g++-unix.conf
77 #
78 # # Fix missing private includes https://bugreports.qt.io/browse/QTBUG-37417
79 # sed -e '/CMAKE_NO_PRIVATE_INCLUDES\ \=\ true/d' -i \
80 # qtbase/mkspecs/features/create_cmake.prf
82 ./configure \
83 -prefix $QT5PREFIX \
84 $QT5OPTS \
85 -sysconfdir /etc/xdg \
86 -confirm-license \
87 -opensource \
88 -dbus-linked \
89 -openssl-linked \
90 -system-harfbuzz \
91 -system-sqlite \
92 -nomake examples \
93 -no-rpath \
94 -no-sse2 \
95 -skip qtwebengine &&
96 make &&
97 make INSTALL_ROOT=$install install || exit 1
99 # find $install$QT5PREFIX/lib/pkgconfig -name '*.pc' \
100 # -exec perl -pi -e "s, -L$PWD/?\S+,,g" {} \; &&
101 # find $install$QT5PREFIX/ -name qt_lib_bootstrap_private.pri \
102 # -exec sed -i -e "s:$PWD/qtbase:/$QT5PREFIX/lib/:g" {} \; &&
103 find $install$QT5PREFIX/ -name '*.prl' \
104 -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' '{}' \;
106 QT5BINDIR=$QT5PREFIX/bin
108 install -v -dm755 $install/usr/share/pixmaps/
110 install -v -Dm644 qttools/src/assistant/assistant/images/assistant-128.png $install/usr/share/pixmaps/assistant-qt5.png
111 install -v -Dm644 qttools/src/designer/src/designer/images/designer.png $install/usr/share/pixmaps/designer-qt5.png
112 install -v -Dm644 qttools/src/linguist/linguist/images/icons/linguist-128-32.png $install/usr/share/pixmaps/linguist-qt5.png
113 install -v -Dm644 qttools/src/qdbus/qdbusviewer/images/qdbusviewer-128.png $install/usr/share/pixmaps/qdbusviewer-qt5.png
115 mkdir -p $install/usr/share/applications
116 for i in $stuff/apps/*.desktop.in; do
117 sed "s|@QT5BINDIR@|$QT5BINDIR|" $i > $install/usr/share/applications/$(basename $i .in)
118 done
120 for file in moc uic rcc qmake lconvert lrelease lupdate; do
121 if [ "$QT5BINDIR" == '/usr/bin' ]; then
122 ln -sfvn $file $install/usr/bin/$file-qt5
123 else
124 ln -sfvn $QT5BINDIR/$file $install/usr/bin/$file-qt5
125 fi
126 done
128 # tweak permissions
129 find $install -type f -perm 664 -exec chmod 644 '{}' \;
130 find $install -type f -perm 775 -exec chmod 755 '{}' \;
131 }
133 genpkg_rules() {
134 # How to split Qt5?
135 # It contains: 41 executables in bin/, 61 different libraries in lib/,
136 # 27 folders in plugins/, 27 languages in translations/.
137 # 156 packages for Qt5? It's a bit too much, isn't it?
138 #
139 # Let's deep into $src...
140 # Each folder here is a module (with rare exceptions). 41 pieces.
141 # Let use these folders as a landmark to make Qt5 packages.
142 # Each folder may contain: executables (examine bin/ subfolder), libraries
143 # (lib/), plugins (plugins/), and qml (not sure what is it, but examine
144 # qml/ subfolder). Note, some qml directories may be shared across different
145 # Qt5 packages, so add only sub(-sub(-sub))-folders that contain "qmldir"
146 # inside it.
147 #
148 # Let's begin.
149 #
150 case $PACKAGE in
151 qt5)
152 COOKOPTS="!pixmaps !menus"
153 DEPENDS="$SPLIT";;
154 qt5-locale-*)
155 la=${PACKAGE#qt5-locale-}
156 copy *_$la.qm
157 case $la in
158 ar) lo='Arabic';; ca) lo='Catalan';;
159 cs) lo='Czech';; da) lo='Danish';;
160 de) lo='German';; en) lo='English';;
161 es) lo='Spanish';; fa) lo='Persian';;
162 fi) lo='Finnish';; fr) lo='French';;
163 gl) lo='Galician';; he) lo='Hebrew';;
164 hu) lo='Hungarian';; it) lo='Italian';;
165 ja) lo='Japanese';; ko) lo='Korean';;
166 lt) lo='Lithuanian';; lv) lo='Latvian';;
167 pl) lo='Polish';; pt) lo='Portuguese';;
168 ru) lo='Russian';; sk) lo='Slovak';;
169 sl) lo='Slovenian';; sv) lo='Swedish';;
170 uk) lo='Ukrainian';; zh_CN) lo='Chinese simplified';;
171 zh_TW) lo='Chinese traditional';;
172 esac
173 CAT="localization|$lo locale"
174 DEPENDS=" ";;
175 qt5-doc)
176 copy doc/
177 CAT="docs|documentation"
178 DEPENDS="qt5-base";;
179 qt5-dev)
180 copy @dev qt5/include/ mkspecs/ *.cmake *.prl qmake.conf
181 # Binaries from qt5-base:
182 copy fixqt4headers.pl moc moc-qt5 qdbuscpp2xml qdbusxml2cpp qlalr \
183 qmake qmake-qt5 rcc rcc-qt5 syncqt.pl uic uic-qt5 \
184 builtins.qmltypes
185 DEPENDS="qt5";;
186 qt5-base-gtk3)
187 copy libqgtk3.so
188 CAT="development|GTK+3 theme support"
189 DEPENDS="qt5-base atk cairo gdk-pixbuf glib gtk+3 mesa pango \
190 xorg-libX11 xorg-libXext";;
191 qt5-base-egl)
192 copy libQt5Egl*so*
193 CAT="development|EGL libs"
194 DEPENDS="qt5-base mesa mesa-libegl mesa-libgbm" ;;
195 *)
196 # examine folders in $src to understand what we need to copy from $install
197 examine="$src/qt${PACKAGE#qt5-}"
199 unset binaries libraries plugins qml
201 # output "base names" of files found in bin/ subfolder
202 [ -d "$examine/bin" ] &&
203 binaries=$(find $examine/bin -type f | awk -F/ '{print $NF}')
205 # the same thing with lib/
206 [ -d "$examine/lib" ] &&
207 libraries=$(find $examine/lib -name '*.so' | awk -F/ '{print $NF}')
209 # libraries in plugins/ sub-folder
210 [ -d "$examine/plugins" ] &&
211 plugins=$(find $examine/plugins -name '*.so' | awk -F/ '{print $NF}')
213 # libraries in qml/ sub-folder
214 [ -d "$examine/qml" ] &&
215 qml=$(cd $examine; find ./qml -name 'qmldir' | sed 's|^./||; s|qmldir$||')
217 copy $binaries $plugins $(
218 for i in $libraries; do echo "$i*"; done
219 for i in $qml; do echo $i; done)
220 ;;
221 esac
222 case $PACKAGE in
223 qt5-3d)
224 CAT="development|3D module"
225 DEPENDS="qt5-base qt5-declarative qt5-gamepad mesa zlib";;
227 qt5-base)
228 # Move binaries (that required for compiling the packages) to qt5-dev
229 rm -r $fs/usr/bin
231 # Move to qt5-base-gtk3 because only it depends on GTK3 and friends
232 rm $fs/usr/lib/qt5/plugins/platformthemes/libqgtk3.so
234 # Move to qt5-base-egl
235 rm -f $fs/usr/lib/libQt5Egl*
237 CAT="development|Base module"
238 DEPENDS="dbus eudev fontconfig freetype glib icu openssl libcups \
239 libdrm libharfbuzz libicu libinput libjpeg-turbo libpng16 \
240 libsqlite3 libxkbcommon libxkbcommon-x11 mesa \
241 mtdev tslib xorg-libICE xorg-libSM xorg-libX11 xorg-libXext \
242 xorg-libXi xorg-libxcb zlib libatomic";;
243 qt5-canvas3d)
244 CAT="development|Canvas3D module"
245 DEPENDS="qt5-base qt5-declarative mesa";;
246 qt5-charts)
247 CAT="development|Charts module"
248 DEPENDS="qt5-base qt5-declarative mesa";;
249 qt5-connectivity)
250 CAT="development|Connectivity module"
251 DEPENDS="qt5-base qt5-declarative mesa";;
252 qt5-datavis3d)
253 CAT="development|DataVisualization module"
254 DEPENDS="qt5-base qt5-declarative mesa";;
255 qt5-declarative)
256 CAT="development|Declarative module"
257 DEPENDS="qt5-base qt5-remoteobjects qt5-xmlpatterns mesa";;
258 qt5-gamepad)
259 CAT="development|Gamepad module"
260 DEPENDS="qt5-base qt5-declarative eudev mesa";;
261 qt5-graphicaleffects)
262 CAT="development|GraphicalEffects module"
263 DEPENDS="qt5-base qt5-declarative mesa";;
264 qt5-imageformats)
265 CAT="development|imageformats module"
266 DEPENDS="qt5-base mesa tiff";;
267 qt5-location)
268 CAT="development|Location module"
269 DEPENDS="qt5-base qt5-declarative icu openssl libicu openssl \
270 mesa zlib";;
271 qt5-multimedia)
272 CAT="development|Multimedia module"
273 DEPENDS="qt5-base qt5-declarative alsa-lib glib gst1-plugins-base \
274 gstreamer1 mesa";;
275 qt5-networkauth)
276 CAT="development|NetworkAuth module"
277 DEPENDS="qt5-base mesa";;
278 qt5-purchasing)
279 CAT="development|Purchasing module"
280 DEPENDS="qt5-base qt5-declarative mesa";;
281 qt5-quickcontrols)
282 CAT="development|QuickControls module"
283 DEPENDS="qt5-base qt5-declarative mesa";;
284 qt5-quickcontrols2)
285 CAT="development|QuickControls2 module"
286 DEPENDS="qt5-base qt5-declarative mesa";;
287 qt5-remoteobjects)
288 rm -r $fs/usr/lib/qt5/ # interception with qt5-declarative
289 CAT="development|RemoteObjects module"
290 DEPENDS="qt5-base";;
291 qt5-script)
292 CAT="development|Script module"
293 DEPENDS="qt5-base mesa";;
294 qt5-scxml)
295 CAT="development|SCXML module"
296 DEPENDS="qt5-base qt5-declarative";;
297 qt5-sensors)
298 CAT="development|Sensors module"
299 DEPENDS="qt5-base qt5-declarative mesa";;
300 qt5-serialbus)
301 CAT="development|SerialBus module"
302 DEPENDS="qt5-base qt5-serialport";;
303 qt5-serialport)
304 CAT="development|SerialPort module"
305 DEPENDS="qt5-base eudev";;
306 qt5-speech)
307 CAT="development|Speech module"
308 DEPENDS="qt5-base";;
309 qt5-svg)
310 CAT="development|SVG module"
311 DEPENDS="qt5-base mesa zlib";;
312 qt5-tools)
313 copy applications/ pixmaps/ phrasebooks/ lconvert-qt5 lrelease-qt5 \
314 lupdate-qt5
315 CAT="development|Tools module"
316 DEPENDS="qt5-base qt5-declarative mesa";;
317 qt5-virtualkeyboard)
318 CAT="development|VirtualKeyboard module"
319 DEPENDS="qt5-base qt5-declarative qt5-svg mesa xorg-libxcb";;
320 qt5-wayland)
321 CAT="development|Wayland module"
322 DEPENDS="qt5-base qt5-declarative fontconfig freetype glib \
323 libxkbcommon mesa mesa-libegl mesa-libwayland-egl wayland \
324 xorg-libX11 xorg-libXcomposite xorg-libXext";;
325 qt5-webchannel)
326 CAT="development|WebChannel module"
327 DEPENDS="qt5-base qt5-declarative mesa";;
328 qt5-websockets)
329 CAT="development|WebSockets module"
330 DEPENDS="qt5-base qt5-declarative";;
331 qt5-x11extras)
332 CAT="development|X11Extras module"
333 DEPENDS="qt5-base mesa";;
334 qt5-xmlpatterns)
335 CAT="development|XmlPatterns module"
336 DEPENDS="qt5-base";;
337 esac
338 }