summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: a74d8d10d19d1e6f4a059511ddfb3b74597b6c56 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# Maintainer: Markus Hovorka <m.hovorka@live.de>
# Contributor: Felix Yan <felixonmars@archlinux.org>
# Contributor: Andrea Scarpino <andrea@archlinux.org>

pkgname=qt5.6
pkgver=5.6.2
pkgrel=4
arch=('i686' 'x86_64')
url='http://qt-project.org/'
license=('GPL3' 'LGPL' 'FDL' 'custom')
pkgdesc='A cross-platform application and UI framework'
depends=('libjpeg-turbo' 'xcb-util-keysyms' 'xcb-util-wm' 'xcb-util-image'
         'icu' 'tslib' 'libinput' 'libxkbcommon-x11' 'jasper' 'libmng'
	 'libwebp' 'libpulse' 'openal' 'libxcomposite' 'pciutils'  'libxss'
	 'libvpx' 'opus' 'libevent' 'jsoncpp' 'snappy' 'nss' 'libxslt'
	 'gst-plugins-base-libs' 'libxrandr' 'libsrtp' 'protobuf' 'libxdamage'
	 'minizip' 'ffmpeg' 'openssl-1.0')
makedepends=('mtdev' 'libfbclient' 'libmariadbclient' 'unixodbc' 'alsa-lib' 
             'postgresql-libs' 'gtk2' 'cups' 'freetds' 'bluez-libs' 'python2'
	     'libxcursor' 'git' 'gperf' 'python')
optdepends=('qt5-svg: to use SVG icon themes'
            'postgresql-libs: PostgreSQL driver'
            'libmariadbclient: MariaDB driver'
            'unixodbc: ODBC driver'
            'libfbclient: Firebird/iBase driver'
            'freetds: MS SQL driver'
            'mtdev: evdev plugin'
            'gtk2: GTK2 plugin'
	    'bluez-libs: for sdpscanner')
_tarname="qt-everywhere-opensource-src-${pkgver}"
source=("http://download.qt.io/official_releases/qt/${pkgver%.*}/${pkgver}/single/${_tarname}.tar.xz")
md5sums=('5175fba2f221fd4c91e94771a57a5557')

prepare() {
    cd ${_tarname}

    find . -name '*.py' -exec sed -i \
        's|#![ ]*/usr/bin/python$|&2|;s|#![ ]*/usr/bin/env python$|&2|' {} +

    # Hack to force using python2
    mkdir -p "$srcdir/bin"
    ln -s /usr/bin/python2 "$srcdir/bin/python"
    export PATH="$srcdir/bin:$PATH"
}

build() {
    cd ${_tarname}
    local qt5_src="/opt/qt5.6"

    echo "INCLUDEPATH += /usr/include/openssl-1.0" >> qtbase/src/network/network.pro
    export OPENSSL_LIBS='-L/usr/lib/openssl-1.0 -lssl -lcrypto'

    PYTHON=/usr/bin/python2 ./configure -confirm-license -opensource \
        -prefix /opt/qt5.6 \
        -nomake examples \
        -no-use-gold-linker \
        -plugin-sql-{psql,mysql,sqlite,odbc,ibase} \
        -optimized-qmake \
        -openssl-linked \
        -system-sqlite \
        -system-pcre \
        -system-harfbuzz
  make
}

package() {
    cd ${_tarname}
    make INSTALL_ROOT="${pkgdir}" install

    install -D -m644 LGPL_EXCEPTION.txt \
        "${pkgdir}"/usr/share/licenses/${pkgname}/LGPL_EXCEPTION.txt
}