Bug 278288 - emulators/wine-proton Update to 8.0-5
Summary: emulators/wine-proton Update to 8.0-5
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: Gerald Pfeifer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-04-10 07:51 UTC by Bartek Jasicki
Modified: 2024-05-09 09:07 UTC (History)
3 users (show)

See Also:
iwtcex: maintainer-feedback+


Attachments
Update to 8.0-5 (3.16 KB, patch)
2024-04-10 07:51 UTC, Bartek Jasicki
no flags Details | Diff
Update to 8.0-5 with pthread_getthreadid_np (3.38 KB, patch)
2024-04-10 11:38 UTC, Bartek Jasicki
no flags Details | Diff
Update to 8.0-5 with pthread_getthreadid_np and fixed LLVM check (3.15 KB, patch)
2024-04-21 20:33 UTC, Bartek Jasicki
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Bartek Jasicki 2024-04-10 07:51:39 UTC
Created attachment 249874 [details]
Update to 8.0-5

Update to version 8.0-5, it brings also two more patches, needed for compilation.
It needs some tests, I tested it only with two games.
Comment 1 Alex S 2024-04-10 08:05:26 UTC
I think gettid could be replaced by pthread_getthreadid_np. No objections otherwise.
Comment 2 Bartek Jasicki 2024-04-10 11:38:39 UTC
Created attachment 249879 [details]
Update to 8.0-5 with pthread_getthreadid_np

A new version of the patch with the suggestion of the maintainer in comment #1. Using now pthread_getthreadid_np. As far I see, it is used only in debug messaging, so I think it shouldn't break anything (yes, famous last words :) ). Need some tests, I just tested compilation on FreeBSD 14.0 and a very short run.
Comment 3 Alex S 2024-04-10 12:39:00 UTC
Approved.

(In reply to Bartek Jasicki from comment #2)

> Need some tests, I just tested compilation on FreeBSD 14.0 and a very short run.

To be honest, it's probably not worth thoroughly testing.
Comment 4 Bartek Jasicki 2024-04-19 09:20:24 UTC
(In reply to Alex S from comment #3)

"Sometimes" I miss reaction buttons here, so I don't need to spam with "I agree". ;) That's true, especially with the last change to the patch.

Well, some time passed, and seems like the patch is working. I think that is enough tests. Now we only need to find someone who will commit it.
Comment 5 Gerald Pfeifer freebsd_committer freebsd_triage 2024-04-21 20:17:44 UTC
Note this part

-.if ${LLVM_DEFAULT} == 11
+.if (${LLVM_DEFAULT} == 10 || ${LLVM_DEFAULT} == 11)

is not correct. This was simplified to no longer take LLVM 10 into 
account a while ago, and the patch (presumably unintentionally) 
reverts it.
Comment 6 Bartek Jasicki 2024-04-21 20:33:19 UTC
Created attachment 250139 [details]
Update to 8.0-5 with pthread_getthreadid_np and fixed LLVM check

(In reply to Gerald Pfeifer from comment #5)

Good catch, thank you for checking it. Here is the new version of the patch.
Comment 7 Gerald Pfeifer freebsd_committer freebsd_triage 2024-04-22 08:27:18 UTC
I'll have a look and see to commit this...
Comment 8 commit-hook freebsd_committer freebsd_triage 2024-04-26 08:54:48 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=cb4943510ff163609a697f02398b79d6c8a8d441

commit cb4943510ff163609a697f02398b79d6c8a8d441
Author:     Bartek Jasicki <thindil@laeran.pl.eu.org>
AuthorDate: 2024-04-26 08:53:16 +0000
Commit:     Gerald Pfeifer <gerald@FreeBSD.org>
CommitDate: 2024-04-26 08:53:16 +0000

    emulators/wine-proton: Update to 8.0-5

    This brings two new patches on top of upstream (to maintain
    compilation).

    PR:             278288
    Approved by:    maintainer

 emulators/wine-proton/Makefile                     |  4 ++--
 emulators/wine-proton/distinfo                     |  6 +++---
 .../files/patch-dlls__ntdll__unix__virtual.c (new) | 18 +++++++++++++++++
 .../files/patch-dlls__winevulkan__vulkan.c (new)   | 23 ++++++++++++++++++++++
 4 files changed, 46 insertions(+), 5 deletions(-)
Comment 9 Gerald Pfeifer freebsd_committer freebsd_triage 2024-05-09 07:02:30 UTC
I pushed the patch two weeks ago. One recommendation, Bartek, to make
things easier to upstream.

In files/patch-dlls__winevulkan__vulkan.c, instead of replacing the
code for other platforms, it's probably better to add a configure
check for pthread_np.h and then conditionally include it as already
the case below with #ifdef HAVE_SYS_SYSCALL_H

Then use the same pattern in signaller_worker as with HAVE_SYS_SYSCALL_H.
Comment 10 Alex S 2024-05-09 07:32:43 UTC
The suffix np stands for non-portable, so that part in fact should only have platform-specific ifdefs (__linux__, __FreeBSD__, etc).
Comment 11 Bartek Jasicki 2024-05-09 09:07:56 UTC
(In reply to Gerald Pfeifer from comment #9)

Thank you for your advice, I will try to remember it. :) 

I think in this package (wine-proton), removing a part of a code may be allowed. The upstream (Valve) doesn't accept any patches, plus they don't care about anything except Linux. Our patches often remove such platforms' specific code. Perhaps these patches will not work with (or not needed in) the standard version of Wine, the differences between both versions are too big.