diff options
author | Eric Engestrom | 2018-02-15 19:58:46 +0000 |
---|---|---|
committer | Eric Engestrom | 2018-02-15 20:14:02 +0000 |
commit | 5ab91e1cbe71ec63854fde8c70fc41ce117e579b (patch) | |
tree | 461c528688673c1ce80af7c846fe234be50868b7 | |
download | aur-5ab91e1cbe71ec63854fde8c70fc41ce117e579b.tar.gz |
initial commit - r957.757399aa75
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
-rw-r--r-- | .SRCINFO | 23 | ||||
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | PKGBUILD | 71 |
3 files changed, 96 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..a51a68531b49 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,23 @@ +pkgbase = gputop-git + pkgdesc = GPU profiling tool + pkgver = r957.757399aa75 + pkgrel = 1 + url = https://github.com/rib/gputop + arch = i686 + arch = x86_64 + license = MIT + makedepends = meson + makedepends = ninja + depends = openssl + optdepends = mesa: for the UI + optdepends = libepoxy: for the UI + optdepends = glfw-x11: for the UI (Xorg native) + optdepends = glfw-wayland: for the UI (Wayland native) + optdepends = gtk3: for the UI (GTK) + optdepends = cogl: for the UI (GTK) + optdepends = libsoup: for the UI (GTK) + source = https://github.com/rib/gputop + md5sums = SKIP + +pkgname = gputop-git + diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..915bf6171362 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/gputop/ +/*.pkg.* diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..3e33c5f600b9 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,71 @@ +# Maintainer: Eric Engestrom <aur [at] engestrom [dot] ch> + +pkgname=gputop-git +pkgver=r957.757399aa75 +pkgrel=1 +pkgdesc="GPU profiling tool" +arch=('i686' 'x86_64') +url="https://github.com/rib/gputop" +license=('MIT') +depends=('openssl') +makedepends=('meson' 'ninja') +source=("git+$url") +md5sums=('SKIP') +optdepends=( + 'mesa: for the UI' + 'libepoxy: for the UI' + 'glfw-x11: for the UI (Xorg native)' + 'glfw-wayland: for the UI (Wayland native)' + 'gtk3: for the UI (GTK)' + 'cogl: for the UI (GTK)' + 'libsoup: for the UI (GTK)' + ) + +pkgver() { + cd "${srcdir}"/gputop + printf 'r%d.%s' \ + $(git rev-list --count HEAD) \ + $(git rev-parse HEAD | head -c10) +} + +__has_package() { + pacman &>/dev/null -Qi "$@" +} + +prepare() { + if [ -d build ] && [ -f build/meson-private/build.dat ] + then + cd build + else + rm -rf build + mkdir build + cd build + arch-meson "$srcdir"/gputop + fi + + option=() + if __has_package mesa libepoxy \ + && (__has_package glfw-x11 || __has_package glfw-wayland) + then + options+=('-Dnative_ui=true') + else + options+=('-Dnative_ui=false') + fi + + meson configure "${options[@]}" +} + +build() { + cd build + ninja || ninja || ninja # there's a race condition in the build dependencies; running multiple times works around it +} + +check() { + cd build + ninja test || true # subproject libuv is known to fail checks +} + +package() { + cd build + DESTDIR="${pkgdir}" ninja install +} |