PKGBUILDs/community/dev86/PKGBUILD
2009-10-09 21:15:33 -05:00

40 lines
1.3 KiB
Bash

# $Id: PKGBUILD 1281 2009-08-14 14:09:37Z dgriffiths $
# Maintainer: Alessio 'mOLOk' Bolognino <themolok@gmail.com>
# Contributor: Suat SARIALP <muhendis.suat@gmail.com>
pkgname=dev86
pkgver=0.16.17
pkgrel=5
pkgdesc="Simple C compiler to generate 8086 code"
arch=('i686' 'x86_64')
url="http://homepage.ntlworld.com/robert.debath/dev86"
license=(GPL)
makedepends=('bin86')
options=('!libtool' '!strip' '!makeflags')
source=(http://homepage.ntlworld.com/robert.debath/dev86/Dev86src-0.16.17.tar.gz dev86-pic.patch)
md5sums=('e7bbfdbe61c2fb964994a087e29b0087' '1b750c5561a4bde5f83f65e5827feb73')
build() {
cd $startdir/src/$pkgname-$pkgver
patch -Np0 -i ${startdir}/src/dev86-pic.patch
if [ "${CARCH}" = "x86_64" ]; then
# x86_64 fix
sed -i.orig \
-e 's,alt-libs elksemu,alt-libs,' \
-e 's,install-lib install-emu,install-lib,' \
$startdir/src/$pkgname-$pkgver/makefile.in
fi
# use our CFLAGS
sed -i -e "s/-O2 -g/${CFLAGS}/" makefile.in
make PREFIX=/usr DIST="$startdir/pkg" || return 1
make install-all DIST="$startdir/pkg"
mkdir -p $startdir/pkg/usr/share
mv $startdir/pkg/usr/man $startdir/pkg/usr/share
# remove all the stuff supplied by bin86
rm $startdir/pkg/usr/bin/{as,ld,nm,objdump,size}86
rm $startdir/pkg/usr/share/man/man1/{as,ld}86.1
}