summaryrefslogtreecommitdiff
path: root/community/dev86/PKGBUILD
blob: 28d31b13e97e7cc3b26f92a3f63c9c0deafa35a9 (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
34
35
36
37
38
39
40
41
42
# $Id: PKGBUILD 44944 2011-04-13 08:59:01Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Maintainer: Alessio 'mOLOk' Bolognino <themolok@gmail.com>
# Contributor: Suat SARIALP <muhendis.suat@gmail.com>

pkgname=dev86
pkgver=0.16.18
pkgrel=1
pkgdesc="Simple C compiler to generate 8086 code"
arch=('i686' 'x86_64')
#url="http://homepage.ntlworld.com/robert.debath/dev86"
url="http://www.debath.co.uk/dev86/"
license=(GPL)
makedepends=('bin86')
options=('!libtool' '!strip' '!makeflags')
source=(http://www.debath.co.uk/dev86/Dev86src-$pkgver.tar.gz
#	http://homepage.ntlworld.com/robert.debath/dev86/Dev86src-$pkgver.tar.gz
	dev86-pic.patch)
md5sums=('f2e06b547397383b2b2650b9c4fd9bab'
         '1b750c5561a4bde5f83f65e5827feb73')

build() {
  cd $srcdir/$pkgname-$pkgver
  patch -Np0 -i $srcdir/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,' \
		$srcdir/$pkgname-$pkgver/makefile.in
  fi

  # use our CFLAGS
  sed -i -e "s/-O2 -g/${CFLAGS}/" makefile.in

  make PREFIX=/usr DIST="$pkgdir" || return 1
  make install-all DIST="$pkgdir"
  mkdir -p $pkgdir/usr/share
  mv $pkgdir/usr/man $pkgdir/usr/share
  # remove all the stuff supplied by bin86
  rm $pkgdir/usr/bin/{as,ld,nm,objdump,size}86
  rm $pkgdir/usr/share/man/man1/{as,ld}86.1
}