Bug 197798 - [PATCH] emulators/wine-devel: Add Wine64 support
Summary: [PATCH] emulators/wine-devel: Add Wine64 support
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Some People
Assignee: David Naylor
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-18 18:54 UTC by David Naylor
Modified: 2015-03-30 19:56 UTC (History)
1 user (show)

See Also:


Attachments
WIne64 support (30.83 KB, patch)
2015-02-18 18:54 UTC, David Naylor
no flags Details | Diff
patch-wine-devel 1.7.37 (30.49 KB, patch)
2015-03-02 20:37 UTC, David Naylor
no flags Details | Diff
Build log of patch 1.7.37 on FreeBSD/amd64 (108.52 KB, application/x-xz)
2015-03-02 20:39 UTC, David Naylor
no flags Details
Build log of patch 1.7.37 on FreeBSD/i386 (111.39 KB, application/x-xz)
2015-03-02 20:39 UTC, David Naylor
no flags Details
patch-wine-devel 1.7.37 v1.0.2 (32.56 KB, patch)
2015-03-05 18:18 UTC, David Naylor
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Naylor freebsd_committer freebsd_triage 2015-02-18 18:54:46 UTC
Created attachment 153157 [details]
WIne64 support

The attached patch adds Wine64 support to emulators/wine-devel.  All patches have been submitted upstream and are awaiting approval/commmit.
Comment 1 Bugzilla Automation freebsd_committer freebsd_triage 2015-02-18 18:54:46 UTC
Auto-assigned to maintainer gerald@FreeBSD.org
Comment 2 Gerald Pfeifer freebsd_committer freebsd_triage 2015-02-21 16:11:55 UTC
I am very pleased to see how small the patch to Makefile is, and
also essentially isolated to one part of the Makefile.  And that
there are only two specific patches left.  Nice job!

Some specific comments:

- Why do you need to set --libdir?  Can you please add a comment on
  that in the Makefile?

- Why the change for .include <bsd.port.pre.mk>?

- Why ${REINPLACE_CMD} 's|/wine|/wine64|g' ${WRKSRC}/tools/wineapploader.in?
  Is this a bug in Wine that you have reported already?

- Why bin/wine versus bin/wine64?  As a user, wouldn't it be better to
  just have bin/wine, also in the 64-bit case?

  As a small side effect, we would not need %%WINE64%% any longer.
 	
- Those patches to pkg-plist that remove %%COMPHOLIO%% look like mistakes?
  (You did spot two cases where entries were not sorted properly, and I
  will fix those in a minute.)

- %%WINE32%%%%WINE32%% feels a bit overeager in pkg-plist? ;-)

Let me update the port to 1.7.37 and then let's put an updated version
of your patchset in before the next release.
Comment 3 commit-hook freebsd_committer freebsd_triage 2015-02-21 16:15:41 UTC
A commit references this bug:

Author: gerald
Date: Sat Feb 21 16:15:36 UTC 2015
New revision: 379533
URL: https://svnweb.freebsd.org/changeset/ports/379533

Log:
  Properly sort two COMPHOLIO-specific items in pkg-plist.

  PR:		197798

Changes:
  head/emulators/wine-devel/pkg-plist
Comment 4 David Naylor freebsd_committer freebsd_triage 2015-03-02 20:37:09 UTC
Created attachment 153692 [details]
patch-wine-devel 1.7.37

Thanks, but most of the patching has been done by others - and my patches haven't been accepted by upstream yet (they have been sitting there for weeks).  

To answer your questions:
 1) Wine defaults to a libdir of "lib64" on x86_64 whereas FreeBSD uses normal "lib" (and "lib32" for the other stuff ;-)).  Added comment to patch.  

 2) To pull in the definition of ${ARCH}

 3) This is a complicated situation.  The short answer is that Wine assumes WoW64 is installed with Wine64 however we are taking an incremental step and need this fix here.  

 4) Wine64 defaults to "bin/wine64" - so I followed it here.  Wine does require both wine (from WoW64) and wine64 in an installation to be fully functioning.  The "wine64" binary runs 64-bit apps whereas "wine" runs 32-bit apps.  This point, however, I will need to confirm.  

 5) I compared the existing pkg-plist with the `make makeplist` output and found that many %%COMPHOLIO%% files were now included in Wine.  I did compile test this on FreeBSD/i386 however it was a manual integration thus prone to human error.  

 6) I prefer to be thorough (just in case).  Maybe we should make all a triple?  Lol ;-D.  I've fixed in the attached patch.  

To fully explain (3) and (4):
Wine consists of the following components:
 - wine (aka emulators/wine) is the 32-bit component and runs 32-bit programs (on FreeBSD/i386).  
 - wine64 (what this patch achieves) is the 64-bit component and runs 64-bit programs (on FreeBSD/amd64)
 - wow64 (a subset of wine, (and of) emulators/i386-wine) is the part of the 64-bit component and runs 32-bit programs (on FreeBSD/amd64).

Due to limits of Ports we cannot build wow64 - but instead need to package the build from a FreeBSD/i386 chroot/system.  This is currently what emulators/i386-wine does (although wow64 is a subset).  

wow64 is basically "bin/wine" and "lib32" from emulators/i386-wine (although I am skipping some detail).  My understanding is that wine64 will call wine when it encounters 32-bit programs and that wineapploader.in defaults to wine for maximum compatibility (since wine will work with both 32-bit and 64-bit WINEPREFIXes).  However, this paragraph is based on what I have read and intepreted and I need to confirm these details.  

The patch has been updated to 1.7.37.
Comment 5 David Naylor freebsd_committer freebsd_triage 2015-03-02 20:39:07 UTC
Created attachment 153693 [details]
Build log of patch 1.7.37 on FreeBSD/amd64
Comment 6 David Naylor freebsd_committer freebsd_triage 2015-03-02 20:39:29 UTC
Created attachment 153694 [details]
Build log of patch 1.7.37 on FreeBSD/i386
Comment 7 David Naylor freebsd_committer freebsd_triage 2015-03-05 18:18:15 UTC
Created attachment 153850 [details]
patch-wine-devel 1.7.37 v1.0.2

I have run the latest patch (v1.0.2) through `poudriere testport` for i386/amd64 and devel/compholio options.  All four pass without issue (except for many STRIP warnings, but we live with that).
Comment 8 Gerald Pfeifer freebsd_committer freebsd_triage 2015-03-15 21:23:06 UTC
Thanks for your thorough response and updates, David!

Can you somewhere describe the gist of the last three paragraphs
of comment #4?  (I was also going to ask for a comment in Makefile
above/at the beginning of the new code, so perhaps that can be
combined somehow?)

And I am really, really leery of the pkg-plist changes.  My builds
(on i385, without COMPHOLIO) succeed and there are no leftovers nor
missing files at all.  So, where you _add_ 
  +%%COMPHOLIO%%
I buy that.  Where you _remove_ it or add new files altogether, I
remain very sceptical.

Apart from that, Approved by: gerald.

Thank you!
Comment 9 commit-hook freebsd_committer freebsd_triage 2015-03-30 19:48:14 UTC
A commit references this bug:

Author: dbn
Date: Mon Mar 30 19:47:31 UTC 2015
New revision: 382718
URL: https://svnweb.freebsd.org/changeset/ports/382718

Log:
  emulators/wine-devel: add wine64 support.

  Changes:
   * Enable building on amd64 (including execution support)
   * Add support for clang on amd64
   * No support for wow64 at this time
   * Update pkg-plist for 32-/64-bit split
   * Update pkg-plist for missing files reported by poudriere

  PR:		197798
  Approved by:	gerald@

Changes:
  head/emulators/wine-devel/Makefile
  head/emulators/wine-devel/files/patch-configure
  head/emulators/wine-devel/files/patch-dlls_kernel32_Makefile.in
  head/emulators/wine-devel/pkg-plist
Comment 10 David Naylor freebsd_committer freebsd_triage 2015-03-30 19:56:41 UTC
I committed patch v1.0.2 with comments explaining all the different components of wine.  

I also included all the changes to pkg-plist.  I checked the source code (aka Makefile.in) and those files are unconditionally there.  If there are any pkg-fallout emails please forward them to me and I'll address them (since it will be my fault - and thus my responsibility).  

Next steps are:
 - keep pushing patches upstream (2 accepted so far, 2 needs rework, 1 not submitted)
 - add patches to port (test and prepare)
 - introduce wow64 port (I suggest "MOVED" i386-wine to wine and "renaming" i386-wine to wow64).  

This will simplify things for the end user: they only need to install one port - the same port for both i386 and amd64 - and will get the full benefit.