### this file is sourced not run
PKGNAME=vice
PKGVER=3.7.1
PKGBUILD=1
PKGARCH=x86_64

# source: JakeSFR
TARBALL=vice-${PKGVER}.tar.gz
MD5SUM=ffcb48e9b688d14dc5f86de22c30ee32
SRC_URL=https://sourceforge.net/projects/vice-emu/files/${TARBALL}
BUNDLE=

SLACKDESC="${PKGNAME}: ${PKGNAME} ${PKGVER} (the Versatile Commodore Emulator)  
${PKGNAME}:  
${PKGNAME}: VICE is a program that runs on a Unix, MS-DOS, Win32,
${PKGNAME}: OS/2, Acorn RISC OS, BeOS, QNX 4.x, QNX 6.x, Amiga, GP2X,
${PKGNAME}: Dingoo, Syllable or Mac OS X machine and executes programs
${PKGNAME}: intended for the old 8-bit computers.
${PKGNAME}: The current version emulates the C64, the C64DTV,
${PKGNAME}: the C128, the VIC20, almost all PET models,
${PKGNAME}: the PLUS4 and the CBM-II (aka C610).
${PKGNAME}: 
${PKGNAME}: http://vice-emu.sourceforge.net/
"

SLACKREQ='gtk3 xa'

### default pkg_download
### prepare
pkg_prepare() {
	pkg_prepare_default &&
	cd tmp/${PKGNAME}* &&
	# patches
	true
}

### default pkg_package
### build
pkg_build() {

	# There are many options. These are just some of them.
	#--enable-ffmpeg \	# configure: error: ffmpeg version is not compatible. Use 4.x
	CONFFLAGS="${CONFFLAGS} \
				--enable-x64 \
				--enable-gtk3ui \
				--enable-ethernet \
				--disable-pdf-docs \
				--without-pulse    \
	" &&
	cd tmp/${PKGNAME}* &&
	#sed -i 's/test -n "$FCCACHE" || FCCACHE="false"/FCCACHE="false"/' configure &&
	pkg_build_autoconf &&
	install -m644 ../pkg/vice.desktop /usr/share/applications &&
	install -m644 ../pkg/vice.png /usr/share/pixmaps &&
	install -m755 ../pkg/vice /usr/bin &&
	pkg_build_slackdesc
}
