dev-python/twisted: keyworded 20.3.0 for ia64, bug #726328
[gentoo.git] / dev-lang / coffee-script / coffee-script-1.9.3-r1.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=5
5
6 inherit multilib
7
8 MY_PN="coffeescript"
9
10 DESCRIPTION="A little language that compiles into javascript"
11 HOMEPAGE="https://coffeescript.org/"
12
13 # The tests are missing from the npm registry package, so use Github
14 # instead.
15 SRC_URI="https://github.com/jashkenas/${MY_PN}/archive/${PV}.tar.gz
16         -> ${P}.tar.gz"
17 S="${WORKDIR}/${MY_PN}-${PV}"
18
19 LICENSE="MIT"
20 SLOT="0"
21 KEYWORDS="amd64 x86"
22
23 # This package has a test suite (that works), but it requires a number
24 # of packages not in the tree. See thread "NPM / NodeJS project" on the
25 # gentoo-dev archives for more info.
26 IUSE="doc examples"
27
28 RDEPEND="net-libs/nodejs"
29
30 src_install() {
31         local npm_module_dir="/usr/$(get_libdir)/node/${PN}"
32         insinto "${npm_module_dir}"
33         doins *.js package.json
34         doins -r lib
35         dodoc CONTRIBUTING.md README.md
36
37         use doc && dodoc -r documentation
38         use examples && dodoc -r examples
39
40         # The coffee and cake "binaries" use a relative path to find the lib
41         # directory, so we have to symlink them rather than use dobin().
42         exeinto "${npm_module_dir}/bin"
43         doexe bin/cake
44         doexe bin/coffee
45         dosym "${npm_module_dir}/bin/cake" "/usr/bin/cake"
46         dosym "${npm_module_dir}/bin/coffee" "/usr/bin/coffee"
47 }