From owner-freebsd-emulation@FreeBSD.ORG Tue Dec 8 13:23:57 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 C4E621065670 for ; Tue, 8 Dec 2009 13:23:57 +0000 (UTC) (envelope-from naylor.b.david@gmail.com) Received: from mail-ew0-f211.google.com (mail-ew0-f211.google.com [209.85.219.211]) by mx1.freebsd.org (Postfix) with ESMTP id 48D558FC15 for ; Tue, 8 Dec 2009 13:23:56 +0000 (UTC) Received: by ewy3 with SMTP id 3so753780ewy.13 for ; Tue, 08 Dec 2009 05:23:56 -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:mime-version:content-type:content-transfer-encoding :message-id; bh=tkbFcrnQ456SpY32EdYN6VtaI2VqhKkgFpvY0vBxbbc=; b=HA8EtZaHd/AArTRyUC/yyByqnRGh/UDP6dxw2wvpgKhiHJ5PML6pufxF7jLzcQXSd3 145uC6iQ82/xEnwb8BS3eWCkqvl/wtCaToU04TkGZ9IadLaWqeAzGp2VW3Xh+nXS77jM eaEH4vjDHr5wO03d44Qb9sobUQztwH3u5p/DA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:organization:to:subject:date:user-agent:mime-version :content-type:content-transfer-encoding:message-id; b=mq66HMYmfG/vncwY1cQYcnkc9iEcFQQNmZduqwjylPgLjiGU4dk4lyp+8/jyGV5BDH Z7TSk1I4iD4gipcCM9W9wS332Thv37P1OPMg5HHFcF0Qcu5JADfhSEt7nytmv/tGF4Yw QLgKxnxflIyyrWFyBFAsa3rtoJoyiDN6A5h88= Received: by 10.216.90.79 with SMTP id d57mr2103073wef.117.1260278633508; Tue, 08 Dec 2009 05:23:53 -0800 (PST) Received: from dragon.dg ([41.0.54.28]) by mx.google.com with ESMTPS id 28sm4339915eye.3.2009.12.08.05.23.51 (version=SSLv3 cipher=RC4-MD5); Tue, 08 Dec 2009 05:23:52 -0800 (PST) From: David Naylor Organization: Private To: freebsd-emulation@freebsd.org Date: Tue, 8 Dec 2009 15:24:00 +0200 User-Agent: KMail/1.12.3 (FreeBSD/8.0-PRERELEASE; KDE/4.3.3; amd64; ; ) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1691217.xVsqCBnkXp"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200912081524.03878.naylor.b.david@gmail.com> Subject: [WIP] wine/i386 on FreeBSD/amd64 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: Tue, 08 Dec 2009 13:23:57 -0000 --nextPart1691217.xVsqCBnkXp Content-Type: multipart/mixed; boundary="Boundary-01=_wNlHLkqgePszJUV" Content-Transfer-Encoding: 7bit --Boundary-01=_wNlHLkqgePszJUV Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi, I have developed a port that allows wine to be installed as a package under= =20 =46reeBSD/amd64. This avoids having a i386 chroot environment (and is much= =20 easier to setup, once the package is built). =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 host: (On FreeBSD/i386) # cd /usr/ports/emulators # patch < /tmp/wine-amd64.diff # cd wine-amd64 # make package clean (On FreeBSD/amd64) # 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. =20 There are a few TODO items (port options not supported). Any=20 comments/suggestions are welcome. =20 Word of warning: nvidia-driver breaks everything. Make sure it is not=20 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=20 is the same version of the driver) and copy libGL.so.1, libGLcore.so.1 and= =20 libnvidia-tls.so.1 from i386 to $PREFIX/lib32 (on amd64). =20 Regards, David=20 P.S. This should be a no-op for emulators/wine --Boundary-01=_wNlHLkqgePszJUV Content-Type: text/x-patch; charset="ISO-8859-1"; name="wine-amd64.diff" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="wine-amd64.diff" diff -urN /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-08 11:40:12.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 @@ -50,6 +48,18 @@ LDAP "Use LDAP" Off \ LIBXSLT "Use libxslt (only used by msxml3.dll)" Off =20 +WINELIBS=3D libGL.so.1 libICE.so.6 libSM.so.6 libX11-xcb.so.1 libX11.so.6 \ + libXau.so.6 libXdamage.so.1 libXdmcp.so.6 libXext.so.6 \ + libXfixes.so.3 libXrender.so.1 libXxf86vm.so.1 libdrm.so.2 \ + libfreetype.so.9 libiconv.so.3 libpthread-stubs.so.0 \ + libxcb-glx.so.0 libxcb.so.2 libxml2.so.5 + +# wine not on this list as it acts as the master script +WINEBINS=3D function_grep.pl msiexec notepad regedit regsvr32 widl \ + wineboot winebuild winecfg wineconsole winecpp winedbg \ + winedump winefile wineg++ winegcc winemaker winemine winepath \ + wineprefixcreate wineserver wmc wrc + .include =20 .ifdef WITHOUT_CUPS @@ -57,11 +67,15 @@ .else CONFIGURE_ARGS+=3D --with-cups LIB_DEPENDS+=3D cups.2:${PORTSDIR}/print/cups-base +# TODO +#WINELIBS+=3D .endif =20 .ifdef WITH_HAL CONFIGURE_ARGS+=3D --with-hal LIB_DEPENDS+=3D hal.1:${PORTSDIR}/sysutils/hal +# TODO +#WINELIBS+=3D .else CONFIGURE_ARGS+=3D --without-hal .endif @@ -69,6 +83,8 @@ .ifdef WITH_LDAP CONFIGURE_ARGS+=3D --with-ldap USE_OPENLDAP=3D yes +# TODO +#WINELIBS+=3D .else CONFIGURE_ARGS+=3D --without-ldap .endif @@ -76,14 +92,47 @@ .ifdef WITH_LIBXSLT CONFIGURE_ARGS+=3D --with-xslt LIB_DEPENDS+=3D xslt.2:${PORTSDIR}/textproc/libxslt +# TODO +#WINELIBS+=3D .else 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_ARGS+=3D --bindir=3D${PREFIX}/bin32 --libdir=3D${PREFIX}/lib32 +CONFLICTS=3D wine-[0-9]* +ONLY_FOR_ARCHS=3D i386 amd64 +USE_LDCONFIG32=3D ${PREFIX}/lib32 ${PREFIX}/lib32/wine +WINELIBDIR=3D${PREFIX}/lib32 + +.for i in ${WINEBINS} +PLIST_FILES+=3D bin32/${i} +.endfor +.for i in ${WINELIBS} +PLIST_FILES+=3D lib32/${i} +.endfor +PLIST_FILES+=3D bin32/wine +#PLIST_FILES+=3D @dirrmtry bin32 + +PLIST_REINPLACE+=3D winelib +PLIST_REINPLACE_WINELIB=3Ds!lib/!lib32/!g + +ACTUAL-PACKAGE-DEPENDS=3D${DO_NADA} + +.else + +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 +148,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 +158,15 @@ @${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 +.for i in ${WINELIBS} + ${INSTALL_DATA} ${LOCALBASE}/lib/${i} ${PREFIX}/lib32/ +.endfor + ${INSTALL_SCRIPT} ${FILESDIR}/binbounce ${PREFIX}/bin/wine +.for i in ${WINEBINS} + ${LN} -sf wine ${PREFIX}/bin/${i} +.endfor +.endif @${MKDIR} ${DESKTOPDIR} @${MV} ${DATADIR}/applications/wine.desktop ${DESKTOPDIR}/ @${ECHO} diff -urN /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 -urN /usr/ports/emulators/wine-amd64/Makefile wine-amd64/Makefile =2D-- /usr/ports/emulators/wine-amd64/Makefile 1970-01-01 02:00:00.00000000= 0 +0200 +++ wine-amd64/Makefile 2009-12-08 11:39:39.000000000 +0200 @@ -0,0 +1,13 @@ +PORTNAME=3D wine +PKGNAMESUFFIX=3D -amd64-${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=_wNlHLkqgePszJUV-- --nextPart1691217.xVsqCBnkXp 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) iEYEABECAAYFAkseU3MACgkQUaaFgP9pFrKcXgCfUkaLcysZgJDf/g06t93Ycxpk FYQAnikqLST7L64YqOzEmBCPDWxpyfB1 =pXro -----END PGP SIGNATURE----- --nextPart1691217.xVsqCBnkXp--