Bug 250264 - [NEW PORT] emulators/wine-proton: Wine + Proton (aka Linux Steam integration) patches
Summary: [NEW PORT] emulators/wine-proton: Wine + Proton (aka Linux Steam integration)...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks: 250591
  Show dependency treegraph
 
Reported: 2020-10-11 03:28 UTC by Alex S
Modified: 2020-11-30 16:24 UTC (History)
7 users (show)

See Also:


Attachments
wine-proton.patch (116.83 KB, patch)
2020-10-11 03:28 UTC, Alex S
no flags Details | Diff
wine-proton.patch (v2) (116.78 KB, patch)
2020-10-11 14:54 UTC, Alex S
no flags Details | Diff
wine-proton.patch v3 (update to 5.13) (124.32 KB, patch)
2020-10-16 01:11 UTC, Alex S
no flags Details | Diff
wine-proton.patch v4 (update to 5.13) (124.29 KB, patch)
2020-10-16 01:37 UTC, Alex S
no flags Details | Diff
wine-proton.patch v5 (124.94 KB, patch)
2020-10-20 06:54 UTC, Alex S
no flags Details | Diff
wine-proton.patch v6 (124.94 KB, patch)
2020-10-25 06:19 UTC, Alex S
no flags Details | Diff
wine-proton.patch v7 (121.04 KB, patch)
2020-11-09 17:15 UTC, Alex S
no flags Details | Diff
wine-proton.patch v8 (update to 5.13-2) (121.96 KB, patch)
2020-11-14 11:29 UTC, Alex S
no flags Details | Diff
wine-proton.patch v9 (without patch-dlls_kernel32_Makefile.in) (120.71 KB, patch)
2020-11-15 13:15 UTC, Alex S
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alex S 2020-10-11 03:28:32 UTC
Created attachment 218656 [details]
wine-proton.patch

Some notes here:
1. The Linux Steam client is not capable of running Windows games with vanilla Wine, it specifically requires this patchset, hence the port.
2. This is _not_ a complete Proton distribution. Proton has other components as well, which are also necessary for Steam. This will be addressed separately.
3. The port itself is derived from wine-devel, however I did not manage to make it a slave port. Notably, the installation location is adjusted to /usr/local/wine-proton to allow coexistence with wine/wine-devel. This in turn necessitates removing USE_LDCONFIG, and man pages, and so on.
5. I've also "flattened" all the options. The port has pretty much a single use case, so it doesn't need that flexibility.
6. The sanity check script used to verify the conversion (compare-with-wine-devel.rb) is included for completeness.
Comment 1 Alex S 2020-10-11 14:54:11 UTC
Created attachment 218666 [details]
wine-proton.patch (v2)
Comment 2 Alex S 2020-10-16 01:11:12 UTC
Created attachment 218778 [details]
wine-proton.patch v3 (update to 5.13)
Comment 3 Alex S 2020-10-16 01:37:10 UTC
Created attachment 218779 [details]
wine-proton.patch v4 (update to 5.13)

Forgot to add --without-usb.
Comment 4 Alex S 2020-10-20 06:54:17 UTC
Created attachment 218911 [details]
wine-proton.patch v5

+ GStreamer
Comment 5 Alex S 2020-10-25 06:19:59 UTC
Created attachment 219051 [details]
wine-proton.patch v6

Let's limit the GStreamer dependency to "good" plugins. "Core" apparently means all of them.
Comment 6 Gleb Popov freebsd_committer freebsd_triage 2020-11-09 17:07:40 UTC
Can you please remove compare-with-wine-devel.rb from the patch? As far as you're going to maintain this port, there is no reason to keep it in the tree.
Comment 7 Alex S 2020-11-09 17:15:49 UTC
Created attachment 219496 [details]
wine-proton.patch v7
Comment 8 Gerald Pfeifer freebsd_committer freebsd_triage 2020-11-09 18:33:17 UTC
(In reply to Gleb Popov from comment #6)
> Can you please remove compare-with-wine-devel.rb from the patch? As far
> as you're going to maintain this port, there is no reason to keep it in
> the tree.

I beg to disagree.  Keeping such scripts in the tree is extremely useful.
It helps reduce the bus factor (and to some extent serves as documentation).

Alex, that looks like solid work overall - thank you!

It's a pity this could not just be a child part of wine-devel, though I do
understand your rationale.  Note, there also are the i386-wine{,-devel}
ports which are unmaintained right now.  Perhaps that may be part of the
reason nobody has committed this new port yet?

(Personally I am "only" lacking time and the ability to test.)
Comment 9 Alexander Vereeken freebsd_triage 2020-11-09 18:38:36 UTC
Actually I wanted to send in updates, but wine seems currently not to be usable in the latest version?
Comment 10 Alex S 2020-11-09 19:25:24 UTC
(In reply to Alexander Vereeken from comment #9)

This a bit off topic, but anyway:

> Actually I wanted to send in updates,

1. i386-wine(-devel) itself does not require updates, it's a slave port, thus it's always in sync with the master port.

2. Rebuilding the packages for it is actually a waste of everyone's time. Instead you should download up-to-date i386 wine package with pkg and simply run that: https://gist.github.com/shkhln/3d0856683e1fc029d64cdaa6ba3e9393. i386-wine might have been convenient 7 years ago, but now there's no point to it whatsoever.

> but wine seems currently not to be usable in the latest version?

3. wine-devel packages are currently broken on 12.2 due to https://bugs.winehq.org/show_bug.cgi?id=49437#c12.
Comment 11 Alexander Vereeken freebsd_triage 2020-11-09 20:39:33 UTC
I also apologize for the off-topic.

(In reply to Alex S from comment #10)

No matter how stupid and uneducated that sounds but i like the currently i386-wine(-devel) ports and would like to take my time with each new version, to building binaries for each freebsd version for the port.
Comment 12 Alex S 2020-11-14 11:29:58 UTC
Created attachment 219677 [details]
wine-proton.patch v8 (update to 5.13-2)
Comment 13 Damjan Jovanovic 2020-11-15 09:58:51 UTC
This is excellent work Alex, thank you so much.

I have a few comments on some of the patches:

------------

emulators/wine-proton/files/patch-dlls_ntdll_unix_loader.c

You're probably already familiar with the discussion on https://bugs.winehq.org/show_bug.cgi?id=49437

------------

emulators/wine-proton/files/patch-dlls_kernel32_Makefile.in:

As we discovered a few days ago, this wasn't necessary since wine-1.9.7 in 2016:

commit e59395208d527d1bffb2725efc85fb798aee7610
Author: Alexandre Julliard <julliard at winehq.org>
Date:   Mon Mar 28 15:47:19 2016 +0900

    makefiles: Reduce the maximum page size for modules that have a base
address.

    It avoid bumping into the next allocated base address on 64-bit.

as per the feedback on https://www.winehq.org/pipermail/wine-devel/2020-November/176951.html

------------

emulators/wine-proton/files/patch-dlls_ntdll_unix_signal_x86_64.c:

This one and a few others seem useful for Wine on FreeBSD generally, are they getting submitted upstream?
Comment 14 Alex S 2020-11-15 10:17:43 UTC
(In reply to Damjan Jovanovic from comment #13)

> emulators/wine-proton/files/patch-dlls_ntdll_unix_signal_x86_64.c

It probably would be better to refactor common bits from signal_i386.c and signal_x86_64.c into signal_x86_common.c instead of simply copying them around.

> This one and a few others seem useful for Wine on FreeBSD generally, are they getting submitted upstream?

I'm treating this email address as semi-private and I'm not in a hurry to get another one. Feel free to borrow whatever changes you think make sense.
Comment 15 Alex S 2020-11-15 13:15:22 UTC
Created attachment 219700 [details]
wine-proton.patch v9 (without patch-dlls_kernel32_Makefile.in)
Comment 16 Gerald Pfeifer freebsd_committer freebsd_triage 2020-11-22 19:17:13 UTC
This is good work, Alex!

I hope you - or Damjan? - are going to upstream the general improvements
to Wine to benefit all ports (and anyone building directly from upstream)
as well as simplifying maintenance longer term (been there, done that).

Putting this into a distinct location so that it does not conflict with
the regular Wine ports is a good idea.

Making this a completely distinct port has benefits and drawbacks.

I personally simply do not have the bandwidth to help with another port
(rather I do need to reduce my time spent), so I won't be able to review
in detail, approve, or commit this port or updates once its in the tree.
If another committer steps up, that's totally cool, and I hope we can 
share general improvements between this and the regular wine ports (and
upstream).
Comment 17 Eric Turgeon freebsd_committer freebsd_triage 2020-11-29 19:11:59 UTC
I am not much knowledgeable with wine and proton but I can help committing the ports and changes.
Comment 18 commit-hook freebsd_committer freebsd_triage 2020-11-30 16:11:50 UTC
A commit references this bug:

Author: arrowd
Date: Mon Nov 30 16:10:49 UTC 2020
New revision: 556653
URL: https://svnweb.freebsd.org/changeset/ports/556653

Log:
  emulators/wine-proton: Add a new port.

  This is a special version of Wine developed by Valve.

  PR:		250264
  Submitted by:	Alex S <iwtcex@gmail.com>
  Reviewed by:	Damjan Jovanovic <damjan.jov@gmail.com>

Changes:
  head/emulators/Makefile
  head/emulators/wine-proton/
  head/emulators/wine-proton/Makefile
  head/emulators/wine-proton/distinfo
  head/emulators/wine-proton/files/
  head/emulators/wine-proton/files/patch-dlls-ntdll-unix-registry.c
  head/emulators/wine-proton/files/patch-dlls_ntdll_unix_fsync.c
  head/emulators/wine-proton/files/patch-dlls_ntdll_unix_loader.c
  head/emulators/wine-proton/files/patch-dlls_ntdll_unix_signal_x86_64.c
  head/emulators/wine-proton/files/patch-dlls_winebus.sys_bus_sdl.c
  head/emulators/wine-proton/files/patch-server_fsync.c
  head/emulators/wine-proton/files/patch-server_ptrace.c
  head/emulators/wine-proton/files/patch-tools_makedep.c
  head/emulators/wine-proton/files/wine.sh
  head/emulators/wine-proton/pkg-descr
  head/emulators/wine-proton/pkg-plist