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