Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
node-sqlite3
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
俞永鹏
node-sqlite3
Commits
586f5a6a
Commit
586f5a6a
authored
Dec 09, 2011
by
Konstantin Käfer
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of github.com:developmentseed/node-sqlite3
parents
29cb28e5
e27750f6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
4 deletions
+15
-4
wscript
wscript
+15
-4
No files found.
wscript
View file @
586f5a6a
...
@@ -4,6 +4,7 @@ import Options
...
@@ -4,6 +4,7 @@ import Options
from Configure import ConfigurationError
from Configure import ConfigurationError
from os.path import exists
from os.path import exists
from shutil import copy2 as copy, rmtree
from shutil import copy2 as copy, rmtree
from subprocess import Popen, PIPE
# node-wafadmin
# node-wafadmin
import Options
import Options
...
@@ -17,8 +18,9 @@ dest = 'lib/%s' % TARGET_FILE
...
@@ -17,8 +18,9 @@ dest = 'lib/%s' % TARGET_FILE
BUNDLED_SQLITE3_VERSION = '3070800'
BUNDLED_SQLITE3_VERSION = '3070800'
BUNDLED_SQLITE3 = 'sqlite-autoconf-%s' % BUNDLED_SQLITE3_VERSION
BUNDLED_SQLITE3 = 'sqlite-autoconf-%s' % BUNDLED_SQLITE3_VERSION
BUNDLED_SQLITE3_TAR = 'sqlite-autoconf-%s.tar.gz' % BUNDLED_SQLITE3_VERSION
SQLITE3_TARGET = 'deps/%s' % BUNDLED_SQLITE3
SQLITE3_TARGET = 'deps/%s' % BUNDLED_SQLITE3
SQLITE3_TARGET_ABS = os.path.join(os.path.dirname(os.getcwd()),SQLITE3_TARGET)
BUNDLED_SQLITE3_TAR = 'sqlite-autoconf-%s.tar.gz' % BUNDLED_SQLITE3_VERSION
sqlite3_test_program = '''
sqlite3_test_program = '''
#include "stdio.h"
#include "stdio.h"
...
@@ -36,6 +38,11 @@ main() {
...
@@ -36,6 +38,11 @@ main() {
}
}
'''
'''
def call(cmd):
stdin, stderr = Popen(cmd, shell=True, stdout=PIPE, stderr=PIPE).communicate()
if not stderr:
return stdin.strip()
return None
def set_options(opt):
def set_options(opt):
opt.tool_options("compiler_cxx")
opt.tool_options("compiler_cxx")
...
@@ -84,7 +91,7 @@ def configure(conf):
...
@@ -84,7 +91,7 @@ def configure(conf):
if not o.sqlite3_dir and Options.platform == 'darwin':
if not o.sqlite3_dir and Options.platform == 'darwin':
linkflags.append('-Wl,-search_paths_first')
linkflags.append('-Wl,-search_paths_first')
conf.env.append_value("LINKFLAGS", linkflags)
conf.env.append_value("LINKFLAGS", linkflags)
def configure_internal_sqlite3(conf):
def configure_internal_sqlite3(conf):
...
@@ -102,14 +109,18 @@ def configure_internal_sqlite3(conf):
...
@@ -102,14 +109,18 @@ def configure_internal_sqlite3(conf):
cxxflags += os.environ['CXXFLAGS']
cxxflags += os.environ['CXXFLAGS']
# LINKFLAGS appear to be picked up automatically...
# LINKFLAGS appear to be picked up automatically...
if not os.path.exists('config.status'):
if not os.path.exists('config.status'):
cmd = "CFLAGS='%s -DSQLITE_ENABLE_RTREE=1 -fPIC -O3 -DNDEBUG' ./configure --
enable-static --disable-shared" % cxxflags
cmd = "CFLAGS='%s -DSQLITE_ENABLE_RTREE=1 -fPIC -O3 -DNDEBUG' ./configure --
prefix=%s --enable-static --disable-shared" % (cxxflags, SQLITE3_TARGET_ABS)
if Options.platform == 'darwin':
if Options.platform == 'darwin':
cmd += ' --disable-dependency-tracking'
cmd += ' --disable-dependency-tracking'
os.system(cmd)
os.system(cmd)
os.chdir('../../')
os.chdir('../../')
conf.env.append_value("CPPPATH_SQLITE3", ['../deps/%s' % BUNDLED_SQLITE3])
conf.env.append_value("CPPPATH_SQLITE3", ['../deps/%s' % BUNDLED_SQLITE3])
conf.env.append_value("LINKFLAGS", ['-L../deps/%s/.libs' % BUNDLED_SQLITE3, '-lsqlite3'])
linkflags = ['-L../deps/%s/.libs' % BUNDLED_SQLITE3]
extra_sqlite_libs = call('pkg-config %s/sqlite3.pc --static --libs-only-l' % SQLITE3_TARGET)
if extra_sqlite_libs:
linkflags.extend(extra_sqlite_libs.split(' '))
conf.env.append_value("LINKFLAGS", linkflags)
def build_internal_sqlite3(bld):
def build_internal_sqlite3(bld):
if not Options.commands['clean'] and '../deps' in bld.env['CPPPATH_SQLITE3'][0]:
if not Options.commands['clean'] and '../deps' in bld.env['CPPPATH_SQLITE3'][0]:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment