summaryrefslogtreecommitdiff
path: root/community/sdcc/PKGBUILD
blob: bb057dccef6b78b501e18b603c46be28ad262fbb (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
# $Id: PKGBUILD 61264 2011-12-27 15:33:34Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Maintainer: Jose Negron <josenj.arch@mailnull.net>

pkgname=sdcc
pkgver=3.1.0
pkgrel=1
pkgdesc="Retargettable ANSI C compiler (Intel 8051, Maxim 80DS390, Zilog Z80 and the Motorola 68HC08)"
arch=('i686' 'x86_64')
license=('GPL')
depends=('bash' 'gcc-libs' 'boost-libs')
makedepends=('gputils' 'flex' 'bison' 'patch' 'boost')
optdepends=('python')
url="http://sdcc.sourceforge.net/"
options=(!strip)
source=(http://downloads.sourceforge.net/sourceforge/sdcc/$pkgname-src-$pkgver.tar.bz2)
md5sums=('92202e970071a8b506fea62a913bd2d2')

build() {
  cd $srcdir/$pkgname
  LDFLAGS="-lm" ./configure --prefix=$pkgdir/usr

  # gcc -O2 bug workaround
  [ $CARCH == "i686" ] && (
	cd src &&
	make SDCCy.h &&
	gcc -g -O0  -I. -I.. -I./../support/util -c SDCCicode.c -o SDCCicode.o
  )

  make
  make install
  strip $pkgdir/usr/bin/* || true
}