Permalink
Browse files

increment to 0.1.5, and move internal libzip configure and build into…

… node-waf so that ndistro will work
  • Loading branch information...
1 parent 1a93187 commit c3436500bd567e583c4ad9170a76faa3b9f2fd75 @springmeyer springmeyer committed Feb 4, 2011
Showing with 27 additions and 13 deletions.
  1. +0 −3 Makefile
  2. +0 −8 configure
  3. +1 −1 package.json
  4. +1 −1 src/_zipfile.cc
  5. +25 −0 wscript
View
3 Makefile
@@ -1,15 +1,12 @@
all: zipfile.node
install:
- cd deps/libzip-0.9.3; make; cd ../../
node-waf -v build install
zipfile.node:
- cd deps/libzip-0.9.3; make; cd ../../
node-waf -v build
clean:
- cd deps/libzip-0.9.3; make clean distclean; cd ../../
node-waf -v clean distclean
uninstall:
View
8 configure
@@ -1,11 +1,3 @@
#!/bin/sh
-cd deps/
-# internal libzip
-if ! test -e libzip-0.9.3; then
- tar xvf libzip-0.9.3.tar.bz2
-fi
-cd libzip-0.9.3
-CFLAGS='-fPIC' ./configure --disable-dependency-tracking --enable-static --disable-shared
-cd ../../
node-waf configure $@
View
2 package.json
@@ -1,6 +1,6 @@
{
"name" : "zipfile",
- "version" : "0.1.4",
+ "version" : "0.1.5",
"main" : "./lib/index.js",
"description" : "C++ library for handling zipfiles in node",
"keywords" : ["zipfile", "uncompress", "unzip", "zlib"],
View
2 src/_zipfile.cc
@@ -19,7 +19,7 @@ extern "C" {
ZipFile::Initialize(target);
// node-zipfile version
- target->Set(String::NewSymbol("version"), String::New("0.1.4"));
+ target->Set(String::NewSymbol("version"), String::New("0.1.5"));
// versions of deps
Local<Object> versions = Object::New();
View
25 wscript
@@ -34,9 +34,20 @@ def set_options(opt):
, dest='shared_libzip'
)
+def configure_libzip():
+ if not Options.options.shared_libzip:
+ Utils.pprint('GREEN','configuring internal libzip dep')
+ os.chdir('deps')
+ if not os.path.exists('libzip-0.9.3'):
+ os.system('tar xvf libzip-0.9.3.tar.bz2')
+ os.chdir('libzip-0.9.3')
+ os.system("CFLAGS='-fPIC' ./configure --disable-dependency-tracking --enable-static --disable-shared")
+ os.chdir('../../')
+
def configure(conf):
conf.check_tool("compiler_cxx")
conf.check_tool("node_addon")
+ configure_libzip()
libzip_includes = []
libzip_libpath = []
@@ -119,8 +130,15 @@ def configure(conf):
#ldflags = []
#conf.env.append_value("LDFLAGS", ldflags)
+def build_libzip():
+ if not Options.options.shared_libzip:
+ os.chdir('deps/libzip-0.9.3')
+ os.system('make')
+ os.chdir('../../')
+
def build(bld):
obj = bld.new_task_gen("cxx", "shlib", "node_addon", install_path=None)
+ build_libzip()
obj.cxxflags = ["-DNDEBUG", "-O3", "-g", "-Wall", "-D_FILE_OFFSET_BITS=64", "-D_LARGEFILE_SOURCE"]
obj.target = TARGET
obj.source = "src/_zipfile.cc"
@@ -133,9 +151,16 @@ def build(bld):
bin_dir = bld.path.find_dir('./bin')
bld.install_files('${PREFIX}/bin', bin_dir.ant_glob('*'), cwd=bin_dir, relative_trick=True, chmod=0755)
+def clean_libzip():
+ if not Options.options.shared_libzip:
+ os.chdir('deps/libzip-0.9.3')
+ os.system('make clean distclean')
+ os.chdir('../../')
+
def shutdown():
if Options.commands['clean']:
if exists(TARGET): unlink(TARGET)
+ clean_libzip()
if Options.commands['clean']:
if exists(dest):
unlink(dest)

0 comments on commit c343650

Please sign in to comment.