### this file is sourced not run
PKGVER=2.6.9
PKGBUILD=1
PKGARCH=x86_64

# source: james
TARBALL=bochs-$PKGVER.tar.gz
MD5SUM=f6670c56ac49af36174e254e82528d5f
SRC_URL=http://downloads.sourceforge.net/bochs/$TARBALL
BUNDLE=

SLACKREQ=
SLACKDESC="bochs: bochs $PKGVER (x86 Emulator)  
bochs:  
bochs: Bochs is a portable x86 PC emulation software package that emulates 
bochs: enough of the x86 CPU, related AT hardware, and BIOS to run Windows, 
bochs: Linux, *BSD, Minix, and other OS'\''s, all on your workstation.  
bochs: 
bochs: 
bochs: 
bochs: 
bochs: 
bochs:
"

### default pkg_download
### prepare
pkg_prepare() {
	pkg_prepare_default &&
	cd tmp/bochs* &&
	patch -Np0 -i ../pkg/slirpinc.patch
}

### default pkg_package
### build
pkg_build() {
	cd /tmp/bochs*
	CONFFLAGS="$CONFFLAGS --enable-idle-hack --with-x11 --with-rfb --with-sdl \
		--enable-cpu-level=6 \
		--enable-smp --enable-x86_64 --enable-svm --enable-vmx=2 \
		--enable-avx --enable-3dnow --enable-evex \
		--enable-pci --enable-usb --enable-usb-ohci --enable-usb-ehci --enable-usb-xhci \
		--enable-sb16 --enable-es1370 --enable-ne2000 --enable-e1000 --enable-pnic --enable-cdrom \
		--enable-clgd54xx  \
		--enable-all-optimizations \
		--enable-debugger --enable-debugger-gui --enable-disasm \
		--enable-readline \
		--enable-repeat-speedups --enable-handlers-chaining --enable-trace-linking \
		"
		# --enable-gdb-stub is mutually exclusive with --enable-debugger
		# --enable-pcidev doesn't compile
	pkg_build_autoconf &&
	pkg_build_slackdesc
}
