# Description: HTTP library implementation in C
# URL: https://wiki.gnome.org/action/show/Projects/libsoup
# Maintainer: Tim Biermann, tbier at posteo dot de
# Depends on: glib-networking libpsl libxml2
# Optional: vala krb5

name=libsoup
version=2.74.3
release=2
source=(https://ftp.gnome.org/pub/gnome/sources/$name/${version%.*}/$name-$version.tar.xz
  385.patch)

build() {
  patch -Np1 -d $name-$version -i $SRC/385.patch

  meson setup $name-$version build \
    --prefix=/usr \
    --buildtype=plain \
    --wrap-mode nodownload \
    -D b_lto=true \
    -D b_pie=true
    #--auto-features disabled \

  sed -i 's|-R/usr/lib||g' build/build.ninja

  meson compile -C build -j ${JOBS:-1}
  DESTDIR=$PKG meson install -C build

  rm -r $PKG/usr/share/locale
}
