# Maintainer: lantw44 at gmail dot com pkgname=mingw-w64-gtk3 pkgver=3.8.6 pkgrel=1 pkgdesc="GTK+ is a multi-platform toolkit (v3) (mingw-w64)" arch=(any) url="http://www.gtk.org" license=("LGPL") makedepends=(mingw-w64-gcc mingw-w64-pkg-config gtk-update-icon-cache python2) # python2 is required to run gdbus-codegen depends=( 'mingw-w64-crt' 'mingw-w64-atk>=2.7.5' 'mingw-w64-pango>=1.32.4' 'mingw-w64-glib2>=2.35.3' 'mingw-w64-cairo>=1.10.0' 'mingw-w64-gdk-pixbuf2>=2.27.1') options=(!libtool !strip !buildflags) source=( "http://ftp.gnome.org/pub/gnome/sources/gtk+/${pkgver%.*}/gtk+-${pkgver}.tar.xz" "https://git.gnome.org/browse/gtk+/plain/demos/gtk-demo/brick.png?h=gtk-3-8&id=231d6c209f47edac828f52a7316980129c370eb1" "gtk-dont-define-initguid.patch") # The second source file is downloaded from GNOME. This file exists in the git repository but not in the tarball. Building of demos will fail without this file. # The third source file is downloaded from Fedora Project sha256sums=('b5638b2d2ffa1b3aa2dbdba75a3134d9dc4b6e4ed7a287855fed2811956cd4ed' '22c7fbf387ccb874bfd05e58243e1d77597ff7c1ef3e61649f84d4b921decba7' 'ccad28dbc881049f40fa23199692be7b19575018e6259f97092c5e8404607cac') _architectures="i686-w64-mingw32 x86_64-w64-mingw32" build() { cd "${srcdir}/gtk+-${pkgver}" patch -Np0 < '../gtk-dont-define-initguid.patch' for _arch in ${_architectures}; do unset LDFLAGS export CFLAGS="-O2 -mms-bitfields" export CXXFLAGS="${CFLAGS}" export PKG_CONFIG="${_arch}-pkg-config" export PKG_CONFIG_FOR_BUILD="pkg-config" mkdir -p "${srcdir}/${pkgname}-${pkgver}-build-${_arch}" cp '../brick.png?h=gtk-3-8&id=231d6c209f47edac828f52a7316980129c370eb1' \ "${srcdir}/gtk+-${pkgver}/demos/gtk-demo/brick.png" cd "${srcdir}/${pkgname}-${pkgver}-build-${_arch}" ${srcdir}/gtk+-${pkgver}/configure \ --prefix=/usr/${_arch} \ --build=$CHOST \ --host=${_arch} \ --enable-win32-backend \ --enable-gtk2-dependency \ --enable-static \ --enable-shared \ --disable-cups \ --with-included-immodules make done } package() { for _arch in ${_architectures}; do cd "${srcdir}/${pkgname}-${pkgver}-build-${_arch}" make -j1 DESTDIR="$pkgdir" install find "$pkgdir/usr/${_arch}" -name '*.exe' -o -name '*.bat' -o -name '*.def' -o -name '*.exp' -o -name '*.manifest' | xargs -rtl1 rm find "$pkgdir/usr/${_arch}" -name '*.dll' | xargs -rtl1 ${_arch}-strip -x find "$pkgdir/usr/${_arch}" -name '*.a' -o -name '*.dll' | xargs -rtl1 ${_arch}-strip -g rm -r "$pkgdir/usr/${_arch}/etc" rm -r "$pkgdir/usr/${_arch}/share/man" done }