Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Important Haiku patches from HaikuPorts repository #3116

Closed
SDLBugzilla opened this issue Feb 11, 2021 · 1 comment · Fixed by #4170
Closed

Important Haiku patches from HaikuPorts repository #3116

SDLBugzilla opened this issue Feb 11, 2021 · 1 comment · Fixed by #4170
Labels
enhancement New feature or request

Comments

@SDLBugzilla
Copy link
Collaborator

This bug report was migrated from our old Bugzilla tracker.

These attachments are available in the static archive:

Reported in version: 2.0.9
Reported for operating system, platform: Haiku, All

Comments on the original bug report:

On 2019-01-05 20:16:12 +0000, EXL wrote:

Created attachment 3559
Patchset from official HaikuPorts repository.

Please integrate relevant C/C++ patches from official HaikuPorts repository to the SDL2 upstream:

https://github.com/haikuports/haikuports/blob/master/media-libs/libsdl2/patches/libsdl2-2.0.8.patchset

P.S. Is it possible to apply these patches so that the author and the date of the changes was saved in Mercurial commits?

On 2019-03-31 06:40:12 +0000, Pirat wrote:

https://github.com/haikuports/haikuports/blob/master/media-libs/libsdl2/patches/libsdl2-2.0.9.patchset

New patchset for SDL2 2.0.9

On 2019-03-31 06:41:02 +0000, Pirat wrote:

Created attachment 3719
Haiku Patchset for SDL2 2.0.9

On 2019-07-30 17:49:39 +0000, Ryan C. Gordon wrote:

(Sorry if you get several emails like this, we're marking a bunch of bugs.)

We're hoping to ship SDL 2.0.11 on a much shorter timeframe than we have historically done releases, so I'm starting to tag bugs we hope to have closed in this release cycle.

Note that this tag means we just intend to scrutinize this bug for the 2.0.11 release: we may fix it, reject it, or even push it back to a later release for now, but this helps give us both a goal and a wishlist for the next release.

If this bug has been quiet for a few months and you have new information (such as, "this is definitely still broken" or "this got fixed at some point"), please feel free to retest and/or add more notes to the bug.

--ryan.

On 2019-09-20 20:47:35 +0000, Ryan C. Gordon wrote:

We're changing how we do SDL release versions; now releases will be even numbers (2.0.10, 2.0.12, etc), and as soon as we tag a release, we'll move the internal version number to an odd number (2.0.12 ships, we tag the latest in revision control as 2.0.13 immediately, which will become 2.0.14 on release, etc).

As such, I'm moving the bugs tagged with target-2.0.11 to target 2.0.12. Sorry if you get a lot of email from this change!

Thanks,
--ryan.

On 2019-09-20 20:48:43 +0000, Ryan C. Gordon wrote:

We're changing how we do SDL release versions; now releases will be even numbers (2.0.10, 2.0.12, etc), and as soon as we tag a release, we'll move the internal version number to an odd number (2.0.12 ships, we tag the latest in revision control as 2.0.13 immediately, which will become 2.0.14 on release, etc).

As such, I'm moving the bugs tagged with target-2.0.11 to target 2.0.12. Sorry if you get a lot of email from this change!

Thanks,
--ryan.

On 2019-11-12 03:32:05 +0000, Ryan C. Gordon wrote:

Okay, most of these patches are in now, under the original author's names:

https://hg.libsdl.org/SDL/rev/57ed423da32a
https://hg.libsdl.org/SDL/rev/7685ed78cd5c
https://hg.libsdl.org/SDL/rev/6058a0286a96
https://hg.libsdl.org/SDL/rev/9dfa95a693ba
https://hg.libsdl.org/SDL/rev/c6c5c0c9ad2b
https://hg.libsdl.org/SDL/rev/7e53f9a1d5e4
https://hg.libsdl.org/SDL/rev/00da92ddae19
https://hg.libsdl.org/SDL/rev/f5298e605071

Some notes:

  • I didn't test this, I just made sure things applied cleanly. Reopen this bug if I screwed something up. :)

  • The B_NO_POINTER_HISTORY patch is probably wrong...? I assume it was meant to be an optimization, but it seems to me that you would want old mouse events even if your framerate isn't keeping up (think of a painting program, where you would want all the curves painted, regardless of when the program catches up to processing them). This is just my opinion though, and maybe this is more complicated than I think. It's common for SDL apps to process all available events, and decide where the mouse is at the end, if they don't need old positions.

  • I didn't remove the NaCl code from the configure script, because obviously that's not a correct patch in general, but if I could understand why it causes problems on Haiku, we can fix that. That code is never called (at least, it shouldn't be called!) on Haiku.

  • The "Fix AC_DEFINE" patch is wrong. I'm not sure why this one AC_DEFINE is being changed when all the others aren't, especially because this one is in the X11 support code which Haiku doesn't use. Also, it's changing the AC_DEFINE from something that's correct to something that isn't. Can I get an understanding of what the problem was here?

  • I can't apply the "Fix secondary arch build" patch because it hardcodes in the assumption that you are using a C++ compiler to Makefile.in, which is true on Haiku but almost nowhere else.

--ryan.

On 2019-11-12 03:35:01 +0000, Ryan C. Gordon wrote:

Created attachment 4041
Patched not applied.

Here are just the unapplied patches, to make this easier to sort out.

--ryan.

On 2019-11-12 03:44:27 +0000, Ryan C. Gordon wrote:

Also, this is failing to build: https://buildbot.libsdl.org/builders/sdl-haiku/builds/3964/steps/compile/logs/stdio

If we just need to upgrade the (very old) Haiku install on the buildbot to fix this, disregard these errors.

--ryan.

On 2019-11-12 20:56:29 +0000, EXL wrote:

Created attachment 4044
Renaming BE_* to HAIKU_*

Renaming BE_* entities to HAIKU_* and bump copyright years.

See Bugzilla # 2349: https://bugzilla.libsdl.org/show_bug.cgi?id=2349

On 2019-11-12 22:25:56 +0000, Ryan C. Gordon wrote:

(In reply to EXL from comment # 9)

Created attachment 4044 [details]
Renaming BE_* to HAIKU_*

This patch is now https://hg.libsdl.org/SDL/rev/007002587d5d, thanks!

--ryan.

On 2019-11-12 22:26:51 +0000, Ryan C. Gordon wrote:

Comment on attachment 4044
Renaming BE_* to HAIKU_*

Marking EXL's attachment obsolete, because it's in revision control now!

--ryan.

On 2019-11-19 20:34:31 +0000, PulkoMandy wrote:

Hi,
So I tried building from unpatched mercurial, here is what I found:

  • Patch for nacl: seems not needed, probably we carried this over from older versions without checking if it was still a problem
  • Patch for xinput2 multitouch: likewise
  • Patch to use CXX instead of CC for libtool: still needed except for the gcc2 version of Haiku. AC_CHECK_FILE as it is done currently isn't working because our 32bit system ships with both gcc2 and gcc8, and has both variants of the C++ library. If you really want to manually specify which C++ library to use, you can use the "getarch" commandm if its output is x86_gcc2, you need libstdc++.r4. But using CXX in libtool options would be cleaner for Haiku
  • The event mask: note that the window and GL view run in their own thread which I don't expect to be too much CPU bound, and will quickly pop these messages and forward them to the main thread in our SDL code. Therefore the B_NO_POINTER_HISTORY should be no problem, and is the default on Haiku anyway (it was not in BeOS, but we changed that and added a B_FULL_POINTER_HISTORY flag to request the old behavior explicitly). So, this seems fine.
  • The build is currently not broken for me (besides the error with linking libstdc++.r4 with gcc8), so if you still have problems, consider updating your bot to a recent nightly. You could also use the bot to build the gcc8 version to improve coverage (use "setarch x86 somescript" to run "somescript" in the gcc8 environment) and/or setup a 64bit buildbot (which will be gcc8 only)

On 2019-12-03 07:50:48 +0000, Ryan C. Gordon wrote:

The B_NO_POINTER_HISTORY patch is applied:

https://hg.libsdl.org/SDL/rev/c51961094960

On 2019-12-03 07:55:14 +0000, Ryan C. Gordon wrote:

Created attachment 4086
The last unapplied Haiku support patch

Updated attached patch to remove the B_NO_POINTER_HISTORY patch (since it's in revision control now) and the other things that PulkoMandy said could be dropped. It's down to the one last libtool thing. We'll probably just need some small effort to wrap this in an extra variable so it does "CXX" on Haiku and "CC" everywhere else, but I haven't done so yet.

--ryan.

On 2020-02-12 20:19:00 +0000, Ryan C. Gordon wrote:

I'm going to remove the target-2.0.12 tag from this bug soon; if any Haiku people want to see about making that final patch agreeable, I'd like to get it into 2.0.12.

Thanks,
--ryan.

On 2020-02-14 02:36:30 +0000, Ryan C. Gordon wrote:

Moved to target-2.0.14. If anyone gets to this last patch before me, we'll accept it at any time.

Thanks!

--ryan.

@SDLBugzilla SDLBugzilla added the enhancement New feature or request label Feb 11, 2021
@kenmays
Copy link
Contributor

kenmays commented Mar 10, 2021

These are the new tested Haiku patches for SDL v2.0.14 integration: https://github.com/haikuports/haikuports/blob/master/media-libs/libsdl2/patches/libsdl2-2.0.14.patchset

Please review for the v2.0.15 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants