1 # Copyright 1999-2010 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.3.3.ebuild,v 1.3 2010/09/25 05:35:39 vapier Exp $
7 inherit eutils flag-o-matic multilib
9 if [[ ${PV} == "9999" ]] ; then
10 EGIT_REPO_URI="git://source.winehq.org/git/wine.git"
15 AUTOTOOLS_AUTO_DEPEND="no"
17 MY_P="${PN}-${PV/_/-}"
18 SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.bz2"
19 KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
23 pulse_patches() { echo "$1"/winepulse-{0.36,0.35-configure.ac,0.38-winecfg}.patch ; }
25 DESCRIPTION="free implementation of Windows(tm) on Unix"
26 HOMEPAGE="http://www.winehq.org/"
29 mirror://sourceforge/wine/wine_gecko-${GV}-x86.cab
30 win64? ( mirror://sourceforge/wine/wine_gecko-${GV}-x86_64.cab )
32 pulseaudio? ( `pulse_patches http://art.ified.ca/downloads/winepulse` )"
36 IUSE="alsa capi cups custom-cflags dbus esd fontconfig +gecko gnutls gphoto2 gsm hal jack jpeg lcms ldap mp3 nas ncurses openal +opengl +oss +perl png pulseaudio samba scanner ssl test +threads +truetype +win32 +win64 +X xcomposite xinerama xml"
37 RESTRICT="test" #72375
40 truetype? ( >=app-emulation/emul-linux-x86-xlibs-2.1 )
42 >=app-emulation/emul-linux-x86-xlibs-2.1
43 >=app-emulation/emul-linux-x86-soundlibs-2.1
45 openal? ( app-emulation/emul-linux-x86-sdl )
46 opengl? ( app-emulation/emul-linux-x86-opengl )
47 app-emulation/emul-linux-x86-baselibs
48 >=sys-kernel/linux-headers-2.6
50 RDEPEND="truetype? ( >=media-libs/freetype-2.0.0 media-fonts/corefonts )
51 perl? ( dev-lang/perl dev-perl/XML-Simple )
52 capi? ( net-dialup/capi4k-utils )
53 ncurses? ( >=sys-libs/ncurses-5.2 )
54 fontconfig? ( media-libs/fontconfig )
55 gphoto2? ( media-libs/libgphoto2 )
56 jack? ( media-sound/jack-audio-connection-kit )
57 openal? ( media-libs/openal )
58 dbus? ( sys-apps/dbus )
59 gnutls? ( net-libs/gnutls )
69 xinerama? ( x11-libs/libXinerama )
70 alsa? ( media-libs/alsa-lib )
71 esd? ( media-sound/esound )
72 nas? ( media-libs/nas )
73 cups? ( net-print/cups )
74 opengl? ( virtual/opengl )
75 pulseaudio? ( media-sound/pulseaudio ${AUTOTOOLS_DEPEND} )
76 gsm? ( media-sound/gsm )
77 jpeg? ( media-libs/jpeg )
78 ldap? ( net-nds/openldap )
79 lcms? ( =media-libs/lcms-1* )
80 mp3? ( >=media-sound/mpg123-1.5.0 )
81 samba? ( >=net-fs/samba-3.0.25 )
82 xml? ( dev-libs/libxml2 dev-libs/libxslt )
83 scanner? ( media-gfx/sane-backends )
84 ssl? ( dev-libs/openssl )
85 png? ( media-libs/libpng )
86 !win64? ( ${MLIB_DEPS} )
87 win32? ( ${MLIB_DEPS} )
88 xcomposite? ( x11-libs/libXcomposite ) "
93 x11-proto/xf86vidmodeproto
95 xinerama? ( x11-proto/xineramaproto )
101 [[ $(( $(gcc-major-version) * 100 + $(gcc-minor-version) )) -lt 404 ]] \
102 && die "you need gcc-4.4+ to build 64bit wine"
105 if [[ ${PV} == "9999" ]] ; then
108 unpack ${MY_P}.tar.bz2
113 if use pulseaudio ; then
114 EPATCH_OPTS=-p1 epatch `pulse_patches "${DISTDIR}"`
117 epatch "${FILESDIR}"/${PN}-1.1.15-winegcc.patch #260726
118 epatch "${FILESDIR}"/0001-dsound-Restore-old-format-on-SetFormat-failure.patch
120 sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die
121 sed -i '/^MimeType/d' tools/wine.desktop || die #117785
125 local builddir="${WORKDIR}/wine$1"
126 mkdir -p "${builddir}"
127 pushd "${builddir}" >/dev/null
131 --sysconfdir=/etc/wine \
134 $(use_with lcms cms) \
136 $(use_with ncurses curses) \
138 $(use_with fontconfig) \
140 $(use_with gphoto2 gphoto) \
142 $(! use dbus && echo --without-hal || use_with hal) \
146 $(use_with mp3 mpg123) \
150 $(use_with ssl openssl) \
153 $(use_with threads pthread) \
154 $(use pulseaudio && use_with pulseaudio pulse) \
155 $(use_with scanner sane) \
156 $(use_enable test tests) \
157 $(use_with truetype freetype) \
159 $(use_with xcomposite) \
160 $(use_with xinerama) \
162 $(use_with xml xslt) \
165 emake -j1 depend || die "depend"
170 export LDCONFIG=/bin/true
171 use custom-cflags || strip-flags
174 do_configure 64 --enable-win64
175 use win32 && ABI=x86 do_configure 32 --with-wine64=../wine64
177 ABI=x86 do_configure 32 --disable-win64
184 local builddir="${WORKDIR}/wine${b}"
185 [[ -d ${builddir} ]] || continue
186 emake -C "${builddir}" all || die
193 local builddir="${WORKDIR}/wine${b}"
194 [[ -d ${builddir} ]] || continue
195 emake -C "${builddir}" install DESTDIR="${D}" || die
197 dodoc ANNOUNCE AUTHORS README
199 insinto /usr/share/wine/gecko
200 doins "${DISTDIR}"/wine_gecko-${GV}-x86.cab || die
201 use win64 && { doins "${DISTDIR}"/wine_gecko-${GV}-x86_64.cab || die ; }
204 rm "${D}"/usr/bin/{wine{dump,maker},function_grep.pl} "${D}"/usr/share/man/man1/wine{dump,maker}.1 || die
209 paxctl -psmr "${ROOT}"/usr/bin/wine{,-preloader} 2>/dev/null #255055