summaryrefslogtreecommitdiff
path: root/community/mingw32-runtime/PKGBUILD
blob: 43ae147b4a2ba5d215c650314ac3f4328b238695 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# $Id: PKGBUILD 39755 2011-02-15 23:16:01Z svenstaro $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Maintainer: Ondrej Jirman <megous@megous.com>

pkgname=mingw32-runtime
pkgver=3.18
pkgrel=3
arch=(i686 x86_64)
pkgdesc="mingw32 run-time library"
makedepends=(mingw32-w32api mingw32-gcc)
options=(!strip)
license=(LGPL)
url="http://www.mingw.org/"
source=(http://downloads.sourceforge.net/mingw/mingwrt-$pkgver-mingw32-src.tar.gz)
md5sums=('34b54cb3379f871f0dcd5c20b69b0350')

build()
{
  cd $srcdir/mingwrt-$pkgver-mingw32

  sed -i "s%\r%%g" `find . -type f`
  sed -i -e "s%^W32API_INCLUDE=.*%W32API_INCLUDE=-I/usr/i486-mingw32/include%" `find -type f -name 'configure'`

  export CFLAGS="-mms-bitfields"

  ./configure \
    --prefix=/usr/i486-mingw32 \
    --target=i486-mingw32 \
    --host=i486-mingw32 \
    --build=$CHOST

  make
  mkdir -p $pkgdir/usr/i486-mingw32/bin
  make install prefix=$pkgdir/usr/i486-mingw32

  cd $pkgdir
  rm -rf usr/i486-mingw32/{doc,man}
  find . -name '*.a' | xargs -rtl1 i486-mingw32-strip -g
}