summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 60d7bd1bf6795378aad7474b3f7b1859be2b9d4a (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
# Maintainer: Phi11ipus <phi11ipus AT bensherman DOT io>
# Modified from PKGBUILD in official repositories

pkgname=bochs-sdl
pkgver=2.6.11
pkgrel=4
pkgdesc="A portable x86 PC emulation software package, including GUI debugger, with sdl support"
arch=('x86_64')
url="http://bochs.sourceforge.net/"
license=('LGPL')
depends=('gcc-libs' 'libxrandr' 'libxpm' 'gtk2')
conflicts=('bochs')
provides=('bochs')
source=("https://downloads.sourceforge.net/sourceforge/bochs/bochs-$pkgver.tar.gz"
        "fix-build.patch")
md5sums=('61dbf6d5c0384712e1f3e51e88381b4c'
	       '0ae4954b32d49ac3c7a2431ea7935d1c')

prepare() {
    cd "$srcdir/bochs-$pkgver"
    # 4.X kernel is basically 3.20
    sed -i 's/2\.6\*|3\.\*)/2.6*|3.*|4.*)/' configure*

		patch -p1 < ../fix-build.patch # https://sourceforge.net/p/bochs/bugs/1411/
}

build() {
    cd "$srcdir/bochs-$pkgver"

    ./configure \
        --prefix=/usr \
        --without-wx \
        --with-x11 \
        --with-x \
        --with-term \
        --disable-docbook \
        --enable-cpu-level=6 \
        --enable-fpu \
        --enable-3dnow \
        --enable-disasm \
        --enable-smp \
        --enable-x86-64 \
        --enable-avx \
        --enable-evex \
        --enable-long-phy-address \
        --enable-disasm \
        --enable-pcidev \
        --enable-usb \
        --enable-debugger \
        --with-sdl
    sed -i 's/^LIBS = /LIBS = -lpthread/g' Makefile
    make -j 1
}

package() {
    cd "$srcdir/bochs-$pkgver"
    make DESTDIR="$pkgdir" install
    install -Dm644 .bochsrc "$pkgdir/etc/bochsrc-sample.txt"
}