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