Skip to content
Browse files

Preliminary pkg-config support.

  • Loading branch information...
1 parent 6691aca commit 045bd4c7a49b83a9e6cd4083763f12a698c48845 @bnoordhuis bnoordhuis committed with ry
Showing with 19 additions and 0 deletions.
  1. +1 −0 .gitignore
  2. +9 −0 tools/nodejs.pc.in
  3. +9 −0 wscript
View
1 .gitignore
@@ -8,6 +8,7 @@ doc/api.xml
doc/api.html
doc/changelog.html
doc/node.1
+tools/nodejs.pc
test/fixtures/hello.txt
tmp/
node
View
9 tools/nodejs.pc.in
@@ -0,0 +1,9 @@
+version=@VERSION@
+prefix=@PREFIX@
+libdir=${prefix}/lib
+includedir=${prefix}/include/node
+
+Name: nodejs
+Description: Evented I/O for V8 JavaScript.
+Version: ${version}
+Cflags: -I${includedir}
View
9 wscript
@@ -530,6 +530,7 @@ def build(bld):
, 'CPPFLAGS' : " ".join(program.env["CPPFLAGS"]).replace('"', '\\"')
, 'LIBFLAGS' : " ".join(program.env["LIBFLAGS"]).replace('"', '\\"')
, 'PREFIX' : program.env["PREFIX"]
+ , 'VERSION' : '0.3.0-pre' # FIXME should not be hard-coded, see NODE_VERSION_STRING in src/node_version.h
}
return x
@@ -571,6 +572,14 @@ def build(bld):
bld.install_files('${PREFIX}/lib/node/wafadmin', 'tools/wafadmin/*.py')
bld.install_files('${PREFIX}/lib/node/wafadmin/Tools', 'tools/wafadmin/Tools/*.py')
+ # create a pkg-config(1) file
+ node_conf = bld.new_task_gen('subst', before="cxx")
+ node_conf.source = 'tools/nodejs.pc.in'
+ node_conf.target = 'tools/nodejs.pc'
+ node_conf.dict = subflags(node)
+
+ bld.install_files('${PREFIX}/lib/pkgconfig', 'tools/nodejs.pc')
+
def shutdown():
Options.options.debug
# HACK to get binding.node out of build directory.

0 comments on commit 045bd4c

Please sign in to comment.
Something went wrong with that request. Please try again.