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

pkgname="qt5-python27-git"
_qtver=5.8.0
pkgver=3.1+116.g1d22033
pkgrel=1
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"
  "git"
  "mesa" # GL/gl.h
  "ninja"
  "qt5-tools" # Qt5UiTools
)
depends=("python2"
  "qt5-declarative" # =$_qtver
  "qt5-multimedia"
  "qt5-svg"
)
provides=("qt5-python27")
replaces=("qt5-python26") # conflicting older versions is the idea
source=("git+https://github.com/knossos-project/PythonQt.git")
md5sums=('SKIP')

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

prepare() {
  mkdir -p PythonQt/src/private
}

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="/usr" -DPythonQt_Qt5=TRUE -DPythonQt_Python3=FALSE ../PythonQt
  ninja
}

check() {
  if ! xset q &> /dev/null; then
    echo "no running X Server, skipping tests"
  else
    cd "$srcdir/build-$CHOST-$pkgname"
    ninja tests
  fi
}

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