blob: 1b7bb0f4d4be4732435e7526ffc63f06acf466fe (
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
# Maintainer: Kyle Keen <keenerd@gmail.com>
# Contributor: Tom Newsom <Jeepster@gmx.co.uk>
# Contributor: Kevin Piche <kevin@archlinux.org>
pkgname=bochs
pkgver=2.8
pkgrel=2
pkgdesc="A portable x86 PC emulation software package, including GUI debugger"
arch=('x86_64' 'pentium4' 'i686' 'i486')
url="http://bochs.sourceforge.net/"
license=('LGPL')
depends=('gcc-libs' 'libxrandr' 'libxpm' 'gtk2')
source=("https://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.gz")
sha256sums=('a85b13aff7d8411f7a9f356ba6c33b5f5dc1fbb107eb5018cc23a62639da0059')
prepare() {
cd "$srcdir/$pkgname-$pkgver"
# 4.X kernel is basically 3.20
sed -i 's/2\.6\*|3\.\*)/2.6*|3.*|4.*)/' configure*
}
build() {
cd "$srcdir/$pkgname-$pkgver"
./configure \
--prefix=/usr \
--without-wx \
--with-x11 \
--with-x \
--with-term \
--disable-docbook \
--enable-cpu-level=6 \
--enable-fpu \
--enable-3dnow \
--enable-smp \
--enable-x86-64 \
--enable-avx \
--enable-evex \
--enable-long-phy-address \
--enable-pcidev \
--enable-usb \
--enable-debugger
#--with-sdl
#--enable-x86-debugger
#--enable-all-optimizations
#--enable-plugins
sed -i 's/^LIBS = /LIBS = -lpthread/g' Makefile
make -j 1
}
package() {
cd "$srcdir/$pkgname-$pkgver"
make DESTDIR="$pkgdir" install
install -Dm644 .bochsrc "$pkgdir/etc/bochsrc-sample.txt"
}
# disable host PCI device mapping, not supported for newer kernels in Bochs itself
if [ "${CARCH}" = "i486" -o "${CARCH}" = "i686" -o "${CARCH}" = "pentium4" ]; then
eval "$(
declare -f build | \
sed '
s@--enable-pcidev@--disable-pcidev@g
'
)"
fi
|