| 1 |
# Copyright 1999-2011 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.2.1.ebuild,v 1.9 2011/08/20 19:19:05 vapier Exp $
|
| 4 |
|
| 5 |
EAPI="2"
|
| 6 |
|
| 7 |
inherit eutils flag-o-matic multilib
|
| 8 |
|
| 9 |
if [[ ${PV} == "9999" ]] ; then
|
| 10 |
EGIT_REPO_URI="git://source.winehq.org/git/wine.git"
|
| 11 |
inherit git-2 autotools
|
| 12 |
SRC_URI=""
|
| 13 |
#KEYWORDS=""
|
| 14 |
else
|
| 15 |
AUTOTOOLS_AUTO_DEPEND="no"
|
| 16 |
inherit autotools
|
| 17 |
MY_P="${PN}-${PV/_/-}"
|
| 18 |
SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.bz2"
|
| 19 |
KEYWORDS="-* amd64 x86 ~x86-fbsd"
|
| 20 |
S=${WORKDIR}/${MY_P}
|
| 21 |
fi
|
| 22 |
|
| 23 |
pulse_patches() { echo "$1"/winepulse-{0.36,0.35-configure.ac,0.38-winecfg}.patch ; }
|
| 24 |
GV="1.0.0-x86"
|
| 25 |
DESCRIPTION="free implementation of Windows(tm) on Unix"
|
| 26 |
HOMEPAGE="http://www.winehq.org/"
|
| 27 |
SRC_URI="${SRC_URI}
|
| 28 |
gecko? ( mirror://sourceforge/wine/wine_gecko-${GV}.cab )
|
| 29 |
pulseaudio? ( `pulse_patches http://art.ified.ca/downloads/winepulse` )"
|
| 30 |
|
| 31 |
LICENSE="LGPL-2.1"
|
| 32 |
SLOT="0"
|
| 33 |
IUSE="alsa capi cups custom-cflags dbus esd fontconfig +gecko gnutls gphoto2 gsm hal hardened jack jpeg lcms ldap mp3 nas ncurses openal +opengl +oss +perl png pulseaudio samba scanner ssl test +threads +truetype v4l +win32 +win64 +X xcomposite xinerama xml"
|
| 34 |
RESTRICT="test" #72375
|
| 35 |
|
| 36 |
MLIB_DEPS="amd64? (
|
| 37 |
truetype? ( >=app-emulation/emul-linux-x86-xlibs-2.1 )
|
| 38 |
X? (
|
| 39 |
>=app-emulation/emul-linux-x86-xlibs-2.1
|
| 40 |
>=app-emulation/emul-linux-x86-soundlibs-2.1[pulseaudio?]
|
| 41 |
)
|
| 42 |
openal? ( app-emulation/emul-linux-x86-sdl )
|
| 43 |
opengl? ( app-emulation/emul-linux-x86-opengl )
|
| 44 |
v4l? ( app-emulation/emul-linux-x86-medialibs )
|
| 45 |
app-emulation/emul-linux-x86-baselibs
|
| 46 |
>=sys-kernel/linux-headers-2.6
|
| 47 |
)"
|
| 48 |
RDEPEND="truetype? ( >=media-libs/freetype-2.0.0 media-fonts/corefonts )
|
| 49 |
perl? ( dev-lang/perl dev-perl/XML-Simple )
|
| 50 |
capi? ( net-dialup/capi4k-utils )
|
| 51 |
ncurses? ( >=sys-libs/ncurses-5.2 )
|
| 52 |
fontconfig? ( media-libs/fontconfig )
|
| 53 |
gphoto2? ( media-libs/libgphoto2 )
|
| 54 |
jack? ( media-sound/jack-audio-connection-kit )
|
| 55 |
openal? ( media-libs/openal )
|
| 56 |
dbus? ( sys-apps/dbus )
|
| 57 |
gnutls? ( net-libs/gnutls )
|
| 58 |
hal? ( sys-apps/hal )
|
| 59 |
X? (
|
| 60 |
x11-libs/libXcursor
|
| 61 |
x11-libs/libXrandr
|
| 62 |
x11-libs/libXi
|
| 63 |
x11-libs/libXmu
|
| 64 |
x11-libs/libXxf86vm
|
| 65 |
x11-apps/xmessage
|
| 66 |
)
|
| 67 |
xinerama? ( x11-libs/libXinerama )
|
| 68 |
alsa? ( media-libs/alsa-lib )
|
| 69 |
esd? ( media-sound/esound )
|
| 70 |
nas? ( media-libs/nas )
|
| 71 |
cups? ( net-print/cups )
|
| 72 |
opengl? ( virtual/opengl )
|
| 73 |
pulseaudio? ( media-sound/pulseaudio )
|
| 74 |
gsm? ( media-sound/gsm )
|
| 75 |
jpeg? ( virtual/jpeg )
|
| 76 |
ldap? ( net-nds/openldap )
|
| 77 |
lcms? ( =media-libs/lcms-1* )
|
| 78 |
mp3? ( >=media-sound/mpg123-1.5.0 )
|
| 79 |
samba? ( >=net-fs/samba-3.0.25 )
|
| 80 |
xml? ( dev-libs/libxml2 dev-libs/libxslt )
|
| 81 |
scanner? ( media-gfx/sane-backends )
|
| 82 |
ssl? ( dev-libs/openssl )
|
| 83 |
png? ( media-libs/libpng )
|
| 84 |
v4l? ( media-libs/libv4l )
|
| 85 |
!win64? ( ${MLIB_DEPS} )
|
| 86 |
win32? ( ${MLIB_DEPS} )
|
| 87 |
xcomposite? ( x11-libs/libXcomposite )"
|
| 88 |
DEPEND="${RDEPEND}
|
| 89 |
pulseaudio? ( ${AUTOTOOLS_DEPEND} )
|
| 90 |
X? (
|
| 91 |
x11-proto/inputproto
|
| 92 |
x11-proto/xextproto
|
| 93 |
x11-proto/xf86vidmodeproto
|
| 94 |
)
|
| 95 |
xinerama? ( x11-proto/xineramaproto )
|
| 96 |
!hardened? ( sys-devel/prelink )
|
| 97 |
virtual/yacc
|
| 98 |
sys-devel/flex"
|
| 99 |
|
| 100 |
src_unpack() {
|
| 101 |
if use win64 ; then
|
| 102 |
[[ $(( $(gcc-major-version) * 100 + $(gcc-minor-version) )) -lt 404 ]] \
|
| 103 |
&& die "you need gcc-4.4+ to build 64bit wine"
|
| 104 |
fi
|
| 105 |
|
| 106 |
if [[ ${PV} == "9999" ]] ; then
|
| 107 |
git-2_src_unpack
|
| 108 |
else
|
| 109 |
unpack ${MY_P}.tar.bz2
|
| 110 |
fi
|
| 111 |
}
|
| 112 |
|
| 113 |
src_prepare() {
|
| 114 |
if use pulseaudio ; then
|
| 115 |
EPATCH_OPTS=-p1 epatch `pulse_patches "${DISTDIR}"`
|
| 116 |
eautoreconf
|
| 117 |
fi
|
| 118 |
epatch "${FILESDIR}"/${PN}-1.1.15-winegcc.patch #260726
|
| 119 |
epatch_user #282735
|
| 120 |
sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die
|
| 121 |
sed -i '/^MimeType/d' tools/wine.desktop || die #117785
|
| 122 |
}
|
| 123 |
|
| 124 |
do_configure() {
|
| 125 |
local builddir="${WORKDIR}/wine$1"
|
| 126 |
mkdir -p "${builddir}"
|
| 127 |
pushd "${builddir}" >/dev/null
|
| 128 |
|
| 129 |
ECONF_SOURCE=${S} \
|
| 130 |
econf \
|
| 131 |
--sysconfdir=/etc/wine \
|
| 132 |
$(use_with alsa) \
|
| 133 |
$(use_with capi) \
|
| 134 |
$(use_with lcms cms) \
|
| 135 |
$(use_with cups) \
|
| 136 |
$(use_with ncurses curses) \
|
| 137 |
$(use_with esd) \
|
| 138 |
$(use_with fontconfig) \
|
| 139 |
$(use_with gnutls) \
|
| 140 |
$(use_with gphoto2 gphoto) \
|
| 141 |
$(use_with gsm) \
|
| 142 |
$(! use dbus && echo --without-hal || use_with hal) \
|
| 143 |
$(use_with jack) \
|
| 144 |
$(use_with jpeg) \
|
| 145 |
$(use_with ldap) \
|
| 146 |
$(use_with mp3 mpg123) \
|
| 147 |
$(use_with nas) \
|
| 148 |
$(use_with openal) \
|
| 149 |
$(use_with opengl) \
|
| 150 |
$(use_with ssl openssl) \
|
| 151 |
$(use_with oss) \
|
| 152 |
$(use_with png) \
|
| 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) \
|
| 158 |
$(use_with v4l) \
|
| 159 |
$(use_with X x) \
|
| 160 |
$(use_with xcomposite) \
|
| 161 |
$(use_with xinerama) \
|
| 162 |
$(use_with xml) \
|
| 163 |
$(use_with xml xslt) \
|
| 164 |
$2
|
| 165 |
|
| 166 |
emake -j1 depend || die "depend"
|
| 167 |
|
| 168 |
popd >/dev/null
|
| 169 |
}
|
| 170 |
src_configure() {
|
| 171 |
export LDCONFIG=/bin/true
|
| 172 |
use custom-cflags || strip-flags
|
| 173 |
|
| 174 |
if use win64 ; then
|
| 175 |
do_configure 64 --enable-win64
|
| 176 |
use win32 && ABI=x86 do_configure 32 --with-wine64=../wine64
|
| 177 |
else
|
| 178 |
ABI=x86 do_configure 32 --disable-win64
|
| 179 |
fi
|
| 180 |
}
|
| 181 |
|
| 182 |
src_compile() {
|
| 183 |
local b
|
| 184 |
for b in 64 32 ; do
|
| 185 |
local builddir="${WORKDIR}/wine${b}"
|
| 186 |
[[ -d ${builddir} ]] || continue
|
| 187 |
emake -C "${builddir}" all || die
|
| 188 |
done
|
| 189 |
}
|
| 190 |
|
| 191 |
src_install() {
|
| 192 |
local b
|
| 193 |
for b in 64 32 ; do
|
| 194 |
local builddir="${WORKDIR}/wine${b}"
|
| 195 |
[[ -d ${builddir} ]] || continue
|
| 196 |
emake -C "${builddir}" install DESTDIR="${D}" || die
|
| 197 |
done
|
| 198 |
dodoc ANNOUNCE AUTHORS README
|
| 199 |
if use gecko ; then
|
| 200 |
insinto /usr/share/wine/gecko
|
| 201 |
doins "${DISTDIR}"/wine_gecko-${GV}.cab || die
|
| 202 |
fi
|
| 203 |
if ! use perl ; then
|
| 204 |
rm "${D}"/usr/bin/{wine{dump,maker},function_grep.pl} "${D}"/usr/share/man/man1/wine{dump,maker}.1 || die
|
| 205 |
fi
|
| 206 |
}
|
| 207 |
|
| 208 |
pkg_postinst() {
|
| 209 |
paxctl -psmr "${ROOT}"/usr/bin/wine{,-preloader} 2>/dev/null #255055
|
| 210 |
}
|