Make coffeescript use the node module. This simplifies the Makefile,

removes the need for patches, and makes coffeescript also available
as a library you can require in nodejs.

OK sthen@
This commit is contained in:
jeremy 2012-04-03 18:36:52 +00:00
parent cd034fd16a
commit f3ecaf1511
4 changed files with 40 additions and 86 deletions

View File

@ -1,9 +1,12 @@
# $OpenBSD: Makefile,v 1.1.1.1 2011/12/19 22:21:47 jeremy Exp $
# $OpenBSD: Makefile,v 1.2 2012/04/03 18:36:52 jeremy Exp $
COMMENT = little language that compiles to javascript
DISTNAME = coffeescript-1.2.0
VERSION = 1.2.0
NPM_NAME = coffee-script
PKGNAME = coffeescript-${VERSION}
CATEGORIES = lang
REVISION = 0
HOMEPAGE = http://coffeescript.org
@ -13,24 +16,8 @@ PERMIT_PACKAGE_FTP = Yes
PERMIT_DISTFILES_CDROM = Yes
PERMIT_DISTFILES_FTP = Yes
MASTER_SITES = http://distfiles.nl/
MODULES = www/node
BUILD_DEPENDS = ${RUN_DEPENDS}
RUN_DEPENDS = www/node
GIT_SHA1 = 9abe614
WRKDIST = ${WRKDIR}/jashkenas-coffee-script-${GIT_SHA1}
NO_BUILD = Yes
pre-configure:
${SUBST_CMD} ${WRKSRC}/Cakefile
do-install:
cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} HOME=${WRKSRC} \
${SUDO} bin/cake --prefix ${PREFIX} install
do-regress:
cd ${WRKSRC} && bin/cake test
CONFIGURE_STYLE = npm
.include <bsd.port.mk>

View File

@ -1,5 +1,5 @@
MD5 (coffeescript-1.2.0.tar.gz) = Xfw+4hIU8bfobAU19ThqNQ==
RMD160 (coffeescript-1.2.0.tar.gz) = YnbH/znZSUxB+DIL/BrLveJs51k=
SHA1 (coffeescript-1.2.0.tar.gz) = iKUwy6jLaTzQZ/k3aFIJOFM31vQ=
SHA256 (coffeescript-1.2.0.tar.gz) = 9QJxODduCW+//O8G93chO4o72FKvshD/LH0e6P/bCeA=
SIZE (coffeescript-1.2.0.tar.gz) = 452704
MD5 (coffee-script-1.2.0.tgz) = wo3P9YiEGZsFnZ3k+oLARA==
RMD160 (coffee-script-1.2.0.tgz) = 69HVJuIn31Wg6cJChJzHeK6mcMM=
SHA1 (coffee-script-1.2.0.tgz) = teYeVfHKjEqeuH1TqgZX6kMSW5E=
SHA256 (coffee-script-1.2.0.tgz) = PxvKYTAgMwLpE7Tg19lVzfXdo0Sb6GQ+ge16W5N9e8Q=
SIZE (coffee-script-1.2.0.tgz) = 71680

View File

@ -1,23 +0,0 @@
$OpenBSD: patch-Cakefile,v 1.1.1.1 2011/12/19 22:21:47 jeremy Exp $
--- Cakefile.orig Tue Nov 8 15:01:45 2011
+++ Cakefile Tue Dec 13 14:52:16 2011
@@ -50,17 +50,12 @@ task 'install', 'install CoffeeScript into /usr/local
base = options.prefix or '/usr/local'
lib = "#{base}/lib/coffee-script"
bin = "#{base}/bin"
- node = "~/.node_libraries/coffee-script"
console.log "Installing CoffeeScript to #{lib}"
- console.log "Linking to #{node}"
- console.log "Linking 'coffee' to #{bin}/coffee"
exec([
"mkdir -p #{lib} #{bin}"
"cp -rf bin lib LICENSE README package.json src #{lib}"
- "ln -sfn #{lib}/bin/coffee #{bin}/coffee"
- "ln -sfn #{lib}/bin/cake #{bin}/cake"
- "mkdir -p ~/.node_libraries"
- "ln -sfn #{lib}/lib/coffee-script #{node}"
+ "ln -sfn ${TRUEPREFIX}/lib/coffee-script/bin/coffee #{bin}/coffee"
+ "ln -sfn ${TRUEPREFIX}/lib/coffee-script/bin/cake #{bin}/cake"
].join(' && '), (err, stdout, stderr) ->
if err then console.log stderr.trim() else log 'done', green
)

View File

@ -1,40 +1,30 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2011/12/19 22:21:47 jeremy Exp $
@comment $OpenBSD: PLIST,v 1.2 2012/04/03 18:36:52 jeremy Exp $
bin/cake
bin/coffee
lib/coffee-script/
lib/coffee-script/LICENSE
lib/coffee-script/README
lib/coffee-script/bin/
lib/coffee-script/bin/cake
lib/coffee-script/bin/coffee
lib/coffee-script/lib/
lib/coffee-script/lib/coffee-script/
lib/coffee-script/lib/coffee-script/browser.js
lib/coffee-script/lib/coffee-script/cake.js
lib/coffee-script/lib/coffee-script/coffee-script.js
lib/coffee-script/lib/coffee-script/command.js
lib/coffee-script/lib/coffee-script/grammar.js
lib/coffee-script/lib/coffee-script/helpers.js
lib/coffee-script/lib/coffee-script/index.js
lib/coffee-script/lib/coffee-script/lexer.js
lib/coffee-script/lib/coffee-script/nodes.js
lib/coffee-script/lib/coffee-script/optparse.js
lib/coffee-script/lib/coffee-script/parser.js
lib/coffee-script/lib/coffee-script/repl.js
lib/coffee-script/lib/coffee-script/rewriter.js
lib/coffee-script/lib/coffee-script/scope.js
lib/coffee-script/package.json
lib/coffee-script/src/
lib/coffee-script/src/browser.coffee
lib/coffee-script/src/cake.coffee
lib/coffee-script/src/coffee-script.coffee
lib/coffee-script/src/command.coffee
lib/coffee-script/src/grammar.coffee
lib/coffee-script/src/helpers.coffee
lib/coffee-script/src/index.coffee
lib/coffee-script/src/lexer.coffee
lib/coffee-script/src/nodes.coffee
lib/coffee-script/src/optparse.coffee
lib/coffee-script/src/repl.coffee
lib/coffee-script/src/rewriter.coffee
lib/coffee-script/src/scope.coffee
lib/node_modules/coffee-script/
lib/node_modules/coffee-script/.npmignore
lib/node_modules/coffee-script/LICENSE
lib/node_modules/coffee-script/README
lib/node_modules/coffee-script/Rakefile
lib/node_modules/coffee-script/bin/
lib/node_modules/coffee-script/bin/cake
lib/node_modules/coffee-script/bin/coffee
lib/node_modules/coffee-script/extras/
lib/node_modules/coffee-script/extras/jsl.conf
lib/node_modules/coffee-script/lib/
lib/node_modules/coffee-script/lib/coffee-script/
lib/node_modules/coffee-script/lib/coffee-script/browser.js
lib/node_modules/coffee-script/lib/coffee-script/cake.js
lib/node_modules/coffee-script/lib/coffee-script/coffee-script.js
lib/node_modules/coffee-script/lib/coffee-script/command.js
lib/node_modules/coffee-script/lib/coffee-script/grammar.js
lib/node_modules/coffee-script/lib/coffee-script/helpers.js
lib/node_modules/coffee-script/lib/coffee-script/index.js
lib/node_modules/coffee-script/lib/coffee-script/lexer.js
lib/node_modules/coffee-script/lib/coffee-script/nodes.js
lib/node_modules/coffee-script/lib/coffee-script/optparse.js
lib/node_modules/coffee-script/lib/coffee-script/parser.js
lib/node_modules/coffee-script/lib/coffee-script/repl.js
lib/node_modules/coffee-script/lib/coffee-script/rewriter.js
lib/node_modules/coffee-script/lib/coffee-script/scope.js
lib/node_modules/coffee-script/package.json