summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 4d538f5980e9cf541f11e72866c194e921ccc7ae (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
# Maintainer: Erik Reider <erik.reider@protonmail.com>

pkgver=0.1
pkgname="scenefx-$pkgver"
pkgrel=4
license=("MIT")
pkgdesc="A drop-in replacement for the wlroots scene API that allows wayland compositors to render surfaces with eye-candy effects"
url="https://github.com/wlrfx/scenefx"
arch=("x86_64")
depends=(
	"libdrm"
	"libglvnd"
	"libpixman-1.so"
	"wayland"
	"wlroots0.17"
)
makedepends=(
	"git"
	"glslang"
	"meson"
	"ninja"
	"wayland-protocols"
)
optdepends=()
provides=("libscenefx.so")
options=("debug")
source=("scenefx-${pkgver}.tar.gz::${url}/archive/refs/tags/$pkgver.tar.gz")
sha512sums=("SKIP")

build() {
	export PKG_CONFIG_PATH='/usr/lib/wlroots0.17/pkgconfig'
	arch-meson \
        --includedir /usr/include/scenefx-0.1 \
        --libdir /usr/lib/scenefx-0.1 \
        -Dwerror=false "scenefx-${pkgver}" build
	meson compile -C build
}

package() {
	DESTDIR="$pkgdir" meson install -C build

    cd "${pkgdir}"
    # Move libs to /usr/lib, except the .so symlinks
    local f
    for f in usr/lib/scenefx-0.1/*; do
      if [[ $f == *.so ]]; then
        ln -srf -- usr/lib/"$(readlink "$f")" "$f"
      elif [[ ! -d $f ]]; then
        mv "$f" usr/lib
      fi
    done
}