wok-next annotate qt5/receipt @ rev 21017

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