wok-next view qt5/receipt @ rev 21207

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