here's an update to yt-dlp-ejs. they've changed how the js is built
and I didn't figure out how to work around that, so I've cheated a bit
and sidestepped by fetching the Python wheel (not the sdist) from pypi,
and skipped the build stage.

working for me on one machine; i'm getting auth required on another
one but i had recently tried fetching some things with the old yt-dlp
version and i think it might be because of that (i just committed an
update to yt-dlp).

anyone want to test or do this differently?

Index: Makefile
===================================================================
RCS file: /cvs/ports/www/py-yt-dlp-ejs/Makefile,v
diff -u -p -r1.2 Makefile
--- Makefile    19 Dec 2025 07:04:33 -0000      1.2
+++ Makefile    29 Jan 2026 17:48:56 -0000
@@ -1,15 +1,10 @@
 COMMENT =      external JavaScript for yt-dlp supporting many runtimes
 
-MODPY_DISTV =  0.3.2
-DISTNAME =     yt_dlp_ejs-${MODPY_DISTV}
-PKGNAME =      py-${DISTNAME}
-REVISION =     0
-
-SITES.gh =     https://github.com/yt-dlp/ejs/releases/download/${MODPY_DISTV}/
-DISTFILES.gh = ${DISTNAME}-{}yt.solver.core.min.js \
-               ${DISTNAME}-{}yt.solver.lib.min.js
-
-EXTRACT_ONLY = ${DISTFILES}
+MODPY_DISTV =  0.4.0
+DISTNAME =     yt_dlp_ejs-0.4.0-py3-none-any
+EXTRACT_SUFX = .whl
+EXTRACT_ONLY =
+PKGNAME =      py-yt_dlp_ejs-${MODPY_DISTV}
 
 CATEGORIES =   www
 
@@ -18,19 +13,17 @@ CATEGORIES =        www
 PERMIT_PACKAGE =       Yes
 
 MODULES =      lang/python
-
-MODPY_PYBUILD =        hatch-vcs
-MODPY_PI =     Yes
+MODPY_PYBUILD =        other
+SITES =                
https://files.pythonhosted.org/packages/py3/y/yt-dlp-ejs/
 
 .if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "aarch64"
 RUN_DEPENDS =  lang/deno
 .endif
 
-post-extract:
-       mkdir ${WRKSRC}/dist
-       cp ${FULLDISTDIR}/${DISTNAME}-yt.solver.core.min.js \
-               ${WRKSRC}/dist/yt.solver.core.min.js
-       cp ${FULLDISTDIR}/${DISTNAME}-yt.solver.lib.min.js \
-               ${WRKSRC}/dist/yt.solver.lib.min.js
+do-extract:
+       mkdir -p ${WRKSRC}/dist
+       cp ${FULLDISTDIR}/${DISTFILES} ${WRKSRC}/dist
+
+do-build:
 
 .include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /cvs/ports/www/py-yt-dlp-ejs/distinfo,v
diff -u -p -r1.1.1.1 distinfo
--- distinfo    17 Dec 2025 01:37:48 -0000      1.1.1.1
+++ distinfo    29 Jan 2026 17:48:56 -0000
@@ -1,6 +1,2 @@
-SHA256 (yt_dlp_ejs-0.3.2-yt.solver.core.min.js) = 
jSjukG/QrPB6p6SCE144tu5wY5LUbNSrC1FQPUzBjxg=
-SHA256 (yt_dlp_ejs-0.3.2-yt.solver.lib.min.js) = 
xVmH/ml+W57hiDAWP3r4Uyfpu1w+Z0uWnTjI0gXqpXc=
-SHA256 (yt_dlp_ejs-0.3.2.tar.gz) = MaQSknmZkr3JE+A8n6wqjJDIKly7x5Ky4zc7AdqEHj4=
-SIZE (yt_dlp_ejs-0.3.2-yt.solver.core.min.js) = 8535
-SIZE (yt_dlp_ejs-0.3.2-yt.solver.lib.min.js) = 151561
-SIZE (yt_dlp_ejs-0.3.2.tar.gz) = 34678
+SHA256 (yt_dlp_ejs-0.4.0-py3-none-any.whl) = 
GSeM/zl7JDB030Y0K7dhbEBClq6v8BmGtitOIYI7C5w=
+SIZE (yt_dlp_ejs-0.4.0-py3-none-any.whl) = 53600
Index: patches/patch-pnpm_py
===================================================================
RCS file: patches/patch-pnpm_py
diff -N patches/patch-pnpm_py
--- patches/patch-pnpm_py       17 Dec 2025 01:37:48 -0000      1.1.1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,21 +0,0 @@
-Index: pnpm.py
---- pnpm.py.orig
-+++ pnpm.py
-@@ -13,17 +13,6 @@ except ImportError:
- 
- class CustomBuildHook(BuildHookInterface):
-     def initialize(self, version, build_data):
--        name, pnpm = build_pnpm()
--        if pnpm is None:
--            raise RuntimeError(
--                "One of 'deno', 'bun', or 'npm' could not be found. "
--                "Please install one of them to proceed with the build."
--            )
--        print(f"Building with {name}...")
--
--        pnpm(["install", "--frozen-lockfile"])
--        pnpm(["run", "bundle"])
--
-         build_data["force_include"].update(
-             {
-                 "dist/yt.solver.core.min.js": 
"yt_dlp_ejs/yt/solver/core.min.js",

Reply via email to