# Template file for 'wine-unstable'
pkgname=wine-unstable
version=1.5.21
revision=1
wrksrc=wine-${version}
build_style=gnu-configure
short_desc="Run Windows apps on Linux (unstable)"
maintainer="davehome <davehome@redthumb.info.tm>"
license="LGPL-2.1"
homepage="http://www.winehq.org/"
distfiles="${SOURCEFORGE_SITE}/wine/wine-${version}.tar.bz2"
checksum=ac77c1dd1a31ccc67f0391b4965959096aeb98745f52c4d91b7bd280e3c8b350

only_for_archs=i686
disable_debug=yes
# XXX OpenCL
# XXX libcapi20 (ISDN support)
makedepends="flex gettext-devel autoconf lcms-devel zlib-devel ncurses-devel
 glu-devel libSM-devel libXext-devel libX11-devel libXpm-devel
 libXinerama-devel libXcomposite-devel libXmu-devel libXxf86vm-devel
 libXcursor-devel libXrandr-devel libXdamage-devel libXi-devel libldap-devel
 alsa-lib-devel libgphoto2-devel libxml2-devel libxslt-devel glib-devel
 gst-plugins-base-devel freetype-devel mpg123-devel libgsm-devel libopenal-devel
 giflib-devel libpng-devel v4l-utils-devel fontconfig-devel gnutls-devel
 dbus-devel cups-devel sane-devel prelink"

makedepends+=" desktop-file-utils hicolor-icon-theme liberation-fonts-ttf
 fontconfig libOSMesa"

pre_configure() {
	sed -i 's/\(libncurses\)/\1w/g' configure
}

libwine-unstable_package() {
	short_desc="${short_desc} - Runtime library"
	replaces="libwine>=0"
	provides="libwine-${version}"
	conflicts="libwine>=0"
	pkg_install() {
		vmove "usr/lib/*.so*"
		vmove usr/lib/wine
	}
}

wine-unstable-devel_package() {
	depends="libwine-unstable-${version}_${revision}"
	short_desc="${short_desc} - Development files"
	replaces="wine-devel>=0"
	provides="wine-devel-${version}"
	conflicts="wine-devel>=0"
	pkg_install() {
        	vmove usr/include
	}
}

wine-unstable_package() {
	replaces="wine>=0"
	provides="wine-${version}"
	conflicts="wine>=0"
	# libOSMesa is loaded with dlopen(3) at runtime
	depends="desktop-file-utils hicolor-icon-theme liberation-fonts-ttf
		fontconfig libOSMesa"
	pkg_install() {
		vmove usr
	}
}
