wok-next view qt5/receipt @ rev 21596
updated dos2unix (7.4.0 -> 7.4.1)
author | Hans-G?nter Theisgen |
---|---|
date | Wed Jun 24 14:10:06 2020 +0100 (2020-06-24) |
parents | 687a1d3a3469 |
children |
line source
1 # SliTaz package receipt v2.
3 PACKAGE="qt5"
4 VERSION="5.14.2"
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/svn/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="alsa-lib-dev cups-dev dbus-dev eudev-dev glib-dev
19 gst1-plugins-base-dev gtk3-dev fontconfig-dev freetype-dev
20 harfbuzz-dev icu-dev libinput-dev libjpeg-turbo-dev libpng-dev
21 libx11-dev libxcb-dev libxcomposite-dev libxkbcommon-dev
22 libxrender-dev mesa-dev openssl-dev pcre-dev sqlite3-dev tslib-dev
23 zlib-dev"
25 # Name split packages according to sources structure, for example:
26 # $src/qtgamepad/ -> qt5-gamepad
27 SPLIT="\
28 $PACKAGE-3d $PACKAGE-base $PACKAGE-base-gtk3 \
29 $PACKAGE-canvas3d $PACKAGE-charts $PACKAGE-connectivity \
30 $PACKAGE-datavis3d $PACKAGE-declarative $PACKAGE-gamepad \
31 $PACKAGE-graphicaleffects $PACKAGE-imageformats $PACKAGE-location \
32 $PACKAGE-multimedia $PACKAGE-networkauth $PACKAGE-purchasing \
33 $PACKAGE-quickcontrols $PACKAGE-quickcontrols2 $PACKAGE-remoteobjects \
34 $PACKAGE-script $PACKAGE-scxml $PACKAGE-sensors \
35 $PACKAGE-serialbus $PACKAGE-serialport $PACKAGE-speech \
36 $PACKAGE-svg $PACKAGE-tools $PACKAGE-virtualkeyboard \
37 $PACKAGE-wayland $PACKAGE-webchannel $PACKAGE-websockets \
38 $PACKAGE-x11extras $PACKAGE-xmlpatterns $PACKAGE-base-egl \
39 \
40 $PACKAGE-locale-ar $PACKAGE-locale-ca $PACKAGE-locale-cs \
41 $PACKAGE-locale-da $PACKAGE-locale-de $PACKAGE-locale-en \
42 $PACKAGE-locale-es $PACKAGE-locale-fa $PACKAGE-locale-fi \
43 $PACKAGE-locale-fr $PACKAGE-locale-gl $PACKAGE-locale-he \
44 $PACKAGE-locale-hu $PACKAGE-locale-it $PACKAGE-locale-ja \
45 $PACKAGE-locale-ko $PACKAGE-locale-lt $PACKAGE-locale-lv \
46 $PACKAGE-locale-pl $PACKAGE-locale-pt $PACKAGE-locale-ru \
47 $PACKAGE-locale-sk $PACKAGE-locale-sl $PACKAGE-locale-sv \
48 $PACKAGE-locale-uk $PACKAGE-locale-zh_CN $PACKAGE-locale-zh_TW \
49 \
50 $PACKAGE-doc $PACKAGE-dev"
52 compile_rules()
53 {
54 export QT5PREFIX=/usr # or /opt/qt5
56 if [ "$QT5PREFIX" == '/usr' ]
57 then
58 QT5OPTS="\
59 -archdatadir /usr/lib/qt5 \
60 -bindir /usr/bin \
61 -plugindir /usr/lib/qt5/plugins \
62 -importdir /usr/lib/qt5/imports \
63 -headerdir /usr/include/qt5 \
64 -datadir /usr/share/qt5 \
65 -docdir /usr/share/doc/qt5 \
66 -translationdir /usr/share/qt5/translations \
67 -examplesdir /usr/share/doc/qt5/examples \
68 "
69 fi
71 # echo "INCLUDEPATH += /usr/include/openssl-1.0" >> qtbase/src/network/network.pro
72 # export OPENSSL_LIBS='-L/usr/lib/openssl-1.0 -lssl -lcrypto'
73 #
74 # [ -s $SRC/$PATCH ] || wget -O $SRC/$PATCH $PATCH_URL$PATCH
75 # cd $src/qtdeclarative
76 # cp $SRC/$PATCH ./$PATCH
77 # patch -p1 -i $PATCH
78 # cd ..
79 #
80 # # Build qmake (and all following things with it) using existing CFLAGS and LDFLAGS
81 # sed -i -e "s|^\(QMAKE_CFLAGS_RELEASE.*\)|\1 $CFLAGS -DQT_MATH_H_DEFINES_MACROS=1|" \
82 # qtbase/mkspecs/common/gcc-base.conf
83 # sed -i -e "s|^\(QMAKE_LFLAGS_RELEASE.*\)|\1 $LDFLAGS|" \
84 # qtbase/mkspecs/common/g++-unix.conf
85 #
86 # # Fix missing private includes https://bugreports.qt.io/browse/QTBUG-37417
87 # sed -e '/CMAKE_NO_PRIVATE_INCLUDES\ \=\ true/d' -i \
88 # qtbase/mkspecs/features/create_cmake.prf
90 ./configure \
91 -prefix $QT5PREFIX \
92 $QT5OPTS \
93 -sysconfdir /etc/xdg \
94 -confirm-license \
95 -opensource \
96 -dbus-linked \
97 -openssl-linked \
98 -system-harfbuzz \
99 -system-sqlite \
100 -nomake examples \
101 -no-rpath \
102 -no-sse2 \
103 -skip qtwebengine &&
104 make -j 1 &&
105 make INSTALL_ROOT=$install install || return 1
107 # find $install$QT5PREFIX/lib/pkgconfig -name '*.pc' \
108 # -exec perl -pi -e "s, -L$PWD/?\S+,,g" {} \; &&
109 # find $install$QT5PREFIX/ -name qt_lib_bootstrap_private.pri \
110 # -exec sed -i -e "s:$PWD/qtbase:/$QT5PREFIX/lib/:g" {} \; &&
111 find $install$QT5PREFIX/ -name '*.prl' \
112 -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' '{}' \;
114 QT5BINDIR=$QT5PREFIX/bin
116 install -v -dm755 $install/usr/share/pixmaps/
118 install -v -Dm644 qttools/src/assistant/assistant/images/assistant-128.png \
119 $install/usr/share/pixmaps/assistant-qt5.png
120 install -v -Dm644 qttools/src/designer/src/designer/images/designer.png \
121 $install/usr/share/pixmaps/designer-qt5.png
122 install -v -Dm644 qttools/src/linguist/linguist/images/icons/linguist-128-32.png \
123 $install/usr/share/pixmaps/linguist-qt5.png
124 install -v -Dm644 qttools/src/qdbus/qdbusviewer/images/qdbusviewer-128.png \
125 $install/usr/share/pixmaps/qdbusviewer-qt5.png
127 mkdir -p $install/usr/share/applications
128 for i in $stuff/apps/*.desktop.in
129 do
130 sed "s|@QT5BINDIR@|$QT5BINDIR|" $i > $install/usr/share/applications/$(basename $i .in)
131 done
133 for file in moc uic rcc qmake lconvert lrelease lupdate
134 do
135 if [ "$QT5BINDIR" == '/usr/bin' ]
136 then
137 ln -sfvn $file $install/usr/bin/$file-qt5
138 else
139 ln -sfvn $QT5BINDIR/$file $install/usr/bin/$file-qt5
140 fi
141 done
143 # tweak permissions
144 find $install -type f -perm 664 -exec chmod 644 '{}' \;
145 find $install -type f -perm 775 -exec chmod 755 '{}' \;
146 }
148 genpkg_rules()
149 {
150 # How to split Qt5?
151 # It contains: 41 executables in bin/, 61 different libraries in lib/,
152 # 27 folders in plugins/, 27 languages in translations/.
153 # 156 packages for Qt5? It's a bit too much, isn't it?
154 #
155 # Let's deep into $src...
156 # Each folder here is a module (with rare exceptions). 41 pieces.
157 # Let us use these folders as a landmark to make Qt5 packages.
158 # Each folder may contain: executables (examine bin/ subfolder), libraries
159 # (lib/), plugins (plugins/), and qml (not sure what is it, but examine
160 # qml/ subfolder). Note, some qml directories may be shared across different
161 # Qt5 packages, so add only sub(-sub(-sub))-folders that contain "qmldir"
162 # inside it.
163 #
164 # Let's begin.
165 #
166 case $PACKAGE in
167 qt5)
168 COOKOPTS="!pixmaps !menus"
169 DEPENDS="$SPLIT";;
170 qt5-locale-*)
171 la=${PACKAGE#qt5-locale-}
172 copy *_$la.qm
173 case $la in
174 ar) lo='Arabic';; ca) lo='Catalan';;
175 cs) lo='Czech';; da) lo='Danish';;
176 de) lo='German';; en) lo='English';;
177 es) lo='Spanish';; fa) lo='Persian';;
178 fi) lo='Finnish';; fr) lo='French';;
179 gl) lo='Galician';; he) lo='Hebrew';;
180 hu) lo='Hungarian';; it) lo='Italian';;
181 ja) lo='Japanese';; ko) lo='Korean';;
182 lt) lo='Lithuanian';; lv) lo='Latvian';;
183 pl) lo='Polish';; pt) lo='Portuguese';;
184 ru) lo='Russian';; sk) lo='Slovak';;
185 sl) lo='Slovenian';; sv) lo='Swedish';;
186 uk) lo='Ukrainian';; zh_CN) lo='Chinese simplified';;
187 zh_TW) lo='Chinese traditional';;
188 esac
189 CAT="localization|$lo locale"
190 DEPENDS=" ";;
191 qt5-doc)
192 copy doc/
193 CAT="docs|documentation"
194 DEPENDS="qt5-base";;
195 qt5-dev)
196 copy @dev qt5/include/ mkspecs/ *.cmake *.prl qmake.conf
197 # Binaries from qt5-base:
198 copy fixqt4headers.pl moc moc-qt5 qdbuscpp2xml qdbusxml2cpp qlalr \
199 qmake qmake-qt5 rcc rcc-qt5 syncqt.pl uic uic-qt5 \
200 builtins.qmltypes
201 DEPENDS="qt5";;
202 qt5-base-gtk3)
203 copy libqgtk3.so
204 CAT="development|GTK+3 theme support"
205 DEPENDS="qt5-base atk libcairo gdk-pixbuf glib gtk3 mesa pango \
206 libx11 libxext";;
207 qt5-base-egl)
208 copy libQt5Egl*so*
209 CAT="development|EGL libs"
210 DEPENDS="qt5-base mesa mesa-libegl mesa-libgbm";;
211 *)
212 # examine folders in $src to understand what we need to copy from $install
213 examine="$src/qt${PACKAGE#qt5-}"
215 unset binaries libraries plugins qml
217 # output "base names" of files found in bin/ subfolder
218 [ -d "$examine/bin" ] &&
219 binaries=$(find $examine/bin -type f | awk -F/ '{print $NF}')
221 # the same thing with lib/
222 [ -d "$examine/lib" ] &&
223 libraries=$(find $examine/lib -name '*.so' | awk -F/ '{print $NF}')
225 # libraries in plugins/ sub-folder
226 [ -d "$examine/plugins" ] &&
227 plugins=$(find $examine/plugins -name '*.so' | awk -F/ '{print $NF}')
229 # libraries in qml/ sub-folder
230 [ -d "$examine/qml" ] &&
231 qml=$(cd $examine; find ./qml -name 'qmldir' | sed 's|^./||; s|qmldir$||')
233 copy $binaries $plugins $(
234 for i in $libraries; do echo "$i*"; done
235 for i in $qml; do echo $i; done)
236 ;;
237 esac
238 case $PACKAGE in
239 qt5-3d)
240 CAT="development|3D module"
241 DEPENDS="qt5-base qt5-declarative qt5-gamepad mesa zlib";;
243 qt5-base)
244 # Move binaries (that required for compiling the packages) to qt5-dev
245 rm -r $fs/usr/bin
247 # Move to qt5-base-gtk3 because only it depends on GTK3 and friends
248 rm $fs/usr/lib/qt5/plugins/platformthemes/libqgtk3.so
250 # Move to qt5-base-egl
251 rm -f $fs/usr/lib/libQt5Egl*
253 CAT="development|Base module"
254 DEPENDS="dbus eudev fontconfig freetype glib icu openssl libcups \
255 libdrm libharfbuzz libicu libinput libjpeg-turbo libpng \
256 libsqlite3 libxkbcommon libxkbcommon-x11 mesa \
257 mtdev tslib libice libsm libx11 libxext \
258 libxi libxcb zlib libatomic";;
259 qt5-canvas3d)
260 CAT="development|Canvas3D module"
261 DEPENDS="qt5-base qt5-declarative mesa";;
262 qt5-charts)
263 CAT="development|Charts module"
264 DEPENDS="qt5-base qt5-declarative mesa";;
265 qt5-connectivity)
266 CAT="development|Connectivity module"
267 DEPENDS="qt5-base qt5-declarative mesa";;
268 qt5-datavis3d)
269 CAT="development|DataVisualization module"
270 DEPENDS="qt5-base qt5-declarative mesa";;
271 qt5-declarative)
272 CAT="development|Declarative module"
273 DEPENDS="qt5-base qt5-remoteobjects qt5-xmlpatterns mesa";;
274 qt5-gamepad)
275 CAT="development|Gamepad module"
276 DEPENDS="qt5-base qt5-declarative eudev mesa";;
277 qt5-graphicaleffects)
278 CAT="development|GraphicalEffects module"
279 DEPENDS="qt5-base qt5-declarative mesa";;
280 qt5-imageformats)
281 CAT="development|imageformats module"
282 DEPENDS="qt5-base mesa libtiff";;
283 qt5-location)
284 CAT="development|Location module"
285 DEPENDS="qt5-base qt5-declarative icu openssl libicu openssl \
286 mesa zlib";;
287 qt5-multimedia)
288 CAT="development|Multimedia module"
289 DEPENDS="qt5-base qt5-declarative alsa-lib glib gst1-plugins-base \
290 gstreamer1 mesa";;
291 qt5-networkauth)
292 CAT="development|NetworkAuth module"
293 DEPENDS="qt5-base mesa";;
294 qt5-purchasing)
295 CAT="development|Purchasing module"
296 DEPENDS="qt5-base qt5-declarative mesa";;
297 qt5-quickcontrols)
298 CAT="development|QuickControls module"
299 DEPENDS="qt5-base qt5-declarative mesa";;
300 qt5-quickcontrols2)
301 CAT="development|QuickControls2 module"
302 DEPENDS="qt5-base qt5-declarative mesa";;
303 qt5-remoteobjects)
304 rm -r $fs/usr/lib/qt5/ # interception with qt5-declarative
305 CAT="development|RemoteObjects module"
306 DEPENDS="qt5-base";;
307 qt5-script)
308 CAT="development|Script module"
309 DEPENDS="qt5-base mesa";;
310 qt5-scxml)
311 CAT="development|SCXML module"
312 DEPENDS="qt5-base qt5-declarative";;
313 qt5-sensors)
314 CAT="development|Sensors module"
315 DEPENDS="qt5-base qt5-declarative mesa";;
316 qt5-serialbus)
317 CAT="development|SerialBus module"
318 DEPENDS="qt5-base qt5-serialport";;
319 qt5-serialport)
320 CAT="development|SerialPort module"
321 DEPENDS="qt5-base eudev";;
322 qt5-speech)
323 CAT="development|Speech module"
324 DEPENDS="qt5-base";;
325 qt5-svg)
326 CAT="development|SVG module"
327 DEPENDS="qt5-base mesa zlib";;
328 qt5-tools)
329 copy applications/ pixmaps/ phrasebooks/ lconvert-qt5 lrelease-qt5 \
330 lupdate-qt5
331 CAT="development|Tools module"
332 DEPENDS="qt5-base qt5-declarative mesa";;
333 qt5-virtualkeyboard)
334 CAT="development|VirtualKeyboard module"
335 DEPENDS="qt5-base qt5-declarative qt5-svg mesa libxcb";;
336 qt5-wayland)
337 CAT="development|Wayland module"
338 DEPENDS="qt5-base qt5-declarative fontconfig freetype glib \
339 libxkbcommon mesa mesa-libegl mesa-libwayland-egl wayland \
340 libx11 libxcomposite libxext";;
341 qt5-webchannel)
342 CAT="development|WebChannel module"
343 DEPENDS="qt5-base qt5-declarative mesa";;
344 qt5-websockets)
345 CAT="development|WebSockets module"
346 DEPENDS="qt5-base qt5-declarative";;
347 qt5-x11extras)
348 CAT="development|X11Extras module"
349 DEPENDS="qt5-base mesa";;
350 qt5-xmlpatterns)
351 CAT="development|XmlPatterns module"
352 DEPENDS="qt5-base";;
353 esac
354 }