#!/bin/sh -e

export DESTDIR="$1"

# I don't know why these build systems add these "optional" dependencies, then
# don't let you disable them when your system has it.
clsed "/libbsd\_dep/s/'libbsd'/'libnothankyou'/" meson.build

cl-meson \
    -Ddefault_font_path=/usr/share/fonts \
    -Dsha1=libcrypto \
    -Dinput_thread=true \
    -Ddri3=true \
    -Dxdmcp=false \
    -Dsecure-rpc=false \
    . output

ninja -C output
ninja -C output install