1 | # -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 |
---|
2 | |
---|
3 | PortSystem 1.0 |
---|
4 | PortGroup github 1.0 |
---|
5 | |
---|
6 | github.setup yarnpkg yarn 0.18.0 v |
---|
7 | |
---|
8 | categories devel |
---|
9 | platforms darwin |
---|
10 | license BSD |
---|
11 | maintainers gmail.com:isomacrte |
---|
12 | |
---|
13 | supported_archs noarch |
---|
14 | |
---|
15 | description yarn package manager for JavaScript. |
---|
16 | long_description Yarn is a package manager for your code. \ |
---|
17 | It allows you to use and share code with other developers from around the world. \ |
---|
18 | Yarn does this quickly, securely, and reliably so you don’t ever have to worry. \ |
---|
19 | Yarn allows you to use other developers’ solutions to different problems, making it easier for you to develop your software. \ |
---|
20 | If you have problems, you can report issues or contribute back, and when the problem is fixed, you can use Yarn to keep it all up to date. \ |
---|
21 | Code is shared through something called a package (sometimes referred to as a module). \ |
---|
22 | A package contains all the code being shared as well as a package.json file which describes the package. |
---|
23 | |
---|
24 | homepage https://yarnpkg.com/ |
---|
25 | |
---|
26 | github.tarball_from releases |
---|
27 | |
---|
28 | checksums rmd160 26ecfb7134e6a400fdceff7c97f535466c934dce \ |
---|
29 | Sha256 8fb1843d2a1283972ff5fead9d6c9f9002de793ecec6dfec7abec908403ecd19 |
---|
30 | |
---|
31 | distname ${name}-${git.branch} |
---|
32 | |
---|
33 | worksrcdir "dist" |
---|
34 | |
---|
35 | use_configure no |
---|
36 | |
---|
37 | depends_run bin:node:nodejs7 |
---|
38 | |
---|
39 | patchfiles patch-symbolic-link-fix.diff |
---|
40 | |
---|
41 | build {} |
---|
42 | |
---|
43 | # Since this is all just JavaScript code, there is nothing to _build_. We just copy the files into the correct locations. |
---|
44 | destroot { |
---|
45 | xinstall -d -m 755 ${destroot}${prefix}/lib/node_modules/ |
---|
46 | file copy ${worksrcpath} ${destroot}${prefix}/lib/node_modules/ |
---|
47 | file rename ${destroot}${prefix}/lib/node_modules/${worksrcdir} ${destroot}${prefix}/lib/node_modules/${name} |
---|
48 | ln -s ../lib/node_modules/${name}/bin/${name} ${destroot}${prefix}/bin/${name} |
---|
49 | } |
---|
50 | |
---|
51 | # Borrowed a bit of the well written opening from the macports npm packages. |
---|
52 | notes " |
---|
53 | It is not recommended to install packages globally. But if you do so\ |
---|
54 | please be aware that they won't get cleaned up when you deactivate\ |
---|
55 | or uninstall ${name}. Globally installed packages will leave a\ |
---|
56 | symboolic link in ${prefix}/bin with the package resources installed\ |
---|
57 | in \$HOME/.yarn-config/global by default. You can remove all globally\ |
---|
58 | installed packages by first running the following command (assuming\ |
---|
59 | you have xargs installed), |
---|
60 | |
---|
61 | $ ls -1 \$HOME/.yarn-config/global/node_modules/ | xargs sudo yarn global remove |
---|
62 | |
---|
63 | You should also check your \$HOME folder for leftover .yarn* files. |
---|
64 | |
---|
65 | This is only required if you have installed packages globally. If you did not\ |
---|
66 | install anything globally then you can uninstall normally. |
---|
67 | |
---|
68 | Note, while this package doesn't conflict with NPM, if you have both NPM and\ |
---|
69 | Yarn installed and you use both to install packages globally you may end up\ |
---|
70 | with strange errors. If you do choose to install packages globally you should\ |
---|
71 | probably only use one of these tools to do so. |
---|
72 | |
---|
73 | Rather than installing packages globally, you can set the environment variable\ |
---|
74 | PREFIX and then yarn will install into that location instead, i.e. |
---|
75 | |
---|
76 | mkdir -p \$HOME/.yarnGlobal/bin # Or wherever you want |
---|
77 | export PREFIX=\$HOME/.yarnGlobal/bin |
---|
78 | export PATH=\$PREFIX:\$PATH |
---|
79 | " |
---|