Skip to content

addpkg(x11/upscaler): 1.6.3#29630

Draft
sabamdarif wants to merge 2 commits into
termux:masterfrom
sabamdarif:newpkg-upscaler
Draft

addpkg(x11/upscaler): 1.6.3#29630
sabamdarif wants to merge 2 commits into
termux:masterfrom
sabamdarif:newpkg-upscaler

Conversation

@sabamdarif
Copy link
Copy Markdown
Contributor

  • same as other two
  • btw i use bit AI here , so idk if it will be ok or not

@sabamdarif sabamdarif marked this pull request as draft May 1, 2026 16:08
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.

There's an existing x11-packages/libncnn.
And the build for upscayl-ncnn looks a bit odd.

But the package and dependencies itself look fine from a packaging guidelines standpoint.
Nix, AUR and FreeBSD is just about the bare minimum for existing packages.
But this is a fairly niche GNOME Circle application, so I'm inclined to be slightly more lenient on it.
https://repology.org/project/upscaler/versions

Comment thread packages/ncnn/build.sh Outdated
Comment thread packages/ncnn/build.sh Outdated
Comment thread packages/ncnn/build.sh Outdated
Comment thread packages/upscayl-ncnn/build.sh Outdated
Comment thread x11-packages/upscayl-ncnn/build.sh Outdated
Comment on lines +19 to +21
termux_download "https://github.com/xinntao/Real-ESRGAN/releases/download/v0.2.5.0/realesrgan-ncnn-vulkan-20220424-ubuntu.zip" \
"${TERMUX_PKG_CACHEDIR}/realesrgan-ncnn-vulkan-20220424-ubuntu.zip" \
"e5aa6eb131234b87c0c51f82b89390f5e3e642b7b70f2b9bbe95b6a285a40c96"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

What's going on here?
Do we need a host version of this?
In any case the version(s) shouldn't be hardcoded.
And if this is in the Ubuntu repos you should use termux_download_ubuntu_packages instead.

But again... What?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

so it's because arch linux did this https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=upscayl-ncnn#n16

TERMUX_PKG_VERSION=(
	"20251207-174704"
	"v0.2.5.0"
)

TERMUX_PKG_SRCURL=(
	"https://github.com/upscayl/upscayl-ncnn/archive/refs/tags/${TERMUX_PKG_VERSION[0]}.tar.gz"
	"https://github.com/xinntao/Real-ESRGAN/releases/download/${TERMUX_PKG_VERSION[1]}/realesrgan-ncnn-vulkan-20220424-ubuntu.zip"
)

but idk for what reason it always stopping after applying the patch this is what happened https://github.com/sabamdarif/termux-packages/actions/runs/25170925096/job/73789809688#step:9:5001

that's why i use this , idk how how to do it right way

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

if it's not a problem can you please guide me how this build.sh should be

Copy link
Copy Markdown
Member

@sylirre sylirre May 1, 2026

Choose a reason for hiding this comment

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

@TomJo2000 This zip archive contains model files for image upscaling. No build tools and realesrgan-ncnn-vulkan is not used anyway. There is no ubuntu package exist for it.

There shouldn't be issue downloading it in post-get-source or pre-configure.

Bash package does something like to pull additional patches:

local _MAIN_VERSION="${TERMUX_PKG_VERSION%.*}" _PATCH_VERSION="${TERMUX_PKG_VERSION##*.}"
(( _PATCH_VERSION == 0 )) && return
local PATCH_NUM PATCHFILE
local -A PATCH_CHECKSUMS=()
PATCH_CHECKSUMS[001]=1f608434364af86b9b45c8b0ea3fb3b165fb830d27697e6cdfc7ac17dee3287f
PATCH_CHECKSUMS[002]=e385548a00130765ec7938a56fbdca52447ab41fabc95a25f19ade527e282001
PATCH_CHECKSUMS[003]=f245d9c7dc3f5a20d84b53d249334747940936f09dc97e1dcb89fc3ab37d60ed
PATCH_CHECKSUMS[004]=9591d245045529f32f0812f94180b9d9ce9023f5a765c039b852e5dfc99747d0
PATCH_CHECKSUMS[005]=cca1ef52dbbf433bc98e33269b64b2c814028efe2538be1e2c9a377da90bc99d
PATCH_CHECKSUMS[006]=29119addefed8eff91ae37fd51822c31780ee30d4a28376e96002706c995ff10
PATCH_CHECKSUMS[007]=c0976bbfffa1453c7cfdd62058f206a318568ff2d690f5d4fa048793fa3eb299
PATCH_CHECKSUMS[008]=097cd723cbfb8907674ac32214063a3fd85282657ec5b4e544d2c0f719653fb4
PATCH_CHECKSUMS[009]=eee30fe78a4b0cb2fe20e010e00308899cfc613e0774ebb3c8557a1552f24f8c
for PATCH_NUM in $(seq -f '%03g' "${_PATCH_VERSION}"); do
PATCHFILE=$TERMUX_PKG_CACHEDIR/bash_patch_${PATCH_NUM}.patch
termux_download \
"https://mirrors.kernel.org/gnu/bash/bash-${_MAIN_VERSION}-patches/bash${_MAIN_VERSION/./}-$PATCH_NUM" \
"$PATCHFILE" \
"${PATCH_CHECKSUMS[$PATCH_NUM]}"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'd say bash is a somewhat different case since those patches are essentially Bash's way to do patch releases instead of doing a new tag and tarball like most packages do.

Either way is fine.
I think I'd prefer just having it in the TERMUX_PKG_SRCURL array though since that saves us the hassle of needing a post-get-source hook.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@TomJo2000 then should i test adding both of this in TERMUX_PKG_SRCURL ?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Either way is fine.

Comment thread packages/upscayl-ncnn/build.sh Outdated
Comment on lines +26 to +28
cd "$TERMUX_PKG_SRCDIR"
mv src/* .
rm -rf src
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Did you mean TERMUX_PKG_BUILD_IN_SRC=true?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

let me test it

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Comment thread x11-packages/upscayl-ncnn/build.sh
@sabamdarif sabamdarif force-pushed the newpkg-upscaler branch 3 times, most recently from e26a7ff to 21c0d73 Compare May 2, 2026 12:01
Comment thread x11-packages/upscayl-ncnn/build.sh Outdated
@sylirre
Copy link
Copy Markdown
Member

sylirre commented May 2, 2026

After fixing upscayl-ncnn, the upscaler package fails with

Снимок экрана от 2026-05-02 15-22-22

@sabamdarif
Copy link
Copy Markdown
Contributor Author

After fixing upscayl-ncnn, the upscaler package fails with

it looks like something related to blueprint-compiler

@sabamdarif
Copy link
Copy Markdown
Contributor Author

i think i should try once with this upscayl/upscayl-ncnn#13 patch

@sylirre
Copy link
Copy Markdown
Member

sylirre commented May 2, 2026

it looks like something related to blueprint-compiler

Perhaps something wrong with my build env.

On GitHub Actions I see builds except arm passed.

@sabamdarif sabamdarif force-pushed the newpkg-upscaler branch 2 times, most recently from d4ef011 to 6333b9b Compare May 3, 2026 06:28
@DuilioPerez
Copy link
Copy Markdown

I've tested this PR upscaling a screenshot and in my case the result is just a black image

@sabamdarif
Copy link
Copy Markdown
Contributor Author

I've tested this PR upscaling a screenshot and in my case the result is just a black image

i need to fix it , in my current device it doesn't work because of some driver issue , so there is some issues I needed to be fixed, also arm version doesn't build and upscayl-ncnn have some error during the build so there are a lot to fix

@sabamdarif
Copy link
Copy Markdown
Contributor Author

all the build errors are fixed, now i just need to test it

@sabamdarif
Copy link
Copy Markdown
Contributor Author

@DuilioPerez can you test the new build ?

@DuilioPerez
Copy link
Copy Markdown

@DuilioPerez can you test the new build ?

Sorry, I can't test today. Maybe tomorrow. I'm compiling libreoffice for termux to test bugs, and that take a long time

@sabamdarif
Copy link
Copy Markdown
Contributor Author

@DuilioPerez can you test the new build ?

Sorry, I can't test today. Maybe tomorrow. I'm compiling libreoffice for termux to test bugs, and that take a long time

wow that's great , let me know how things happens , i will try to help if i can

@DuilioPerez
Copy link
Copy Markdown

@DuilioPerez can you test the new build ?

Sorry, I can't test today. Maybe tomorrow. I'm compiling libreoffice for termux to test bugs, and that take a long time

wow that's great , let me know how things happens , i will try to help if i can

Yes, I started yesterday but accidentally stopped the build so I restarted. It was not possible to finish after 12 hours. But I'll give it all the time I can to start testing

@DuilioPerez
Copy link
Copy Markdown

@sabamdarif if you're interested here we talk about it: #29690

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.

4 participants