Skip to content

addpkg(x11/sdl3-{image,mixer,ttf}): 3.4.2, 3.2.0#29285

Merged
robertkirkman merged 3 commits intotermux:masterfrom
togashigreat:master
Apr 11, 2026
Merged

addpkg(x11/sdl3-{image,mixer,ttf}): 3.4.2, 3.2.0#29285
robertkirkman merged 3 commits intotermux:masterfrom
togashigreat:master

Conversation

@togashigreat
Copy link
Copy Markdown
Contributor

@togashigreat togashigreat commented Apr 10, 2026

@togashigreat
Copy link
Copy Markdown
Contributor Author

togashigreat commented Apr 11, 2026

Added sdl3-mixer as well

@robertkirkman
Copy link
Copy Markdown
Member

next, could you combine the commits together so that there are only 2 commits, one for each package?

image

@togashigreat
Copy link
Copy Markdown
Contributor Author

next, could you combine the commits together so that there are only 2 commits, one for each package?

image

I have combined the commits together, one for each package.

@robertkirkman
Copy link
Copy Markdown
Member

Very good,

as has been explained somewhere else, these are major iterations of important libraries and are needed to solve the chicken-and-egg problem of Termux does not support SDL3 -> things do not migrate to SDL3 -> Termux does not add SDL3 because things have not migrated to it.

Therefore, it is expected that the packages will not immediately have reverse dependencies, and might have issues that need to be resolved, but we can add further PRs in the future to resolve any issues, when they happen.

@robertkirkman robertkirkman changed the title addpkg(x11/sdl3-image): A simple library to load images of various fo… addpkg(x11/sdl3-{image,mixer}): 3.4.2, 3.2.0 Apr 11, 2026
Copy link
Copy Markdown
Member

@TomJo2000 TomJo2000 left a comment

Choose a reason for hiding this comment

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

The build scripts look good to me.

I'd like some clarification on why we're not using shared dependencies though.

@truboxl
Copy link
Copy Markdown
Member

truboxl commented Apr 11, 2026

Also change sdl3-ttf maintainer to termux

@robertkirkman
Copy link
Copy Markdown
Member

robertkirkman commented Apr 11, 2026

Oh yes, I didn't realize that sdl3-ttf was in TUR.

https://github.com/termux-user-repository/tur/blob/master/tur/sdl3-ttf/build.sh

if you could, @togashigreat please move it to the main repository in this PR and apply the same formatting and settings (like explicitly setting all configure arguments) that you applied to these two

@togashigreat
Copy link
Copy Markdown
Contributor Author

Oh yes, I didn't realize that sdl3-ttf was in TUR.

https://github.com/termux-user-repository/tur/blob/master/tur/sdl3-ttf/build.sh

if you could, @togashigreat please move it to the main repository in this PR and apply the same formatting and settings (like explicitly setting all configure arguments) that you applied to these two

I actually didn't submit the sdl3-ttf package to TUR, this is my first time contributing to Termux however, I'm happy to pull that build.sh from TUR, update the formatting and maintainer field to match my other two packages, and include it in this PR so we have the full SDL3 suite.

@togashigreat
Copy link
Copy Markdown
Contributor Author

togashigreat commented Apr 11, 2026

Oh yes, I didn't realize that sdl3-ttf was in TUR.
https://github.com/termux-user-repository/tur/blob/master/tur/sdl3-ttf/build.sh
if you could, @togashigreat please move it to the main repository in this PR and apply the same formatting and settings (like explicitly setting all configure arguments) that you applied to these two

I actually didn't submit the sdl3-ttf package to TUR, this is my first time contributing to Termux however, I'm happy to pull that build.sh from TUR, update the formatting and maintainer field to match my other two packages, and include it in this PR so we have the full SDL3 suite.

I added sdl3-ttf keeping the formatting same as sdl3-mixer & sdl3-image

@robertkirkman
Copy link
Copy Markdown
Member

@togashigreat there is a person @stsp who is watching every few seconds to see if a package is moved from TUR to this repository, and as soon as they see it happen, they start compiling the package in TUR as fast as they can to see if it's going to have a build error, and if someone doesn't remove the package from TUR before they can do that then they will get really upset!

therefore, before this PR is merged, do you think you could open a PR in https://github.com/termux-user-repository/tur/pulls to remove the sdl3-ttf package from the TUR GitHub repository, and then we can line them up really carefully and then since I have permission to merge PRs in both this repository and in the TUR repository, I can line them up on my screen right next to each other and then at just the right moment, I can click both of them at the same time so that stsp doesn't experience any problems.

@robertkirkman robertkirkman changed the title addpkg(x11/sdl3-{image,mixer}): 3.4.2, 3.2.0 addpkg(x11/sdl3-{image,mixer,ttf}): 3.4.2, 3.2.0 Apr 11, 2026
@togashigreat
Copy link
Copy Markdown
Contributor Author

@togashigreat there is a person @stsp who is watching every few seconds to see if a package is moved from TUR to this repository, and as soon as they see it happen, they start compiling the package in TUR as fast as they can to see if it's going to have a build error, and if someone doesn't remove the package from TUR before they can do that then they will get really upset!

therefore, before this PR is merged, do you think you could open a PR in https://github.com/termux-user-repository/tur/pulls to remove the sdl3-ttf package from the TUR GitHub repository, and then we can line them up really carefully and then since I have permission to merge PRs in both this repository and in the TUR repository, I can line them up on my screen right next to each other and then at just the right moment, I can click both of them at the same time so that stsp doesn't experience any problems.

I have submitted the PR to remove sdl3-ttf from TUR as requested:
termux-user-repository/tur#2420

@robertkirkman robertkirkman merged commit be6971e into termux:master Apr 11, 2026
11 checks passed
@stsp
Copy link
Copy Markdown
Contributor

stsp commented Apr 11, 2026

Its not me, its an automatic
setup. :) Aka CI. Thanks for
not breaking it.

@robertkirkman
Copy link
Copy Markdown
Member

@stsp if this affects your fork, would you be willing to do something like this in your fork, so that you get a report of the duplicate packages with a warning, instead of a forced error?

having this in common-files/building-system-patches

diff --git a/scripts/buildorder.py b/scripts/buildorder.py
index 74a2392699..43275a3e32 100755
--- a/scripts/buildorder.py
+++ b/scripts/buildorder.py
@@ -1,7 +1,7 @@
 #!/usr/bin/env python3
 "Script to generate a build order respecting package dependencies."
 
-import json, os, re, sys
+import json, os, re, sys, shutil
 
 from itertools import filterfalse
 
@@ -220,7 +220,7 @@ class TermuxSubPackage:
                 result += [dependency_package]
         return unique_everseen(result)
 
-def read_packages_from_directories(directories, fast_build_mode, full_buildmode):
+def read_packages_from_directories(directories, fast_build_mode, full_buildmode, delete_duplicate_packages):
     """Construct a map from package name to TermuxPackage.
     Subpackages are mapped to the parent package if fast_build_mode is false."""
     pkgs_map = {}
@@ -245,7 +245,12 @@ def read_packages_from_directories(directories, fast_build_mode, full_buildmode)
                     continue
 
                 if new_package.name in pkgs_map:
-                    die('Duplicated package: ' + new_package.name)
+                    if delete_duplicate_packages:
+                        print('Deleting duplicated package: ' + new_package.name)
+                        shutil.rmtree(dir_path)
+                        continue
+                    else:
+                        die('Duplicated package: ' + new_package.name)
                 else:
                     pkgs_map[new_package.name] = new_package
                 all_packages.append(new_package)
@@ -254,7 +259,12 @@ def read_packages_from_directories(directories, fast_build_mode, full_buildmode)
                     if termux_arch in subpkg.excluded_arches:
                         continue
                     if subpkg.name in pkgs_map:
-                        die('Duplicated package: ' + subpkg.name)
+                        if delete_duplicate_packages:
+                            print('Deleting duplicated package: ' + new_package.name)
+                            shutil.rmtree(dir_path)
+                            continue
+                        else:
+                            die('Duplicated package: ' + new_package.name)
                     elif fast_build_mode:
                         pkgs_map[subpkg.name] = subpkg
                     else:
@@ -362,12 +372,15 @@ def main():
     parser = argparse.ArgumentParser(description='Generate order in which to build dependencies for a package. Generates')
     parser.add_argument('-i', default=False, action='store_true',
                         help='Generate dependency list for fast-build mode. This includes subpackages in output since these can be downloaded.')
+    parser.add_argument('-d', default=False, action='store_true',
+                        help='Delete duplicate packages')
     parser.add_argument('package', nargs='?',
                         help='Package to generate dependency list for.')
     parser.add_argument('package_dirs', nargs='*',
                         help='Directories with packages. Can for example point to "../community-packages/packages". Note that the packages suffix is no longer added automatically if not present.')
     args = parser.parse_args()
     fast_build_mode = args.i
+    delete_duplicate_packages = args.d
     package = args.package
     packages_directories = args.package_dirs
 
@@ -391,7 +404,10 @@ def main():
             die('Not a directory: ' + package)
         if not os.path.relpath(os.path.dirname(package), '.') in packages_directories:
             packages_directories.insert(0, os.path.dirname(package))
-    pkgs_map = read_packages_from_directories(packages_directories, fast_build_mode, full_buildorder)
+    pkgs_map = read_packages_from_directories(packages_directories, fast_build_mode, full_buildorder, delete_duplicate_packages)
+
+    if delete_duplicate_packages:
+        exit(0)
 
     if full_buildorder:
         build_order = generate_full_buildorder(pkgs_map)

then putting this command in your workflow before your scripts/run-docker.sh ./build-package.sh commands:

scripts/buildorder.py -d

@stsp
Copy link
Copy Markdown
Contributor

stsp commented Apr 11, 2026

Yes, something like this would be
cool. Why don't you add that to
tur? If their CI won't break, that's
also for good!

@robertkirkman
Copy link
Copy Markdown
Member

Well, it is because for the upstream TUR, we want it to break on purpose so that we can decide on a case-by-case basis whether the package needs to be added to the override-packages.txt, or some other action. but if you only need to build packages downstream, then using a patch like that is fine.

@stsp
Copy link
Copy Markdown
Contributor

stsp commented Apr 11, 2026

Thanks, added to a few
repos. Will see how it goes.

@robertkirkman
Copy link
Copy Markdown
Member

Thanks, added to a few repos. Will see how it goes.

In case you did not realize yet, I wanted to let you know,

image

you will also need to add a command to activate it somewhere in your repository, in any workflows that you use, for example right here:

https://github.com/stsp/tur/blob/1657cfc5f23267c4370c63c5ee3b5971adfc5c8d/.github/workflows/packages.yml#L295

image

@stsp
Copy link
Copy Markdown
Contributor

stsp commented Apr 11, 2026

But I actually did:
dosemu2/dosemu2@baa0448

@robertkirkman
Copy link
Copy Markdown
Member

Oh, sorry I was only looking at this branch where you didn't, never mind. https://github.com/stsp/tur/tree/dosemu2 you know what you are doing, I just misinterpreted it.

@stsp
Copy link
Copy Markdown
Contributor

stsp commented Apr 12, 2026

That repo is a kinda "buffer"
where I put tur-specific customizations,
and rebase them from time
to time, w/o affecting other
repos. CI in that particular
repo is not important.

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.

[Package]: SDL3 addons that aren't yet in mainline Termux [Package]: SDL3

5 participants