[SCM] Packaging for cctbx branch, master, updated. upstream/2012.05.08.2305-31-gf917c19
Radostan Riedel
raybuntu at googlemail.com
Sun Jul 22 16:45:11 UTC 2012
The following commit has been merged in the master branch:
commit fc065ac2beed2650a9ffc07ec4ee4acb17849ec3
Author: Radostan Riedel <raybuntu at googlemail.com>
Date: Sun Jul 22 17:51:29 2012 +0200
Rework Shlib versioning patch and added install-bin target
diff --git a/debian/patches/0004-adding-shlib-versioning.patch b/debian/patches/0004-adding-shlib-versioning.patch
index a50e171..14fa237 100644
--- a/debian/patches/0004-adding-shlib-versioning.patch
+++ b/debian/patches/0004-adding-shlib-versioning.patch
@@ -4,10 +4,9 @@ Subject: adding-shlib-versioning
---
cctbx_sources/boost_adaptbx/SConscript | 3 ++
- cctbx_sources/libtbx/SConscript | 64 ++++++++++++++++++++++++++++++++
- cctbx_sources/libtbx/env_config.py | 21 +++++++++++
- cctbx_sources/scitbx/lbfgs/SConscript | 4 ++
- 4 files changed, 92 insertions(+)
+ cctbx_sources/libtbx/SConscript | 75 ++++++++++++++++++++++++++++++++
+ cctbx_sources/libtbx/env_config.py | 21 +++++++++
+ 3 files changed, 99 insertions(+)
diff --git a/cctbx_sources/boost_adaptbx/SConscript b/cctbx_sources/boost_adaptbx/SConscript
index 866b1c1..0d95318 100644
@@ -24,67 +23,76 @@ index 866b1c1..0d95318 100644
LIBPATH=env_etc.libpath_python)
env_no_includes_boost_python_ext.Append(
diff --git a/cctbx_sources/libtbx/SConscript b/cctbx_sources/libtbx/SConscript
-index debf569..1443e6c 100644
+index debf569..ba00dd3 100644
--- a/cctbx_sources/libtbx/SConscript
+++ b/cctbx_sources/libtbx/SConscript
-@@ -1018,4 +1018,68 @@ def enable_cuda_if_possible():
+@@ -1018,4 +1018,79 @@ def enable_cuda_if_possible():
enable_openmp_if_possible()
enable_cuda_if_possible()
+def set_libtool(env, rpath):
-+ # Versioning can be provided by adding by adding the
-+ # "-version-info 3:12:1" to the SHLINKFLAGS
++ # Versioning can be provided by appending "-version-info 3:12:1" to SHLINKFLAGS
+ # Please see:
+ # http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
+ # for reference. Otherwise it will be set to 0:0:0
-+ env_etc.cc_save = env['CC']
-+ env_etc.shcc_save = env['SHCC']
-+ env_etc.cxx_save = env['CXX']
-+ env_etc.link_save = env['LINK']
-+ env_etc.shcxx_save = env['SHCXX']
-+ env_etc.shlink_save = env['SHLINK']
+ env_etc.shobjsuffix_save = env['SHOBJSUFFIX']
+ env_etc.SharedLibBuilder_save = env['BUILDERS']['SharedLibrary']
+ env.Replace(
-+ CC='libtool --tag=CC --mode=compile ' + env_etc.cc_save,
-+ SHCC='libtool --tag=CC --mode=compile ' + env_etc.shcc_save,
-+ CXX='libtool --tag=CXX --mode=compile ' + env_etc.cxx_save,
-+ LINK='libtool --tag=CXX --mode=link ' + env_etc.link_save,
-+ SHCXX='libtool --tag=CXX --mode=compile ' + env_etc.shcxx_save,
-+ SHLINK='libtool --tag=CXX --mode=link ' + env_etc.shlink_save,
+ SHLINKFLAGS='-rpath ' + rpath,
+ SHOBJSUFFIX='.lo',
+ SHLIBSUFFIX='.la',
+ )
++ LIBTOOLCOM = 'libtool --mode=compile --tag='
++ LIBTOOLCCOM = LIBTOOLCOM + 'CC '
++ LIBTOOLCXXCOM = LIBTOOLCOM + 'CXX '
++ LIBTOOLLINK = 'libtool --mode=link --tag=CXX '
++ ShCAction = SCons.Action.Action(LIBTOOLCCOM + "$SHCCCOM", "$SHCCCOMSTR")
++ ShCXXAction = SCons.Action.Action(LIBTOOLCXXCOM + "$SHCXXCOM", "$SHCXXCOMSTR")
++ ShLinkAction = SCons.Action.Action(LIBTOOLLINK + "$SHLINKCOM", "$SHLINKCOMSTR")
+ libtool_install = 'libtool --mode=install install -D ${TARGET.abspath} %s%s/${TARGET.file}'%(abs(libtbx.env.lib_path), rpath)
-+ import SCons.Defaults
++
+ action_list = [ SCons.Defaults.SharedCheck,
-+ SCons.Defaults.ShLinkAction,
++ ShLinkAction,
+ libtool_install,
+ ]
-+ customBuilder = SCons.Builder.Builder(action = action_list,
++ CSuffixes = SCons.Tool.cc.CSuffixes
++ # Can't import SCons.Tool.c++.CSuffixes because of that 'c++'
++ CXXSuffixes = ['.cpp', '.cc', '.cxx', '.c++', '.C++', '.mm']
++ shared_obj = SCons.Builder.Builder(action = {},
++ emitter = {},
++ prefix = '$SHOBJPREFIX',
++ suffix = '$SHOBJSUFFIX',
++ src_builder = ['CFile', 'CXXFile'],
++ source_scanner = SourceFileScanner,
++ single_source = 1)
++ for suffix in CXXSuffixes:
++ shared_obj.add_action(suffix, ShCXXAction)
++ shared_obj.add_emitter(suffix, SCons.Defaults.SharedObjectEmitter)
++ for suffix in CSuffixes:
++ shared_obj.add_action(suffix, ShCAction)
++ shared_obj.add_emitter(suffix, SCons.Defaults.SharedObjectEmitter)
++
++ LibtoolBuilder = SCons.Builder.Builder(action = action_list,
+ emitter = "$SHLIBEMITTER",
+ prefix = '$SHLIBPREFIX',
+ suffix = '$SHLIBSUFFIX',
+ target_scanner = ProgramScanner,
+ src_suffix = '$SHOBJSUFFIX',
-+ src_builder = 'SharedObject')
-+ env['BUILDERS']['SharedLibrary'] = customBuilder
++ src_builder = shared_obj)
++
++ lib_dir = '%s%s'%(abs(libtbx.env.lib_path), env_etc.rpath)
++ if not os.path.exists(lib_dir):
++ os.makedirs(lib_dir)
++ libtool_install_path = '#lib' + rpath
++ env.Append(LIBPATH=libtool_install_path)
++ env['BUILDERS']['SharedLibrary'] = LibtoolBuilder
+env_etc.set_libtool = set_libtool
+
+def unset_libtool(env, rpath):
+ env['BUILDERS']['SharedLibrary'] = env_etc.SharedLibBuilder_save
+ env.Replace(
-+ CC=env_etc.cc_save,
-+ SHCC=env_etc.shcc_save,
-+ CXX=env_etc.cxx_save,
-+ LINK=env_etc.link_save,
-+ SHCXX=env_etc.shcxx_save,
-+ SHLINK=env_etc.shlink_save,
+ SHOBJSUFFIX=env_etc.shobjsuffix_save,
+ )
-+ libtool_install_path = '#lib' + rpath
-+ env.Append(LIBPATH=libtool_install_path)
+env_etc.unset_libtool = unset_libtool
+
+if (libtbx.env.build_options.libtoolize):
@@ -93,6 +101,8 @@ index debf569..1443e6c 100644
+ env_etc.rpath = libtbx.env.build_options.rpath
+ rpath_link = ['-rpath', env_etc.rpath]
+ env_etc.shlinkflags.extend(rpath_link)
++ if '-shared' in env_etc.shlinkflags:
++ env_etc.shlinkflags.remove('-shared')
+ env_etc.set_libtool(env_base, env_etc.rpath)
+
Export("env_base", "env_etc")
@@ -156,19 +166,4 @@ index c3e1c7d..2285c9d 100644
parser.option(None, "--scan_boost",
action="store_true",
default=False,
-diff --git a/cctbx_sources/scitbx/lbfgs/SConscript b/cctbx_sources/scitbx/lbfgs/SConscript
-index 3b487a5..cbe0def 100644
---- a/cctbx_sources/scitbx/lbfgs/SConscript
-+++ b/cctbx_sources/scitbx/lbfgs/SConscript
-@@ -2,6 +2,10 @@ import libtbx.load_env
- Import("env_base", "env_etc")
-
- env = env_base.Clone()
-+if (libtbx.env.build_options.libtoolize):
-+ # we need to unset libtool since this SharedObject
-+ # will be linked into a python-ext which is not supported by libtool
-+ env_etc.unset_libtool(env, env_etc.rpath)
- env_etc.enable_more_warnings(env=env)
- env_etc.include_registry.append(
- env=env,
--
diff --git a/debian/patches/0007-options-for-system-libs-installtarget-and-prefix.patch b/debian/patches/0007-options-for-system-libs-installtarget-and-prefix.patch
index 033480b..dc1c7bf 100644
--- a/debian/patches/0007-options-for-system-libs-installtarget-and-prefix.patch
+++ b/debian/patches/0007-options-for-system-libs-installtarget-and-prefix.patch
@@ -10,7 +10,7 @@ Subject: options for system libs installtarget and prefix
cctbx_sources/gltbx/SConscript | 2 +-
cctbx_sources/iotbx/mtz/SConscript | 3 +-
cctbx_sources/iotbx/pdb/SConscript | 2 +-
- cctbx_sources/libtbx/SConscript | 73 ++++++++++++++++-
+ cctbx_sources/libtbx/SConscript | 78 +++++++++++++++++-
cctbx_sources/libtbx/env_config.py | 19 +++++
cctbx_sources/mmtbx/den/SConscript | 2 +-
cctbx_sources/mmtbx/geometry_restraints/SConscript | 2 +-
@@ -21,7 +21,7 @@ Subject: options for system libs installtarget and prefix
.../smtbx/refinement/boost_python/SConscript | 4 +-
.../refinement/constraints/boost_python/SConscript | 4 +-
cctbx_sources/spotfinder/SConscript | 2 +-
- 18 files changed, 173 insertions(+), 66 deletions(-)
+ 18 files changed, 178 insertions(+), 66 deletions(-)
diff --git a/cctbx_sources/boost_adaptbx/SConscript b/cctbx_sources/boost_adaptbx/SConscript
index 0d95318..5417e1b 100644
@@ -260,7 +260,7 @@ index 6af2664..9b89fe1 100644
env.SharedLibrary(
target="#lib/iotbx_pdb_ext",
diff --git a/cctbx_sources/libtbx/SConscript b/cctbx_sources/libtbx/SConscript
-index 1443e6c..2bef63e 100644
+index ba00dd3..1795e59 100644
--- a/cctbx_sources/libtbx/SConscript
+++ b/cctbx_sources/libtbx/SConscript
@@ -4,7 +4,7 @@ from libtbx import easy_run
@@ -272,16 +272,16 @@ index 1443e6c..2bef63e 100644
op = os.path
if (hasattr(Environment, "Clone")):
-@@ -1074,6 +1074,7 @@ def unset_libtool(env, rpath):
- env.Append(LIBPATH=libtool_install_path)
+@@ -1083,6 +1083,7 @@ def unset_libtool(env, rpath):
+ )
env_etc.unset_libtool = unset_libtool
+env_etc.rpath = ''
if (libtbx.env.build_options.libtoolize):
env_etc.shlibsuffix = ".la"
env_base.Append(LIBSUFFIXES=[env_etc.shlibsuffix])
-@@ -1082,4 +1083,74 @@ if (libtbx.env.build_options.libtoolize):
- env_etc.shlinkflags.extend(rpath_link)
+@@ -1093,4 +1094,79 @@ if (libtbx.env.build_options.libtoolize):
+ env_etc.shlinkflags.remove('-shared')
env_etc.set_libtool(env_base, env_etc.rpath)
+env_etc.use_system_libs = False
@@ -318,6 +318,7 @@ index 1443e6c..2bef63e 100644
+ env_etc.scitbx_boost_python = 'scitbx_boost_python'
+
+env_etc.prefix = libtbx.env.build_options.install_prefix
++env_etc.binpath = os.path.join(env_etc.prefix, 'bin')
+env_etc.libpath = os.path.join(env_etc.prefix, 'lib')
+env_etc.inclpath = os.path.join(env_etc.prefix, 'include')
+
@@ -325,6 +326,7 @@ index 1443e6c..2bef63e 100644
+ cwd = os.getcwd()
+ rp = libtbx.env.repository_paths
+ lib_dir = '%s%s'%(abs(libtbx.env.lib_path), env_etc.rpath)
++ exe_dev = libtbx.env.under_build("exe_dev")
+ if not os.path.exists(lib_dir):
+ os.makedirs(lib_dir)
+ rp = list(rp)
@@ -348,7 +350,10 @@ index 1443e6c..2bef63e 100644
+ src = os.path.join(src_dir, root, filename)
+ env_base.Install(dest, src)
+ env_base.Alias("install-header", dest)
-+ Alias('install', ['install-header', 'install-shlib'])
++ dest = env_etc.binpath
++ env_base.Install(dest, Glob('%s/*'%(exe_dev)))
++ env_base.Alias("install-bin", dest)
++ Alias('install', ['install-header', 'install-shlib', 'install-bin'])
+ os.chdir(cwd)
+
+if 'install' in COMMAND_LINE_TARGETS:
diff --git a/debian/patches/0008-add-with_pycbf-option.patch b/debian/patches/0008-add-with_pycbf-option.patch
index 52ad857..88a650c 100644
--- a/debian/patches/0008-add-with_pycbf-option.patch
+++ b/debian/patches/0008-add-with_pycbf-option.patch
@@ -29,17 +29,17 @@ index 4ac6717..14deee3 100644
Export("env_cbflib_boost_python_ext")
diff --git a/cctbx_sources/libtbx/SConscript b/cctbx_sources/libtbx/SConscript
-index 2bef63e..b97390f 100644
+index 1795e59..e3e4318 100644
--- a/cctbx_sources/libtbx/SConscript
+++ b/cctbx_sources/libtbx/SConscript
-@@ -1116,6 +1116,7 @@ else:
+@@ -1127,6 +1127,7 @@ else:
env_etc.boost_python = 'boost_python'
env_etc.scitbx_boost_python = 'scitbx_boost_python'
+env_etc.with_pycbf = libtbx.env.build_options.with_pycbf
env_etc.prefix = libtbx.env.build_options.install_prefix
+ env_etc.binpath = os.path.join(env_etc.prefix, 'bin')
env_etc.libpath = os.path.join(env_etc.prefix, 'lib')
- env_etc.inclpath = os.path.join(env_etc.prefix, 'include')
diff --git a/cctbx_sources/libtbx/env_config.py b/cctbx_sources/libtbx/env_config.py
index b6bab84..687c00d 100644
--- a/cctbx_sources/libtbx/env_config.py
diff --git a/debian/patches/0011-fix-missing-python-lib-during-linking.patch b/debian/patches/0011-fix-missing-python-lib-during-linking.patch
index d6576d2..75e34bf 100644
--- a/debian/patches/0011-fix-missing-python-lib-during-linking.patch
+++ b/debian/patches/0011-fix-missing-python-lib-during-linking.patch
@@ -7,7 +7,7 @@ Subject: fix missing python lib during linking
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cctbx_sources/libtbx/SConscript b/cctbx_sources/libtbx/SConscript
-index b97390f..c1baf7d 100644
+index e3e4318..ab9e503 100644
--- a/cctbx_sources/libtbx/SConscript
+++ b/cctbx_sources/libtbx/SConscript
@@ -56,7 +56,7 @@ def set_python_include_and_libs(env_etc):
--
Packaging for cctbx
More information about the debian-science-commits
mailing list