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