# Maintainer: Alexey Pavlov <alexpux@gmail.com>

_realname=gnome-common
pkgbase=mingw-w64-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=3.18.0
pkgrel=1
pkgdesc="Common development macros for GNOME (mingw-w64)"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32')
license=('GPL')
url="https://www.gnome.org"
source=(https://download.gnome.org/sources/${_realname}/${pkgver%.*}/${_realname}-${pkgver}.tar.xz
        Werror-format-remove.patch)
sha256sums=('22569e370ae755e04527b76328befc4c73b62bfd4a572499fde116b8318af8cf'
            'c88704be75556c08a62645588ec70050f58def421f849c0519213c8709e36906')

prepare() {
  cd ${srcdir}/${_realname}-${pkgver}
  #patch -p1 -i ${srcdir}/Werror-format-remove.patch
}

build() {
  cd ${srcdir}/${_realname}-${pkgver}
  ./configure \
    --prefix=${MINGW_PREFIX} \
    --build=${MINGW_CHOST} \
    --host=${MINGW_CHOST}
  make
}

package() {
  cd "${srcdir}/${_realname}-${pkgver}"
  make DESTDIR="${pkgdir}" install
}
