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

doomsday-engine: init at 2.3.1, doomsday-engine_3: init at 3.0-unstable-2024-01-23 #318552

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

pluiedev
Copy link
Contributor

@pluiedev pluiedev commented Jun 9, 2024

Description of changes

Fixes #108391

Tested with the DOOM 1 Shareware WAD and it works well!

Known issues include lack of FMOD support, and possible crash under Wayland (workaround: unset WAYLAND_DISPLAY for 2.x, and set SDL_VIDEODRIVER to x11 for 3.x).

Neither of them have update scripts for now (much to my chagrin). See Mic92/nix-update#257

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@ofborg ofborg bot added 8.has: package (new) This PR adds a new package 11.by: package-maintainer This PR was created by the maintainer of the package it changes 10.rebuild-darwin: 1-10 10.rebuild-linux: 1-10 labels Jun 9, 2024
@matteo-pacini
Copy link
Contributor

@pluiedev The official websites points to a different repo (?):

https://github.com/skyjake/Doomsday-Engine

See Git Repositories here: https://dengine.net/source

Also FYI, on the GitHub repo, 2.3.1 is a quite old tag (2021), and there are more recent commits that are not part of any release (5 months ago).

@pluiedev
Copy link
Contributor Author

pluiedev commented Jun 10, 2024

@pluiedev The official websites points to a different repo (?):

Confusingly there are also two different repos for the_Foundation, one on Gitea and one on Codeberg. At this point I have no idea anymore what's supposed to be the "canonical" Git repo to base on

Also FYI, on the GitHub repo, 2.3.1 is a quite old tag (2021), and there are more recent commits that are not part of any release (5 months ago).

We should try to target stable releases if possible. The other commits belong to what the author calls "Doomsday 3", which seems to be still majorly unstable per a blog post I read. Still, we could perhaps package it separately under doomsday-engine3 or something

@matteo-pacini
Copy link
Contributor

matteo-pacini commented Jun 10, 2024

@pluiedev it should also be marked as broken on Darwin for two reasons:

  1. Clang errors - there's a few of those that can be patched (see patch below), but the big problem is (2)
  2. Project relies on an obsolete Darwin framework - QTKit - which has been deprecated by Apple around 10 years ago. That framework is still around in x86_64-darwin, but it definitely won't work on aarch64-darwin.

image

I've tested it on macOS Sonoma 14.5 (on Apple Silicon) - and does not compile.

Patch for (1)

diff --git a/doomsday/apps/client/src/ui/dialogs/filedownloaddialog.cpp b/doomsday/apps/client/src/ui/dialogs/filedownloaddialog.cpp
index 0d19eb1630..f56979ad96 100644
--- a/doomsday/apps/client/src/ui/dialogs/filedownloaddialog.cpp
+++ b/doomsday/apps/client/src/ui/dialogs/filedownloaddialog.cpp
@@ -21,6 +21,8 @@
 
 #include <de/charsymbols.h>
 
+#include <cmath>
+
 using namespace de;
 
 DENG_GUI_PIMPL(FileDownloadDialog)
@@ -47,7 +49,7 @@ DENG_GUI_PIMPL(FileDownloadDialog)
         if (!bytes.end) return;
 
         auto &indicator = self().progressIndicator();
-        indicator.setProgress(round<int>(100.0 * double(bytes.size())/double(bytes.end)));
+        indicator.setProgress((int)(round(100.0 * double(bytes.size())/double(bytes.end))));
 
         indicator.setText(tr("%1\n" _E(l)_E(F) "%2 file%3 / %4 MB")
                           .arg(message)
diff --git a/doomsday/apps/client/src/ui/widgets/cvarsliderwidget.cpp b/doomsday/apps/client/src/ui/widgets/cvarsliderwidget.cpp
index 2c3a424c00..eb8940b491 100644
--- a/doomsday/apps/client/src/ui/widgets/cvarsliderwidget.cpp
+++ b/doomsday/apps/client/src/ui/widgets/cvarsliderwidget.cpp
@@ -19,6 +19,8 @@
 #include "ui/widgets/cvarsliderwidget.h"
 #include <doomsday/console/var.h>
 
+#include <cmath>
+
 using namespace de;
 using namespace de::ui;
 
@@ -87,6 +89,6 @@ void CVarSliderWidget::setCVarValueFromWidget()
     }
     else
     {
-        CVar_SetInteger(d->var(), round<int>(value()));
+        CVar_SetInteger(d->var(), (int)(round(value())));
     }
 }

You could also allow x86_64-darwin only

@pluiedev
Copy link
Contributor Author

I think I'm going to mark it as broken on aarch64-darwin for now — x86_64-darwin should be well-supported in the upstream and unless it fails to build, I don't see why not

@pluiedev pluiedev changed the title doomsday-engine: init at 2.3.1, the_Foundation: init at 1.8.1 doomsday-engine: init at 2.3.1 Jun 11, 2024
@pluiedev
Copy link
Contributor Author

I actually did not realize that the_Foundation was already packaged... oops!

@pluiedev
Copy link
Contributor Author

I was bored so I also packaged the 3.x version of Doomsday Engine. Was easier than I thought

@pluiedev pluiedev changed the title doomsday-engine: init at 2.3.1 doomsday-engine: init at 2.3.1, doomsday-engine3: init at 3.0-unstable-2021-08-07 Jun 11, 2024
Copy link
Member

@getchoo getchoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mainly recommending some structural changes to generic builder here, based on the nvidia-x11 package - which i've found to be pretty great to work with as a user :)

this should help a bit with overriding and avoid any issues with the top level 2.x and 3.x builders overflowing the limited arguments of the current setup (i.e., if one package adds postConfigure currently, generic.nix would need to be updated to account for that. now though, it'll be used automatically)

edit: we should probably add this generic function to passthru as well

pkgs/by-name/do/doomsday-engine/generic.nix Outdated Show resolved Hide resolved
pkgs/by-name/do/doomsday-engine/generic.nix Outdated Show resolved Hide resolved
pkgs/by-name/do/doomsday-engine/generic.nix Outdated Show resolved Hide resolved
pkgs/by-name/do/doomsday-engine/generic.nix Outdated Show resolved Hide resolved
pkgs/by-name/do/doomsday-engine/generic.nix Outdated Show resolved Hide resolved
pkgs/by-name/do/doomsday-engine/3.x.nix Outdated Show resolved Hide resolved
pkgs/by-name/do/doomsday-engine/3.x.nix Outdated Show resolved Hide resolved
pkgs/by-name/do/doomsday-engine/package.nix Outdated Show resolved Hide resolved
pkgs/by-name/do/doomsday-engine/package.nix Outdated Show resolved Hide resolved
pkgs/top-level/all-packages.nix Outdated Show resolved Hide resolved
@pluiedev pluiedev force-pushed the init/doomsday-engine branch 2 times, most recently from 0728404 to 9c287cb Compare June 12, 2024 06:44
@pluiedev pluiedev mentioned this pull request Jun 24, 2024
@danwdart
Copy link

Awesome, thanks for all this effort. There's a lot for me to learn from this.

pkgs/by-name/do/doomsday-engine/generic.nix Show resolved Hide resolved
pkgs/by-name/do/doomsday-engine/generic.nix Show resolved Hide resolved
pkgs/by-name/do/doomsday-engine/package.nix Outdated Show resolved Hide resolved
pkgs/by-name/do/doomsday-engine/3.x.nix Outdated Show resolved Hide resolved
pkgs/by-name/do/doomsday-engine/3.x.nix Outdated Show resolved Hide resolved
pkgs/by-name/do/doomsday-engine/3.x.nix Outdated Show resolved Hide resolved
@danwdart
Copy link

So WAYLAND_DISPLAY= doomsday currently freezes when you push the select wad button with Cannot mix incompatible Qt library (5.15.14) with this library (5.15.12), just checking that this is known.

@pluiedev
Copy link
Contributor Author

pluiedev commented Jun 25, 2024

So WAYLAND_DISPLAY= doomsday currently freezes when you push the select wad button with Cannot mix incompatible Qt library (5.15.14) with this library (5.15.12), just checking that this is known.

You probably have Qt libraries installed in your system that are older than the ones available in master, which is what Doomsday (in this PR) is built against. Maybe try updating your system and running it again?

@pluiedev pluiedev force-pushed the init/doomsday-engine branch 2 times, most recently from 0a6ce31 to 84fe042 Compare June 27, 2024 08:02
pkgs/top-level/all-packages.nix Outdated Show resolved Hide resolved
pkgs/by-name/do/doomsday-engine/package.nix Show resolved Hide resolved
pkgs/by-name/do/doomsday-engine/package.nix Show resolved Hide resolved
pkgs/by-name/do/doomsday-engine/package.nix Outdated Show resolved Hide resolved
pkgs/by-name/do/doomsday-engine/generic.nix Outdated Show resolved Hide resolved
pkgs/by-name/do/doomsday-engine/generic.nix Outdated Show resolved Hide resolved
pkgs/by-name/do/doomsday-engine/3.x.nix Outdated Show resolved Hide resolved
pkgs/by-name/do/doomsday-engine/3.x.nix Outdated Show resolved Hide resolved
pkgs/by-name/do/doomsday-engine/3.x.nix Outdated Show resolved Hide resolved
pkgs/by-name/do/doomsday-engine/3.x.nix Outdated Show resolved Hide resolved
@nixos-discourse

This comment was marked as off-topic.

@pluiedev pluiedev changed the title doomsday-engine: init at 2.3.1, doomsday-engine3: init at 3.0-unstable-2021-08-07 doomsday-engine: init at 2.3.1, doomsday-engine_3: init at 3.0-unstable-2024-01-23 Oct 25, 2024
@danwdart

This comment was marked as off-topic.

@nixos-discourse

This comment was marked as off-topic.

pkgs/by-name/do/doomsday-engine/package.nix Outdated Show resolved Hide resolved
pkgs/top-level/all-packages.nix Show resolved Hide resolved
@matteo-pacini
Copy link
Contributor

matteo-pacini commented Nov 5, 2024

Not building on Darwin:

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 318552


x86_64-darwin

❌ 2 packages failed to build:
  • doomsday-engine
  • doomsday-engine_3

aarch64-darwin

❌ 2 packages failed to build:
  • doomsday-engine
  • doomsday-engine_3

In both builds, it fails to find the glib-2.0 dependency.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.has: package (new) This PR adds a new package 10.rebuild-darwin: 1-10 10.rebuild-linux: 1-10 11.by: package-maintainer This PR was created by the maintainer of the package it changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Doomsday Engine
6 participants