wok-next diff qt4/receipt @ rev 19953

qt4: reveipt v2
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon Oct 16 15:34:21 2017 +0200 (2017-10-16)
parents 795baf180500
children 9744f36fd101
line diff
     1.1 --- a/qt4/receipt	Sat Jul 29 14:46:34 2017 +0300
     1.2 +++ b/qt4/receipt	Mon Oct 16 15:34:21 2017 +0200
     1.3 @@ -1,4 +1,4 @@
     1.4 -# SliTaz package receipt.
     1.5 +# SliTaz package receipt v2.
     1.6  
     1.7  PACKAGE="qt4"
     1.8  SOURCE="qt-everywhere-opensource-src"
     1.9 @@ -13,9 +13,6 @@
    1.10  PROVIDE="qt-x11-opensource-src Qt4"
    1.11  TAGS="qt"
    1.12  
    1.13 -DEPENDS="glibc-locale libQtCore libQtGui libQtNetwork libQtSvg libQtXml \
    1.14 -libQtDesigner libQtScript libQt3Support libQtClucene libQtDBus libQtHelp \
    1.15 -libQtOpenGL libQtSql libQtWebkit gstreamer0"
    1.16  BUILD_DEPENDS="xorg-libX11-dev dbus-dev gstreamer0-dev gst0-python-dev libmng-dev \
    1.17  cups-dev mysql-dev unixODBC-dev mesa-dev fontconfig-dev libegl-mesa libglu-mesa \
    1.18  libglw-mesa postgresql-dev gst0-plugins-base-dev atk-dev autoconf automake bash \
    1.19 @@ -24,13 +21,18 @@
    1.20  libxml2-dev linux-api-headers m4 make mercurial ncurses-dev openssl-dev \
    1.21  pango-dev patch pcre-dev perl perl-xml-parser perl-xml-simple pixman-dev \
    1.22  pkg-config tiff-dev xorg-dev-proto xorg-dev zip unzip gtk+-dev alsa-lib-dev \
    1.23 -sqlite-dev libglu-mesa-dev libglw-mesa-dev libQtClucene wayland-dev"
    1.24 +sqlite-dev libglu-mesa-dev libglw-mesa-dev wayland-dev"
    1.25 +SPLIT="qt4 libQt3Support libQtClucene libQtCore libQtDBus libQtDeclarative \
    1.26 +libQtDesigner libQtGui libQtHelp libQtMultimedia libQtNetwork libQtOpenGL \
    1.27 +libQtPlugins libQtScript libQtScriptTools libQtSql libQtSvg libQtTest \
    1.28 +libQtWebkit-video libQtXml qmake Qt4-dev qt4-phonon qtconfig-phonon QtDesigner \
    1.29 +qt-locale-cs qt-locale-da qt-locale-de qt-locale-es qt-locale-fr qt-locale-hu \
    1.30 +qt-locale-pl qt-locale-pt qt-locale-ru qt-locale-sl qt-locale-sv qt-locale-uk \
    1.31 +qt-locale-zh_CN qt-locale-zh_TW"
    1.32  
    1.33  # Rules to configure and make the package.
    1.34  compile_rules()
    1.35  {
    1.36 -	cd $src
    1.37 -	
    1.38  	#ugly fix for missing files, you probably could do better
    1.39  	
    1.40  	mkdir -p $src/src/3rdparty/webkit/Source/WebKit2/generated
    1.41 @@ -49,7 +51,7 @@
    1.42  	/usr/bin/python $src/src/3rdparty/webkit/Source/WebKit2/Scripts/generate-messages-header.py $dname/$fileprefix.messages.in > $src/src/3rdparty/webkit/Source/WebKit2/generated/$i
    1.43  	done
    1.44  	
    1.45 -		./configure\
    1.46 +	./configure \
    1.47  		-silent \
    1.48  		-prefix /usr \
    1.49  		-confirm-license -opensource \
    1.50 @@ -82,9 +84,350 @@
    1.51  	make INSTALL_ROOT=$DESTDIR install
    1.52  }
    1.53  
    1.54 +# Rules to gen a SliTaz locale qt package.
    1.55 +genpkg_locale()
    1.56 +{
    1.57 +	LICENSE="GPL3 LGPL2.1 FDL other"
    1.58 +	usqt=/usr/share/qt/translations
    1.59 +	mkdir -p $fs$usqt
    1.60 +
    1.61 +	for qm in $(find $install$usqt -name "*_$LOCALE.qm"); do
    1.62 +		cp -a $install$usqt/${qm##*/} $fs$usqt
    1.63 +	done
    1.64 +
    1.65 +	if [ x$BOOK != x ]; then
    1.66 +		usqp=/usr/share/qt/phrasebooks
    1.67 +		mkdir -p $fs$usqp
    1.68 +		cp -a $install$usqp/$BOOK.qph $fs$usqp
    1.69 +	fi
    1.70 +}
    1.71 +
    1.72  # Rules to gen a SliTaz package suitable for Tazpkg.
    1.73  genpkg_rules()
    1.74  {
    1.75 -	# dummy tree to avoid 'tazwok cmp --cook' building loop
    1.76 -	mkdir $fs/etc
    1.77 +	case $PACKAGE in
    1.78 +	qt4)
    1.79 +		DEPENDS="glibc-locale libQtCore libQtGui libQtNetwork libQtSvg \
    1.80 +			libQtXml libQtDesigner libQtScript libQt3Support \
    1.81 +			libQtClucene libQtDBus libQtHelp libQtOpenGL libQtSql \
    1.82 +			libQtWebkit gstreamer0"
    1.83 +		# dummy tree to avoid 'tazwok cmp --cook' building loop
    1.84 +		mkdir $fs/etc
    1.85 +		;;
    1.86 +	libQt3Support)
    1.87 +		CAT="development|Qt3 support Library"
    1.88 +		DEPENDS="libQtGui libQtSql libQtXml"
    1.89 +		mkdir -p $fs/usr/lib
    1.90 +		cp -a $install/usr/lib/libQt3Support.so* $fs/usr/lib
    1.91 +		;;
    1.92 +	libQtClucene)
    1.93 +		CAT="development|Qt clucene Library"
    1.94 +		DEPENDS="libQtCore"
    1.95 +		mkdir -p $fs/usr/lib
    1.96 +		cp -a $install/usr/lib/libQtCLucene.so* $fs/usr/lib
    1.97 +		;;
    1.98 +	libQtCore)
    1.99 +		CAT="development|"Qt Core files"
   1.100 +		DEPENDS="glib zlib gcc-lib-base"
   1.101 +		mkdir -p $fs/usr/lib
   1.102 +		cp -a $install/usr/lib/libQtCore.so* $fs/usr/lib
   1.103 +		;;
   1.104 +	libQtDBus)
   1.105 +		CAT="development|Qt Dbus Library"
   1.106 +		DEPENDS="libQtXml"
   1.107 +		mkdir -p $fs/usr/lib $fs/usr/bin
   1.108 +		cp -a $install/usr/lib/libQtDBus.so* $fs/usr/lib
   1.109 +		cp -a $install/usr/bin/qdbus $fs/usr/bin
   1.110 +		;;
   1.111 +	libQtDeclarative)
   1.112 +		CAT="development|Qt Declarative Library"
   1.113 +		DEPENDS="libQtCore libQtNetwork libQtGui libQtXml libQtSql \
   1.114 +			libQtSvg libQtScript"
   1.115 +		mkdir -p $fs/usr/lib
   1.116 +		cp -a $src/lib/libQtDeclarative.so* $fs/usr/lib
   1.117 +		;;
   1.118 +	libQtDesigner)
   1.119 +		CAT="development|Qt Designer"
   1.120 +		DEPENDS="libQtCore libQtGui libQtScript libQtXml"
   1.121 +		mkdir -p $fs/usr/lib
   1.122 +		cp -a $install/usr/lib/libQtDesigner*.so* $fs/usr/lib
   1.123 +		;;
   1.124 +	libQtGui)
   1.125 +		CAT="development|Qt Gui Library"
   1.126 +		DEPENDS="libQtCore expat fontconfig freetype xorg-libICE \
   1.127 +			xorg-libSM xorg-libX11 xorg-libXau xorg-libXdmcp \
   1.128 +			xorg-libXext xorg-libXi xorg-libXrandr xorg-libXrender \
   1.129 +			libpng"
   1.130 +		mkdir -p $fs/usr/lib
   1.131 +		cp -a $install/usr/lib/libQtGui.so* $fs/usr/lib
   1.132 +	
   1.133 +		mkdir -p $fs/usr/lib/qt/plugins/imageformats
   1.134 +		cp -a $install/usr/lib/qt/plugins/imageformats/libqjpeg.so $fs/usr/lib/qt/plugins/imageformats
   1.135 +		cp -a $install/usr/lib/qt/plugins/imageformats/libqgif.so $fs/usr/lib/qt/plugins/imageformats
   1.136 +
   1.137 +		mkdir -p $fs/etc/skel/.config
   1.138 +		cp -a $stuff/Trolltech.conf $fs/etc/skel/.config
   1.139 +		;;
   1.140 +	libQtHelp)
   1.141 +		CAT="development|Qt help Library"
   1.142 +		DEPENDS="libQtGui libQtClucene libQtSql libQtXml"
   1.143 +		mkdir -p $fs/usr/lib
   1.144 +		cp -a $install/usr/lib/libQtHelp.so* $fs/usr/lib
   1.145 +		;;
   1.146 +	libQtMultimedia)
   1.147 +		CAT="development|Qt Multimedia Library"
   1.148 +		DEPENDS="libQtGui alsa-lib"
   1.149 +		mkdir -p $fs/usr/lib
   1.150 +		cp -a $install/usr/lib/libQtMultimedia.so* $fs/usr/lib
   1.151 +		;;
   1.152 +	libQtNetwork)
   1.153 +		CAT="development|Qt Network Library"
   1.154 +		DEPENDS="libQtCore"
   1.155 +		mkdir -p $fs/usr/lib
   1.156 +		cp -a $install/usr/lib/libQtNetwork.so* $fs/usr/lib
   1.157 +		;;
   1.158 +	libQtOpenGL)
   1.159 +		CAT="development|Qt OpenGL Library"
   1.160 +		DEPENDS="libQtGui mesa libglu-mesa xorg-libXxf86vm xorg-libXdamage libdrm"
   1.161 +		mkdir -p $fs/usr/lib
   1.162 +		cp -a $install/usr/lib/libQtOpenGL.so* $fs/usr/lib
   1.163 +		;;
   1.164 +	libQtPlugins)
   1.165 +		CAT="development|qt x11 toolkit plugins"
   1.166 +		DEPENDS="libQtSql libQt3Support libQtGui libQtCore libQtXml \
   1.167 +			libQtNetwork libQtDBus libQtWebkit libQtScript \
   1.168 +			libQtDesigner libQtOpenGL libQtScriptTools libQtSvg \
   1.169 +			libQtTest libQtHelp"
   1.170 +		mkdir -p $fs/usr/lib/qt
   1.171 +		cp -a $install/usr/lib/qt/plugins $fs/usr/lib/qt
   1.172 +		find $fs -regex \
   1.173 +		'.*\(gstreamer\|libqsqlite\|qjpeg\|bqgif\|libqsvg\).*' -delete
   1.174 +		;;
   1.175 +	libQtScript)
   1.176 +		CAT="development|Qt Script Lib"
   1.177 +		DEPENDS="libQtCore"
   1.178 +		mkdir -p $fs/usr/lib
   1.179 +		cp -a $install/usr/lib/libQtScript.so* $fs/usr/lib
   1.180 +		;;
   1.181 +	libQtScriptTools)
   1.182 +		CAT="development|Qt ScriptTools Lib"
   1.183 +		DEPENDS="libQtScript libQtGui"
   1.184 +		mkdir -p $fs/usr/lib
   1.185 +		cp -a $install/usr/lib/libQtScriptTools.so* $fs/usr/lib
   1.186 +		;;
   1.187 +	libQtSql)
   1.188 +		CAT="development|Qt sql Library"
   1.189 +		DEPENDS="libQtCore sqlite"
   1.190 +		mkdir -p $fs/usr/lib
   1.191 +		cp -a $install/usr/lib/libQtSql.so* $fs/usr/lib
   1.192 +	
   1.193 +		#file from libQtPlugins usable with sqlite preinstalled in core slitaz
   1.194 +		mkdir -p $fs/usr/lib/qt/plugins/sqldrivers
   1.195 +		cp -a $install/usr/lib/qt/plugins/sqldrivers/libqsqlite.so $fs/usr/lib/qt/plugins/sqldrivers/libqsqlite.so
   1.196 +		;;
   1.197 +	libQtSvg)
   1.198 +		CAT="development|Qt Svg Library"
   1.199 +		DEPENDS="libQtCore libQtGui libQtXml libpng"
   1.200 +		mkdir -p $fs/usr/lib/qt/plugins/imageformats $fs/usr/lib/qt/plugins/iconengines
   1.201 +		cp -a $install/usr/lib/libQtSvg.so*	$fs/usr/lib
   1.202 +		cp -a $install/usr/lib/qt/plugins/imageformats/libqsvg.so	$fs/*/*/*/*/imageformats
   1.203 +		cp -a $install/usr/lib/qt/plugins/iconengines/libqsvgicon.so	$fs/*/*/*/*/iconengines
   1.204 +		;;
   1.205 +	libQtTest)
   1.206 +		CAT="development|Qt Test library"
   1.207 +		DEPENDS="libQtCore"
   1.208 +		mkdir -p $fs/usr/lib
   1.209 +		cp -a $install/usr/lib/libQtTest.so* $fs/usr/lib
   1.210 +		;;
   1.211 +	libQtWebkit-video)
   1.212 +		CAT="multimedia|Web browser engine for Qt (with gstreamer HTML5 audio video support)"
   1.213 +		DEPENDS="libQtCore libQtGui libQtNetwork libpng \
   1.214 +			gst0-plugins-base gst0-plugins-good gst0-ffmpeg"
   1.215 +		SUGGESTED="gst0-plugins-bad gst0-plugins-ugly"
   1.216 +		mkdir -p $fs/usr/lib
   1.217 +		cp -a $install/usr/lib/libQtWebKit.so* $fs/usr/lib
   1.218 +		;;
   1.219 +	libQtXml)
   1.220 +		CAT="development|Qt Xml library"
   1.221 +		DEPENDS="libQtNetwork"
   1.222 +		mkdir -p $fs/usr/lib
   1.223 +		cp -a $install/usr/lib/libQtXml.so* $fs/usr/lib
   1.224 +		cp -a $install/usr/lib/libQtXmlPatterns.so* $fs/usr/lib
   1.225 +		;;
   1.226 +	qmake)
   1.227 +		CAT="development|Qt make"
   1.228 +		TAGS="qt"
   1.229 +		DEPENDS="zlib gcc-lib-base"
   1.230 +		mkdir -p $fs/usr/bin
   1.231 +		cp -a $install/usr/bin/qmake $fs/usr/bin
   1.232 +		cp -a $install/usr/bin/moc $fs/usr/bin
   1.233 +		cp -a $install/usr/bin/uic $fs/usr/bin
   1.234 +		;;
   1.235 +	Qt4-dev)
   1.236 +		CAT="development|qt x11 toolkit"
   1.237 +		SUGGESTED="libmng nvidia"
   1.238 +		DEPENDS="QtDesigner jpeg tiff libpng mesa libglu-mesa \
   1.239 +			freetds libmysqlclient libpostgresqlclient libunixODBC \
   1.240 +			xcb-util libQt3Support libQtClucene libQtPlugins \
   1.241 +			libQtDBus libQtHelp libQtOpenGL libQtScript libQtSql \
   1.242 +			libQtScriptTools libQtWebkit libQtTest qtconfig \
   1.243 +			gcc-lib-base"
   1.244 +		mkdir -p $fs/usr/lib $fs/usr/include/private
   1.245 +		cp -a $install/usr/include $fs/usr
   1.246 +		cp -a $install/usr/lib/pkgconfig  $fs/usr/lib
   1.247 +		cp -a $install/usr/lib/*.*a  $fs/usr/lib/	
   1.248 +		cp -a $install/usr/lib/*.prl  $fs/usr/lib/	
   1.249 +		cp -a $install/usr/share  $fs/usr	
   1.250 +		cp -a $install/usr/lib/qt $fs/usr/lib
   1.251 +
   1.252 +		#private qt includes
   1.253 +		for i in $src/include/*/private/*; do cp $src/$(cat $i | sed 's/^#include "[./]*\([a-z].*\)"$/\1/') $fs/usr/include/private; done
   1.254 +	
   1.255 +		# all qt plugins are in libQtPlugins
   1.256 +		rm -rf $fs/usr/lib/qt/plugins
   1.257 +		# all bin and remove QT applications designer, qmake, assistant, linguist: provide seperate packages
   1.258 +		cp -a $install/usr/bin $fs/usr	
   1.259 +		rm $fs/usr/bin/qmake
   1.260 +		rm $fs/usr/bin/designer
   1.261 +		# Linguist and assistant are now part of QTDesigner packages
   1.262 +		rm $fs/usr/bin/linguist
   1.263 +		rm $fs/usr/bin/assistant
   1.264 +		# qtconfig packaged now in separate package
   1.265 +		rm $fs/usr/bin/qtconfig
   1.266 +		rm $fs/usr/share/qt/translations/qtconfig*.qm
   1.267 +		;;
   1.268 +	qt4-phonon)
   1.269 +		CAT="multimedia|Qt phonon library"
   1.270 +		DEPENDS="glib zlib gcc-lib-base"
   1.271 +		SUGGESTED="gst0-plugins-good"
   1.272 +		mkdir -p $fs/usr/lib
   1.273 +		cp -a $install/usr/lib/libphonon.so* $fs/usr/lib
   1.274 +		mkdir -p $fs/usr/lib/qt/plugins/phonon_backend
   1.275 +		cp -a $install/usr/lib/qt/plugins/phonon_backend/libphonon_gstreamer.so $fs/usr/lib/qt/plugins/phonon_backend/libphonon_gstreamer.so
   1.276 +		;;
   1.277 +	qtconfig-phonon)
   1.278 +		CAT="x-window|Qtconfig is a tool that allows users to customize the default settings for Qt applications."
   1.279 +		DEPENDS="gst0-plugins-base libQt3Support libQtNetwork libQtDBus qt4-phonon"
   1.280 +		mkdir -p $fs/usr/bin $fs/usr/share/qt/translations
   1.281 +		cp -a $install/usr/bin/qtconfig $fs/usr/bin
   1.282 +		cp -a $install/usr/share/qt/translations/qtconfig*.qm $fs/usr/share/qt/translations
   1.283 +		;;
   1.284 +	QtDesigner)
   1.285 +		CAT="development|Qt Designer"
   1.286 +		TAGS="qt"
   1.287 +		DEPENDS="libQtCore libQtGui libQtNetwork libQtSvg libQtXml \
   1.288 +			libQtDesigner libQtScript expat fontconfig freetype \
   1.289 +			glib xorg-libICE xorg-libSM xorg-libX11 xorg-libXau \
   1.290 +			xorg-libXdmcp xorg-libXext xorg-libXi xorg-libXrandr \
   1.291 +			xorg-libXrender zlib libpng gcc-lib-base"
   1.292 +		mkdir -p $fs/usr/bin \
   1.293 +			 $fs/usr/share/pixmaps \
   1.294 +			 $fs/usr/share/applications
   1.295 +
   1.296 +		cp -a $install/usr/bin/designer* $fs/usr/bin
   1.297 +		cp -a $install/usr/bin/linguist* $fs/usr/bin
   1.298 +		cp -a $install/usr/bin/assistant* $fs/usr/bin
   1.299 +		
   1.300 +		# add missing icons
   1.301 +		cp -a $src/tools/assistant/tools/assistant/images/assistant.png $fs/usr/share/pixmaps
   1.302 +		cp -a $src/tools/designer/src/designer/images/designer.png $fs/usr/share/pixmaps
   1.303 +		cp -a $src/tools/linguist/linguist/images/icons/linguist-16-32.png  $fs/usr/share/pixmaps
   1.304 +	
   1.305 +		# add .desktop files
   1.306 +		cp -a stuff/*  $fs/usr/share/applications
   1.307 +		;;
   1.308 +	qt-locale-cs)
   1.309 +		CAT="localization|Czech locale for Qt"
   1.310 +		LICENSE="GPL3 LGPL2.1 FDL other"
   1.311 +		LOCALE="cs"
   1.312 +		BOOK=""
   1.313 +		genpkg_locale
   1.314 +		;;
   1.315 +	qt-locale-da)
   1.316 +		CAT="localization|Danish locale for Qt"
   1.317 +		LOCALE="da"
   1.318 +		BOOK="danish"
   1.319 +		genpkg_locale
   1.320 +		;;
   1.321 +	qt-locale-de)
   1.322 +		CAT="localization|German locale for Qt"
   1.323 +		LOCALE="de"
   1.324 +		BOOK="german"
   1.325 +		genpkg_locale
   1.326 +		;;
   1.327 +	qt-locale-es)
   1.328 +		CAT="localization|Spanish locale for Qt"
   1.329 +		LOCALE="es"
   1.330 +		BOOK="spanish"
   1.331 +		genpkg_locale
   1.332 +		;;
   1.333 +	qt-locale-fr)
   1.334 +		CAT="localization|French locale for Qt"
   1.335 +		LOCALE="fr"
   1.336 +		BOOK="french"
   1.337 +		genpkg_locale
   1.338 +		;;
   1.339 +	qt-locale-hu)
   1.340 +		CAT="localization|Hungarian locale for Qt"
   1.341 +		LOCALE="hu"
   1.342 +		BOOK="hungarian"
   1.343 +		genpkg_locale
   1.344 +		;;
   1.345 +	qt-locale-pl)
   1.346 +		CAT="localization|Polish locale for Qt"
   1.347 +		LOCALE="pl"
   1.348 +		BOOK="polish"
   1.349 +		genpkg_locale
   1.350 +		;;
   1.351 +	qt-locale-pt)
   1.352 +		CAT="localization|Portuguese locale for Qt"
   1.353 +		LOCALE="pt"
   1.354 +		BOOK=""
   1.355 +		genpkg_locale
   1.356 +		;;
   1.357 +	qt-locale-ru)
   1.358 +		CAT="localization|Russian locale for Qt"
   1.359 +		LOCALE="ru"
   1.360 +		BOOK="russian"
   1.361 +		genpkg_locale
   1.362 +		;;
   1.363 +	qt-locale-sl)
   1.364 +		CAT="localization|Slovenian locale for Qt"
   1.365 +		LOCALE="sl"
   1.366 +		BOOK=""
   1.367 +		genpkg_locale
   1.368 +		;;
   1.369 +	qt-locale-sv)
   1.370 +		CAT="localization|Swedish locale for Qt"
   1.371 +		LOCALE="sv"
   1.372 +		BOOK="swedish"
   1.373 +		genpkg_locale
   1.374 +		;;
   1.375 +	qt-locale-uk)
   1.376 +		CAT="localization|Ukrainian locale for Qt"
   1.377 +		LOCALE="uk"
   1.378 +		BOOK=""
   1.379 +		genpkg_locale
   1.380 +		;;
   1.381 +	qt-locale-zh_CN)
   1.382 +		CAT="localization|Chinese Simplified locale for Qt"
   1.383 +		LOCALE="zh_CN"
   1.384 +		BOOK=""
   1.385 +		genpkg_locale
   1.386 +		;;
   1.387 +	qt-locale-zh_TW)
   1.388 +		CAT="localization|Chinese Traditional locale for Qt"
   1.389 +		LOCALE="zh_TW"
   1.390 +		BOOK=""
   1.391 +		genpkg_locale
   1.392 +		;;
   1.393  }
   1.394 +
   1.395 +post_install_libQtGui()
   1.396 +{
   1.397 +        for i in $(ls "$1/home" 2> /dev/null); do
   1.398 +                [ -f "$1/home/$i/.config/Trolltech.conf" ] && continue
   1.399 +                cp "$1/etc/skel/.config/Trolltech.conf" "$1/home/$i/.config"
   1.400 +                chroot "$1/" chown -R $(stat -c "%u.%g" "$1/home/$i") "/home/$i/.config"
   1.401 +        done
   1.402 +}