git: e5b951b54dd4 - main - www/py-yt-dlp-ejs: Remove the IGNORE line
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 04 Mar 2026 04:20:11 UTC
The branch main has been updated by yuri:
URL: https://cgit.FreeBSD.org/ports/commit/?id=e5b951b54dd4277d96262f7e21dc1720ad4fd529
commit e5b951b54dd4277d96262f7e21dc1720ad4fd529
Author: Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2026-03-04 04:16:30 +0000
Commit: Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2026-03-04 04:20:02 +0000
www/py-yt-dlp-ejs: Remove the IGNORE line
This do-fetch target does not repackage anything.
It fetches the tarball, extracts it, then fetches NodeJS dependencies
into the same folder, and packages this folder as a final tarball
used during build.
AFAIK there is nothing wrong with this port the way it is now.
This can't be done in post-extract due to internet access that is
required.
---
www/py-yt-dlp-ejs/Makefile | 62 +++++++++++++++++++++++-----------------------
1 file changed, 31 insertions(+), 31 deletions(-)
diff --git a/www/py-yt-dlp-ejs/Makefile b/www/py-yt-dlp-ejs/Makefile
index 16b2e7cdd012..b8cf81136b01 100644
--- a/www/py-yt-dlp-ejs/Makefile
+++ b/www/py-yt-dlp-ejs/Makefile
@@ -31,37 +31,37 @@ NO_ARCH= yes
DD= ${DISTDIR}/${DIST_SUBDIR}
-IGNORE= invalid code in do-fetch
-
-# do-fetch:
-# @if ! [ -f ${DD}/${DISTNAME}${EXTRACT_SUFX} ] || \
-# ! [ -f ${DD}/${PORTNAME}-node-modules-${DISTVERSION}${EXTRACT_SUFX} ]; then \
-# ${MKDIR} ${DD} && ${MKDIR} ${WRKDIR} && \
-# ${ECHO_MSG} "====> Fetching ${DISTNAME}${EXTRACT_SUFX}" && \
-# cd ${DD} && ${FETCH_CMD} https://files.pythonhosted.org/packages/source/y/yt-dlp-ejs/${DISTNAME}${EXTRACT_SUFX} && \
-# ${ECHO_MSG} "====> Fetching and packaging node_modules using package-lock.json" && \
-# ${TAR} -xf ${DD}/${DISTNAME}${EXTRACT_SUFX} -C ${WRKDIR} && \
-# if [ -f ${FILESDIR}/package-lock.json ]; then \
-# ${ECHO_MSG} "====> Using existing package-lock.json"; \
-# ${CP} ${FILESDIR}/package-lock.json ${WRKDIR}/${DISTNAME}/; \
-# else \
-# ${ECHO_MSG} "====> Generating package-lock.json (it will be saved to ${FILESDIR})"; \
-# fi && \
-# cd ${WRKDIR}/${DISTNAME} && \
-# ${SETENV} HOME=${WRKDIR} npm ci && \
-# if ! [ -f ${FILESDIR}/package-lock.json ]; then \
-# ${ECHO_MSG} "====> Saving generated package-lock.json to ${FILESDIR}"; \
-# ${CP} ${WRKDIR}/${DISTNAME}/package-lock.json ${FILESDIR}/; \
-# fi && \
-# ${FIND} node_modules -name '.package-lock.json' -delete && \
-# ${FIND} node_modules -type d -name '@*' -empty -delete && \
-# ${FIND} node_modules -exec ${TOUCH} -h -d 1970-01-01T00:00:00Z {} \; && \
-# ${FIND} node_modules -print0 | ${SORT} -z | \
-# ${TAR} czf ${DD}/${PORTNAME}-node-modules-${DISTVERSION}${EXTRACT_SUFX} \
-# --format=bsdtar --no-read-sparse --gid 0 --uid 0 \
-# --options gzip:!timestamp --no-recursion --null -T - && \
-# ${RM} -rf ${WRKDIR}; \
-# fi
+do-fetch: # this target (1) downloads the source tarball, (2) extracts it to a temporary location, (3) runs npm ci to fetch and install node_modules, and (4) packages the node_modules directory into a separate tarball for later extraction during the build phase. This allows us to avoid running npm ci during the build phase which will require network access
+ @if ! [ -f ${DD}/${DISTNAME}${EXTRACT_SUFX} ] || \
+ ! [ -f ${DD}/${PORTNAME}-node-modules-${DISTVERSION}${EXTRACT_SUFX} ]; then \
+ ${MKDIR} ${DD} && ${MKDIR} ${WRKDIR} && \
+ ${ECHO_MSG} "====> (1) Fetching ${DISTNAME}${EXTRACT_SUFX}" && \
+ cd ${DD} && ${FETCH_CMD} https://files.pythonhosted.org/packages/source/y/yt-dlp-ejs/${DISTNAME}${EXTRACT_SUFX} && \
+ ${ECHO_MSG} "====> (2) Extracting the tarball" && \
+ ${TAR} -xf ${DD}/${DISTNAME}${EXTRACT_SUFX} -C ${WRKDIR} && \
+ ${ECHO_MSG} "====> (3) Fetching and packaging node_modules using package-lock.json" && \
+ if [ -f ${FILESDIR}/package-lock.json ]; then \
+ ${ECHO_MSG} "====> Using existing package-lock.json"; \
+ ${CP} ${FILESDIR}/package-lock.json ${WRKDIR}/${DISTNAME}/; \
+ else \
+ ${ECHO_MSG} "====> Generating package-lock.json (it will be saved to ${FILESDIR})"; \
+ fi && \
+ cd ${WRKDIR}/${DISTNAME} && \
+ ${SETENV} HOME=${WRKDIR} npm ci && \
+ if ! [ -f ${FILESDIR}/package-lock.json ]; then \
+ ${ECHO_MSG} "====> Saving generated package-lock.json to ${FILESDIR}"; \
+ ${CP} ${WRKDIR}/${DISTNAME}/package-lock.json ${FILESDIR}/; \
+ fi && \
+ ${FIND} node_modules -name '.package-lock.json' -delete && \
+ ${FIND} node_modules -type d -name '@*' -empty -delete && \
+ ${FIND} node_modules -exec ${TOUCH} -h -d 1970-01-01T00:00:00Z {} \; && \
+ ${ECHO_MSG} "====> (4) Packaging original tarball + NodeJS dependencies into a final tarball" && \
+ ${FIND} node_modules -print0 | ${SORT} -z | \
+ ${TAR} czf ${DD}/${PORTNAME}-node-modules-${DISTVERSION}${EXTRACT_SUFX} \
+ --format=bsdtar --no-read-sparse --gid 0 --uid 0 \
+ --options gzip:!timestamp --no-recursion --null -T - && \
+ ${RM} -rf ${WRKDIR}; \
+ fi
post-extract:
# Extract pre-downloaded node_modules