wok-next annotate qt5/receipt @ rev 21105

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