blob: 02e50ad9babcc1f0828d65633f6aec81889c4d0a [file] [log] [blame] [edit]
# Maintainer: Alexey Pavlov <alexpux@gmail.com>
_realname=glibmm
pkgbase=mingw-w64-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=2.66.1
pkgrel=2
pkgdesc="Glib-- (glibmm) is a C++ interface for glib (V2.66) (mingw-w64)"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32')
url="https://www.gtkmm.org/"
license=("LGPL")
depends=("${MINGW_PACKAGE_PREFIX}-glib2"
"${MINGW_PACKAGE_PREFIX}-libsigc++")
makedepends=("${MINGW_PACKAGE_PREFIX}-meson"
"${MINGW_PACKAGE_PREFIX}-pkg-config")
options=('strip' '!debug' 'staticlibs')
source=("https://download.gnome.org/sources/${_realname}/${pkgver%.*}/${_realname}-${pkgver}.tar.xz"
"glibmm-2.66.1-no-export-deleted-methods.patch")
sha256sums=('69bd6b5327716ca2f511ab580a969fd7bf0cd2c24ce15e1d0e530592d3ff209c'
'a4ff330529d457b5be05eeab31d0cba5bc073b35b8c05ac5ab1dffb3a79d3751')
prepare() {
cd "${srcdir}/${_realname}-${pkgver}"
# work around error building under clang
# https://gitlab.gnome.org/GNOME/glibmm/-/issues/92
patch -Np1 -i "${srcdir}/glibmm-2.66.1-no-export-deleted-methods.patch"
# glibmm_binding test can not be built due to linking error
sed '/glibmm_binding/d' -i tests/meson.build
}
build() {
[[ -d "${srcdir}/build-${MINGW_CHOST}" ]] && rm -rf "${srcdir}/build-${MINGW_CHOST}"
mkdir -p "${srcdir}/build-${MINGW_CHOST}" && cd "${srcdir}/build-${MINGW_CHOST}"
declare -a extra_config
if check_option "debug" "n"; then
extra_config+=("--buildtype=release")
else
extra_config+=("--buildtype=debug")
fi
CFLAGS+=" -Wno-attributes" \
CXXFLAGS+=" -Wno-attributes" \
MSYS2_ARG_CONV_EXCL="--prefix=" \
${MINGW_PREFIX}/bin/meson.exe \
--prefix="${MINGW_PREFIX}" \
"${extra_config[@]}" \
--wrap-mode=nodownload \
--default-library=both \
--auto-features=enabled \
-Dmaintainer-mode=false \
-Dbuild-documentation=false \
-Dbuild-examples=true \
"../${_realname}-${pkgver}"
${MINGW_PREFIX}/bin/meson.exe compile
}
check() {
cd "${srcdir}/build-${MINGW_CHOST}"
${MINGW_PREFIX}/bin/meson.exe test || true
}
package() {
cd "${srcdir}/build-${MINGW_CHOST}"
DESTDIR="${pkgdir}" ${MINGW_PREFIX}/bin/meson.exe install
install -Dm644 "${srcdir}/${_realname}-${pkgver}/COPYING" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING"
install -Dm644 "${srcdir}/${_realname}-${pkgver}/COPYING.tools" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING.tools"
}