Advertisement
Guest User

Untitled

a guest
Sep 2nd, 2018
227
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.84 KB | None | 0 0
  1. Maintainer: drakkan <nicola.murino at gmail dot com>
  2. # Contributor: Filip Brcic <brcha@gna.org>
  3. # Contributor: ant32 <antreimer@gmail.com>
  4. # Contributor: Renato Silva <br.renatosilva@gmail.com>
  5. pkgname=mingw-w64-glib2
  6. pkgver=2.58.0
  7. pkgrel=1
  8. _commit=f0b57dd7a80425264e318f85c331a039a3cddd87 # tags/2.58.0
  9. arch=(any)
  10. pkgdesc="Low level core library (mingw-w64)"
  11. depends=(mingw-w64-libffi mingw-w64-pcre mingw-w64-gettext mingw-w64-zlib)
  12. makedepends=(mingw-w64-configure git)
  13. license=("LGPL2.1")
  14. options=(!strip !buildflags staticlibs !emptydirs)
  15. url="https://wiki.gnome.org/Projects/GLib"
  16. source=("git+https://gitlab.gnome.org/GNOME/glib.git#commit=$_commit"
  17. "0001-gsocket-fix-cross-compilation.patch"
  18. "0001-Use-CreateFile-on-Win32-to-make-sure-g_unlink-always.patch"
  19. "glib-formaterror.patch"
  20. "glib-include-time-h-for-localtime_r.patch"
  21. "glib-prefer-constructors-over-DllMain.patch")
  22. sha256sums=('SKIP'
  23. '44c8c6b4ca376177a8c333a00c3485d638f8641967503e15364606d4c4292ff3'
  24. 'afd62a852a0b6aed4ce86eb97297e5080b26055cc878413b89d482c184b826b3'
  25. 'ea529d5cbf8cf7ca66467664a3ead37473a1c009ac973d5694b06cc9d0b23df3'
  26. 'ac567f7a9cad51ab97dba70bcdd6c0c16f93d2451c43fde380e4fdb20b2d4b31'
  27. '8a02502069fa88c667a4fd1599280f927cb1bcf61e9fcd369fec5bdb5440d480')
  28.  
  29. _architectures="i686-w64-mingw32 x86_64-w64-mingw32"
  30.  
  31. pkgver() {
  32. cd glib
  33. git describe --tags | sed 's/-/+/g'
  34. }
  35.  
  36. prepare() {
  37. cd glib
  38. patch -Np1 -i ../0001-Use-CreateFile-on-Win32-to-make-sure-g_unlink-always.patch
  39. patch -Np1 -i ../glib-prefer-constructors-over-DllMain.patch
  40. patch -Np1 -i ../glib-formaterror.patch
  41. patch -Np1 -i ../glib-include-time-h-for-localtime_r.patch
  42. patch -Np1 -i ../0001-gsocket-fix-cross-compilation.patch
  43. NOCONFIGURE=1 ./autogen.sh
  44. }
  45.  
  46.  
  47. build() {
  48. cd glib
  49. conf="--with-pcre=system --with-threads=win32 --disable-fam"
  50. for _arch in ${_architectures}; do
  51. mkdir -p build-${_arch}-static && pushd build-${_arch}-static
  52. ${_arch}-configure \
  53. --disable-shared $conf
  54. make
  55. popd
  56.  
  57. mkdir -p build-${_arch}-shared && pushd build-${_arch}-shared
  58. ${_arch}-configure \
  59. --disable-static $conf
  60. make
  61. popd
  62. done
  63. }
  64.  
  65. package() {
  66. for _arch in ${_architectures}; do
  67. cd "$srcdir/glib/build-${_arch}-shared"
  68. make DESTDIR="$pkgdir" install
  69. make -C "$srcdir/glib/build-${_arch}-static" DESTDIR="$pkgdir/static" install
  70. mv "$pkgdir/static/usr/${_arch}/lib/"*.a "$pkgdir/usr/${_arch}/lib/"
  71. find "$pkgdir/usr/${_arch}" -name '*.exe' -exec ${_arch}-strip {} \;
  72. find "$pkgdir/usr/${_arch}" -name '*.dll' -exec ${_arch}-strip --strip-unneeded {} \;
  73. find "$pkgdir/usr/${_arch}" -name '*.a' -o -name '*.dll' | xargs ${_arch}-strip -g
  74. rm -r "$pkgdir/usr/${_arch}/lib/charset.alias"
  75. rm -r "$pkgdir/static"
  76. done
  77. }
  78.  
  79. # vim: ts=2 sw=2 et:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement