From owner-freebsd-emulation@FreeBSD.ORG Fri Dec 18 21:27:12 2009 Return-Path: Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 71BE31065693; Fri, 18 Dec 2009 21:27:12 +0000 (UTC) (envelope-from naylor.b.david@gmail.com) Received: from mail-ew0-f226.google.com (mail-ew0-f226.google.com [209.85.219.226]) by mx1.freebsd.org (Postfix) with ESMTP id 5BF148FC0C; Fri, 18 Dec 2009 21:27:11 +0000 (UTC) Received: by ewy26 with SMTP id 26so2851320ewy.3 for ; Fri, 18 Dec 2009 13:27:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:organization:to:subject :date:user-agent:references:in-reply-to:mime-version:content-type :content-transfer-encoding:message-id; bh=uMLSH+DVv1KrGXJZ6FKOhS4mCgU27Q/NAApqgiBVwAo=; b=J9usicluYFQ1n6wUHBWX8BnDFnTvxUEtUeogNy9QE/GWkIVTi/CEd9erm41yYJVMr1 xw7EyMp0RrnceK6Bhy+ZLVDKgSGFRxfqL4dFAM0znDe2XBQI0PZ4unH1w74nwrURyIJM EQqEFDfb1Hw39CDA5bjOIjrv+ecRjyq0sTEOM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:organization:to:subject:date:user-agent:references:in-reply-to :mime-version:content-type:content-transfer-encoding:message-id; b=SRj6lUbnYN+zH54z4csjfP/R60ZKuTZvdn5hujJZda/1bGlbHnb8/7mQGZd9QVatON eAl6joHp4pP4RgukOZUlwDpPAwV8UHYLzNRUVtBQ3BoFPANR/H+ltPbJkZ+ye/9bh0w/ 3Jmc1bMAufWkvckTroQZj/SUf1QAMp6HOWURs= Received: by 10.216.85.132 with SMTP id u4mr1534006wee.191.1261171630302; Fri, 18 Dec 2009 13:27:10 -0800 (PST) Received: from dragon.dg ([41.0.54.20]) by mx.google.com with ESMTPS id 5sm12157529eyf.4.2009.12.18.13.27.05 (version=SSLv3 cipher=RC4-MD5); Fri, 18 Dec 2009 13:27:09 -0800 (PST) From: David Naylor Organization: Private To: freebsd-emulation@freebsd.org, Ivan Voras Date: Fri, 18 Dec 2009 23:27:15 +0200 User-Agent: KMail/1.12.3 (FreeBSD/8.0-STABLE; KDE/4.3.3; amd64; ; ) References: <200912081524.03878.naylor.b.david@gmail.com> In-Reply-To: <200912081524.03878.naylor.b.david@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart2464685.JAfRq4vdjr"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200912182327.18986.naylor.b.david@gmail.com> X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Subject: [WIP] wine/i386 on FreeBSD/amd64 (take 2) X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Dec 2009 21:27:12 -0000 --nextPart2464685.JAfRq4vdjr Content-Type: multipart/mixed; boundary="Boundary-01=_zO/KLlUWJAJE4EX" Content-Transfer-Encoding: 7bit --Boundary-01=_zO/KLlUWJAJE4EX Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Tuesday 08 December 2009 15:24:00 David Naylor wrote: > Hi, >=20 > I have developed a port that allows wine to be installed as a package und= er > FreeBSD/amd64. This avoids having a i386 chroot environment (and is much > easier to setup, once the package is built). I've changes the name of the port (should be obvious what it is for and not= =20 conflict when wine/amd64 arrives). The port now also automagically determi= nes=20 which third party shared libraries should be bundled with it. (See below o= n=20 how to handle nvidia-driver). =20 > To get this working apply the attached patch and build the emulators/wine- > amd64 port under FreeBSD/i386 then transfer that package to the amd64 hos= t: >=20 > (On FreeBSD/i386) > # cd /usr/ports/emulators > # patch < /tmp/wine-amd64.diff (patch name changed, fix arguments) # patch -sp0 < /tmp/wine-fbsd64.diff > # cd wine-amd64 > # make package clean >=20 > (On FreeBSD/amd64) > # pkg_add wine-amd64-8-1.1.34,1.tbz (package name changed) # pkg_add wine-amd64.8-1.1.34,1.tbz > I have such a package for FreeBSD-8 if anyone is willing to host it. I'll update the patch when wine-1.1.35 gets into my ports. =20 > There are a few TODO items (port options not supported). Any > comments/suggestions are welcome. 1) Install from package on FreeBSD/amd64 (any suggestions on how to do that= ?) 2) Which version of FreeBSD/amd64 supports FreeBSD/i386 well enough to run= =20 wine? 3) Any bugs reported? > Word of warning: nvidia-driver breaks everything. Make sure it is not > installed on both i386/amd64 systems. If one really wants wine with > nvidia- driver support then install the beta on both i386 and amd64 (very > important it is the same version of the driver) and copy libGL.so.1, > libGLcore.so.1 and libnvidia-tls.so.1 from i386 to $PREFIX/lib32 (on > amd64). The above method still does work but now, if one installs nvidia-driver (of= =20 the correct version) before building wine under FreeBSD/i386 then the requi= red=20 libraries will be included (this makes the package unsuitable for any syste= m=20 without the correct nvidia drivers installed). =20 Regards, David P.S. I've included the shar archive as some people have not been able to ap= ply=20 the patch cleanly --Boundary-01=_zO/KLlUWJAJE4EX Content-Type: text/x-patch; charset="ISO-8859-1"; name="wine-fbsd64.diff" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="wine-fbsd64.diff" diff -uNr /usr/ports/emulators/wine/Makefile wine/Makefile =2D-- /usr/ports/emulators/wine/Makefile 2009-12-08 08:27:51.000000000 +0200 +++ wine/Makefile 2009-12-18 23:17:27.000000000 +0200 @@ -30,12 +30,10 @@ --without-sane --without-xcursor CONFIGURE_ENV=3D CPPFLAGS=3D"-I${LOCALBASE}/include" \ LDFLAGS=3D"-L${LOCALBASE}/lib" =2DUSE_LDCONFIG=3D ${PREFIX}/lib ${PREFIX}/lib/wine MAKE_JOBS_SAFE=3D yes MAN1=3D widl.1 wine.1 winebuild.1 winedbg.1 winedump.1 winegcc.1 \ winemaker.1 wineprefixcreate.1 wineserver.1 wmc.1 wrc.1 MLINKS=3D winegcc.1 wineg++.1 =2DONLY_FOR_ARCHS=3D i386 USE_BISON=3D build USE_BZIP2=3D yes USE_GMAKE=3D yes @@ -80,10 +78,33 @@ CONFIGURE_ARGS+=3D --without-xslt .endif =20 +# TODO: when does FreeBSD/i386 work properly under FreeBSD/amd64? .if ${OSVERSION} < 603000 IGNORE=3D fails to properly work on versions of FreeBSD before 6.3 .endif =20 +.ifdef WINE_CROSS_BUILD + +CONFIGURE_ENV+=3D MACHINE=3Di386 UNAME_m=3Di386 UNAME_p=3Di386 +CONFLICTS=3D wine-[0-9]* +ONLY_FOR_ARCHS=3D i386 amd64 +USE_LDCONFIG32=3D ${PREFIX}/lib32 ${PREFIX}/lib32/wine +WINELIBDIR=3D${PREFIX}/lib32 + +PLIST_REINPLACE+=3D winelib +PLIST_REINPLACE_WINELIB=3Ds!lib/!lib32/!g + +ACTUAL-PACKAGE-DEPENDS=3D${DO_NADA} + +.else + +CONFLICTS=3D wine-fbsd64.* +ONLY_FOR_ARCHS=3D i386 +USE_LDCONFIG=3D ${PREFIX}/lib ${PREFIX}/lib/wine +WINELIBDIR=3D${PREFIX}/lib + +.endif + post-patch: .if ${OSVERSION} < 700041 ${REINPLACE_CMD} 's/-lpthread/-lthr/g' ${WRKSRC}/configure @@ -99,8 +120,8 @@ ${MAN1PREFIX}/man/fr.UTF-8/man1/wineserver.1 @-${RMDIR} -p ${MAN1PREFIX}/man/de.UTF-8/man1 \ ${MAN1PREFIX}/man/fr.UTF-8/man1 =2D ${MV} -f ${PREFIX}/lib/libwine.so.1.0 ${PREFIX}/lib/libwine.so.1 =2D ${LN} -sf libwine.so.1 ${PREFIX}/lib/libwine.so + ${MV} -f ${WINELIBDIR}/libwine.so.1.0 ${WINELIBDIR}/libwine.so.1 + ${LN} -sf libwine.so.1 ${WINELIBDIR}/libwine.so .if !defined(NOPORTDOCS) -@${MKDIR} ${DOCSDIR} .for i in README ANNOUNCE AUTHORS LICENSE @@ -109,6 +130,23 @@ @${INSTALL_DATA} ${WRKSRC}/programs/winedbg/README ${DOCSDIR}/README.wine= dbg @${INSTALL_DATA} ${WRKSRC}/tools/winedump/README ${DOCSDIR}/README.winedu= mp .endif +.ifdef WINE_CROSS_BUILD + grep -v '[@%]' ${TMPPLIST} | sed "s!^!${PREFIX}/!g" | \ + xargs -n1 file -F' ' | grep ELF | cut -f1 -d' ' | \ + env LD_LIBRARY_PATH=3D${PREFIX}/lib32:${LD_LIBRARY_PATH} xargs ldd -f '%p= \n' \ + | sort -u | grep -v '^\(/usr\)\?/lib' | grep -v "^${PREFIX}/lib32/libwine= =2Eso" \ + | grep -v "^${PREFIX}/lib32/wine" > ${WRKDIR}/winelibs.list + for i in `cat ${WRKDIR}/winelibs.list` ; do \ + ${INSTALL_DATA} $${i} ${PREFIX}/lib32/ ; \ + echo lib32/`basename $${i}` >> ${TMPPLIST} ; \ + done + ${INSTALL_SCRIPT} ${FILESDIR}/binbounce ${PREFIX}/bin/wine + for i in `grep ^bin ${TMPPLIST} | xargs -n1 basename` ; do \ + [ "$${i}" =3D "wine" ] || ${LN} -sf wine ${PREFIX}/bin/$${i} ; \ + echo bin32/$${i} >> ${TMPPLIST} ; \ + done + echo '@unexec rmdir %D/bin32 2>/dev/null || true' >> ${TMPPLIST} +.endif @${MKDIR} ${DESKTOPDIR} @${MV} ${DATADIR}/applications/wine.desktop ${DESKTOPDIR}/ @${ECHO} diff -uNr /usr/ports/emulators/wine/files/binbounce wine/files/binbounce =2D-- /usr/ports/emulators/wine/files/binbounce 1970-01-01 02:00:00.0000000= 00 +0200 +++ wine/files/binbounce 2009-12-01 13:54:52.000000000 +0200 @@ -0,0 +1,15 @@ +#!/bin/sh + +LOCALBASE=3D`dirname $0`/.. +BINNAME=3D`basename $0` + +while [ $# -gt 0 ] +do + ARGS=3D"$ARGS \"$1\"" + shift +done + + +export LD_32_LIBRARY_PATH=3D$LOCALBASE/lib32:$LOCALBASE/lib32/wine +export PATH=3D$LOCALBASE/bin32:$PATH +eval exec $LOCALBASE/bin32/$BINNAME $ARGS diff -uNr /usr/ports/emulators/wine-fbsd64/ChangeLog wine-fbsd64/ChangeLog =2D-- /usr/ports/emulators/wine-fbsd64/ChangeLog 1970-01-01 02:00:00.000000= 000 +0200 +++ wine-fbsd64/ChangeLog 2009-12-18 23:16:58.000000000 +0200 @@ -0,0 +1,9 @@ +2009/12/18: + * Rename to something with a little more sense (wine-amd64-[V] -> wine-fb= sd64.[V]) + * Fix conflicts (wine conflicts with wine-fbsd64) + +2009/12/17: + * Automatically determine libraries and binaries + +2009/12/08: + * Initial implementation of WINE/i386 on FreeBSD/amd64=20 diff -uNr /usr/ports/emulators/wine-fbsd64/Makefile wine-fbsd64/Makefile =2D-- /usr/ports/emulators/wine-fbsd64/Makefile 1970-01-01 02:00:00.0000000= 00 +0200 +++ wine-fbsd64/Makefile 2009-12-18 19:44:47.000000000 +0200 @@ -0,0 +1,12 @@ +PORTNAME=3D wine +PKGNAMESUFFIX=3D -fbsd64.${OSVERSION:C/([0-9]).*/\1/} + +WINE_CROSS_BUILD=3Dyes + +MASTERDIR=3D ${.CURDIR}/../wine + +#.if ${ARCH} =3D=3D "amd64" +# TODO: install from package (how?) +#.endif + +.include "${MASTERDIR}/Makefile" --Boundary-01=_zO/KLlUWJAJE4EX-- --nextPart2464685.JAfRq4vdjr Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.13 (FreeBSD) iEYEABECAAYFAksr87YACgkQUaaFgP9pFrIQyQCeIr3HKtcmHen/17wb/DjIkL4E 1X0AnR7P/Uv3PLJwzluDpJ8LONSbt5tV =3OBJ -----END PGP SIGNATURE----- --nextPart2464685.JAfRq4vdjr--