The packages that were in the tarball have been removed and listed in
package.json. Please confirm that this hasn't messed something up; I have
almost no experience with node/npm. I did go through the tests described
at https://yarnpkg.com/en/docs/usage and all seemed fine, but please
confirm I didn't do something stupid.
Details
portlint -C: OK
testport: OK (poudriere: 10.3-RELEASE-p10, i386 with all node options)
Diff Detail
- Repository
- rP FreeBSD ports repository
- Lint
No Lint Coverage - Unit
No Test Coverage - Build Status
Buildable 9573 Build 10020: arc lint + arc unit
Event Timeline
Hi Luca. I have been using this latest version of yarn a descent amount recently for work with the upcoming net-im/mastodon. All seems well from here. Have you had a chance to do any tests?
I'm moving my suggestions here per request of the package maintainer:
www/yarn/Makefile | ||
---|---|---|
37–38 | Also add the link to yarnpkg: ${LN} -sf ../lib/node_modules/yarn/bin/yarnpkg ${STAGEDIR}${PREFIX}/bin/yarnpkg | |
www/yarn/pkg-plist | ||
5 | This needs the executable bit set | |
6–7 | This is a Windows cmd file. It is better not to have the executable bit set. | |
8–9 | This is a Windows cmd file. It is better not to have the executable bit set. |
- Use DISTVERSION
- Remove PORTREVISION
- Stop trying to remove files that are no longer in WRKSRC
- Remove Windows cmd files
- Create a link to yarnpkg in ${PREFIX}/bin
Actually, taking a closer look at $WRKSRC, I wonder if do-install should be changed.
WRKSRC is now simply
./bin
./bin/yarn
./bin/yarn.js
./bin/yarnpkg
./bin/yarnpkg.cmd
./bin/yarn.cmd
./package.json
./lib
./lib/v8-compile-cache.js
./lib/yarn-cli.js
./LICENSE
Why not just install what's in bin/ to ${PREFIX}/bin and what's in lib to ${PREFIX}/lib? Where should package.json go?
I spent a couple of week on holiday. Today I performed several tests and I'm very happy with all of your modifications. Thanks for the contribution!
yarn is a node module, so it should be installed where all other node modules are installed.
yarn, as module, is special, because it provides a couple of shell script that, for convenience, are made available using symbolic links.
Even if installing under ${PREFIX} should be doable, imho it's not consistent with node
I agree after taking a closer look at the source files and other yarn packages. I will proceed with the accepted changes. Thanks.
It should go in /usr/local/lib/node_modules/yarn/package.json.
If you want to be picky, you can replace "installationMethod": "tar", to "installationMethod": "pkg", in package.json.
Something like:
post-patch: @${REINPLACE_CMD} -i '' -e 's|"installationMethod": "tar"|"installationMethod": "pkg"|g' \ ${WRKSRC}/package.json
This is what the homebrew package does:
www/yarn/Makefile | ||
---|---|---|
37–38 | Both these lines should probably use the RLN macro, so that you can use fully qualified paths. Something like: ${RLN} ${STAGEDIR}${PREFIX}/lib/node_modules/yarn/bin/yarn.js \ ${STAGEDIR}${PREFIX}/bin/yarn |
www/yarn/Makefile | ||
---|---|---|
31–32 | I'm sorry. I think the convention is to do it this way: REINPLACE_ARGS= -i '' post-patch: @${RM} ${WRKSRC}/bin/*.cmd @${REINPLACE_CMD} -e 's|"installationMethod": "tar"|"installationMethod": "pkg"|g' \ ${WRKSRC}/package.json |