1 # Maintainer: Kyle Keen <keenerd@gmail.com>
2 # Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>
3 # Contributor: Jose Negron <josenj.arch@mailnull.net>
8 pkgdesc="Retargettable ANSI C compiler (Intel 8051, Maxim 80DS390, Zilog Z80 and the Motorola 68HC08)"
11 depends=('bash' 'gcc-libs' 'boost-libs')
12 makedepends=('gputils' 'flex' 'bison' 'patch' 'boost')
14 url="http://sdcc.sourceforge.net/"
15 options=(!strip staticlibs)
16 source=(https://downloads.sourceforge.net/sourceforge/sdcc/$pkgname-src-${pkgver//_/-}.tar.bz2)
17 md5sums=('cc5042a207b15c387185867ca1b32145')
18 sha256sums=('b49bae1d23bcd6057a82c4ffe5613f9cd0cbcfd1e940e9d84c4bfe9df0a8c053')
20 # namcap claims boost-libs isn't needed, investigate this
23 cd "$srcdir/$pkgname-$pkgver"
24 sed -i 's|CC -E|CC -O2 -E|g' support/sdbinutils/libiberty/configure
28 cd "$srcdir/$pkgname-$pkgver"
31 --includedir=/usr/include/sdcc \
32 --libdir=/usr/lib/sdcc \
38 cd "$srcdir/$pkgname-$pkgver"
40 make install DESTDIR="$pkgdir"
42 if [ -d "$pkgdir/usr/lib/lib" ]; then
43 mv "$pkgdir/usr/lib/lib/"* "$pkgdir/usr/lib/sdcc/"
44 rm -rf "$pkgdir/usr/lib/lib"
47 sed -i 's|#!/usr/bin/env python|#!/usr/bin/env python3|' "$pkgdir/usr/bin/as2gbmap"