upgpkg: wordpress 6.2.1-1
[ArchLinux/community.git] / sdcc / trunk / PKGBUILD
blobac81a3ef55ece89a75c824d3d9a555c436bc84e4
1 # Maintainer: Kyle Keen <keenerd@gmail.com>
2 # Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>
3 # Contributor: Jose Negron <josenj.arch@mailnull.net>
5 pkgname=sdcc
6 pkgver=4.2.0
7 pkgrel=3
8 pkgdesc="Retargettable ANSI C compiler (Intel 8051, Maxim 80DS390, Zilog Z80 and the Motorola 68HC08)"
9 arch=('x86_64')
10 license=('GPL')
11 depends=('bash' 'gcc-libs' 'boost-libs')
12 makedepends=('gputils' 'flex' 'bison' 'patch' 'boost')
13 optdepends=('python')
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
22 prepare() {
23   cd "$srcdir/$pkgname-$pkgver"
24   sed -i 's|CC -E|CC -O2 -E|g' support/sdbinutils/libiberty/configure
27 build() {
28   cd "$srcdir/$pkgname-$pkgver"
29   ./configure \
30         --prefix=/usr \
31         --includedir=/usr/include/sdcc \
32         --libdir=/usr/lib/sdcc \
33         --disable-werror
34   make
37 package() {
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"
45   fi
47   sed -i 's|#!/usr/bin/env python|#!/usr/bin/env python3|' "$pkgdir/usr/bin/as2gbmap"