[app-emulation/wine] kill the osmesa hack for win32 which disables it on amd64. requires FireBurn overlay to work, therefore not keyworded, also osmesa use flag on mesa-32bit is required which is not checked here yet due to lazyness

This commit is contained in:
Robert Förster 2012-09-13 02:07:42 +02:00
parent 714c343cd8
commit e8e70061a5
5 changed files with 388 additions and 0 deletions

View File

@ -0,0 +1,5 @@
DIST wine-1.5.12.tar.bz2 20652437 SHA256 ba987a0e3b1d5c0ba2d42fecdcff1c4e910d7c9949d9baca796b8b5c1318662c SHA512 c16ca8a6343a40f5a287fa123c9d03d6bc60b1e9bd9642cfa94fc473e2acd8bed56d442a149ac590b00292494795aa3b23e3c021990c3ca444641a4899d9a947 WHIRLPOOL 834b79863c158113a3cc71507371110c269aea8edb00bcb9cacadcf5d69a6389bf1836a19d3c9ad6e9b1593aaf02c8f1f90d9cea3149b42a3089983addfcd233
DIST wine-mono-0.0.4.msi 44408320 SHA256 15d8a612cdeca4eff3137353f29fdeb7a99e055cd633844c91cd00e0186b8882 SHA512 a7a3d5a564bab68ec6f3b96dff53c7b1491ce6d53b9fa3c2f5770e3ada69ffdefcbdde340697e9916d8c487f748db22aae97803b21bd63e461149be1eac096e4 WHIRLPOOL dc3bfafb8768cbda124870fceb1389e34a7d8ff0b1bad3df7e05923ce2695a2b037467bfddd90e1726f3f64f79bfa9f64bf65054ae3355a69039026fabf1eb4a
DIST wine_gecko-1.7-x86.msi 16995328 SHA256 2ed524e79cc88137b28430389af19cb032989311921462a29f72d6f121954913 SHA512 c17308ebcaaa947729dcfcc73736ec4f0ed559744eb89fc7b60afab9bc6c67044dc4885209ac79104ef0f957e842162ad8beb1535236c0fa2ed0dab6b0133636 WHIRLPOOL cba9e7276783c3fa828a948c6c5bca3a01329dd768f0768f310624aab70bcafb94dca1789ad77670dfc5c737da0a21342641997c0697d7c2a337b9e15555363b
DIST wine_gecko-1.7-x86_64.msi 17438720 SHA256 19d0364a43621738fa3fd1713ef9590ad0cc61ea4c8858ad3f8703a81b13c927 SHA512 04928aab0ba3ab90074085f9198e46372701249863b6710ed4ffc0c92e0ffc30348a41be528c7c1dec9007441cc1f3d3aa1193e469ac75f5ae635df52dac4dd7 WHIRLPOOL 389ae0eb32b2ea994cac9fdb0fd785bb457489063657040f54a5dd74c74483396772b18bbb0e7b4d86c1036d52a21d0d68610a458842e79e2c2567301d3e1659
DIST winepulse-2012.06.15.patch 100596 SHA256 f6baf816e6170c406607d81e298fea2d175452ca822ee4cd2748fe4381ecd4dc SHA512 cd14a3407820d5d7b64a1ea19e41ae816a6a06888d57314cd7314192744574885501c98fa9e9f0fb102d3427d9f7bcc4f1a5ac532947b89db52ef731e071cb69 WHIRLPOOL 2dbb40afb633f5b1238d8849825b4711de865033ebb5c8f04c8e930a2974b8a5f4958fe87b5c1a9ccb1417ab1f4fbd2ed37feec11d2212efa01a6e05171a06a6

View File

@ -0,0 +1,55 @@
http://bugs.gentoo.org/260726
--- wine-1.1.15/tools/winegcc/winegcc.c
+++ wine-1.1.15/tools/winegcc/winegcc.c
@@ -215,10 +215,13 @@
strarray* files;
};
+#undef FORCE_POINTER_SIZE
#ifdef __i386__
static const enum target_cpu build_cpu = CPU_x86;
+#define FORCE_POINTER_SIZE
#elif defined(__x86_64__)
static const enum target_cpu build_cpu = CPU_x86_64;
+#define FORCE_POINTER_SIZE
#elif defined(__sparc__)
static const enum target_cpu build_cpu = CPU_SPARC;
#elif defined(__ALPHA__)
@@ -968,6 +971,9 @@
opts.linker_args = strarray_alloc();
opts.compiler_args = strarray_alloc();
opts.winebuild_args = strarray_alloc();
+#ifdef FORCE_POINTER_SIZE
+ opts.force_pointer_size = sizeof(size_t);
+#endif
/* determine the processor type */
if (strendswith(argv[0], "winecpp")) opts.processor = proc_cpp;
--- wine-1.1.15/tools/winebuild/main.c
+++ wine-1.1.15/tools/winebuild/main.c
@@ -50,10 +50,13 @@
int link_ext_symbols = 0;
int force_pointer_size = 0;
+#undef FORCE_POINTER_SIZE
#ifdef __i386__
enum target_cpu target_cpu = CPU_x86;
+#define FORCE_POINTER_SIZE
#elif defined(__x86_64__)
enum target_cpu target_cpu = CPU_x86_64;
+#define FORCE_POINTER_SIZE
#elif defined(__sparc__)
enum target_cpu target_cpu = CPU_SPARC;
#elif defined(__ALPHA__)
@@ -574,6 +577,10 @@
signal( SIGTERM, exit_on_signal );
signal( SIGINT, exit_on_signal );
+#ifdef FORCE_POINTER_SIZE
+ force_pointer_size = sizeof(size_t);
+#endif
+
output_file = stdout;
argv = parse_options( argc, argv, spec );

View File

@ -0,0 +1,40 @@
https://bugs.gentoo.org/show_bug.cgi?id=395615
Explicitly add the required -m32/m64 to *FLAGS; this overrides any
arch-specific -m* flags that may have been appended by multilib-portage.
Even though -m32/m64 is now added to *FLAGS, -m32/m64 still has to be
explicitly added to CC and CXX due to wine's build system. For example,
winegcc saves the build-time value of CC and uses it at runtime.
--- a/configure.ac
+++ b/configure.ac
@@ -133,12 +133,18 @@
then
CC="$CC -m64"
CXX="$CXX -m64"
+ CFLAGS="$CFLAGS -m64"
+ LDFLAGS="$LDFLAGS -m64"
+ CXXFLAGS="$CXXFLAGS -m64"
host_cpu="x86_64"
notice_platform="64-bit "
AC_SUBST(TARGETFLAGS,"-m64")
else
CC="$CC -m32"
CXX="$CXX -m32"
+ CFLAGS="$CFLAGS -m32"
+ LDFLAGS="$LDFLAGS -m32"
+ CXXFLAGS="$CXXFLAGS -m32"
host_cpu="i386"
notice_platform="32-bit "
AC_SUBST(TARGETFLAGS,"-m32")
@@ -150,6 +156,9 @@
then
CC="$CC -m32"
CXX="$CXX -m32"
+ CFLAGS="$CFLAGS -m32"
+ LDFLAGS="$LDFLAGS -m32"
+ CXXFLAGS="$CXXFLAGS -m32"
AC_MSG_CHECKING([whether $CC works])
AC_LINK_IFELSE([AC_LANG_PROGRAM()],AC_MSG_RESULT([yes]),
[AC_MSG_RESULT([no])

View File

@ -0,0 +1,38 @@
From 22fcf835dfe713ad93f649a901973208e0f7b62d Mon Sep 17 00:00:00 2001
From: Alexandre Rostovtsev <tetromino@gentoo.org>
Date: Tue, 7 Aug 2012 01:29:01 -0400
Subject: [PATCH] Do not check for libGL symbols when checking libOSMesa
If mesa had been built with shared glapi, glAccum is not available in
libOSMesa without explicitly linking to libGL. In addition, in
mesa-8.0.x and earlier, libOSMesa needs to be explicitly linked to
libglapi if mesa was built with shared glapi, see
https://bugs.gentoo.org/show_bug.cgi?id=399813
And in mesa-8.1.x, libOSMesa in addition needs libdl, libpthread, and
libstdc++, see https://bugs.gentoo.org/show_bug.cgi?id=431832
---
configure.ac | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/configure.ac b/configure.ac
index 15ada86..6eab75e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1133,7 +1133,13 @@ This probably prevents linking to OpenGL. Try deleting the file and restarting c
if test "$ac_cv_header_GL_osmesa_h" = "yes"
then
- WINE_CHECK_SONAME(OSMesa,glAccum,,,[$X_LIBS $X_PRE_LIBS $XLIB -lm $X_EXTRA_LIBS])
+ WINE_CHECK_SONAME(OSMesa,OSMesaCreateContext,,,[$X_LIBS $X_PRE_LIBS $XLIB -lm $X_EXTRA_LIBS])
+ if test "x$ac_cv_lib_soname_OSMesa" = "x"; then
+ osmesa_save_CC=$CC
+ CC=$CXX
+ WINE_CHECK_SONAME(OSMesa,OSMesaCreateContext,,,[-lglapi -lpthread -ldl $X_LIBS $X_PRE_LIBS $XLIB -lm $X_EXTRA_LIBS])
+ CC=$osmesa_save_CC
+ fi
fi
WINE_NOTICE_WITH(osmesa,[test "x$ac_cv_lib_soname_OSMesa" = "x"],
[libOSMesa ${notice_platform}development files not found (or too old), OpenGL rendering in bitmaps won't be supported.])
--
1.7.8.6

View File

@ -0,0 +1,250 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-emulation/wine/wine-1.5.12.ebuild,v 1.2 2012/09/10 06:02:11 tetromino Exp $
EAPI="4"
inherit autotools eutils flag-o-matic multilib pax-utils
if [[ ${PV} == "9999" ]] ; then
EGIT_REPO_URI="git://source.winehq.org/git/wine.git"
inherit git-2
SRC_URI=""
#KEYWORDS=""
else
MY_P="${PN}-${PV/_/-}"
SRC_URI="mirror://sourceforge/${PN}/Source/${MY_P}.tar.bz2"
#KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
S=${WORKDIR}/${MY_P}
fi
GV="1.7"
MV="0.0.4"
PULSE_PATCH="winepulse-2012.06.15.patch"
DESCRIPTION="free implementation of Windows(tm) on Unix"
HOMEPAGE="http://www.winehq.org/"
SRC_URI="${SRC_URI}
gecko? (
mirror://sourceforge/${PN}/Wine%20Gecko/${GV}/wine_gecko-${GV}-x86.msi
win64? ( mirror://sourceforge/${PN}/Wine%20Gecko/${GV}/wine_gecko-${GV}-x86_64.msi )
)
mono? ( mirror://sourceforge/${PN}/Wine%20Mono/${MV}/wine-mono-${MV}.msi )
http://source.winehq.org/patches/data/87234 -> ${PULSE_PATCH}"
LICENSE="LGPL-2.1"
SLOT="0"
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 osmesa +oss +perl png pulseaudio samba scanner selinux ssl test +threads +truetype udisks v4l +win32 +win64 +X xcomposite xinerama xml"
REQUIRED_USE="elibc_glibc? ( threads )
mono? ( || ( win32 !win64 ) )
osmesa? ( opengl )" #286560
RESTRICT="test" #72375
MLIB_DEPS="amd64? (
truetype? ( >=app-emulation/emul-linux-x86-xlibs-2.1 )
X? (
>=app-emulation/emul-linux-x86-xlibs-2.1
>=app-emulation/emul-linux-x86-soundlibs-2.1[pulseaudio(+)?]
)
mp3? ( app-emulation/emul-linux-x86-soundlibs )
odbc? ( app-emulation/emul-linux-x86-db )
openal? ( app-emulation/emul-linux-x86-sdl )
opengl? ( app-emulation/emul-linux-x86-opengl )
scanner? ( app-emulation/emul-linux-x86-medialibs )
v4l? ( app-emulation/emul-linux-x86-medialibs )
app-emulation/emul-linux-x86-baselibs
>=sys-kernel/linux-headers-2.6
)"
RDEPEND="truetype? ( >=media-libs/freetype-2.0.0 media-fonts/corefonts )
perl? ( dev-lang/perl dev-perl/XML-Simple )
capi? ( net-dialup/capi4k-utils )
ncurses? ( >=sys-libs/ncurses-5.2 )
fontconfig? ( media-libs/fontconfig )
gphoto2? ( media-libs/libgphoto2 )
openal? ( media-libs/openal )
udisks? (
sys-apps/dbus
sys-fs/udisks:2
)
gnutls? ( net-libs/gnutls )
gstreamer? ( media-libs/gstreamer media-libs/gst-plugins-base )
X? (
x11-libs/libXcursor
x11-libs/libXrandr
x11-libs/libXi
x11-libs/libXmu
x11-libs/libXxf86vm
)
xinerama? ( x11-libs/libXinerama )
alsa? ( media-libs/alsa-lib )
cups? ( net-print/cups )
opencl? ( virtual/opencl )
opengl? (
virtual/glu
virtual/opengl
)
gsm? ( media-sound/gsm )
jpeg? ( virtual/jpeg )
ldap? ( net-nds/openldap )
lcms? ( =media-libs/lcms-1* )
mp3? ( >=media-sound/mpg123-1.5.0 )
nls? ( sys-devel/gettext )
odbc? ( dev-db/unixODBC )
osmesa? ( media-libs/mesa[osmesa] )
pulseaudio? ( media-sound/pulseaudio )
samba? ( >=net-fs/samba-3.0.25 )
selinux? ( sec-policy/selinux-wine )
xml? ( dev-libs/libxml2 dev-libs/libxslt )
scanner? ( media-gfx/sane-backends )
ssl? ( dev-libs/openssl )
png? ( media-libs/libpng )
v4l? ( media-libs/libv4l )
!win64? ( ${MLIB_DEPS} )
win32? ( ${MLIB_DEPS} )
xcomposite? ( x11-libs/libXcomposite )"
DEPEND="${RDEPEND}
X? (
x11-proto/inputproto
x11-proto/xextproto
x11-proto/xf86vidmodeproto
)
xinerama? ( x11-proto/xineramaproto )
!hardened? ( sys-devel/prelink )
virtual/pkgconfig
virtual/yacc
sys-devel/flex"
src_unpack() {
if use win64 ; then
[[ $(( $(gcc-major-version) * 100 + $(gcc-minor-version) )) -lt 404 ]] \
&& die "you need gcc-4.4+ to build 64bit wine"
fi
if use win32 && use opencl; then
[[ x$(eselect opencl show) = "xintel" ]] &&
die "Cannot build wine[opencl,win32]: intel-ocl-sdk is 64-bit only" # 403947
fi
if [[ ${PV} == "9999" ]] ; then
git-2_src_unpack
else
unpack ${MY_P}.tar.bz2
fi
}
src_prepare() {
local md5="$(md5sum server/protocol.def)"
epatch "${FILESDIR}"/${PN}-1.1.15-winegcc.patch #260726
epatch "${FILESDIR}"/${PN}-1.4_rc2-multilib-portage.patch #395615
epatch "${FILESDIR}"/${PN}-1.5.11-osmesa-check.patch #429386
epatch "${DISTDIR}/${PULSE_PATCH}" #421365
epatch_user #282735
if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then
einfo "server/protocol.def was patched; running tools/make_requests"
tools/make_requests || die #432348
fi
eautoreconf
sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die
sed -i '/^MimeType/d' tools/wine.desktop || die #117785
}
do_configure() {
local builddir="${WORKDIR}/wine$1"
mkdir -p "${builddir}"
pushd "${builddir}" >/dev/null
ECONF_SOURCE=${S} \
econf \
--sysconfdir=/etc/wine \
$(use_with alsa) \
$(use_with capi) \
$(use_with lcms cms) \
$(use_with cups) \
$(use_with ncurses curses) \
$(use_with udisks dbus) \
$(use_with fontconfig) \
$(use_with gnutls) \
$(use_with gphoto2 gphoto) \
$(use_with gsm) \
$(use_with gstreamer) \
--without-hal \
$(use_with jpeg) \
$(use_with ldap) \
$(use_with mp3 mpg123) \
$(use_with nls gettext) \
$(use_with openal) \
$(use_with opencl) \
$(use_with opengl) \
$(use_with ssl openssl) \
$(use_with osmesa) \
$(use_with oss) \
$(use_with png) \
$(use_with threads pthread) \
$(use_with pulseaudio pulse) \
$(use_with scanner sane) \
$(use_enable test tests) \
$(use_with truetype freetype) \
$(use_with v4l) \
$(use_with X x) \
$(use_with xcomposite) \
$(use_with xinerama) \
$(use_with xml) \
$(use_with xml xslt) \
$2
emake -j1 depend
popd >/dev/null
}
src_configure() {
export LDCONFIG=/bin/true
use custom-cflags || strip-flags
if use win64 ; then
do_configure 64 --enable-win64
use win32 && ABI=x86 do_configure 32 --with-wine64=../wine64
else
ABI=x86 do_configure 32 --disable-win64
fi
}
src_compile() {
local b
for b in 64 32 ; do
local builddir="${WORKDIR}/wine${b}"
[[ -d ${builddir} ]] || continue
emake -C "${builddir}" all
done
}
src_install() {
local b
for b in 64 32 ; do
local builddir="${WORKDIR}/wine${b}"
[[ -d ${builddir} ]] || continue
emake -C "${builddir}" install DESTDIR="${D}"
done
dodoc ANNOUNCE AUTHORS README
if use gecko ; then
insinto /usr/share/wine/gecko
doins "${DISTDIR}"/wine_gecko-${GV}-x86.msi
use win64 && doins "${DISTDIR}"/wine_gecko-${GV}-x86_64.msi
fi
if use mono ; then
insinto /usr/share/wine/mono
doins "${DISTDIR}"/wine-mono-${MV}.msi
fi
if ! use perl ; then
rm "${D}"usr/bin/{wine{dump,maker},function_grep.pl} "${D}"usr/share/man/man1/wine{dump,maker}.1 || die
fi
if use win32 || ! use win64; then
pax-mark psmr "${D}"usr/bin/wine{,-preloader} #255055
fi
use win64 && pax-mark psmr "${D}"usr/bin/wine64{,-preloader}
if use win64 && ! use win32; then
dosym /usr/bin/wine{64,} # 404331
dosym /usr/bin/wine{64,}-preloader
fi
}