Skip to content

Commit

Permalink
www/yarn-node*: Reorganize yarn-node* as node20 is the new default
Browse files Browse the repository at this point in the history
  • Loading branch information
sunpoet committed Nov 1, 2023
1 parent 1ce5801 commit 1d8473a
Show file tree
Hide file tree
Showing 7 changed files with 53 additions and 53 deletions.
2 changes: 1 addition & 1 deletion www/yarn-node16/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
USES= nodejs:16,run

MASTERDIR= ${.CURDIR}/../yarn-node18
MASTERDIR= ${.CURDIR}/../yarn-node20

.include "${MASTERDIR}/Makefile"
52 changes: 3 additions & 49 deletions www/yarn-node18/Makefile
Original file line number Diff line number Diff line change
@@ -1,51 +1,5 @@
PORTNAME= yarn
DISTVERSIONPREFIX= v
PORTVERSION= 1.22.19
CATEGORIES= www
MASTER_SITES= https://yarnpkg.com/downloads/${PORTVERSION}/
PKGNAMESUFFIX= ${NODEJS_SUFFIX}
USES= nodejs:18,run

MAINTAINER= [email protected]
COMMENT= Package manager for node, alternative to npm
WWW= https://classic.yarnpkg.com/
MASTERDIR= ${.CURDIR}/../yarn-node20

LICENSE= BSD2CLAUSE
LICENSE_FILE= ${WRKSRC}/LICENSE

USES?= nodejs:18,run
USES+= cpe
CPE_VENDOR= ${PORTNAME}pkg

CONFLICTS_INSTALL= yarn-node[0-9][0-9]

OPTIONS_DEFINE= HADOOPCOMPAT
HADOOPCOMPAT_DESC= hadoop2 compatibility, the yarn script is excluded

OPTIONS_SUB= yes

HADOOPCOMPAT_CONFLICTS_INSTALL_OFF= hadoop2*

NO_ARCH= yes
NO_BUILD= yes

post-patch:
@${RM} ${WRKSRC}/bin/*.cmd
@${REINPLACE_CMD} -i '' \
-e 's|"installationMethod": "tar"|"installationMethod": "pkg"|g' \
${WRKSRC}/package.json
@${REINPLACE_CMD} -i '' -e 's%Linux)%Linux|FreeBSD)%g' \
${WRKSRC}/bin/yarn

do-install:
${MKDIR} ${STAGEDIR}${PREFIX}/lib/node_modules/yarn
(cd ${WRKSRC}/ && ${COPYTREE_SHARE} . ${STAGEDIR}${PREFIX}/lib/node_modules/yarn)
${RLN} ${STAGEDIR}${PREFIX}/lib/node_modules/yarn/bin/yarn.js \
${STAGEDIR}${PREFIX}/bin/yarn.js
${RLN} ${STAGEDIR}${PREFIX}/lib/node_modules/yarn/bin/yarnpkg \
${STAGEDIR}${PREFIX}/bin/yarnpkg

do-install-HADOOPCOMPAT-off:
${RLN} ${STAGEDIR}${PREFIX}/lib/node_modules/yarn/bin/yarn \
${STAGEDIR}${PREFIX}/bin/yarn

.include <bsd.port.mk>
.include "${MASTERDIR}/Makefile"
52 changes: 49 additions & 3 deletions www/yarn-node20/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,51 @@
USES= nodejs:20,run
PORTNAME= yarn
DISTVERSIONPREFIX= v
PORTVERSION= 1.22.19
CATEGORIES= www
MASTER_SITES= https://yarnpkg.com/downloads/${PORTVERSION}/
PKGNAMESUFFIX= ${NODEJS_SUFFIX}

MASTERDIR= ${.CURDIR}/../yarn-node18
MAINTAINER= [email protected]
COMMENT= Package manager for node, alternative to npm
WWW= https://classic.yarnpkg.com/

.include "${MASTERDIR}/Makefile"
LICENSE= BSD2CLAUSE
LICENSE_FILE= ${WRKSRC}/LICENSE

USES?= nodejs:20,run
USES+= cpe
CPE_VENDOR= ${PORTNAME}pkg

CONFLICTS_INSTALL= yarn-node[0-9][0-9]

OPTIONS_DEFINE= HADOOPCOMPAT
HADOOPCOMPAT_DESC= hadoop2 compatibility, the yarn script is excluded

OPTIONS_SUB= yes

HADOOPCOMPAT_CONFLICTS_INSTALL_OFF= hadoop2*

NO_ARCH= yes
NO_BUILD= yes

post-patch:
@${RM} ${WRKSRC}/bin/*.cmd
@${REINPLACE_CMD} -i '' \
-e 's|"installationMethod": "tar"|"installationMethod": "pkg"|g' \
${WRKSRC}/package.json
@${REINPLACE_CMD} -i '' -e 's%Linux)%Linux|FreeBSD)%g' \
${WRKSRC}/bin/yarn

do-install:
${MKDIR} ${STAGEDIR}${PREFIX}/lib/node_modules/yarn
(cd ${WRKSRC}/ && ${COPYTREE_SHARE} . ${STAGEDIR}${PREFIX}/lib/node_modules/yarn)
${RLN} ${STAGEDIR}${PREFIX}/lib/node_modules/yarn/bin/yarn.js \
${STAGEDIR}${PREFIX}/bin/yarn.js
${RLN} ${STAGEDIR}${PREFIX}/lib/node_modules/yarn/bin/yarnpkg \
${STAGEDIR}${PREFIX}/bin/yarnpkg

do-install-HADOOPCOMPAT-off:
${RLN} ${STAGEDIR}${PREFIX}/lib/node_modules/yarn/bin/yarn \
${STAGEDIR}${PREFIX}/bin/yarn

.include <bsd.port.mk>
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 1d8473a

Please sign in to comment.