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

Add FreeBSD compatibility #337

Merged
merged 1 commit into from
Jan 19, 2025
Merged

Conversation

SetiQyu
Copy link
Contributor

@SetiQyu SetiQyu commented Jan 15, 2025

Changed 3 files to make the project build on FreeBSD (and possibly the other BSDs, requires gmake).

The meson.build in the project root has the most questionable change that should be improved, since the new second custom_target call outputs the file "junk.txt" that serves no purpose other than the fact that meson does not allow an empty output for the custom_target method. For whatever reason FreeBSD does not like some of the shell commands that are in the meson.build files custom_target methods, requiring some of them to be tweaked a little to build successfully.

The issue is that the wine call with makerom_exe did not work when sandwiched in there so there had to be some separate execution step with the added custom_target running after pokeplatinum_nds for it work.

The repo with this patch builds fine on my Debian and FreeBSD machines.

I would love any suggestions as to how to improve this very bad solution, I'll test them!

@SetiQyu
Copy link
Contributor Author

SetiQyu commented Jan 15, 2025

To clarify the issue, when the command to run wine (makerom_exe) was part of pokeplatinum_nds command array, it would fail. But the wine command and the second command after && in the original meson.build had no trouble running individually, so the "solution" was to only have makerom_exe run in pokeplatinum_nds, then create a second custom_target that depended on pokeplatinum_nds so that makerom_exe and the second command would still be ran sequentially but as part of separate shell commands.

@SetiQyu
Copy link
Contributor Author

SetiQyu commented Jan 16, 2025

I fixed my hacky solution now, now there is no junk file being created! Tested on my FreeBSD and Debian machine.

@lhearachel
Copy link
Collaborator

Changes build on my Arch Linux machine. I will pull onto my Macbook later today and verify there as well.

@lhearachel lhearachel added the needs-testing The PR affects the underlying build system in a way that requires testing other platforms label Jan 17, 2025
@lhearachel
Copy link
Collaborator

Build succeeds on my M3 Macbook, as well, so I'll call this one good.

@lhearachel lhearachel merged commit c8ce55b into pret:main Jan 19, 2025
1 check passed
@SetiQyu SetiQyu deleted the BSD-compatibility branch January 19, 2025 21:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-testing The PR affects the underlying build system in a way that requires testing other platforms
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants