/[gentoo-x86]/app-emulation/wine/wine-1.6.2.ebuild
Gentoo

Contents of /app-emulation/wine/wine-1.6.2.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.9 - (show annotations) (download)
Sun Jun 14 16:18:11 2015 UTC (3 years, 10 months ago) by ulm
Branch: MAIN
CVS Tags: HEAD
Changes since 1.8: +43 -124 lines
[QA] Remove emul-linux-x86-* from dependencies.

(Portage version: 2.2.20/cvs/Linux x86_64, signed Manifest commit with key 9433907D693FB5B8!)

1 # Copyright 1999-2015 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.6.2.ebuild,v 1.8 2015/01/01 21:01:23 ryao Exp $
4
5 EAPI="5"
6
7 AUTOTOOLS_AUTORECONF=1
8 PLOCALES="ar bg ca cs da de el en en_US eo es fa fi fr he hi hr hu it ja ko lt ml nb_NO nl or pa pl pt_BR pt_PT rm ro ru sk sl sr_RS@cyrillic sr_RS@latin sv te th tr uk wa zh_CN zh_TW"
9 PLOCALE_BACKUP="en"
10
11 inherit autotools-multilib eutils fdo-mime flag-o-matic gnome2-utils l10n multilib pax-utils toolchain-funcs virtualx
12
13 if [[ ${PV} == "9999" ]] ; then
14 EGIT_REPO_URI="git://source.winehq.org/git/wine.git"
15 inherit git-2
16 SRC_URI=""
17 #KEYWORDS=""
18 else
19 MY_P="${PN}-${PV/_/-}"
20 SRC_URI="mirror://sourceforge/${PN}/Source/${MY_P}.tar.bz2"
21 KEYWORDS="-* amd64 x86 ~x86-fbsd"
22 S=${WORKDIR}/${MY_P}
23 fi
24
25 GV="2.21"
26 MV="0.0.8"
27 PULSE_PATCHES="winepulse-patches-1.7.8"
28 WINE_GENTOO="wine-gentoo-2013.06.24"
29 DESCRIPTION="Free implementation of Windows(tm) on Unix"
30 HOMEPAGE="http://www.winehq.org/"
31 SRC_URI="${SRC_URI}
32 gecko? (
33 abi_x86_32? ( mirror://sourceforge/${PN}/Wine%20Gecko/${GV}/wine_gecko-${GV}-x86.msi )
34 abi_x86_64? ( mirror://sourceforge/${PN}/Wine%20Gecko/${GV}/wine_gecko-${GV}-x86_64.msi )
35 )
36 mono? ( mirror://sourceforge/${PN}/Wine%20Mono/${MV}/wine-mono-${MV}.msi )
37 pulseaudio? ( http://dev.gentoo.org/~tetromino/distfiles/${PN}/${PULSE_PATCHES}.tar.bz2 )
38 http://dev.gentoo.org/~tetromino/distfiles/${PN}/${WINE_GENTOO}.tar.bz2"
39
40 LICENSE="LGPL-2.1"
41 SLOT="0"
42 IUSE="+abi_x86_32 +abi_x86_64 +alsa capi cups custom-cflags dos elibc_glibc +fontconfig +gecko gphoto2 gsm gstreamer +jpeg lcms ldap +mono mp3 ncurses nls odbc openal opencl +opengl osmesa oss +perl +png +prelink pulseaudio +realtime +run-exes samba scanner selinux +ssl test +threads +truetype +udisks v4l +X xcomposite xinerama +xml"
43 REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 )
44 test? ( abi_x86_32 )
45 elibc_glibc? ( threads )
46 mono? ( abi_x86_32 )
47 osmesa? ( opengl )" #286560
48
49 # FIXME: the test suite is unsuitable for us; many tests require net access
50 # or fail due to Xvfb's opengl limitations.
51 RESTRICT="test"
52
53 NATIVE_DEPEND="
54 truetype? ( >=media-libs/freetype-2.0.0 )
55 capi? ( net-dialup/capi4k-utils )
56 ncurses? ( >=sys-libs/ncurses-5.2:= )
57 udisks? ( sys-apps/dbus )
58 fontconfig? ( media-libs/fontconfig:= )
59 gphoto2? ( media-libs/libgphoto2:= )
60 openal? ( media-libs/openal:= )
61 gstreamer? ( media-libs/gstreamer:0.10 media-libs/gst-plugins-base:0.10 )
62 X? (
63 x11-libs/libXcursor
64 x11-libs/libXext
65 x11-libs/libXrandr
66 x11-libs/libXi
67 x11-libs/libXxf86vm
68 )
69 xinerama? ( x11-libs/libXinerama )
70 alsa? ( media-libs/alsa-lib )
71 cups? ( net-print/cups:= )
72 opencl? ( virtual/opencl )
73 opengl? (
74 virtual/glu
75 virtual/opengl
76 )
77 gsm? ( media-sound/gsm:= )
78 jpeg? ( virtual/jpeg:0= )
79 ldap? ( net-nds/openldap:= )
80 lcms? ( media-libs/lcms:2= )
81 mp3? ( >=media-sound/mpg123-1.5.0 )
82 nls? ( sys-devel/gettext )
83 odbc? ( dev-db/unixODBC:= )
84 osmesa? ( media-libs/mesa[osmesa] )
85 pulseaudio? ( media-sound/pulseaudio )
86 xml? ( dev-libs/libxml2 dev-libs/libxslt )
87 scanner? ( media-gfx/sane-backends:= )
88 ssl? ( net-libs/gnutls:= )
89 png? ( media-libs/libpng:0= )
90 v4l? ( media-libs/libv4l )
91 xcomposite? ( x11-libs/libXcomposite )"
92
93 COMMON_DEPEND="
94 !amd64? ( ${NATIVE_DEPEND} )
95 amd64? (
96 abi_x86_64? ( ${NATIVE_DEPEND} )
97 abi_x86_32? (
98 truetype? ( >=media-libs/freetype-2.5.0.1[abi_x86_32(-)] )
99 ncurses? ( >=sys-libs/ncurses-5.9-r3[abi_x86_32(-)] )
100 udisks? ( >=sys-apps/dbus-1.6.18-r1[abi_x86_32(-)] )
101 fontconfig? ( >=media-libs/fontconfig-2.10.92[abi_x86_32(-)] )
102 gphoto2? ( >=media-libs/libgphoto2-2.5.3.1[abi_x86_32(-)] )
103 openal? ( >=media-libs/openal-1.15.1[abi_x86_32(-)] )
104 gstreamer? (
105 >=media-libs/gstreamer-0.10.36-r2:0.10[abi_x86_32(-)]
106 >=media-libs/gst-plugins-base-0.10.36:0.10[abi_x86_32(-)]
107 )
108 X? (
109 >=x11-libs/libXcursor-1.1.14[abi_x86_32(-)]
110 >=x11-libs/libXext-1.3.2[abi_x86_32(-)]
111 >=x11-libs/libXrandr-1.4.2[abi_x86_32(-)]
112 >=x11-libs/libXi-1.7.2[abi_x86_32(-)]
113 >=x11-libs/libXxf86vm-1.1.3[abi_x86_32(-)]
114 )
115 xinerama? ( >=x11-libs/libXinerama-1.1.3[abi_x86_32(-)] )
116 alsa? ( >=media-libs/alsa-lib-1.0.27.2[abi_x86_32(-)] )
117 cups? ( >=net-print/cups-1.7.1-r1[abi_x86_32(-)] )
118 opencl? ( >=virtual/opencl-0-r3[abi_x86_32(-)] )
119 opengl? (
120 >=virtual/glu-9.0-r1[abi_x86_32(-)]
121 >=virtual/opengl-7.0-r1[abi_x86_32(-)]
122 )
123 gsm? ( >=media-sound/gsm-1.0.13-r1[abi_x86_32(-)] )
124 jpeg? ( >=virtual/jpeg-0-r2:0[abi_x86_32(-)] )
125 ldap? ( >=net-nds/openldap-2.4.38-r1:=[abi_x86_32(-)] )
126 lcms? ( >=media-libs/lcms-2.5:2[abi_x86_32(-)] )
127 mp3? ( >=media-sound/mpg123-1.15.4[abi_x86_32(-)] )
128 nls? ( >=sys-devel/gettext-0.18.3.2[abi_x86_32(-)] )
129 odbc? ( >=dev-db/unixODBC-2.3.2:=[abi_x86_32(-)] )
130 osmesa? ( >=media-libs/mesa-9.1.6[osmesa,abi_x86_32(-)] )
131 pulseaudio? ( >=media-sound/pulseaudio-5.0[abi_x86_32(-)] )
132 xml? (
133 >=dev-libs/libxml2-2.9.1-r4[abi_x86_32(-)]
134 >=dev-libs/libxslt-1.1.28-r1[abi_x86_32(-)]
135 )
136 scanner? ( >=media-gfx/sane-backends-1.0.23:=[abi_x86_32(-)] )
137 ssl? ( >=net-libs/gnutls-2.12.23-r6:=[abi_x86_32(-)] )
138 png? ( >=media-libs/libpng-1.6.10:0[abi_x86_32(-)] )
139 v4l? ( >=media-libs/libv4l-0.9.5[abi_x86_32(-)] )
140 xcomposite? ( >=x11-libs/libXcomposite-0.4.4-r1[abi_x86_32(-)] )
141 )
142 )"
143
144 RDEPEND="${COMMON_DEPEND}
145 dos? ( games-emulation/dosbox )
146 perl? ( dev-lang/perl dev-perl/XML-Simple )
147 samba? ( >=net-fs/samba-3.0.25 )
148 selinux? ( sec-policy/selinux-wine )
149 udisks? ( sys-fs/udisks:2 )
150 pulseaudio? ( realtime? ( sys-auth/rtkit ) )"
151
152 DEPEND="${COMMON_DEPEND}
153 amd64? ( abi_x86_32? ( !abi_x86_64? ( ${NATIVE_DEPEND} ) ) )
154 X? (
155 x11-proto/inputproto
156 x11-proto/xextproto
157 x11-proto/xf86vidmodeproto
158 )
159 xinerama? ( x11-proto/xineramaproto )
160 prelink? ( sys-devel/prelink )
161 >=sys-kernel/linux-headers-2.6
162 virtual/pkgconfig
163 virtual/yacc
164 sys-devel/flex"
165
166 # These use a non-standard "Wine" category, which is provided by
167 # /etc/xdg/applications-merged/wine.menu
168 QA_DESKTOP_FILE="usr/share/applications/wine-browsedrive.desktop
169 usr/share/applications/wine-notepad.desktop
170 usr/share/applications/wine-uninstaller.desktop
171 usr/share/applications/wine-winecfg.desktop"
172
173 wine_build_environment_check() {
174 [[ ${MERGE_TYPE} = "binary" ]] && return 0
175
176 if use abi_x86_64 && [[ $(( $(gcc-major-version) * 100 + $(gcc-minor-version) )) -lt 404 ]]; then
177 eerror "You need gcc-4.4+ to build 64-bit wine"
178 eerror
179 return 1
180 fi
181
182 if use abi_x86_32 && use opencl && [[ x$(eselect opencl show 2> /dev/null) = "xintel" ]]; then
183 eerror "You cannot build wine with USE=opencl because intel-ocl-sdk is 64-bit only."
184 eerror "See https://bugs.gentoo.org/487864 for more details."
185 eerror
186 return 1
187 fi
188 }
189
190 pkg_pretend() {
191 wine_build_environment_check || die
192 }
193
194 pkg_setup() {
195 wine_build_environment_check || die
196 }
197
198 src_unpack() {
199 if [[ ${PV} == "9999" ]] ; then
200 git-2_src_unpack
201 else
202 unpack ${MY_P}.tar.bz2
203 fi
204
205 use pulseaudio && unpack "${PULSE_PATCHES}.tar.bz2"
206 unpack "${WINE_GENTOO}.tar.bz2"
207
208 l10n_find_plocales_changes "${S}/po" "" ".po"
209 }
210
211 src_prepare() {
212 local md5="$(md5sum server/protocol.def)"
213 local PATCHES=(
214 "${FILESDIR}"/${PN}-1.5.26-winegcc.patch #260726
215 "${FILESDIR}"/${PN}-1.4_rc2-multilib-portage.patch #395615
216 "${FILESDIR}"/${PN}-1.7.2-osmesa-check.patch #429386
217 "${FILESDIR}"/${PN}-1.6-memset-O3.patch #480508
218 )
219 use pulseaudio && PATCHES+=(
220 "../${PULSE_PATCHES}"/*.patch #421365
221 )
222
223 autotools-utils_src_prepare
224
225 if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then
226 einfo "server/protocol.def was patched; running tools/make_requests"
227 tools/make_requests || die #432348
228 fi
229 sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die
230 if ! use run-exes; then
231 sed -i '/^MimeType/d' tools/wine.desktop || die #117785
232 fi
233
234 # hi-res default icon, #472990, http://bugs.winehq.org/show_bug.cgi?id=24652
235 cp "${WORKDIR}"/${WINE_GENTOO}/icons/oic_winlogo.ico dlls/user32/resources/ || die
236
237 l10n_get_locales > po/LINGUAS # otherwise wine doesn't respect LINGUAS
238 }
239
240 do_configure() {
241 local myeconfargs=( "${myeconfargs[@]}" )
242
243 if use amd64; then
244 if [[ ${ABI} == amd64 ]]; then
245 myeconfargs+=( --enable-win64 )
246 else
247 myeconfargs+=( --disable-win64 )
248 fi
249
250 # Note: using --with-wine64 results in problems with multilib.eclass
251 # CC/LD hackery. We're using separate tools instead.
252 fi
253
254 autotools-utils_src_configure
255 }
256
257 src_configure() {
258 export LDCONFIG=/bin/true
259 use custom-cflags || strip-flags
260
261 local myeconfargs=( # common
262 --sysconfdir=/etc/wine
263 $(use_with alsa)
264 $(use_with capi)
265 $(use_with lcms cms)
266 $(use_with cups)
267 $(use_with ncurses curses)
268 $(use_with udisks dbus)
269 $(use_with fontconfig)
270 $(use_with ssl gnutls)
271 $(use_with gphoto2 gphoto)
272 $(use_with gsm)
273 $(use_with gstreamer)
274 --without-hal
275 $(use_with jpeg)
276 $(use_with ldap)
277 $(use_with mp3 mpg123)
278 $(use_with nls gettext)
279 $(use_with openal)
280 $(use_with opencl)
281 $(use_with opengl)
282 $(use_with osmesa)
283 $(use_with oss)
284 $(use_with png)
285 $(use_with threads pthread)
286 $(use_with scanner sane)
287 $(use_enable test tests)
288 $(use_with truetype freetype)
289 $(use_with v4l)
290 $(use_with X x)
291 $(use_with xcomposite)
292 $(use_with xinerama)
293 $(use_with xml)
294 $(use_with xml xslt)
295 )
296
297 use pulseaudio && myeconfargs+=( --with-pulse )
298
299 if use amd64 && use abi_x86_32; then
300 # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038
301 # set AR and RANLIB to make QA scripts happy; #483342
302 tc-export PKG_CONFIG AR RANLIB
303 fi
304
305 multilib_parallel_foreach_abi do_configure
306 }
307
308 src_compile() {
309 autotools-multilib_src_compile depend
310 autotools-multilib_src_compile all
311 }
312
313 src_test() {
314 if [[ $(id -u) == 0 ]]; then
315 ewarn "Skipping tests since they cannot be run under the root user."
316 ewarn "To run the test ${PN} suite, add userpriv to FEATURES in make.conf"
317 return
318 fi
319
320 # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader"
321 multilib_toolchain_setup x86
322 local BUILD_DIR="${S}-${ABI}"
323 cd "${BUILD_DIR}" || die
324 WINEPREFIX="${T}/.wine-${ABI}" Xemake test
325 }
326
327 src_install() {
328 local DOCS=( ANNOUNCE AUTHORS README )
329 add_locale_docs() {
330 local locale_doc="documentation/README.$1"
331 [[ ! -e ${locale_doc} ]] || DOCS=( "${DOCS[@]}" ${locale_doc} )
332 }
333 l10n_for_each_locale_do add_locale_docs
334 autotools-multilib_src_install
335
336 emake -C "../${WINE_GENTOO}" install DESTDIR="${D}" EPREFIX="${EPREFIX}"
337 if use gecko ; then
338 insinto /usr/share/wine/gecko
339 use abi_x86_32 && doins "${DISTDIR}"/wine_gecko-${GV}-x86.msi
340 use abi_x86_64 && doins "${DISTDIR}"/wine_gecko-${GV}-x86_64.msi
341 fi
342 if use mono ; then
343 insinto /usr/share/wine/mono
344 doins "${DISTDIR}"/wine-mono-${MV}.msi
345 fi
346 if ! use perl ; then
347 rm "${D}"usr/bin/{wine{dump,maker},function_grep.pl} "${D}"usr/share/man/man1/wine{dump,maker}.1 || die
348 fi
349
350 use abi_x86_32 && pax-mark psmr "${D}"usr/bin/wine{,-preloader} #255055
351 use abi_x86_64 && pax-mark psmr "${D}"usr/bin/wine64{,-preloader}
352
353 if use abi_x86_64 && ! use abi_x86_32; then
354 dosym /usr/bin/wine{64,} # 404331
355 dosym /usr/bin/wine{64,}-preloader
356 fi
357
358 # respect LINGUAS when installing man pages, #469418
359 for l in de fr pl; do
360 use linguas_${l} || rm -r "${D}"usr/share/man/${l}*
361 done
362 }
363
364 pkg_preinst() {
365 gnome2_icon_savelist
366 }
367
368 pkg_postinst() {
369 gnome2_icon_cache_update
370 fdo-mime_desktop_database_update
371 }
372
373 pkg_postrm() {
374 gnome2_icon_cache_update
375 fdo-mime_desktop_database_update
376 }

  ViewVC Help
Powered by ViewVC 1.1.20