summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: e8c8ee7dd9b99acbe61a301096529bc5329b1cde (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
# Maintainer: drakkan <nicola.murino at gmail dot com>
pkgname=mingw-w64-libsoup
pkgver=2.74.0
pkgrel=1
pkgdesc="HTTP client/server library (mingw-w64)"
arch=(any)
url="https://download.gnome.org/sources/libsoup"
license=("LGPL")
depends=('mingw-w64-glib2' 'mingw-w64-glib-networking' 'mingw-w64-sqlite' 'mingw-w64-libxml2' 'mingw-w64-libpsl' 'mingw-w64-brotli')
makedepends=('mingw-w64-meson' 'git')
options=(!strip !buildflags staticlibs)
_commit=63b1d319c6a0d4fde69f074c2fe04ff9767e7684  # tags/2.74.0^0
source=("git+https://gitlab.gnome.org/GNOME/libsoup.git#commit=$_commit"
  "libsoup_extern.patch")
sha256sums=('SKIP'
  '10ade43ee9a2bcfb177539c59e39e01984d7f96c09110173cec3d675aa0f410e')

_architectures="i686-w64-mingw32 x86_64-w64-mingw32"

prepare() {
  cd libsoup 
  # # Fix mulitple definition errors
  patch -Np1 -i ../libsoup_extern.patch
}

build() {
  for _arch in ${_architectures}; do
    mkdir -p "${srcdir}/libsoup/build-${_arch}"
    cd "${srcdir}/libsoup/build-${_arch}"
    ${_arch}-meson \
      -D gssapi=disabled \
      -D gnome=false \
      -D vapi=disabled \
      -D gtk_doc=false \
      -D introspection=disabled \
      -D tests=false \
      -D tls_check=false \
      --default-library both .. 
    ninja
  done
}

package() {
  for _arch in ${_architectures}; do
    DESTDIR="${pkgdir}" ninja -C "${srcdir}/libsoup/build-${_arch}" install
  done
}

# vim: ts=2 sw=2 et: