1.0.18-rc2 - alsa-plugins builds fine now, alsa-utils on the other hand needs hit...
[gentoo-diskmaster-overlay.git] / app-emulation / wine / wine-1.1.2.ebuild
blobe8b49bb9f698535f95815e6d8ca8fcaf67729d96
1 # Copyright 1999-2008 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/app-emulation/wine/wine-1.1.0.ebuild,v 1.1 2008/06/27 16:24:02 vapier Exp $
5 EAPI="1"
7 inherit eutils flag-o-matic multilib
9 if [[ ${PV} == "9999" ]] ; then
10 EGIT_REPO_URI="git://source.winehq.org/git/wine.git"
11 inherit git
12 SRC_URI=""
13 else
14 MY_P="${PN}-${PV/_/-}"
15 SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.bz2"
16 S=${WORKDIR}/${MY_P}
19 DESCRIPTION="free implementation of Windows(tm) on Unix"
20 HOMEPAGE="http://www.winehq.org/"
21 SRC_URI="${SRC_URI}
22 gecko? ( mirror://sourceforge/wine/wine_gecko-0.1.0.cab )"
24 LICENSE="LGPL-2.1"
25 SLOT="0"
26 KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
27 IUSE="alsa cups dbus esd +gecko hal jack jpeg lcms ldap nas ncurses +opengl oss samba scanner xml +X"
28 RESTRICT="test" #72375
30 RDEPEND=">=media-libs/freetype-2.0.0
31 media-fonts/corefonts
32 ncurses? ( >=sys-libs/ncurses-5.2 )
33 jack? ( media-sound/jack-audio-connection-kit )
34 dbus? ( sys-apps/dbus )
35 hal? ( sys-apps/hal )
36 X? (
37 x11-libs/libXcursor
38 x11-libs/libXrandr
39 x11-libs/libXi
40 x11-libs/libXmu
41 x11-libs/libXxf86vm
42 x11-apps/xmessage
44 alsa? ( media-libs/alsa-lib )
45 esd? ( media-sound/esound )
46 nas? ( media-libs/nas )
47 cups? ( net-print/cups )
48 opengl? ( virtual/opengl )
49 jpeg? ( media-libs/jpeg )
50 ldap? ( net-nds/openldap )
51 lcms? ( media-libs/lcms )
52 samba? ( >=net-fs/samba-3.0.25 )
53 xml? ( dev-libs/libxml2 dev-libs/libxslt )
54 scanner? ( media-gfx/sane-backends )
55 amd64? (
56 X? (
57 >=app-emulation/emul-linux-x86-xlibs-2.1
58 >=app-emulation/emul-linux-x86-soundlibs-2.1
60 >=sys-kernel/linux-headers-2.6
62 DEPEND="${RDEPEND}
63 X? (
64 x11-proto/inputproto
65 x11-proto/xextproto
66 x11-proto/xf86vidmodeproto
68 sys-devel/bison
69 sys-devel/flex"
71 pkg_setup() {
72 use alsa || return 0
73 if ! built_with_use --missing true media-libs/alsa-lib midi ; then
74 eerror "You must build media-libs/alsa-lib with USE=midi"
75 die "please re-emerge media-libs/alsa-lib with USE=midi"
79 src_unpack() {
80 if [[ ${PV} == "9999" ]] ; then
81 git_src_unpack
82 else
83 unpack ${MY_P}.tar.bz2
85 cd "${S}"
87 sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die
88 epatch "${FILESDIR}"/wine-gentoo-no-ssp.patch #66002
89 sed -i '/^MimeType/d' tools/wine.desktop || die #117785
92 config_cache() {
93 local h ans="no"
94 use $1 && ans="yes"
95 shift
96 for h in "$@" ; do
97 [[ ${h} == *.h ]] \
98 && h=header_${h} \
99 || h=lib_${h}
100 export ac_cv_${h//[:\/.]/_}=${ans}
101 done
104 src_compile() {
105 export LDCONFIG=/bin/true
106 use esd || export ac_cv_path_ESDCONFIG=""
107 use scanner || export ac_cv_path_sane_devel="no"
108 config_cache jack jack/jack.h
109 config_cache cups cups/cups.h
110 config_cache alsa alsa/asoundlib.h sys/asoundlib.h asound:snd_pcm_open
111 config_cache nas audio/audiolib.h audio/soundlib.h
112 config_cache xml libxml/parser.h libxslt/pattern.h libxslt/transform.h
113 config_cache ldap ldap.h lber.h
114 config_cache dbus dbus/dbus.h
115 config_cache hal hal/libhal.h
116 config_cache jpeg jpeglib.h
117 config_cache oss sys/soundcard.h machine/soundcard.h soundcard.h
118 config_cache lcms lcms.h
120 strip-flags
122 use amd64 && multilib_toolchain_setup x86
124 # $(use_enable amd64 win64)
125 econf \
126 --sysconfdir=/etc/wine \
127 $(use_with ncurses curses) \
128 $(use_with opengl) \
129 $(use_with X x) \
130 || die "configure failed"
132 emake -j1 depend || die "depend"
133 emake all || die "all"
136 src_install() {
137 emake DESTDIR="${D}" install || die
138 dodoc ANNOUNCE AUTHORS ChangeLog DEVELOPERS-HINTS README
139 if use gecko ; then
140 insinto /usr/share/wine/gecko
141 doins "${DISTDIR}"/wine_gecko-*.cab || die
145 pkg_postinst() {
146 elog "~/.wine/config is now deprecated. For configuration either use"
147 elog "winecfg or regedit HKCU\\Software\\Wine"