wok-next diff qt5/receipt @ rev 19988
Add qt5 - now it's look good enough
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Fri Oct 20 03:29:40 2017 +0300 (2017-10-20) |
parents | |
children | 26b78719991d |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/qt5/receipt Fri Oct 20 03:29:40 2017 +0300 1.3 @@ -0,0 +1,310 @@ 1.4 +# SliTaz package receipt v2. 1.5 + 1.6 +PACKAGE="qt5" 1.7 +VERSION="5.9.1" 1.8 +CATEGORY="meta" 1.9 +SHORT_DESC="Cross-platform application framework" 1.10 +MAINTAINER="al.bobylev@gmail.com" 1.11 +LICENSE="LGPL3 GPL3" 1.12 +WEB_SITE="https://www.qt.io/" 1.13 +LFS="http://www.linuxfromscratch.org/blfs/view/stable/x/qt5.html" 1.14 + 1.15 +TARBALL="qt-everywhere-opensource-src-$VERSION.tar.xz" 1.16 +WGET_URL="https://download.qt.io/archive/qt/${VERSION%.*}/$VERSION/single/$TARBALL" 1.17 + 1.18 +BUILD_DEPENDS="dbus-dev eudev-dev zlib-dev glib-dev icu-dev pcre-dev \ 1.19 +openssl-dev sqlite3-dev xorg-libxcb-dev mesa17-dev freetype-dev fontconfig-dev \ 1.20 +libinput-dev harfbuzz-dev libjpeg-turbo-dev libpng16-dev tslib-dev \ 1.21 +xorg-libX11-dev libxkbcommon-dev xorg-libXrender-dev cups-dev \ 1.22 +xorg-libXcomposite-dev alsa-lib-dev gst1-plugins-base-dev gtk+3-dev" 1.23 +# Name split packages according to sources structure, for example: 1.24 +# $src/qtgamepad/ -> qt5-gamepad 1.25 +SPLIT="qt5-3d qt5-base qt5-base-gtk3 \ 1.26 +qt5-canvas3d qt5-charts qt5-connectivity \ 1.27 +qt5-datavis3d qt5-declarative qt5-gamepad \ 1.28 +qt5-graphicaleffects qt5-imageformats qt5-location \ 1.29 +qt5-multimedia qt5-networkauth qt5-purchasing \ 1.30 +qt5-quickcontrols qt5-quickcontrols2 qt5-remoteobjects \ 1.31 +qt5-script qt5-scxml qt5-sensors \ 1.32 +qt5-serialbus qt5-serialport qt5-speech \ 1.33 +qt5-svg qt5-tools qt5-virtualkeyboard \ 1.34 +qt5-wayland qt5-webchannel qt5-websockets \ 1.35 +qt5-x11extras qt5-xmlpatterns \ 1.36 +\ 1.37 +qt5-locale-ar qt5-locale-ca qt5-locale-cs qt5-locale-da \ 1.38 +qt5-locale-de qt5-locale-en qt5-locale-es qt5-locale-fa \ 1.39 +qt5-locale-fi qt5-locale-fr qt5-locale-gl qt5-locale-he \ 1.40 +qt5-locale-hu qt5-locale-it qt5-locale-ja qt5-locale-ko \ 1.41 +qt5-locale-lt qt5-locale-lv qt5-locale-pl qt5-locale-pt \ 1.42 +qt5-locale-ru qt5-locale-sk qt5-locale-sl qt5-locale-sv \ 1.43 +qt5-locale-uk qt5-locale-zh_CN qt5-locale-zh_TW \ 1.44 +\ 1.45 +qt5-doc qt5-dev" 1.46 + 1.47 +compile_rules() { 1.48 + export QT5PREFIX=/usr # or /opt/qt5 1.49 + if [ "$QT5PREFIX" == '/usr' ]; then 1.50 + QT5OPTS="\ 1.51 + -archdatadir /usr/lib/qt5 \ 1.52 + -bindir /usr/bin \ 1.53 + -plugindir /usr/lib/qt5/plugins \ 1.54 + -importdir /usr/lib/qt5/imports \ 1.55 + -headerdir /usr/include/qt5 \ 1.56 + -datadir /usr/share/qt5 \ 1.57 + -docdir /usr/share/doc/qt5 \ 1.58 + -translationdir /usr/share/qt5/translations \ 1.59 + -examplesdir /usr/share/doc/qt5/examples \ 1.60 +" 1.61 + fi 1.62 + 1.63 + echo "INCLUDEPATH += /usr/include/openssl-1.0" >> qtbase/src/network/network.pro 1.64 + export OPENSSL_LIBS='-L/usr/lib/openssl-1.0 -lssl -lcrypto' 1.65 + 1.66 + ./configure \ 1.67 + -prefix $QT5PREFIX \ 1.68 + $QT5OPTS \ 1.69 + -sysconfdir /etc/xdg \ 1.70 + -confirm-license \ 1.71 + -opensource \ 1.72 + -dbus-linked \ 1.73 + -openssl-linked \ 1.74 + -system-harfbuzz \ 1.75 + -system-sqlite \ 1.76 + -nomake examples \ 1.77 + -no-rpath \ 1.78 + -skip qtwebengine && 1.79 + make && 1.80 + make INSTALL_ROOT=$install install || exit 1 1.81 + 1.82 +# find $install$QT5PREFIX/lib/pkgconfig -name '*.pc' \ 1.83 +# -exec perl -pi -e "s, -L$PWD/?\S+,,g" {} \; && 1.84 +# find $install$QT5PREFIX/ -name qt_lib_bootstrap_private.pri \ 1.85 +# -exec sed -i -e "s:$PWD/qtbase:/$QT5PREFIX/lib/:g" {} \; && 1.86 + find $install$QT5PREFIX/ -name '*.prl' \ 1.87 + -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' '{}' \; 1.88 + 1.89 + QT5BINDIR=$QT5PREFIX/bin 1.90 + 1.91 + install -v -dm755 $install/usr/share/pixmaps/ 1.92 + 1.93 + install -v -Dm644 qttools/src/assistant/assistant/images/assistant-128.png $install/usr/share/pixmaps/assistant-qt5.png 1.94 + install -v -Dm644 qttools/src/designer/src/designer/images/designer.png $install/usr/share/pixmaps/designer-qt5.png 1.95 + install -v -Dm644 qttools/src/linguist/linguist/images/icons/linguist-128-32.png $install/usr/share/pixmaps/linguist-qt5.png 1.96 + install -v -Dm644 qttools/src/qdbus/qdbusviewer/images/qdbusviewer-128.png $install/usr/share/pixmaps/qdbusviewer-qt5.png 1.97 + 1.98 + mkdir -p $install/usr/share/applications 1.99 + for i in $stuff/apps/*.desktop.in; do 1.100 + sed "s|@QT5BINDIR@|$QT5BINDIR|" $i > $install/usr/share/applications/$(basename $i .in) 1.101 + done 1.102 + 1.103 + for file in moc uic rcc qmake lconvert lrelease lupdate; do 1.104 + if [ "$QT5BINDIR" == '/usr/bin' ]; then 1.105 + ln -sfvn $file $install/usr/bin/$file-qt5 1.106 + else 1.107 + ln -sfvn $QT5BINDIR/$file $install/usr/bin/$file-qt5 1.108 + fi 1.109 + done 1.110 + 1.111 + # tweak permissions 1.112 + find $install -type f -perm 664 -exec chmod 644 '{}' \; 1.113 + find $install -type f -perm 775 -exec chmod 755 '{}' \; 1.114 +} 1.115 + 1.116 +genpkg_rules() { 1.117 + # How to split Qt5? 1.118 + # It contains: 41 executables in bin/, 61 different libraries in lib/, 1.119 + # 27 folders in plugins/, 27 languages in translations/. 1.120 + # 156 packages for Qt5? It's a bit too much, isn't it? 1.121 + # 1.122 + # Let's deep into $src... 1.123 + # Each folder here is a module (with rare exceptions). 41 pieces. 1.124 + # Let use these folders as a landmark to make Qt5 packages. 1.125 + # Each folder may contain: executables (examine bin/ subfolder), libraries 1.126 + # (lib/), plugins (plugins/), and qml (not sure what is it, but examine 1.127 + # qml/ subfolder). Note, some qml directories may be shared across different 1.128 + # Qt5 packages, so add only sub(-sub(-sub))-folders that contain "qmldir" 1.129 + # inside it. 1.130 + # 1.131 + # Let's begin. 1.132 + # 1.133 + case $PACKAGE in 1.134 + qt5) 1.135 + COOKOPTS="!pixmaps !menus" 1.136 + DEPENDS="$SPLIT";; 1.137 + qt5-locale-*) 1.138 + la=${PACKAGE#qt5-locale-} 1.139 + copy *_$la.qm 1.140 + case $la in 1.141 + ar) lo='Arabic';; ca) lo='Catalan';; 1.142 + cs) lo='Czech';; da) lo='Danish';; 1.143 + de) lo='German';; en) lo='English';; 1.144 + es) lo='Spanish';; fa) lo='Persian';; 1.145 + fi) lo='Finnish';; fr) lo='French';; 1.146 + gl) lo='Galician';; he) lo='Hebrew';; 1.147 + hu) lo='Hungarian';; it) lo='Italian';; 1.148 + ja) lo='Japanese';; ko) lo='Korean';; 1.149 + lt) lo='Lithuanian';; lv) lo='Latvian';; 1.150 + pl) lo='Polish';; pt) lo='Portuguese';; 1.151 + ru) lo='Russian';; sk) lo='Slovak';; 1.152 + sl) lo='Slovenian';; sv) lo='Swedish';; 1.153 + uk) lo='Ukrainian';; zh_CN) lo='Chinese simplified';; 1.154 + zh_TW) lo='Chinese traditional';; 1.155 + esac 1.156 + CAT="localization|$lo locale" 1.157 + DEPENDS=" ";; 1.158 + qt5-doc) 1.159 + copy doc/ 1.160 + CAT="docs|documentation" 1.161 + DEPENDS="qt5-base";; 1.162 + qt5-dev) 1.163 + copy @dev qt5/include/ mkspecs/ *.cmake *.prl qmake.conf 1.164 + # Binaries from qt5-base: 1.165 + copy fixqt4headers.pl moc moc-qt5 qdbuscpp2xml qdbusxml2cpp qlalr \ 1.166 + qmake qmake-qt5 rcc rcc-qt5 syncqt.pl uic uic-qt5 \ 1.167 + builtins.qmltypes 1.168 + DEPENDS="qt5";; 1.169 + qt5-base-gtk3) 1.170 + copy libqgtk3.so 1.171 + CAT="development|GTK+3 theme support" 1.172 + DEPENDS="qt5-base atk cairo gdk-pixbuf glib gtk+3 mesa17 pango \ 1.173 + xorg-libX11 xorg-libXext";; 1.174 + *) 1.175 + # examine folders in $src to understand what we need to copy from $install 1.176 + examine="$src/qt${PACKAGE#qt5-}" 1.177 + 1.178 + unset binaries libraries plugins qml 1.179 + 1.180 + # output "base names" of files found in bin/ subfolder 1.181 + [ -d "$examine/bin" ] && 1.182 + binaries=$(find $examine/bin -type f | awk -F/ '{print $NF}') 1.183 + 1.184 + # the same thing with lib/ 1.185 + [ -d "$examine/lib" ] && 1.186 + libraries=$(find $examine/lib -name '*.so' | awk -F/ '{print $NF}') 1.187 + 1.188 + # libraries in plugins/ sub-folder 1.189 + [ -d "$examine/plugins" ] && 1.190 + plugins=$(find $examine/plugins -name '*.so' | awk -F/ '{print $NF}') 1.191 + 1.192 + # libraries in qml/ sub-folder 1.193 + [ -d "$examine/qml" ] && 1.194 + qml=$(cd $examine; find ./qml -name 'qmldir' | sed 's|^./||; s|qmldir$||') 1.195 + 1.196 + copy $binaries $plugins $( 1.197 + for i in $libraries; do echo "$i*"; done 1.198 + for i in $qml; do echo $i; done) 1.199 + ;; 1.200 + esac 1.201 + case $PACKAGE in 1.202 + qt5-3d) 1.203 + CAT="development|3D module" 1.204 + DEPENDS="qt5-base qt5-declarative qt5-gamepad mesa17 zlib";; 1.205 + qt5-base) 1.206 + # Move binaries (that required for compiling the packages) to qt5-dev 1.207 + rm -r $fs/usr/bin 1.208 + 1.209 + # Move to qt5-base-gtk3 because only it depends on GTK3 and friends 1.210 + rm $fs/usr/lib/qt5/plugins/platformthemes/libqgtk3.so 1.211 + 1.212 + CAT="development|Base module" 1.213 + DEPENDS="dbus eudev fontconfig freetype glib icu libcrypto libcups \ 1.214 + libdrm libharfbuzz libicu libinput libjpeg-turbo libpng16 \ 1.215 + libsqlite3 libssl libxkbcommon mesa17 mesa17-libegl mesa17-libgbm \ 1.216 + mtdev tslib xorg-libICE xorg-libSM xorg-libX11 xorg-libXext \ 1.217 + xorg-libXi xorg-libxcb zlib";; 1.218 + qt5-canvas3d) 1.219 + CAT="development|Canvas3D module" 1.220 + DEPENDS="qt5-base qt5-declarative mesa17";; 1.221 + qt5-charts) 1.222 + CAT="development|Charts module" 1.223 + DEPENDS="qt5-base qt5-declarative mesa17";; 1.224 + qt5-connectivity) 1.225 + CAT="development|Connectivity module" 1.226 + DEPENDS="qt5-base qt5-declarative mesa17";; 1.227 + qt5-datavis3d) 1.228 + CAT="development|DataVisualization module" 1.229 + DEPENDS="qt5-base qt5-declarative mesa17";; 1.230 + qt5-declarative) 1.231 + CAT="development|Declarative module" 1.232 + DEPENDS="qt5-base qt5-remoteobjects qt5-xmlpatterns mesa17";; 1.233 + qt5-gamepad) 1.234 + CAT="development|Gamepad module" 1.235 + DEPENDS="qt5-base qt5-declarative eudev mesa17";; 1.236 + qt5-graphicaleffects) 1.237 + CAT="development|GraphicalEffects module" 1.238 + DEPENDS="qt5-base qt5-declarative mesa17";; 1.239 + qt5-imageformats) 1.240 + CAT="development|imageformats module" 1.241 + DEPENDS="qt5-base mesa17 tiff";; 1.242 + qt5-location) 1.243 + CAT="development|Location module" 1.244 + DEPENDS="qt5-base qt5-declarative icu libcrypto libicu libssl \ 1.245 + mesa17 zlib";; 1.246 + qt5-multimedia) 1.247 + CAT="development|Multimedia module" 1.248 + DEPENDS="qt5-base qt5-declarative alsa-lib glib gst1-plugins-base \ 1.249 + gstreamer1 mesa17";; 1.250 + qt5-networkauth) 1.251 + CAT="development|NetworkAuth module" 1.252 + DEPENDS="qt5-base mesa17";; 1.253 + qt5-purchasing) 1.254 + CAT="development|Purchasing module" 1.255 + DEPENDS="qt5-base qt5-declarative mesa17";; 1.256 + qt5-quickcontrols) 1.257 + CAT="development|QuickControls module" 1.258 + DEPENDS="qt5-base qt5-declarative mesa17";; 1.259 + qt5-quickcontrols2) 1.260 + CAT="development|QuickControls2 module" 1.261 + DEPENDS="qt5-base qt5-declarative mesa17";; 1.262 + qt5-remoteobjects) 1.263 + rm -r $fs/usr/lib/qt5/ # interception with qt5-declarative 1.264 + CAT="development|RemoteObjects module" 1.265 + DEPENDS="qt5-base";; 1.266 + qt5-script) 1.267 + CAT="development|Script module" 1.268 + DEPENDS="qt5-base mesa17";; 1.269 + qt5-scxml) 1.270 + CAT="development|SCXML module" 1.271 + DEPENDS="qt5-base qt5-declarative";; 1.272 + qt5-sensors) 1.273 + CAT="development|Sensors module" 1.274 + DEPENDS="qt5-base qt5-declarative mesa17";; 1.275 + qt5-serialbus) 1.276 + CAT="development|SerialBus module" 1.277 + DEPENDS="qt5-base qt5-serialport";; 1.278 + qt5-serialport) 1.279 + CAT="development|SerialPort module" 1.280 + DEPENDS="qt5-base eudev";; 1.281 + qt5-speech) 1.282 + CAT="development|Speech module" 1.283 + DEPENDS="qt5-base";; 1.284 + qt5-svg) 1.285 + CAT="development|SVG module" 1.286 + DEPENDS="qt5-base mesa17 zlib";; 1.287 + qt5-tools) 1.288 + copy applications/ pixmaps/ phrasebooks/ lconvert-qt5 lrelease-qt5 \ 1.289 + lupdate-qt5 1.290 + CAT="development|Tools module" 1.291 + DEPENDS="qt5-base qt5-declarative mesa17";; 1.292 + qt5-virtualkeyboard) 1.293 + CAT="development|VirtualKeyboard module" 1.294 + DEPENDS="qt5-base qt5-declarative qt5-svg mesa17 xorg-libxcb";; 1.295 + qt5-wayland) 1.296 + CAT="development|Wayland module" 1.297 + DEPENDS="qt5-base qt5-declarative fontconfig freetype glib \ 1.298 + libxkbcommon mesa17 mesa17-libegl mesa17-libwayland-egl wayland \ 1.299 + xorg-libX11 xorg-libXcomposite xorg-libXext";; 1.300 + qt5-webchannel) 1.301 + CAT="development|WebChannel module" 1.302 + DEPENDS="qt5-base qt5-declarative mesa17";; 1.303 + qt5-websockets) 1.304 + CAT="development|WebSockets module" 1.305 + DEPENDS="qt5-base qt5-declarative";; 1.306 + qt5-x11extras) 1.307 + CAT="development|X11Extras module" 1.308 + DEPENDS="qt5-base mesa17";; 1.309 + qt5-xmlpatterns) 1.310 + CAT="development|XmlPatterns module" 1.311 + DEPENDS="qt5-base";; 1.312 + esac 1.313 +}