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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (hide annotations) (download)
Thu Aug 23 16:45:20 2012 UTC (2 years ago) by tetromino
Branch: MAIN
Changes since 1.2: +6 -1 lines
Run tools/make_requests if a user patch modifies the server protocol definition (bug #432348, thanks to Oliver 'oGGy' Ney).

(Portage version: 2.2.0_alpha121/cvs/Linux x86_64)

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

  ViewVC Help
Powered by ViewVC 1.1.20