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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.13 - (hide annotations) (download)
Sun Oct 13 21:10:09 2013 UTC (11 months, 1 week ago) by tetromino
Branch: MAIN
CVS Tags: HEAD
Changes since 1.12: +23 -8 lines
Move gcc and opencl build environment check into a separate function and run it in pkg_pretend() and pkg_setup() for non-binpkg merges for user friendliness.

(Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key CF0ADD61)

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

  ViewVC Help
Powered by ViewVC 1.1.20