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