wok-next 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 d78f328fc5cb
children 4c3ee4d2d357
files qt5/description.txt qt5/receipt qt5/stuff/apps/assistant-qt5.desktop.in qt5/stuff/apps/designer-qt5.desktop.in qt5/stuff/apps/linguist-qt5.desktop.in qt5/stuff/apps/qdbusviewer-qt5.desktop.in
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/qt5/description.txt	Fri Oct 20 03:29:40 2017 +0300
     1.3 @@ -0,0 +1,5 @@
     1.4 +Qt5 is a cross-platform application framework that is widely used for developing
     1.5 +application software with a graphical user interface (GUI) (in which cases Qt5
     1.6 +is classified as a widget toolkit), and also used for developing non-GUI
     1.7 +programs such as command-line tools and consoles for servers. One of the major
     1.8 +users of Qt is KDE Frameworks 5 (KF5).
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/qt5/receipt	Fri Oct 20 03:29:40 2017 +0300
     2.3 @@ -0,0 +1,310 @@
     2.4 +# SliTaz package receipt v2.
     2.5 +
     2.6 +PACKAGE="qt5"
     2.7 +VERSION="5.9.1"
     2.8 +CATEGORY="meta"
     2.9 +SHORT_DESC="Cross-platform application framework"
    2.10 +MAINTAINER="al.bobylev@gmail.com"
    2.11 +LICENSE="LGPL3 GPL3"
    2.12 +WEB_SITE="https://www.qt.io/"
    2.13 +LFS="http://www.linuxfromscratch.org/blfs/view/stable/x/qt5.html"
    2.14 +
    2.15 +TARBALL="qt-everywhere-opensource-src-$VERSION.tar.xz"
    2.16 +WGET_URL="https://download.qt.io/archive/qt/${VERSION%.*}/$VERSION/single/$TARBALL"
    2.17 +
    2.18 +BUILD_DEPENDS="dbus-dev eudev-dev zlib-dev glib-dev icu-dev pcre-dev \
    2.19 +openssl-dev sqlite3-dev xorg-libxcb-dev mesa17-dev freetype-dev fontconfig-dev \
    2.20 +libinput-dev harfbuzz-dev libjpeg-turbo-dev libpng16-dev tslib-dev \
    2.21 +xorg-libX11-dev libxkbcommon-dev xorg-libXrender-dev cups-dev \
    2.22 +xorg-libXcomposite-dev alsa-lib-dev gst1-plugins-base-dev gtk+3-dev"
    2.23 +# Name split packages according to sources structure, for example:
    2.24 +# $src/qtgamepad/ -> qt5-gamepad
    2.25 +SPLIT="qt5-3d        qt5-base             qt5-base-gtk3        \
    2.26 +qt5-canvas3d         qt5-charts           qt5-connectivity     \
    2.27 +qt5-datavis3d        qt5-declarative      qt5-gamepad          \
    2.28 +qt5-graphicaleffects qt5-imageformats     qt5-location         \
    2.29 +qt5-multimedia       qt5-networkauth      qt5-purchasing       \
    2.30 +qt5-quickcontrols    qt5-quickcontrols2   qt5-remoteobjects    \
    2.31 +qt5-script           qt5-scxml            qt5-sensors          \
    2.32 +qt5-serialbus        qt5-serialport       qt5-speech           \
    2.33 +qt5-svg              qt5-tools            qt5-virtualkeyboard  \
    2.34 +qt5-wayland          qt5-webchannel       qt5-websockets       \
    2.35 +qt5-x11extras        qt5-xmlpatterns      \
    2.36 +\
    2.37 +qt5-locale-ar    qt5-locale-ca    qt5-locale-cs    qt5-locale-da \
    2.38 +qt5-locale-de    qt5-locale-en    qt5-locale-es    qt5-locale-fa \
    2.39 +qt5-locale-fi    qt5-locale-fr    qt5-locale-gl    qt5-locale-he \
    2.40 +qt5-locale-hu    qt5-locale-it    qt5-locale-ja    qt5-locale-ko \
    2.41 +qt5-locale-lt    qt5-locale-lv    qt5-locale-pl    qt5-locale-pt \
    2.42 +qt5-locale-ru    qt5-locale-sk    qt5-locale-sl    qt5-locale-sv \
    2.43 +qt5-locale-uk    qt5-locale-zh_CN qt5-locale-zh_TW \
    2.44 +\
    2.45 +qt5-doc qt5-dev"
    2.46 +
    2.47 +compile_rules() {
    2.48 +	export QT5PREFIX=/usr # or /opt/qt5
    2.49 +	if [ "$QT5PREFIX" == '/usr' ]; then
    2.50 +		QT5OPTS="\
    2.51 +		-archdatadir    /usr/lib/qt5 \
    2.52 +		-bindir         /usr/bin \
    2.53 +		-plugindir      /usr/lib/qt5/plugins \
    2.54 +		-importdir      /usr/lib/qt5/imports \
    2.55 +		-headerdir      /usr/include/qt5 \
    2.56 +		-datadir        /usr/share/qt5 \
    2.57 +		-docdir         /usr/share/doc/qt5 \
    2.58 +		-translationdir /usr/share/qt5/translations \
    2.59 +		-examplesdir    /usr/share/doc/qt5/examples \
    2.60 +"
    2.61 +	fi
    2.62 +
    2.63 +	echo "INCLUDEPATH += /usr/include/openssl-1.0" >> qtbase/src/network/network.pro
    2.64 +	export OPENSSL_LIBS='-L/usr/lib/openssl-1.0 -lssl -lcrypto'
    2.65 +
    2.66 +	./configure \
    2.67 +		-prefix $QT5PREFIX \
    2.68 +		$QT5OPTS \
    2.69 +		-sysconfdir /etc/xdg \
    2.70 +		-confirm-license \
    2.71 +		-opensource \
    2.72 +		-dbus-linked \
    2.73 +		-openssl-linked \
    2.74 +		-system-harfbuzz \
    2.75 +		-system-sqlite \
    2.76 +		-nomake examples \
    2.77 +		-no-rpath \
    2.78 +		-skip qtwebengine &&
    2.79 +	make &&
    2.80 +	make INSTALL_ROOT=$install install || exit 1
    2.81 +
    2.82 +#	find $install$QT5PREFIX/lib/pkgconfig -name '*.pc' \
    2.83 +#		-exec perl -pi -e "s, -L$PWD/?\S+,,g" {} \; &&
    2.84 +#	find $install$QT5PREFIX/ -name qt_lib_bootstrap_private.pri \
    2.85 +#		-exec sed -i -e "s:$PWD/qtbase:/$QT5PREFIX/lib/:g" {} \; &&
    2.86 +	find $install$QT5PREFIX/ -name '*.prl' \
    2.87 +		-exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' '{}' \;
    2.88 +
    2.89 +	QT5BINDIR=$QT5PREFIX/bin
    2.90 +
    2.91 +	install -v -dm755 $install/usr/share/pixmaps/
    2.92 +
    2.93 +	install -v -Dm644 qttools/src/assistant/assistant/images/assistant-128.png       $install/usr/share/pixmaps/assistant-qt5.png
    2.94 +	install -v -Dm644 qttools/src/designer/src/designer/images/designer.png          $install/usr/share/pixmaps/designer-qt5.png
    2.95 +	install -v -Dm644 qttools/src/linguist/linguist/images/icons/linguist-128-32.png $install/usr/share/pixmaps/linguist-qt5.png
    2.96 +	install -v -Dm644 qttools/src/qdbus/qdbusviewer/images/qdbusviewer-128.png       $install/usr/share/pixmaps/qdbusviewer-qt5.png
    2.97 +
    2.98 +	mkdir -p $install/usr/share/applications
    2.99 +	for i in $stuff/apps/*.desktop.in; do
   2.100 +		sed "s|@QT5BINDIR@|$QT5BINDIR|" $i > $install/usr/share/applications/$(basename $i .in)
   2.101 +	done
   2.102 +
   2.103 +	for file in moc uic rcc qmake lconvert lrelease lupdate; do
   2.104 +		if [ "$QT5BINDIR" == '/usr/bin' ]; then
   2.105 +			ln -sfvn $file $install/usr/bin/$file-qt5
   2.106 +		else
   2.107 +			ln -sfvn $QT5BINDIR/$file $install/usr/bin/$file-qt5
   2.108 +		fi
   2.109 +	done
   2.110 +
   2.111 +	# tweak permissions
   2.112 +	find $install -type f -perm 664 -exec chmod 644 '{}' \;
   2.113 +	find $install -type f -perm 775 -exec chmod 755 '{}' \;
   2.114 +}
   2.115 +
   2.116 +genpkg_rules() {
   2.117 +	# How to split Qt5?
   2.118 +	# It contains: 41 executables in bin/, 61 different libraries in lib/,
   2.119 +	# 27 folders in plugins/, 27 languages in translations/.
   2.120 +	# 156 packages for Qt5? It's a bit too much, isn't it?
   2.121 +	#
   2.122 +	# Let's deep into $src...
   2.123 +	# Each folder here is a module (with rare exceptions). 41 pieces.
   2.124 +	# Let use these folders as a landmark to make Qt5 packages.
   2.125 +	# Each folder may contain: executables (examine bin/ subfolder), libraries
   2.126 +	# (lib/), plugins (plugins/), and qml (not sure what is it, but examine
   2.127 +	# qml/ subfolder). Note, some qml directories may be shared across different
   2.128 +	# Qt5 packages, so add only sub(-sub(-sub))-folders that contain "qmldir"
   2.129 +	# inside it.
   2.130 +	#
   2.131 +	# Let's begin.
   2.132 +	#
   2.133 +	case $PACKAGE in
   2.134 +		qt5)
   2.135 +			COOKOPTS="!pixmaps !menus"
   2.136 +			DEPENDS="$SPLIT";;
   2.137 +		qt5-locale-*)
   2.138 +			la=${PACKAGE#qt5-locale-}
   2.139 +			copy *_$la.qm
   2.140 +			case $la in
   2.141 +				ar) lo='Arabic';;		ca) lo='Catalan';;
   2.142 +				cs) lo='Czech';;		da) lo='Danish';;
   2.143 +				de) lo='German';;		en) lo='English';;
   2.144 +				es) lo='Spanish';;		fa) lo='Persian';;
   2.145 +				fi) lo='Finnish';;		fr) lo='French';;
   2.146 +				gl) lo='Galician';;		he) lo='Hebrew';;
   2.147 +				hu) lo='Hungarian';;	it) lo='Italian';;
   2.148 +				ja) lo='Japanese';;		ko) lo='Korean';;
   2.149 +				lt) lo='Lithuanian';;	lv) lo='Latvian';;
   2.150 +				pl) lo='Polish';;		pt) lo='Portuguese';;
   2.151 +				ru) lo='Russian';;		sk) lo='Slovak';;
   2.152 +				sl) lo='Slovenian';;	sv) lo='Swedish';;
   2.153 +				uk) lo='Ukrainian';;	zh_CN) lo='Chinese simplified';;
   2.154 +				zh_TW) lo='Chinese traditional';;
   2.155 +			esac
   2.156 +			CAT="localization|$lo locale"
   2.157 +			DEPENDS=" ";;
   2.158 +		qt5-doc)
   2.159 +			copy doc/
   2.160 +			CAT="docs|documentation"
   2.161 +			DEPENDS="qt5-base";;
   2.162 +		qt5-dev)
   2.163 +			copy @dev qt5/include/ mkspecs/ *.cmake *.prl qmake.conf
   2.164 +			# Binaries from qt5-base:
   2.165 +			copy fixqt4headers.pl moc moc-qt5 qdbuscpp2xml qdbusxml2cpp qlalr \
   2.166 +			qmake qmake-qt5 rcc rcc-qt5 syncqt.pl uic uic-qt5 \
   2.167 +			builtins.qmltypes
   2.168 +			DEPENDS="qt5";;
   2.169 +		qt5-base-gtk3)
   2.170 +			copy libqgtk3.so
   2.171 +			CAT="development|GTK+3 theme support"
   2.172 +			DEPENDS="qt5-base atk cairo gdk-pixbuf glib gtk+3 mesa17 pango \
   2.173 +			xorg-libX11 xorg-libXext";;
   2.174 +		*)
   2.175 +			# examine folders in $src to understand what we need to copy from $install
   2.176 +			examine="$src/qt${PACKAGE#qt5-}"
   2.177 +
   2.178 +			unset binaries libraries plugins qml
   2.179 +
   2.180 +			# output "base names" of files found in bin/ subfolder
   2.181 +			[ -d "$examine/bin" ] &&
   2.182 +			binaries=$(find $examine/bin -type f | awk -F/ '{print $NF}')
   2.183 +
   2.184 +			# the same thing with lib/
   2.185 +			[ -d "$examine/lib" ] &&
   2.186 +			libraries=$(find $examine/lib -name '*.so' | awk -F/ '{print $NF}')
   2.187 +
   2.188 +			# libraries in plugins/ sub-folder
   2.189 +			[ -d "$examine/plugins" ] &&
   2.190 +			plugins=$(find $examine/plugins -name '*.so' | awk -F/ '{print $NF}')
   2.191 +
   2.192 +			# libraries in qml/ sub-folder
   2.193 +			[ -d "$examine/qml" ] &&
   2.194 +			qml=$(cd $examine; find ./qml -name 'qmldir' | sed 's|^./||; s|qmldir$||')
   2.195 +
   2.196 +			copy $binaries $plugins $(
   2.197 +				for i in $libraries; do echo "$i*"; done
   2.198 +				for i in $qml; do echo $i; done)
   2.199 +			;;
   2.200 +	esac
   2.201 +	case $PACKAGE in
   2.202 +		qt5-3d)
   2.203 +			CAT="development|3D module"
   2.204 +			DEPENDS="qt5-base qt5-declarative qt5-gamepad mesa17 zlib";;
   2.205 +		qt5-base)
   2.206 +			# Move binaries (that required for compiling the packages) to qt5-dev
   2.207 +			rm -r $fs/usr/bin
   2.208 +
   2.209 +			# Move to qt5-base-gtk3 because only it depends on GTK3 and friends
   2.210 +			rm $fs/usr/lib/qt5/plugins/platformthemes/libqgtk3.so
   2.211 +
   2.212 +			CAT="development|Base module"
   2.213 +			DEPENDS="dbus eudev fontconfig freetype glib icu libcrypto libcups \
   2.214 +			libdrm libharfbuzz libicu libinput libjpeg-turbo libpng16 \
   2.215 +			libsqlite3 libssl libxkbcommon mesa17 mesa17-libegl mesa17-libgbm \
   2.216 +			mtdev tslib xorg-libICE xorg-libSM xorg-libX11 xorg-libXext \
   2.217 +			xorg-libXi xorg-libxcb zlib";;
   2.218 +		qt5-canvas3d)
   2.219 +			CAT="development|Canvas3D module"
   2.220 +			DEPENDS="qt5-base qt5-declarative mesa17";;
   2.221 +		qt5-charts)
   2.222 +			CAT="development|Charts module"
   2.223 +			DEPENDS="qt5-base qt5-declarative mesa17";;
   2.224 +		qt5-connectivity)
   2.225 +			CAT="development|Connectivity module"
   2.226 +			DEPENDS="qt5-base qt5-declarative mesa17";;
   2.227 +		qt5-datavis3d)
   2.228 +			CAT="development|DataVisualization module"
   2.229 +			DEPENDS="qt5-base qt5-declarative mesa17";;
   2.230 +		qt5-declarative)
   2.231 +			CAT="development|Declarative module"
   2.232 +			DEPENDS="qt5-base qt5-remoteobjects qt5-xmlpatterns mesa17";;
   2.233 +		qt5-gamepad)
   2.234 +			CAT="development|Gamepad module"
   2.235 +			DEPENDS="qt5-base qt5-declarative eudev mesa17";;
   2.236 +		qt5-graphicaleffects)
   2.237 +			CAT="development|GraphicalEffects module"
   2.238 +			DEPENDS="qt5-base qt5-declarative mesa17";;
   2.239 +		qt5-imageformats)
   2.240 +			CAT="development|imageformats module"
   2.241 +			DEPENDS="qt5-base mesa17 tiff";;
   2.242 +		qt5-location)
   2.243 +			CAT="development|Location module"
   2.244 +			DEPENDS="qt5-base qt5-declarative icu libcrypto libicu libssl \
   2.245 +			mesa17 zlib";;
   2.246 +		qt5-multimedia)
   2.247 +			CAT="development|Multimedia module"
   2.248 +			DEPENDS="qt5-base qt5-declarative alsa-lib glib gst1-plugins-base \
   2.249 +			gstreamer1 mesa17";;
   2.250 +		qt5-networkauth)
   2.251 +			CAT="development|NetworkAuth module"
   2.252 +			DEPENDS="qt5-base mesa17";;
   2.253 +		qt5-purchasing)
   2.254 +			CAT="development|Purchasing module"
   2.255 +			DEPENDS="qt5-base qt5-declarative mesa17";;
   2.256 +		qt5-quickcontrols)
   2.257 +			CAT="development|QuickControls module"
   2.258 +			DEPENDS="qt5-base qt5-declarative mesa17";;
   2.259 +		qt5-quickcontrols2)
   2.260 +			CAT="development|QuickControls2 module"
   2.261 +			DEPENDS="qt5-base qt5-declarative mesa17";;
   2.262 +		qt5-remoteobjects)
   2.263 +			rm -r $fs/usr/lib/qt5/ # interception with qt5-declarative
   2.264 +			CAT="development|RemoteObjects module"
   2.265 +			DEPENDS="qt5-base";;
   2.266 +		qt5-script)
   2.267 +			CAT="development|Script module"
   2.268 +			DEPENDS="qt5-base mesa17";;
   2.269 +		qt5-scxml)
   2.270 +			CAT="development|SCXML module"
   2.271 +			DEPENDS="qt5-base qt5-declarative";;
   2.272 +		qt5-sensors)
   2.273 +			CAT="development|Sensors module"
   2.274 +			DEPENDS="qt5-base qt5-declarative mesa17";;
   2.275 +		qt5-serialbus)
   2.276 +			CAT="development|SerialBus module"
   2.277 +			DEPENDS="qt5-base qt5-serialport";;
   2.278 +		qt5-serialport)
   2.279 +			CAT="development|SerialPort module"
   2.280 +			DEPENDS="qt5-base eudev";;
   2.281 +		qt5-speech)
   2.282 +			CAT="development|Speech module"
   2.283 +			DEPENDS="qt5-base";;
   2.284 +		qt5-svg)
   2.285 +			CAT="development|SVG module"
   2.286 +			DEPENDS="qt5-base mesa17 zlib";;
   2.287 +		qt5-tools)
   2.288 +			copy applications/ pixmaps/ phrasebooks/ lconvert-qt5 lrelease-qt5 \
   2.289 +			lupdate-qt5
   2.290 +			CAT="development|Tools module"
   2.291 +			DEPENDS="qt5-base qt5-declarative mesa17";;
   2.292 +		qt5-virtualkeyboard)
   2.293 +			CAT="development|VirtualKeyboard module"
   2.294 +			DEPENDS="qt5-base qt5-declarative qt5-svg mesa17 xorg-libxcb";;
   2.295 +		qt5-wayland)
   2.296 +			CAT="development|Wayland module"
   2.297 +			DEPENDS="qt5-base qt5-declarative fontconfig freetype glib \
   2.298 +			libxkbcommon mesa17 mesa17-libegl mesa17-libwayland-egl wayland \
   2.299 +			xorg-libX11 xorg-libXcomposite xorg-libXext";;
   2.300 +		qt5-webchannel)
   2.301 +			CAT="development|WebChannel module"
   2.302 +			DEPENDS="qt5-base qt5-declarative mesa17";;
   2.303 +		qt5-websockets)
   2.304 +			CAT="development|WebSockets module"
   2.305 +			DEPENDS="qt5-base qt5-declarative";;
   2.306 +		qt5-x11extras)
   2.307 +			CAT="development|X11Extras module"
   2.308 +			DEPENDS="qt5-base mesa17";;
   2.309 +		qt5-xmlpatterns)
   2.310 +			CAT="development|XmlPatterns module"
   2.311 +			DEPENDS="qt5-base";;
   2.312 +	esac
   2.313 +}
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/qt5/stuff/apps/assistant-qt5.desktop.in	Fri Oct 20 03:29:40 2017 +0300
     3.3 @@ -0,0 +1,8 @@
     3.4 +[Desktop Entry]
     3.5 +Type=Application
     3.6 +Name=Qt5 Assistant
     3.7 +Comment=Shows Qt5 documentation and examples
     3.8 +Exec=@QT5BINDIR@/assistant
     3.9 +Icon=assistant-qt5
    3.10 +Terminal=false
    3.11 +Categories=Qt;Development;Documentation;
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/qt5/stuff/apps/designer-qt5.desktop.in	Fri Oct 20 03:29:40 2017 +0300
     4.3 @@ -0,0 +1,10 @@
     4.4 +[Desktop Entry]
     4.5 +Type=Application
     4.6 +Name=Qt5 Designer
     4.7 +GenericName=Interface Designer
     4.8 +Comment=Design GUIs for Qt5 applications
     4.9 +Exec=@QT5BINDIR@/designer
    4.10 +Icon=designer-qt5
    4.11 +Terminal=false
    4.12 +Categories=Qt;Development;
    4.13 +MimeType=application/x-designer;
     5.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.2 +++ b/qt5/stuff/apps/linguist-qt5.desktop.in	Fri Oct 20 03:29:40 2017 +0300
     5.3 @@ -0,0 +1,9 @@
     5.4 +[Desktop Entry]
     5.5 +Type=Application
     5.6 +Name=Qt5 Linguist
     5.7 +Comment=Add translations to Qt5 applications
     5.8 +Exec=@QT5BINDIR@/linguist
     5.9 +Icon=linguist-qt5
    5.10 +Terminal=false
    5.11 +Categories=Qt;Development;
    5.12 +MimeType=text/vnd.trolltech.linguist;application/x-linguist;
     6.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.2 +++ b/qt5/stuff/apps/qdbusviewer-qt5.desktop.in	Fri Oct 20 03:29:40 2017 +0300
     6.3 @@ -0,0 +1,9 @@
     6.4 +[Desktop Entry]
     6.5 +Type=Application
     6.6 +Name=Qt5 QDbusViewer
     6.7 +GenericName=D-Bus Debugger
     6.8 +Comment=Debug D-Bus applications
     6.9 +Exec=@QT5BINDIR@/qdbusviewer
    6.10 +Icon=qdbusviewer-qt5
    6.11 +Terminal=false
    6.12 +Categories=Qt;Development;Debugger;