| 1 | # Copyright 1999-2012 Gentoo Foundation |
1 | # Copyright 1999-2012 Gentoo Foundation |
| 2 | # Distributed under the terms of the GNU General Public License v2 |
2 | # Distributed under the terms of the GNU General Public License v2 |
| 3 | # $Header: /var/cvsroot/gentoo-x86/app-emulation/wine/wine-9999.ebuild,v 1.102 2012/02/15 16:46:38 tetromino Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/app-emulation/wine/wine-9999.ebuild,v 1.103 2012/02/21 04:17:24 tetromino Exp $ |
| 4 | |
4 | |
| 5 | EAPI="4" |
5 | EAPI="4" |
| 6 | |
6 | |
| 7 | inherit autotools eutils flag-o-matic multilib |
7 | inherit autotools eutils flag-o-matic multilib pax-utils |
| 8 | |
8 | |
| 9 | if [[ ${PV} == "9999" ]] ; then |
9 | if [[ ${PV} == "9999" ]] ; then |
| 10 | EGIT_REPO_URI="git://source.winehq.org/git/wine.git" |
10 | EGIT_REPO_URI="git://source.winehq.org/git/wine.git" |
| 11 | inherit git-2 |
11 | inherit git-2 |
| 12 | SRC_URI="" |
12 | SRC_URI="" |
| … | |
… | |
| 27 | win64? ( mirror://sourceforge/wine/wine_gecko-${GV}-x86_64.msi ) |
27 | win64? ( mirror://sourceforge/wine/wine_gecko-${GV}-x86_64.msi ) |
| 28 | )" |
28 | )" |
| 29 | |
29 | |
| 30 | LICENSE="LGPL-2.1" |
30 | LICENSE="LGPL-2.1" |
| 31 | SLOT="0" |
31 | SLOT="0" |
| 32 | IUSE="alsa capi cups custom-cflags elibc_glibc fontconfig +gecko gnutls gphoto2 gsm gstreamer hardened jpeg lcms ldap mp3 ncurses nls openal opencl +opengl +oss +perl png samba scanner selinux ssl test +threads +truetype udisks v4l +win32 +win64 +X xcomposite xinerama xml" |
32 | IUSE="alsa capi cups custom-cflags elibc_glibc fontconfig +gecko gnutls gphoto2 gsm gstreamer hardened jpeg lcms ldap mp3 ncurses nls odbc openal opencl +opengl +oss +perl png samba scanner selinux ssl test +threads +truetype udisks v4l +win32 +win64 +X xcomposite xinerama xml" |
| 33 | REQUIRED_USE="elibc_glibc? ( threads )" #286560 |
33 | REQUIRED_USE="elibc_glibc? ( threads )" #286560 |
| 34 | RESTRICT="test" #72375 |
34 | RESTRICT="test" #72375 |
| 35 | |
35 | |
| 36 | MLIB_DEPS="amd64? ( |
36 | MLIB_DEPS="amd64? ( |
| 37 | truetype? ( >=app-emulation/emul-linux-x86-xlibs-2.1 ) |
37 | truetype? ( >=app-emulation/emul-linux-x86-xlibs-2.1 ) |
| 38 | X? ( |
38 | X? ( |
| 39 | >=app-emulation/emul-linux-x86-xlibs-2.1 |
39 | >=app-emulation/emul-linux-x86-xlibs-2.1 |
| 40 | >=app-emulation/emul-linux-x86-soundlibs-2.1 |
40 | >=app-emulation/emul-linux-x86-soundlibs-2.1 |
| 41 | ) |
41 | ) |
| 42 | mp3? ( app-emulation/emul-linux-x86-soundlibs ) |
42 | mp3? ( app-emulation/emul-linux-x86-soundlibs ) |
|
|
43 | odbc? ( app-emulation/emul-linux-x86-db ) |
| 43 | openal? ( app-emulation/emul-linux-x86-sdl ) |
44 | openal? ( app-emulation/emul-linux-x86-sdl ) |
| 44 | opengl? ( app-emulation/emul-linux-x86-opengl ) |
45 | opengl? ( app-emulation/emul-linux-x86-opengl ) |
| 45 | scanner? ( app-emulation/emul-linux-x86-medialibs ) |
46 | scanner? ( app-emulation/emul-linux-x86-medialibs ) |
| 46 | v4l? ( app-emulation/emul-linux-x86-medialibs ) |
47 | v4l? ( app-emulation/emul-linux-x86-medialibs ) |
| 47 | app-emulation/emul-linux-x86-baselibs |
48 | app-emulation/emul-linux-x86-baselibs |
| … | |
… | |
| 77 | jpeg? ( virtual/jpeg ) |
78 | jpeg? ( virtual/jpeg ) |
| 78 | ldap? ( net-nds/openldap ) |
79 | ldap? ( net-nds/openldap ) |
| 79 | lcms? ( =media-libs/lcms-1* ) |
80 | lcms? ( =media-libs/lcms-1* ) |
| 80 | mp3? ( >=media-sound/mpg123-1.5.0 ) |
81 | mp3? ( >=media-sound/mpg123-1.5.0 ) |
| 81 | nls? ( sys-devel/gettext ) |
82 | nls? ( sys-devel/gettext ) |
|
|
83 | odbc? ( dev-db/unixODBC ) |
| 82 | samba? ( >=net-fs/samba-3.0.25 ) |
84 | samba? ( >=net-fs/samba-3.0.25 ) |
| 83 | selinux? ( sec-policy/selinux-wine ) |
85 | selinux? ( sec-policy/selinux-wine ) |
| 84 | xml? ( dev-libs/libxml2 dev-libs/libxslt ) |
86 | xml? ( dev-libs/libxml2 dev-libs/libxslt ) |
| 85 | scanner? ( media-gfx/sane-backends ) |
87 | scanner? ( media-gfx/sane-backends ) |
| 86 | ssl? ( dev-libs/openssl ) |
88 | ssl? ( dev-libs/openssl ) |
| … | |
… | |
| 102 | |
104 | |
| 103 | src_unpack() { |
105 | src_unpack() { |
| 104 | if use win64 ; then |
106 | if use win64 ; then |
| 105 | [[ $(( $(gcc-major-version) * 100 + $(gcc-minor-version) )) -lt 404 ]] \ |
107 | [[ $(( $(gcc-major-version) * 100 + $(gcc-minor-version) )) -lt 404 ]] \ |
| 106 | && die "you need gcc-4.4+ to build 64bit wine" |
108 | && die "you need gcc-4.4+ to build 64bit wine" |
|
|
109 | fi |
|
|
110 | |
|
|
111 | if use win32 && use opencl; then |
|
|
112 | [[ x$(eselect opencl show) = "xintel" ]] && |
|
|
113 | die "Cannot build wine[opencl,win32]: intel-ocl-sdk is 64-bit only" # 403947 |
| 107 | fi |
114 | fi |
| 108 | |
115 | |
| 109 | if [[ ${PV} == "9999" ]] ; then |
116 | if [[ ${PV} == "9999" ]] ; then |
| 110 | git-2_src_unpack |
117 | git-2_src_unpack |
| 111 | else |
118 | else |
| … | |
… | |
| 202 | insinto /usr/share/wine/gecko |
209 | insinto /usr/share/wine/gecko |
| 203 | doins "${DISTDIR}"/wine_gecko-${GV}-x86.msi |
210 | doins "${DISTDIR}"/wine_gecko-${GV}-x86.msi |
| 204 | use win64 && doins "${DISTDIR}"/wine_gecko-${GV}-x86_64.msi |
211 | use win64 && doins "${DISTDIR}"/wine_gecko-${GV}-x86_64.msi |
| 205 | fi |
212 | fi |
| 206 | if ! use perl ; then |
213 | if ! use perl ; then |
| 207 | rm "${D}"/usr/bin/{wine{dump,maker},function_grep.pl} "${D}"/usr/share/man/man1/wine{dump,maker}.1 || die |
214 | rm "${D}"usr/bin/{wine{dump,maker},function_grep.pl} "${D}"usr/share/man/man1/wine{dump,maker}.1 || die |
| 208 | fi |
215 | fi |
| 209 | } |
|
|
| 210 | |
216 | |
| 211 | pkg_postinst() { |
217 | if use win32 || ! use win64; then |
| 212 | paxctl -psmr "${ROOT}"/usr/bin/wine{,-preloader} 2>/dev/null #255055 |
218 | pax-mark psmr "${D}"usr/bin/wine{,-preloader} #255055 |
|
|
219 | fi |
|
|
220 | use win64 && pax-mark psmr "${D}"usr/bin/wine64{,-preloader} |
|
|
221 | |
|
|
222 | if use win64 && ! use win32; then |
|
|
223 | dosym /usr/bin/wine{64,} # 404331 |
|
|
224 | dosym /usr/bin/wine{64,}-preloader |
|
|
225 | fi |
| 213 | } |
226 | } |