这是indexloc提供的服务,不要输入任何密码
Skip to content

fix(main/openjdk): Build jsound and regerate patchset #25152

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

Merged
merged 9 commits into from
Jul 23, 2025

Conversation

alexytomi
Copy link
Contributor

@alexytomi alexytomi commented Jun 23, 2025

WIP because git is refusing to apply the patches with git am and thus I cannot regenerate them to make this a proper PR

Help appreciated.

What did I do

  • git am'ed every patch that worked with that, then manually applied the patches after, using the file names, comments and commit history for the commit message, date and author
  • Modified patch android: prevent build of libjsound and libsa into android: Prevent build of libsaproc, please check if I attributed authors correctly
  • Removed patch configure: do not require alsa, this was stopping libjsound.so from linking to libasound.so so it needed to either be LD_PRELOAD'ed or patchelf'ed

What should be done when updating this

  • Clone the corresponding openjdk repo
  • git am path/to/patches/*.patch the corresponding openjdk package folder
  • Do your changes as you would normally
  • Commit them
  • git format-patch <tag to the jdk version> (i.e git format-patch jdk-17.0.16-ga) to generate the patches (personally used -o dir to make copying easier)
  • Replace all the patches in the package folder with the generated ones

Copy link
Contributor

@robertkirkman robertkirkman left a comment

Choose a reason for hiding this comment

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

@alexytomi fantastic job!!! I couldn't really figure out how to do this, but you did.

This build actually works to solve the problem as-is.

So that others understand how to test this PR: these are the commands that don't work currently in Termux, but will work and actually play audible sounds, if this PR is merged:

pkg upgrade
pkg install x11-repo
pkg install termux-x11-nightly xfce openjdk-21-x
export DISPLAY=:0 TERMUX_X11_XSTARTUP=xfce4-session
LIBGL_ALWAYS_SOFTWARE=1 termux-x11 &
wget https://www.oracle.com/technetwork/java/javasounddemo-150249.zip
unzip javasounddemo-150249.zip
cd JavaSoundDemo/
java -jar JavaSoundDemo.jar

@TomJo2000
Copy link
Member

I'll see if I can "properly" do a v2 of the patches modified in this PR, since we have a proper git format-patch generated patch series for the OpenJDK packages.

So having the proper headers and metadata on the patches would be good to maintain.

@alexytomi
Copy link
Contributor Author

alexytomi commented Jul 21, 2025

@robertkirkman This PR undoes the reallignment at b30f9a8

Am unsure why, git am applies it fine though

Err figured it out, was using outdated java, oops

@alexytomi alexytomi marked this pull request as ready for review July 21, 2025 07:40
@alexytomi alexytomi changed the title fix(main/openjdk): Build jsound fix(main/openjdk): Build jsound and regerate patchset Jul 21, 2025
@alexytomi
Copy link
Contributor Author

Say should there be a readme about how to properly update the set?

@robertkirkman
Copy link
Contributor

Say should there be a readme about how to properly update the set?

Thank you for writing the explanation in the PR description, I think it's sufficient for it to be there since it's associated with this set of changes

This was disabled before someone made the `alsa-utils`, `alsa-lib` and
`alsa-plugins` packages and added a pulseaudio backend to ALSA

This is no longer true, we now have ALSA
Since we have ALSA, we can now use jsound, as it uses ALSA as the
backend for linux
This was disabled before someone made the `alsa-utils`, `alsa-lib` and
`alsa-plugins` packages and added a pulseaudio backend to ALSA
Since we have ALSA, we can now use jsound, as it uses ALSA as the
backend for linux
@alexytomi
Copy link
Contributor Author

alexytomi commented Jul 21, 2025

Okay I've finished updating the patches for the updated Java and it seems to be applying good
image

@robertkirkman
Copy link
Contributor

I believe that this is correct and that no patches have been removed that shouldn't be. I will merge this in 24 hours if no problems are found.

@robertkirkman robertkirkman merged commit 8d30dd9 into termux:master Jul 23, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants