git: bce3c4b307a1 - main - lang/typescript: improve port
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 02 Oct 2025 09:19:52 UTC
The branch main has been updated by mandree:
URL: https://cgit.FreeBSD.org/ports/commit/?id=bce3c4b307a1ef5a94e6e556b4e7f5debb9fc998
commit bce3c4b307a1ef5a94e6e556b4e7f5debb9fc998
Author: Daniel Engberg <diizzy@FreeBSD.org>
AuthorDate: 2025-10-02 09:15:42 +0000
Commit: Matthias Andree <mandree@FreeBSD.org>
CommitDate: 2025-10-02 09:19:45 +0000
lang/typescript: improve port
-----
I've replaced the ${RM} ... *.bak from Daniel's patch by a
case *.bak) ;; *) ${INSTALL_SCRIPT} ... ;; esac to avoid
gratuitous writes.
-- Matthias Andree
---
lang/typescript/Makefile | 25 +++++++++++++------------
1 file changed, 13 insertions(+), 12 deletions(-)
diff --git a/lang/typescript/Makefile b/lang/typescript/Makefile
index 92173be51f85..98f0fdf4f419 100644
--- a/lang/typescript/Makefile
+++ b/lang/typescript/Makefile
@@ -1,36 +1,37 @@
PORTNAME= typescript
DISTVERSION= 5.9.3
CATEGORIES= lang
-MASTER_SITES= https://registry.npmjs.org/${PORTNAME}/-/
-EXTRACT_SUFX= .tgz
+MASTER_SITES= https://github.com/microsoft/TypeScript/releases/download/v${DISTVERSION}/ \
+ https://registry.npmjs.org/${PORTNAME}/-/
MAINTAINER= mandree@FreeBSD.org
COMMENT= Superset of JavaScript that compiles to JavaScript output
WWW= https://www.typescriptlang.org/
+LICENSE= APACHE20
+
DEPRECATED= New port was added without port maintainer, submitter not interested in taking it. See https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=289856 and contact mandree@ if you are willing to maintain typescript and have a track record that lets you appear suitable for maintaining a high-profile port.
EXPIRATION_DATE=2025-11-30
-LICENSE= APACHE20
+USES= nodejs:run tar:tgz
NO_ARCH= yes
NO_BUILD= yes
-USES= nodejs:run tar
-
WRKSRC= ${WRKDIR}/package
-
post-patch:
- ${FIND} ${WRKSRC}/bin -type f | ${XARGS} \
- ${REINPLACE_CMD} -i "" -e 's|../lib|${LOCALBASE}/lib/node_modules/${PORTNAME}|'
+ @cd ${WRKSRC}/bin && for f in *; do \
+ ${REINPLACE_CMD} -e 's|../lib|${LOCALBASE}/lib/node_modules/${PORTNAME}|g' "$$f"; \
+ done
do-install:
@${MKDIR} ${STAGEDIR}${PREFIX}/lib/node_modules/${PORTNAME}
- @${INSTALL_SCRIPT} ${WRKSRC}/bin/tsc \
- ${STAGEDIR}${PREFIX}/bin
- @${INSTALL_SCRIPT} ${WRKSRC}/bin/tsserver \
- ${STAGEDIR}${PREFIX}/bin
+ cd ${WRKSRC}/bin && for f in *; do \
+ case "$${f}" in *.bak) ;; *) \
+ ${INSTALL_SCRIPT} "${WRKSRC}/bin/$$f" ${STAGEDIR}${PREFIX}/bin ; \
+ esac ; \
+ done
cd ${WRKSRC}/lib && ${COPYTREE_SHARE} . \
${STAGEDIR}${PREFIX}/lib/node_modules/${PORTNAME}