summaryrefslogblamecommitdiffstats
path: root/mingw-w64-gtk3/PKGBUILD
blob: 1ee717e840d1575151d3c5d7767850387118a97f (plain) (tree)
1
2
3
4
5
6
7
8
9


                                      
             
        
                                                                   
          
                        
                            






                                                       
         
                 





                                 
                                       
                                                                                     
                                                                               




                                                    
                                    

                                            

                             
                                                            
        
         



           
                               
                                    
                       
                                  
                                                                                                                                       

                                                                                           

                                          
         

      
# Maintainer: lantw44 at gmail dot com

pkgname=mingw-w64-gtk3
pkgver=3.16.1
pkgrel=3
pkgdesc='GObject-based multi-platform GUI toolkit (v3) (mingw-w64)'
arch=(any)
url='http://www.gtk.org'
install="${pkgname}.install"
license=('LGPL')
makedepends=(
  'mingw-w64-gcc'
  'mingw-w64-pkg-config'
  'mingw-w64-configure'
  'gtk-update-icon-cache'
  'python2') # python2 is required to run gdbus-codegen
depends=(
  'mingw-w64-crt'
  'mingw-w64-atk>=2.15.1'
  'mingw-w64-cairo>=1.14.0'
  'mingw-w64-gdk-pixbuf2>=2.30.0'
  'mingw-w64-glib2>=2.43.4'
  'mingw-w64-libepoxy>=1.0'
  'mingw-w64-pango>=1.36.7')
options=(!strip !buildflags staticlibs)
source=("https://download.gnome.org/sources/gtk+/${pkgver%.*}/gtk+-${pkgver}.tar.xz")
sha256sums=('9f9716a8c7f8dc149f767718e25fed41984b504a00fd0919b1a4969ca2e4db31')

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

build() {
  cd "${srcdir}/gtk+-${pkgver}"
  for _arch in ${_architectures}; do
    export PKG_CONFIG="${_arch}-pkg-config"
    export PKG_CONFIG_FOR_BUILD="pkg-config"
    mkdir -p "build-${_arch}"
    cd "build-${_arch}"
    ${_arch}-configure --enable-win32-backend --disable-cups
    make
    cd ..
  done
}

package() {
  cd "${srcdir}/gtk+-${pkgver}"
  for _arch in ${_architectures}; do
    cd "build-${_arch}"
    make 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 --strip-unneeded
    find "$pkgdir/usr/${_arch}" -name '*.a' | xargs -rtl1 ${_arch}-strip -g
    rm -r "$pkgdir/usr/${_arch}/etc"
    rm -r "$pkgdir/usr/${_arch}/share/man"
    cd ..
  done
}