wok-next annotate qt5/receipt @ rev 21375

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