From owner-freebsd-ports-bugs@FreeBSD.ORG Mon Jan 31 10:50:11 2011 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4D9B6106564A for ; Mon, 31 Jan 2011 10:50:11 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 330788FC16 for ; Mon, 31 Jan 2011 10:50:11 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p0VAoBqF068867 for ; Mon, 31 Jan 2011 10:50:11 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p0VAoAN3068866; Mon, 31 Jan 2011 10:50:10 GMT (envelope-from gnats) Date: Mon, 31 Jan 2011 10:50:10 GMT Message-Id: <201101311050.p0VAoAN3068866@freefall.freebsd.org> To: freebsd-ports-bugs@FreeBSD.org From: David Naylor Cc: Subject: Re: ports/151747: request to enable emulators/wine on amd64 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: David Naylor List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Jan 2011 10:50:11 -0000 The following reply was made to PR ports/151747; it has been noted by GNATS. From: David Naylor To: Gerald Pfeifer Cc: bug-followup@freebsd.org, kenorb@gmail.com Subject: Re: ports/151747: request to enable emulators/wine on amd64 Date: Mon, 31 Jan 2011 12:40:24 +0200 --nextPart1336102.nATJze5qC4 Content-Type: multipart/mixed; boundary="Boundary-01=_YGpRN/eidpdH4KM" Content-Transfer-Encoding: 7bit --Boundary-01=_YGpRN/eidpdH4KM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Monday 31 January 2011 04:12:00 Gerald Pfeifer wrote: > -CONFIGURE_ARGS=3D --datadir=3D${DATADIR} --verbose --disable-tests \ > +CONFIGURE_ARGS+=3D --datadir=3D${DATADIR} --verbose --disable-tests \ >=20 > I will include this as part of my next update for the wine port. >=20 > +CONFLICTS?=3D wine-fbsd64.* > +.if !defined(USE_LDCONFIG32) > USE_LDCONFIG=3D ${PREFIX}/lib ${PREFIX}/lib/wine > +.endif > +WINELIBDIR?=3D ${PREFIX}/lib >=20 > Shouldn't WINELIBDIR be defined first and then used for USE_LDCONFIG? > I will include this as part of my next update for the wine port, and > also the other changes around WINELIBDIR. Agreed. > -post-install: > +# This target allows hooks for wine-fbsd64 > +.if !target(post-install-wine) > +post-install-wine: > +.endif >=20 > Does this have to be in emulators/wine, or is there a way to handle > this from a slave port? That definitely would be my preference. The slave port needs some way to hook into the install process. It require= s=20 wine to be installed (so in the post sequence). I've looked through the po= st- install targets and think post-install-script is perhaps the most appropria= te=20 however it does happen ofter @${CAT} ${PKGMESSAGE} in port-install which I= =20 compensated for. =20 > --- /usr/ports/emulators/wine/files/binbounce 1970-01-01=20 02:00:00.000000000 > +0200 +++ wine/files/binbounce 2011-01-01 12:32:55.000000000 +0200 >=20 > Ugh, does _this_ need to become part of emulators/wine? No, it does not. See attached for the patch that fixes this, WINELIBDIR an= d=20 the port-install target. I have compile tested the patch and the resulting= =20 package appears identical to the previous patch. =20 > --- /usr/ports/emulators/wine-fbsd64/Makefile 1970-01-01=20 02:00:00.000000000 > +0200 +++ wine-fbsd64/Makefile 2011-01-07 23:14:50.000000000 +0200 > +USE_LDCONFIG32=3D ${PREFIX}/lib32 ${PREFIX}/lib32/wine > +WINELIBDIR=3D ${PREFIX}/lib32 >=20 > Shouldn't USE_LDCONFIG32 use WINELIBDIR instead of repeating the > stuff? Agreed. > post-install-wine: is really brutal; I'd hope FreeBSD will gain > proper combined 32-/64-bit support at one point. Agreed but I do not think there is sufficient demand to warrant the effort.= I=20 suspect an approach similar to this one will suffice for the few ports that= =20 are required to run under amd64. =20 > Gerald David --Boundary-01=_YGpRN/eidpdH4KM 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 -urN /usr/ports/emulators/wine/Makefile wine/Makefile =2D-- /usr/ports/emulators/wine/Makefile 2011-01-23 03:20:50.000000000 +0200 +++ wine/Makefile 2011-01-31 11:31:31.000000000 +0200 @@ -29,7 +29,7 @@ LICENSE_FILE=3D ${WRKSRC}/LICENSE =20 GNU_CONFIGURE=3D yes =2DCONFIGURE_ARGS=3D --datadir=3D${DATADIR} --verbose --disable-tests \ +CONFIGURE_ARGS+=3D --datadir=3D${DATADIR} --verbose --disable-tests \ --with-glu --with-opengl --with-xrandr \ --without-capi --without-gphoto --without-gsm \ --without-v4l --without-mpg123 --without-sane \ @@ -37,7 +37,11 @@ CONFIGURE_ENV=3D CPPFLAGS=3D"-I${LOCALBASE}/include" \ LDFLAGS=3D"-L${LOCALBASE}/lib" \ FLEX=3D"${LOCALBASE}/bin/flex" =2DUSE_LDCONFIG=3D ${PREFIX}/lib ${PREFIX}/lib/wine +CONFLICTS?=3D wine-fbsd64.* +WINELIBDIR?=3D ${PREFIX}/lib +.if !defined(WINE_SLAVE_BUILD) +USE_LDCONFIG=3D ${WINELIBDIR} ${WINELIBDIR}/wine +.endif MAKE_JOBS_SAFE=3D yes MAN1=3D msiexec.1 notepad.1 regedit.1 regsvr32.1 widl.1 wine.1 \ wineboot.1 winebuild.1 winecfg.1 wineconsole.1 winedbg.1 \ @@ -133,8 +137,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 @@ -146,7 +150,9 @@ @${MKDIR} ${DESKTOPDIR} ${MV} ${DATADIR}/applications/wine.desktop ${DESKTOPDIR}/ @${RMDIR} ${DATADIR}/applications +.if !defined(WINE_SLAVE_BUILD) @${ECHO} @${CAT} ${PKGMESSAGE} +.endif =20 .include diff -urN /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 2011-01-31 11:27:18.000000000 +0200 @@ -0,0 +1,43 @@ +2011/01/31: + * Remove requirement for post-install-wine hook (post-install-script used) + * Propergate use of WINELIBDIR to USE_LDCONFIG32 and CONFIGURE_ARGS + * Move binbounce script to wine-fsd64 port + +2011/01/07: + * Automatically detect soft dependencies + +2011/01/05: + * Update patch to make it minimally invasive for wine/Makefile + +2011/01/01: + * Update wine to 1.3.10 + +2010/10/17: + * Update wine to 1.3.5 + * Add support for openal (soft dependency) + +2010/01/18: + * Update wine to 1.1.36 + * Follow relative symbolic links to script + * Use readlink (vs `ls -l | sed ...`) + +2009/12/20: + * Correctly set bin/lib directories + * Support running on i386 + * Follow symbolic links to script + * Allow spaces in path + * Hard link the bin/* files (otherwise symbolic link following breaks) + +2009/12/19: + * Include freetype (it is a soft dependency) + * Include libXrender (it is a soft dependency) + +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 -urN /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 2011-01-31 12:32:10.000000000 +0200 @@ -0,0 +1,57 @@ +# New ports collection Makefile for: wine-fbsd64 +# Date created: 2011/01/05 +# Whom: David Naylor +# +# $FreeBSD$ + +PKGNAMESUFFIX=3D -fbsd64 + +# TODO: mention patch-wine-nvidia.sh +# TODO: fix wine/fakedlls/openal32.dll + +# Use the wine port to do most of the heavy lifting +MASTERDIR=3D ${.CURDIR}/../wine + +ACTUAL-PACKAGE-DEPENDS=3D ${DO_NADA} +WINELIBDIR=3D ${PREFIX}/lib32 +CONFIGURE_ARGS+=3D --bindir=3D${PREFIX}/bin32 --libdir=3D${WINELIBDIR} +CONFLICTS=3D wine-[0-9]* +PLIST_REINPLACE+=3D winelib +PLIST_REINPLACE_WINELIB=3D s!lib/!lib32/!g +WINE_SLAVE_BUILD=3D yes +USE_LDCONFIG32=3D ${WINELIBDIR} ${WINELIBDIR}/wine + +# Hook into post-install and do some adapting to make i386 binaries work n= icely +# under FreeBSD/amd64 (include add dependant i386 libs) +post-install-script: + # Find all libraries that are linked too (via ldd(1)) + 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 + for i in `cat ${WRKDIR}/winelibs` ; do \ + ${INSTALL_DATA} $${i} ${PREFIX}/lib32/ ; \ + echo lib32/`basename $${i}` >> ${TMPPLIST} ; \ + done + # Find all soft dependancies (via strings(1)) + grep -v '[@%]' ${TMPPLIST} | sed "s!^!${PREFIX}/!g" | \ + xargs -n1 file -F' ' | grep ELF | cut -f1 -d' ' | xargs strings | \ + grep '^lib.*\.so' | sort -u > ${WRKDIR}/winesoftlibs + for i in `cat ${WRKDIR}/winesoftlibs` ; do \ + if [ -e ${LOCALBASE}/lib/$${i} ] && [ -z "`grep $${i} ${TMPPLIST}`" ] ; = then \ + ${INSTALL_DATA} ${LOCALBASE}/lib/$${i} ${PREFIX}/lib32/ ; \ + echo lib32/$${i} >> ${TMPPLIST} ; \ + fi ; \ + done + # Install bounce script to access the 32bit executables + ${INSTALL_SCRIPT} ${.CURDIR}/files/binbounce ${PREFIX}/bin/wine + for i in `grep ^bin ${TMPPLIST} | xargs -n1 basename` ; do \ + [ "$${i}" =3D "wine" ] || ${LN} -f ${PREFIX}/bin/wine ${PREFIX}/bin/$${i= } ; \ + echo bin32/$${i} >> ${TMPPLIST} ; \ + done + echo '@unexec rmdir %D/bin32 2>/dev/null || true' >> ${TMPPLIST} + @${ECHO} + @${CAT} ${PKGMESSAGE} + +.include "${MASTERDIR}/Makefile" diff -urN /usr/ports/emulators/wine-fbsd64/files/binbounce wine-fbsd64/file= s/binbounce =2D-- /usr/ports/emulators/wine-fbsd64/files/binbounce 1970-01-01 02:00:00.= 000000000 +0200 +++ wine-fbsd64/files/binbounce 2011-01-31 11:08:39.000000000 +0200 @@ -0,0 +1,32 @@ +#!/bin/sh + +TARGET=3D"$0" +_count=3D0 +while [ -L "$TARGET" ] +do + _old=3D"$TARGET" + TARGET=3D"`readlink "$TARGET"`" + if [ ! -e "$TARGET" ] + then + TARGET=3D"`dirname "$_old"`/$TARGET" + fi + _count=3D$(($_count + 1)) + if [ $_count -gt 100 ] + then + echo "$0: to many symbolic links" > /dev/stderr + exit 1 + fi +done + +LOCALBASE=3D`dirname "$TARGET"`/.. +BINNAME=3D`basename "$TARGET"` + +if [ `uname -p` =3D i386 ] +then + export LD_LIBRARY_PATH=3D"$LOCALBASE/lib32":"$LOCALBASE/lib32/wine":"$LD= _LIBRARY_PATH" +else + export LD_32_LIBRARY_PATH=3D"$LOCALBASE/lib32":"$LOCALBASE/lib32/wine":"= $LD_32_LIBRARY_PATH" +fi +export PATH=3D"$LOCALBASE/bin32":"$PATH" + +exec "$LOCALBASE/bin32/$BINNAME" "$@" --Boundary-01=_YGpRN/eidpdH4KM-- --nextPart1336102.nATJze5qC4 Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (FreeBSD) iEYEABECAAYFAk1GkZwACgkQUaaFgP9pFrJGBgCffypejf2G5RAfvyAqkZCIdyxr k0UAn0sG571cdnnDeqg4IaoKAtno8T5T =k+Bo -----END PGP SIGNATURE----- --nextPart1336102.nATJze5qC4--