summaryrefslogtreecommitdiff
path: root/community/sdcc/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'community/sdcc/PKGBUILD')
-rw-r--r--community/sdcc/PKGBUILD44
1 files changed, 44 insertions, 0 deletions
diff --git a/community/sdcc/PKGBUILD b/community/sdcc/PKGBUILD
new file mode 100644
index 000000000..5efa9daa1
--- /dev/null
+++ b/community/sdcc/PKGBUILD
@@ -0,0 +1,44 @@
+# $Id: PKGBUILD 94049 2013-07-13 12:37:05Z svenstaro $
+# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
+# Maintainer: Jose Negron <josenj.arch@mailnull.net>
+
+pkgname=sdcc
+pkgver=3.3.0
+pkgrel=2
+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=('c7c6aa75415580795ecc4fd31948e5ba')
+
+prepare() {
+ cd $srcdir/$pkgname-$pkgver
+ sed -i 's|CC -E|CC -O2 -E|g' support/sdbinutils/libiberty/configure
+}
+
+build() {
+ cd $srcdir/$pkgname-$pkgver
+ ./configure \
+ --prefix=/usr \
+ --includedir=/usr/include/sdcc \
+ --libdir=/usr/lib/sdcc
+ make
+}
+
+package() {
+ cd $srcdir/$pkgname-$pkgver
+
+ make install DESTDIR=$pkgdir
+
+ if [ -d $pkgdir/usr/lib/lib ]; then
+ mv $pkgdir/usr/lib/lib/* $pkgdir/usr/lib/sdcc/
+ rm -rf $pkgdir/usr/lib/lib
+ fi
+
+ sed -i 's|#!/usr/bin/env python|#!/usr/bin/env python3|' $pkgdir/usr/bin/as2gbmap
+}