Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 35 lines (27 sloc) 1.279 kB
45a7ddb @pkrumins added wscript
pkrumins authored
1 import Options
2 from os import unlink, symlink, popen
8be64dc @mnutt upgrade to node 0.3
mnutt authored
3 from os.path import exists
45a7ddb @pkrumins added wscript
pkrumins authored
4
5 srcdir = "."
6 blddir = "build"
7 VERSION = "0.0.1"
8
9 def set_options(opt):
10 opt.tool_options("compiler_cxx")
11
12 def configure(conf):
13 conf.check_tool("compiler_cxx")
14 conf.check_tool("node_addon")
9b3af33 @Sannis Improve error reporting in wscript
Sannis authored
15
16 if not conf.check_cxx(lib='gif', libpath=['/lib', '/usr/lib', '/usr/local/lib', '/usr/local/libgif/lib', '/usr/local/giflib/lib', '/usr/local/libungif/lib', '/usr/local/pkg/giflib-4.1.6/lib']):
17 conf.fatal("Missing libgif library from giflib package")
18 if not conf.check_cxx(header_name='gif_lib.h'):
19 conf.fatal("Missing gif_lib.h header from giflib-devel package")
45a7ddb @pkrumins added wscript
pkrumins authored
20
21 def build(bld):
22 obj = bld.new_task_gen("cxx", "shlib", "node_addon")
23 obj.target = "gif"
8be64dc @mnutt upgrade to node 0.3
mnutt authored
24 obj.source = "src/common.cpp src/utils.cpp src/palette.cpp src/quantize.cpp src/gif_encoder.cpp src/gif.cpp src/dynamic_gif_stack.cpp src/animated_gif.cpp src/async_animated_gif.cpp src/module.cpp src/buffer_compat.cpp"
45a7ddb @pkrumins added wscript
pkrumins authored
25 obj.uselib = "GIF"
e1af308 @pkrumins Gif class is now async
pkrumins authored
26 obj.cxxflags = ["-D_FILE_OFFSET_BITS=64", "-D_LARGEFILE_SOURCE"]
45a7ddb @pkrumins added wscript
pkrumins authored
27
28 def shutdown():
29 if Options.commands['clean']:
30 if exists('gif.node'): unlink('gif.node')
31 else:
32 if exists('build/default/gif.node') and not exists('gif.node'):
33 symlink('build/default/gif.node', 'gif.node')
34
Something went wrong with that request. Please try again.