summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2013-06-02 22:30:06 +0100
committerCarl Hetherington <cth@carlh.net>2013-06-02 22:30:06 +0100
commit27e74ac5cf717233914fd017eb9ca67ee7c4af96 (patch)
tree2c4c4d4de70cac2dd10778edcad0e995e8a97191
parent52528d511935d95b1a2f0dbf62bcd2af3a6288ad (diff)
parente6e329c27b5b48c4341860810dea4616cdc8e7b0 (diff)
Merge master.
-rw-r--r--cscript2
-rwxr-xr-xrelease85
-rw-r--r--src/lut.h2
-rw-r--r--wscript9
4 files changed, 10 insertions, 88 deletions
diff --git a/cscript b/cscript
index 18913fa1..5413fdbc 100644
--- a/cscript
+++ b/cscript
@@ -6,6 +6,8 @@ def build(env, target):
cmd += ' --static-libdcp --static-openjpeg'
elif target.platform == 'windows':
cmd += ' --target-windows'
+ elif target.platform == 'osx':
+ cmd += ' --osx'
env.command(cmd)
env.command('./waf build install')
diff --git a/release b/release
deleted file mode 100755
index 12e7b7fe..00000000
--- a/release
+++ /dev/null
@@ -1,85 +0,0 @@
-#!/usr/bin/python
-
-import os
-import sys
-import datetime
-import shutil
-
-def command(c):
- os.system(c)
- print c
-
-def release_version(s):
- s = s[1:-1]
- if s.endswith('pre'):
- s = s[0:-3]
- p = s.split('.')
- return '0.%02d' % int(p[1])
-
-def new_pre_version(s):
- s = s[1:-1]
- p = s.split('.')
- return '0.%02dpre' % (int(p[1]) + 1)
-
-def rewrite_wscript(version_maker):
- f = open('wscript', 'rw')
- o = open('wscript.tmp', 'w')
- while 1:
- l = f.readline()
- if l == '':
- break
-
- s = l.split()
- if len(s) == 3 and s[0] == "VERSION":
- v = version_maker(s[2])
- print "REWRITE %s -> %s" % (s[2], v)
- print >>o,"VERSION = '%s'" % v
- else:
- print >>o,l,
- f.close()
- o.close()
-
- os.rename('wscript.tmp', 'wscript')
- return v
-
-def append_to_changelog(version):
- f = open('ChangeLog', 'r')
- c = f.read()
- f.close()
-
- f = open('ChangeLog', 'w')
- now = datetime.datetime.now()
- f.write('%d-%02d-%02d Carl Hetherington <cth@carlh.net>\n\n\t* Version %s released.\n\n' % (now.year, now.month, now.day, version))
- f.write(c)
-
-release_version_string = rewrite_wscript(release_version)
-#append_to_changelog(release_version_string)
-
-command("git diff")
-if raw_input() != "y":
- command("git reset --hard")
- print 'Aborted'
- sys.exit(1)
-
-command("git commit -a -m \"Bump version\"")
-print "git cleaning..."
-command("git clean -n")
-if raw_input() != "y":
- print 'Aborted'
- sys.exit(1)
-command("git clean -f")
-command("git tag -m \"v%s\" v%s" % (release_version_string, release_version_string))
-command("./waf clean")
-command("./waf configure")
-command("./waf")
-command("./waf dist")
-
-rewrite_wscript(new_pre_version)
-
-command("git diff")
-if raw_input() != "y":
- command("git reset --hard")
- print 'Aborted'
- sys.exit(1)
-
-command("git commit -a -m \"Bump version\"")
diff --git a/src/lut.h b/src/lut.h
index 8363e6a4..bdb5f37f 100644
--- a/src/lut.h
+++ b/src/lut.h
@@ -33,7 +33,7 @@ public:
, _bit_depth (bit_depth)
, _gamma (gamma)
{
- _lut = new T[int(std::pow(2, _bit_depth))];
+ _lut = new T[int(std::pow(2.0f, _bit_depth))];
}
virtual ~LUT() {
diff --git a/wscript b/wscript
index 5414f13d..004be672 100644
--- a/wscript
+++ b/wscript
@@ -2,21 +2,23 @@ import subprocess
import os
APPNAME = 'libdcp'
-VERSION = '0.51pre'
+VERSION = '0.53pre'
def options(opt):
opt.load('compiler_cxx')
opt.add_option('--target-windows', action='store_true', default = False, help = 'set up to do a cross-compile to Windows')
+ opt.add_option('--osx', action='store_true', default = False, help = 'set up to build on OS X')
opt.add_option('--enable-debug', action='store_true', default = False, help = 'build with debugging information and without optimisation')
opt.add_option('--static', action='store_true', default = False, help = 'build libdcp and in-tree dependencies statically, and link statically to openjpeg and cxml')
def configure(conf):
conf.load('compiler_cxx')
- conf.env.append_value('CXXFLAGS', ['-Wall', '-Wextra', '-Wno-unused-result', '-O2', '-D_FILE_OFFSET_BITS=64'])
+ conf.env.append_value('CXXFLAGS', ['-Wall', '-Wextra', '-O2', '-D_FILE_OFFSET_BITS=64'])
conf.env.append_value('CXXFLAGS', ['-DLIBDCP_VERSION="%s"' % VERSION])
conf.env.TARGET_WINDOWS = conf.options.target_windows
conf.env.STATIC = conf.options.static
+ conf.env.OSX = conf.options.osx
conf.env.ENABLE_DEBUG = conf.options.enable_debug
if conf.options.target_windows:
@@ -24,6 +26,9 @@ def configure(conf):
else:
conf.env.append_value('CXXFLAGS', '-DLIBDCP_POSIX')
+ if not conf.options.osx:
+ conf.env.append_value('CXXFLAGS', ['-Wno-unused-result'])
+
conf.check_cfg(package = 'openssl', args = '--cflags --libs', uselib_store = 'OPENSSL', mandatory = True)
conf.check_cfg(package = 'libxml++-2.6', args = '--cflags --libs', uselib_store = 'LIBXML++', mandatory = True)
if conf.options.static: