summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: e12a644c47b6053ee0102952257804e01f1accab (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
# Maintainer: KNOSSOS-Team <knossos-team ät mpimf-heidelberg.mpg.de>

pkgname="qt5-python27-git"
_qtver=5.7.0
pkgver=3.1+96.gbe06218
pkgrel=3
arch=("x86_64")
pkgdesc="PythonQt fork featuring Qt 5.x and Python 3.x support and improved CMake build system (Qt5 and Python2.7 version)"
license=("LGPL")
url="https://github.com/knossos-project/PythonQt"
makedepends=("cmake"
  "mesa" # GL/gl.h
  "ninja"
  "qt5-tools" # Qt5UiTools
)
depends=("python2"
  "qt5-declarative" # =$_qtver
  "qt5-multimedia"
  "qt5-svg"
)
provides=("qt5-python27"
  "pythonqt"
)
conflicts=("pythonqt")
replaces=("qt5-python26") # conflicting older versions is the idea
source=("git+https://github.com/knossos-project/PythonQt.git"
  "qmetaobjectbuilder_p.h::http://code.qt.io/cgit/qt/qtbase.git/plain/src/corelib/kernel/qmetaobjectbuilder_p.h?h=v$_qtver")
md5sums=('SKIP'
         'cee8d4c63cf37186a6076465a1b40e70')

pkgver() {
  cd "PythonQt"
  git describe --always --dirty --tags | sed 's/^v//;s/-/+/;s/-/./g'
}

prepare() {
  mkdir -p PythonQt/src/private
  cp qmetaobjectbuilder_p.h PythonQt/src/private/qmetaobjectbuilder_p.h
}

build() {
  mkdir -p "$srcdir/build-$CHOST-$pkgname"
  cd "$srcdir/build-$CHOST-$pkgname"
  cmake -G Ninja -DCMAKE_BUILD_TYPE=RELEASE -DBUILD_SHARED_LIBS=TRUE -DCMAKE_INSTALL_PREFIX="$pkgdir/usr" -DPythonQt_Qt5=TRUE -DPythonQt_Python3=FALSE ../PythonQt
  ninja
}

check() {
  cd "$srcdir/build-$CHOST-$pkgname"
  ninja tests
}

package() {
  cd "$srcdir/build-$CHOST-$pkgname"
  ninja install
}