1 |
tetromino |
1.7 |
# Copyright 1999-2013 Gentoo Foundation |
2 |
tetromino |
1.1 |
# Distributed under the terms of the GNU General Public License v2 |
3 |
tetromino |
1.13 |
# $Header: /var/cvsroot/gentoo-x86/app-emulation/wine/wine-1.5.7.ebuild,v 1.12 2013/10/13 21:10:09 tetromino Exp $ |
4 |
tetromino |
1.1 |
|
5 |
tetromino |
1.7 |
EAPI="5" |
6 |
tetromino |
1.1 |
|
7 |
|
|
inherit autotools eutils flag-o-matic multilib pax-utils |
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.6" |
22 |
|
|
MV="0.0.4" |
23 |
|
|
PULSE_PATCH="winepulse-2012.06.15.patch" |
24 |
tetromino |
1.7 |
DESCRIPTION="Free implementation of Windows(tm) on Unix" |
25 |
tetromino |
1.1 |
HOMEPAGE="http://www.winehq.org/" |
26 |
|
|
SRC_URI="${SRC_URI} |
27 |
|
|
gecko? ( |
28 |
|
|
mirror://sourceforge/${PN}/Wine%20Gecko/${GV}/wine_gecko-${GV}-x86.msi |
29 |
|
|
win64? ( mirror://sourceforge/${PN}/Wine%20Gecko/${GV}/wine_gecko-${GV}-x86_64.msi ) |
30 |
|
|
) |
31 |
|
|
mono? ( mirror://sourceforge/${PN}/Wine%20Mono/${MV}/wine-mono-${MV}.msi ) |
32 |
|
|
http://source.winehq.org/patches/data/87234 -> ${PULSE_PATCH}" |
33 |
|
|
|
34 |
|
|
LICENSE="LGPL-2.1" |
35 |
|
|
SLOT="0" |
36 |
vapier |
1.6 |
IUSE="alsa capi cups custom-cflags elibc_glibc fontconfig +gecko gnutls gphoto2 gsm gstreamer jpeg lcms ldap +mono mp3 ncurses nls odbc openal opencl +opengl +oss +perl png +prelink pulseaudio samba scanner selinux ssl test +threads +truetype udisks v4l +win32 +win64 +X xcomposite xinerama xml" |
37 |
tetromino |
1.1 |
REQUIRED_USE="elibc_glibc? ( threads ) |
38 |
|
|
mono? ( || ( win32 !win64 ) )" #286560 |
39 |
|
|
RESTRICT="test" #72375 |
40 |
|
|
|
41 |
|
|
MLIB_DEPS="amd64? ( |
42 |
ssuominen |
1.9 |
gstreamer? ( app-emulation/emul-linux-x86-gstplugins ) |
43 |
tetromino |
1.1 |
truetype? ( >=app-emulation/emul-linux-x86-xlibs-2.1 ) |
44 |
|
|
X? ( |
45 |
|
|
>=app-emulation/emul-linux-x86-xlibs-2.1 |
46 |
tetromino |
1.7 |
>=app-emulation/emul-linux-x86-soundlibs-2.1 |
47 |
tetromino |
1.1 |
) |
48 |
|
|
mp3? ( app-emulation/emul-linux-x86-soundlibs ) |
49 |
|
|
odbc? ( app-emulation/emul-linux-x86-db ) |
50 |
|
|
openal? ( app-emulation/emul-linux-x86-sdl ) |
51 |
|
|
opengl? ( app-emulation/emul-linux-x86-opengl ) |
52 |
|
|
scanner? ( app-emulation/emul-linux-x86-medialibs ) |
53 |
|
|
v4l? ( app-emulation/emul-linux-x86-medialibs ) |
54 |
|
|
app-emulation/emul-linux-x86-baselibs |
55 |
|
|
>=sys-kernel/linux-headers-2.6 |
56 |
|
|
)" |
57 |
tetromino |
1.11 |
RDEPEND="truetype? ( >=media-libs/freetype-2.0.0 ) |
58 |
tetromino |
1.1 |
perl? ( dev-lang/perl dev-perl/XML-Simple ) |
59 |
|
|
capi? ( net-dialup/capi4k-utils ) |
60 |
tetromino |
1.7 |
ncurses? ( >=sys-libs/ncurses-5.2:= ) |
61 |
|
|
fontconfig? ( media-libs/fontconfig:= ) |
62 |
|
|
gphoto2? ( media-libs/libgphoto2:= ) |
63 |
|
|
openal? ( media-libs/openal:= ) |
64 |
tetromino |
1.1 |
udisks? ( |
65 |
|
|
sys-apps/dbus |
66 |
|
|
sys-fs/udisks:2 |
67 |
|
|
) |
68 |
tetromino |
1.7 |
gnutls? ( net-libs/gnutls:= ) |
69 |
tetromino |
1.5 |
gstreamer? ( media-libs/gstreamer:0.10 media-libs/gst-plugins-base:0.10 ) |
70 |
tetromino |
1.1 |
X? ( |
71 |
tetromino |
1.11 |
x11-libs/libICE |
72 |
|
|
x11-libs/libSM |
73 |
tetromino |
1.1 |
x11-libs/libXcursor |
74 |
|
|
x11-libs/libXrandr |
75 |
|
|
x11-libs/libXi |
76 |
|
|
x11-libs/libXxf86vm |
77 |
|
|
) |
78 |
|
|
xinerama? ( x11-libs/libXinerama ) |
79 |
|
|
alsa? ( media-libs/alsa-lib ) |
80 |
tetromino |
1.7 |
cups? ( net-print/cups:= ) |
81 |
tetromino |
1.1 |
opencl? ( virtual/opencl ) |
82 |
tetromino |
1.4 |
opengl? ( |
83 |
|
|
virtual/glu |
84 |
|
|
virtual/opengl |
85 |
|
|
) |
86 |
tetromino |
1.7 |
gsm? ( media-sound/gsm:= ) |
87 |
ssuominen |
1.10 |
jpeg? ( virtual/jpeg:0= ) |
88 |
tetromino |
1.7 |
ldap? ( net-nds/openldap:= ) |
89 |
|
|
lcms? ( media-libs/lcms:0= ) |
90 |
tetromino |
1.1 |
mp3? ( >=media-sound/mpg123-1.5.0 ) |
91 |
|
|
nls? ( sys-devel/gettext ) |
92 |
tetromino |
1.7 |
odbc? ( dev-db/unixODBC:= ) |
93 |
tetromino |
1.1 |
pulseaudio? ( media-sound/pulseaudio ) |
94 |
|
|
samba? ( >=net-fs/samba-3.0.25 ) |
95 |
|
|
selinux? ( sec-policy/selinux-wine ) |
96 |
|
|
xml? ( dev-libs/libxml2 dev-libs/libxslt ) |
97 |
tetromino |
1.7 |
scanner? ( media-gfx/sane-backends:= ) |
98 |
tetromino |
1.8 |
ssl? ( dev-libs/openssl:0= ) |
99 |
|
|
png? ( media-libs/libpng:0= ) |
100 |
tetromino |
1.1 |
v4l? ( media-libs/libv4l ) |
101 |
|
|
!win64? ( ${MLIB_DEPS} ) |
102 |
|
|
win32? ( ${MLIB_DEPS} ) |
103 |
|
|
xcomposite? ( x11-libs/libXcomposite )" |
104 |
|
|
DEPEND="${RDEPEND} |
105 |
|
|
X? ( |
106 |
|
|
x11-proto/inputproto |
107 |
|
|
x11-proto/xextproto |
108 |
|
|
x11-proto/xf86vidmodeproto |
109 |
|
|
) |
110 |
|
|
xinerama? ( x11-proto/xineramaproto ) |
111 |
vapier |
1.6 |
prelink? ( sys-devel/prelink ) |
112 |
tetromino |
1.1 |
virtual/pkgconfig |
113 |
|
|
virtual/yacc |
114 |
|
|
sys-devel/flex" |
115 |
|
|
|
116 |
tetromino |
1.12 |
wine_build_environment_check() { |
117 |
|
|
[[ ${MERGE_TYPE} = "binary" ]] && return 0 |
118 |
|
|
|
119 |
|
|
if use win64 && [[ $(( $(gcc-major-version) * 100 + $(gcc-minor-version) )) -lt 404 ]]; then |
120 |
|
|
eerror "You need gcc-4.4+ to build 64-bit wine" |
121 |
|
|
eerror |
122 |
|
|
return 1 |
123 |
tetromino |
1.1 |
fi |
124 |
|
|
|
125 |
tetromino |
1.12 |
if use win32 && use opencl && [[ x$(eselect opencl show 2> /dev/null) = "xintel" ]]; then |
126 |
|
|
eerror "You cannot build wine with USE=opencl because intel-ocl-sdk is 64-bit only." |
127 |
|
|
eerror "See https://bugs.gentoo.org/487864 for more details." |
128 |
|
|
eerror |
129 |
|
|
return 1 |
130 |
tetromino |
1.1 |
fi |
131 |
tetromino |
1.12 |
} |
132 |
tetromino |
1.1 |
|
133 |
tetromino |
1.12 |
pkg_pretend() { |
134 |
|
|
wine_build_environment_check || die |
135 |
|
|
} |
136 |
|
|
|
137 |
|
|
pkg_setup() { |
138 |
|
|
wine_build_environment_check || die |
139 |
|
|
} |
140 |
|
|
|
141 |
|
|
src_unpack() { |
142 |
tetromino |
1.1 |
if [[ ${PV} == "9999" ]] ; then |
143 |
|
|
git-2_src_unpack |
144 |
|
|
else |
145 |
|
|
unpack ${MY_P}.tar.bz2 |
146 |
|
|
fi |
147 |
|
|
} |
148 |
|
|
|
149 |
|
|
src_prepare() { |
150 |
tetromino |
1.3 |
local md5="$(md5sum server/protocol.def)" |
151 |
tetromino |
1.1 |
epatch "${FILESDIR}"/${PN}-1.1.15-winegcc.patch #260726 |
152 |
|
|
epatch "${FILESDIR}"/${PN}-1.4_rc2-multilib-portage.patch #395615 |
153 |
|
|
epatch "${DISTDIR}/${PULSE_PATCH}" #421365 |
154 |
|
|
epatch_user #282735 |
155 |
tetromino |
1.3 |
if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then |
156 |
|
|
einfo "server/protocol.def was patched; running tools/make_requests" |
157 |
|
|
tools/make_requests || die #432348 |
158 |
|
|
fi |
159 |
tetromino |
1.1 |
eautoreconf |
160 |
|
|
sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die |
161 |
|
|
sed -i '/^MimeType/d' tools/wine.desktop || die #117785 |
162 |
|
|
} |
163 |
|
|
|
164 |
|
|
do_configure() { |
165 |
|
|
local builddir="${WORKDIR}/wine$1" |
166 |
|
|
mkdir -p "${builddir}" |
167 |
|
|
pushd "${builddir}" >/dev/null |
168 |
|
|
|
169 |
|
|
ECONF_SOURCE=${S} \ |
170 |
|
|
econf \ |
171 |
|
|
--sysconfdir=/etc/wine \ |
172 |
|
|
$(use_with alsa) \ |
173 |
|
|
$(use_with capi) \ |
174 |
|
|
$(use_with lcms cms) \ |
175 |
|
|
$(use_with cups) \ |
176 |
|
|
$(use_with ncurses curses) \ |
177 |
|
|
$(use_with udisks dbus) \ |
178 |
|
|
$(use_with fontconfig) \ |
179 |
|
|
$(use_with gnutls) \ |
180 |
|
|
$(use_with gphoto2 gphoto) \ |
181 |
|
|
$(use_with gsm) \ |
182 |
|
|
$(use_with gstreamer) \ |
183 |
|
|
--without-hal \ |
184 |
|
|
$(use_with jpeg) \ |
185 |
|
|
$(use_with ldap) \ |
186 |
|
|
$(use_with mp3 mpg123) \ |
187 |
|
|
$(use_with nls gettext) \ |
188 |
|
|
$(use_with openal) \ |
189 |
|
|
$(use_with opencl) \ |
190 |
|
|
$(use_with opengl) \ |
191 |
|
|
$(use_with ssl openssl) \ |
192 |
|
|
$(use_with oss) \ |
193 |
|
|
$(use_with png) \ |
194 |
|
|
$(use_with threads pthread) \ |
195 |
|
|
$(use_with pulseaudio pulse) \ |
196 |
|
|
$(use_with scanner sane) \ |
197 |
|
|
$(use_enable test tests) \ |
198 |
|
|
$(use_with truetype freetype) \ |
199 |
|
|
$(use_with v4l) \ |
200 |
|
|
$(use_with X x) \ |
201 |
|
|
$(use_with xcomposite) \ |
202 |
|
|
$(use_with xinerama) \ |
203 |
|
|
$(use_with xml) \ |
204 |
|
|
$(use_with xml xslt) \ |
205 |
|
|
$2 |
206 |
|
|
|
207 |
|
|
emake -j1 depend |
208 |
|
|
|
209 |
|
|
popd >/dev/null |
210 |
|
|
} |
211 |
|
|
|
212 |
|
|
src_configure() { |
213 |
|
|
export LDCONFIG=/bin/true |
214 |
|
|
use custom-cflags || strip-flags |
215 |
|
|
|
216 |
|
|
if use win64 ; then |
217 |
|
|
do_configure 64 --enable-win64 |
218 |
|
|
use win32 && ABI=x86 do_configure 32 --with-wine64=../wine64 |
219 |
|
|
else |
220 |
|
|
ABI=x86 do_configure 32 --disable-win64 |
221 |
|
|
fi |
222 |
|
|
} |
223 |
|
|
|
224 |
|
|
src_compile() { |
225 |
|
|
local b |
226 |
|
|
for b in 64 32 ; do |
227 |
|
|
local builddir="${WORKDIR}/wine${b}" |
228 |
|
|
[[ -d ${builddir} ]] || continue |
229 |
|
|
emake -C "${builddir}" all |
230 |
|
|
done |
231 |
|
|
} |
232 |
|
|
|
233 |
|
|
src_install() { |
234 |
|
|
local b |
235 |
|
|
for b in 64 32 ; do |
236 |
|
|
local builddir="${WORKDIR}/wine${b}" |
237 |
|
|
[[ -d ${builddir} ]] || continue |
238 |
|
|
emake -C "${builddir}" install DESTDIR="${D}" |
239 |
|
|
done |
240 |
|
|
dodoc ANNOUNCE AUTHORS README |
241 |
|
|
if use gecko ; then |
242 |
|
|
insinto /usr/share/wine/gecko |
243 |
|
|
doins "${DISTDIR}"/wine_gecko-${GV}-x86.msi |
244 |
|
|
use win64 && doins "${DISTDIR}"/wine_gecko-${GV}-x86_64.msi |
245 |
|
|
fi |
246 |
|
|
if use mono ; then |
247 |
|
|
insinto /usr/share/wine/mono |
248 |
|
|
doins "${DISTDIR}"/wine-mono-${MV}.msi |
249 |
|
|
fi |
250 |
|
|
if ! use perl ; then |
251 |
|
|
rm "${D}"usr/bin/{wine{dump,maker},function_grep.pl} "${D}"usr/share/man/man1/wine{dump,maker}.1 || die |
252 |
|
|
fi |
253 |
|
|
|
254 |
|
|
if use win32 || ! use win64; then |
255 |
|
|
pax-mark psmr "${D}"usr/bin/wine{,-preloader} #255055 |
256 |
|
|
fi |
257 |
|
|
use win64 && pax-mark psmr "${D}"usr/bin/wine64{,-preloader} |
258 |
|
|
|
259 |
|
|
if use win64 && ! use win32; then |
260 |
|
|
dosym /usr/bin/wine{64,} # 404331 |
261 |
|
|
dosym /usr/bin/wine{64,}-preloader |
262 |
|
|
fi |
263 |
|
|
} |