summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b6a12514e94eb8fa6db4d7b24638be33dd880b39 (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
73
74
75
76
77
# Maintainer: Riley Trautman <asonix.dev@gmail.com>
# Contributor: Jerome Leclanche <jerome@leclan.ch>
# Contributor: Andrea Scarpino <andrea@archlinux.org>
# Contributor: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>

_pkgname=qt5-base
pkgname=$_pkgname-git
pkgver=v5.5.0.beta1.356.gbac1116
pkgrel=1
pkgdesc="A cross-platform application and UI framework"
arch=("i686" "x86_64")
url="https://qt-project.org/"
license=("GPL3" "LGPL")
depends=(
	"dbus" "xcb-util-keysyms" "xcb-util-wm" "xcb-util-image"
	"libxext" "inputproto" "libgl" "libxkbcommon" "systemd"
	"libpng" "sqlite" "fontconfig" "icu" "libxrender" "libinput"
)
makedepends=("git" "postgresql-libs")
optdepends=(
	"qtchooser: set the default Qt toolkit"
	"postgresql-libs: PostgreSQL driver"
	"libmariadbclient: MariaDB driver"
	"unixodbc: ODBC driver"
	"libfbclient: Firebird/iBase driver"
)
provides=("$_pkgname")
conflicts=("$_pkgname")
source=("$_pkgname::git://code.qt.io/qt/qtbase.git#branch=5.5")

sha256sums=("SKIP")

pkgver() {
	cd "$srcdir/$_pkgname"
	git describe --always | sed "s/-/./g"
}

prepare() {
	cd "$srcdir/$_pkgname"
	sed -i "s|-O2|${CXXFLAGS}|" mkspecs/common/{g++,gcc}-base.conf
	sed -i "/^QMAKE_LFLAGS_RPATH/s| -Wl,-rpath,||g" "mkspecs/common/gcc-base-unix.conf"
	sed -i "/^QMAKE_LFLAGS\s/s|+=|+= ${LDFLAGS}|g" "mkspecs/common/gcc-base.conf"
}

build() {
	cd "$srcdir/$_pkgname"

	./configure -confirm-license -opensource \
		-prefix /usr \
		-bindir /usr/lib/qt/bin \
		-docdir /usr/share/doc/qt \
		-headerdir /usr/include/qt \
		-archdatadir /usr/lib/qt \
		-datadir /usr/share/qt \
		-sysconfdir /etc/xdg \
		-examplesdir /usr/share/doc/qt/examples \
		-system-sqlite \
		-openssl-linked \
		-nomake examples \
		-nomake tests \
		-no-rpath \
		-optimized-qmake \
		-dbus-linked \
		-reduce-relocations \
		-opengl es2 \
		-libinput
	make
}

package() {
	cd "$srcdir/$_pkgname"
	make INSTALL_ROOT="$pkgdir" install
      for file in "${pkgdir}"/usr/lib/qt/bin/*; do
              mkdir -p "${pkgdir}"/usr/bin
              ln -s /usr/lib/qt/bin/$(basename $file) "${pkgdir}"/usr/bin/$(basename $file)
      done
}