NAME="libsoup"
DESC="HTTP client/server library for GNOME"
VERSION="3.4.2"
FILES=("https://download.gnome.org/sources/libsoup/3.4/libsoup-$VERSION.tar.xz")
HASHES=("cd8b0fc5d53331b9c0b5b22aabac4294")
DEPENDS=(
  "libpsl" "libxml2" "sqlite"
  "nghttp2" "glib-networking" "gobject-introspection"
)

PACKAGE() {
  tar xf $NAME-$VERSION.tar.xz
  cd $NAME-$VERSION

  sed 's/apiversion/soup_version/' -i docs/reference/meson.build

  mkdir build
  cd    build

  meson setup --prefix=/usr          \
            --buildtype=release    \
            -Dvapi=enabled         \
            -Dgssapi=disabled      \
            -Dsysprof=disabled     \
            --wrap-mode=nofallback \
            .. 
  ninja && DESTDIR="$ROOTDIR" ninja install

  cd ../.. && rm -r $NAME-$VERSION
}
