summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 0b68bd0f3abf994c170e6caff96b65542541a179 (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
# Maintainer: Bruno Van de Velde <bruno@texus.me>

pkgname=tgui-git
pkgver=nightly_build.r0.gddac6f47
pkgrel=1
pkgdesc="Cross-platform modern c++ GUI library"
arch=('i686' 'x86_64')
url="https://tgui.eu/"
license=('ZLIB')
depends=('sfml' 'sdl2' 'sdl2_ttf' 'glfw-x11' 'freetype2')
makedepends=('cmake' 'doxygen' 'git')
provides=('tgui')
conflicts=('tgui')
replaces=()

source=("git+https://github.com/texus/TGUI.git#branch=1.x")
sha256sums=('SKIP')

pkgver() {
  cd "${srcdir}/TGUI"
  git describe --long --tags | sed -r 's/([^-]*-g)/r\1/;s/-/./g'
}

build() {
  cd "$srcdir/TGUI"
  cmake -DCMAKE_INSTALL_PREFIX=/usr . \
        -DCMAKE_BUILD_TYPE=RelWithDebugInfo \
        -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON \
        -DTGUI_CXX_STANDARD=17 \
        -DTGUI_BUILD_DOC=ON \
        -DTGUI_BUILD_GUI_BUILDER=ON \
        -DTGUI_BACKEND=Custom \
        -DTGUI_HAS_BACKEND_SFML_GRAPHICS=ON \
        -DTGUI_HAS_BACKEND_SFML_OPENGL3=ON \
        -DTGUI_HAS_BACKEND_SDL_RENDERER=ON \
        -DTGUI_HAS_BACKEND_SDL_OPENGL3=ON \
        -DTGUI_HAS_BACKEND_SDL_GLES2=ON \
        -DTGUI_HAS_BACKEND_SDL_TTF_OPENGL3=ON \
        -DTGUI_HAS_BACKEND_SDL_TTF_GLES2=ON \
        -DTGUI_HAS_BACKEND_GLFW_OPENGL3=ON \
        -DTGUI_HAS_BACKEND_GLFW_GLES2=ON
  make
}

package() {
  cd "$srcdir/TGUI"
  make DESTDIR="$pkgdir/" install
  install -Dm644 ./license.txt ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
}