You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/sci-libs/cctbx/files/2010.03.29.2334-boost.patch

517 lines
18 KiB

From 7e77ff8694b87e95efe56ed961fbc8dd30d8c238 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <gentoo@mgorny.alt.pl>
Date: Sun, 4 Jul 2010 12:21:10 +0200
Subject: [PATCH] Unbundle boost.
---
work/cctbx_sources/boost_adaptbx/SConscript | 260 -------------------------
work/cctbx_sources/cbflib_adaptbx/SConscript | 1 -
work/cctbx_sources/cctbx/SConscript | 1 -
work/cctbx_sources/clipper_adaptbx/SConscript | 1 -
work/cctbx_sources/fable/SConscript | 1 -
work/cctbx_sources/fable/libtbx_config | 2 +-
work/cctbx_sources/fftw3tbx/SConscript | 1 -
work/cctbx_sources/gltbx/SConscript | 1 -
work/cctbx_sources/iotbx/SConscript | 2 -
work/cctbx_sources/mmtbx/SConscript | 1 -
work/cctbx_sources/omptbx/libtbx_config | 2 +-
work/cctbx_sources/rstbx/SConscript | 1 -
work/cctbx_sources/scitbx/SConscript | 1 -
work/cctbx_sources/scitbx/libtbx_config | 2 +-
work/cctbx_sources/scitbx/libtbx_refresh.py | 3 +-
work/cctbx_sources/smtbx/SConscript | 1 -
work/cctbx_sources/spotfinder/SConscript | 1 -
work/cctbx_sources/tntbx/SConscript | 1 -
18 files changed, 4 insertions(+), 279 deletions(-)
diff --git a/work/cctbx_sources/boost_adaptbx/SConscript b/work/cctbx_sources/boost_adaptbx/SConscript
index 0701816..9f8cbf9 100644
--- a/work/cctbx_sources/boost_adaptbx/SConscript
+++ b/work/cctbx_sources/boost_adaptbx/SConscript
@@ -8,39 +8,9 @@ import string
import sys, os
op = os.path
Import("env_base", "env_etc")
-env_etc.boost_dist = libtbx.env.dist_path("boost")
-env_etc.boost_include = env_etc.boost_dist
env_etc.boost_adaptbx_dist = libtbx.env.dist_path("boost_adaptbx")
env_etc.boost_adaptbx_include = os.path.dirname(env_etc.boost_adaptbx_dist)
-def build_boost_thread():
- if (not libtbx.env.build_options.enable_boost_threads):
- return
- if (sys.platform == "win32"): s = "win32"
- else: s = "pthread"
- join = os.path.join
- src = join("libs", "thread", "src", s)
- prefix = "#" + join(os.path.basename(env_etc.boost_dist), src)
- source = []
- for node in sorted(os.listdir(join(env_etc.boost_dist, src))):
- if (not node.lower().endswith(".cpp")): continue
- source.append(join(prefix, node))
- env = env_base.Clone(
- SHLINKFLAGS=env_etc.shlinkflags)
- env.Append(SHCXXFLAGS=["-DBOOST_THREAD_BUILD_DLL"])
- env_etc.include_registry.append(
- env=env,
- paths=[env_etc.boost_include])
- darwin_shlinkcom(env_etc, env,
- lo="boost/libs/thread/src/libboost_thread.lo",
- dylib="lib/libboost_thread.dylib")
- env.Repository(os.path.dirname(env_etc.boost_dist))
- env.SharedLibrary(
- target='#lib/boost_thread',
- source=source)
-
-build_boost_thread()
-
if (not env_etc.no_boost_python):
env_etc.cxxflags_bpl_defines_base = [
"-DBOOST_PYTHON_MAX_BASES=2"]
@@ -64,12 +34,10 @@ if (not env_etc.no_boost_python):
' /manifest ${TARGET}.manifest'])
Export("env_no_includes_boost_python_ext")
env_pure_boost_python_ext = env_no_includes_boost_python_ext.Clone()
- env_etc.include_registry.set_boost_dir_name(env_etc.boost_dist)
env_etc.include_registry.append(
env=env_pure_boost_python_ext,
paths=[
"#include",
- env_etc.boost_include,
env_etc.python_include])
env_boost_python_ext = env_pure_boost_python_ext.Clone()
env_etc.include_registry.prepend(
@@ -113,234 +81,6 @@ if (not env_etc.no_boost_python):
target="tests/tst_optional_copy",
source="tests/tst_optional_copy.cpp")
- import os, os.path
- env = env_base.Clone(LIBS=env_etc.libs_python)
- env.Append(LIBPATH=env_etc.libpath_python)
- env.Append(SHCXXFLAGS=env_etc.cxxflags_bpl_defines_base)
- env.Append(SHCXXFLAGS=["-DBOOST_PYTHON_SOURCE"])
- if (libtbx.env.build_options.boost_python_bool_int_strict):
- env.Append(SHCXXFLAGS=["-DBOOST_PYTHON_BOOL_INT_STRICT"])
- env.Replace(SHLINKFLAGS=env_etc.shlinkflags)
- env.Append(CXXFLAGS=env_etc.cxxflags_bpl_defines_base)
- env.Append(CXXFLAGS="-DBOOST_PYTHON_SOURCE")
- env.Replace(LINKFLAGS=env_etc.shlinkflags)
- env_etc.include_registry.append(
- env=env,
- paths=[env_etc.boost_include, env_etc.python_include])
-
- darwin_shlinkcom(env_etc, env,
- lo="boost/libs/python/src/libboost_python.lo",
- dylib="lib/libboost_python.dylib")
-
- # fixed list of file names introduced 2009-09-29, due to major changes in
- # boost/libs/python/build/Jamfile.v2 svn rev. 56305 (new Python 3 support)
- bpl_dll_sources = """\
-numeric.cpp
-list.cpp
-long.cpp
-dict.cpp
-tuple.cpp
-str.cpp
-slice.cpp
-converter/from_python.cpp
-converter/registry.cpp
-converter/type_id.cpp
-object/enum.cpp
-object/class.cpp
-object/function.cpp
-object/inheritance.cpp
-object/life_support.cpp
-object/pickle_support.cpp
-errors.cpp
-module.cpp
-converter/builtin_converters.cpp
-converter/arg_to_python_base.cpp
-object/iterator.cpp
-object/stl_iterator.cpp
-object_protocol.cpp
-object_operators.cpp
-wrapper.cpp
-import.cpp
-exec.cpp
-object/function_doc_signature.cpp
-""".splitlines()
- prefix = "#"+os.path.join(
- os.path.basename(env_etc.boost_dist), "libs", "python", "src")
- bpl_dll_sources = [os.path.join(prefix, path) for path in bpl_dll_sources]
- #
- env.Repository(os.path.dirname(env_etc.boost_dist))
- if (env_etc.static_bpl):
- env.StaticLibrary(target="#lib/boost_python", source=bpl_dll_sources)
- else:
- env.SharedLibrary(target="#lib/boost_python", source=bpl_dll_sources)
- if (int(ARGUMENTS.get("boost_python_tests", 0))):
- warn_if_unexpected_md5_hexdigest(
- path=libtbx.env.under_dist("boost", "libs/python/test/Jamfile.v2"),
- expected_md5_hexdigests=[
- "c7a3dd81bf730635146f5c908ac982eb", # svn revision 39065M
- "d40aac0029bcd28f6e205ae3b30a1284", # svn revision 40216
- "b79f016d3ec10cf1625a9e006e605428", # svn revision 40714
- "f948983d970fd47e83a3a785bb54520a", # svn revision 41550
- "c3d84006331d534840c42ab956fdfa05", # svn revision 50367M
- "cedfd061d767a27413ef4a75ee0e446f", # svn revision 56310
- "e5507482a1937825e4c9f3ffe555fc59", # svn revision 59331
- ])
- bpl_tests = Split("""
-staticmethod
-shared_ptr
-enable_shared_from_this
-andreas_beyer
-polymorphism
-polymorphism2
-auto_ptr
-minimal
-args
-numpy
-enum
-exception_translator
-test_pointer_adoption
-operators
-callbacks
-defaults
-object
-list
-long
-dict
-tuple
-str
-virtual_functions
-back_reference
-implicit
-data_members
-ben_scott1
-bienstman1
-bienstman2
-bienstman3
-multi_arg_constructor
-extract
-opaque
-pickle1
-pickle2
-pickle3
-pickle4
-nested
-docstring
-pytype_function
-bienstman4
-bienstman5
-test_builtin_converters,builtin_converters_ext,test_builtin_converters
-cltree,cltree,test_cltree
-m1,m1,newtest
-m2,m2,newtest
-iterator,iterator_ext,iterator
-input_iterator,input_iterator,iterator
-crossmod_exception_a,crossmod_exception_a,crossmod_exception
-crossmod_exception_b,crossmod_exception_b,crossmod_exception
-vector_indexing_suite
-return_arg
-keywords,keywords,keywords_test
-properties
-map_indexing_suite;int_map_indexing_suite;a_map_indexing_suite,map_indexing_suite_ext,map_indexing_suite
-injected
-slice
-const_argument
-raw_ctor
-pointer_vector
-wrapper_held_type
-polymorphism2_auto_ptr
-stl_iterator
-voidptr
-crossmod_opaque_a,crossmod_opaque_a,crossmod_opaque
-crossmod_opaque_b,crossmod_opaque_b,crossmod_opaque
-""")
-# non-portable tests are not included above:
-# calling_conventions
-# calling_conventions_mf
-#
- Import("env_boost_python_ext")
- test_dir = libtbx.env.under_dist("boost", "libs/python/test")
- prefix = "#"+os.path.join(
- os.path.basename(env_etc.boost_dist), "libs", "python", "test")
- all_tst = []
- for bpl_test in bpl_tests:
- flds = bpl_test.split(",")
- assert len(flds) in (1,3)
- if (len(flds) == 1):
- src = bpl_test
- pyd = bpl_test + "_ext"
- tst = bpl_test
- else:
- src = flds[0]
- pyd = flds[1]
- tst = flds[2]
- env = env_pure_boost_python_ext.Clone()
- env.Repository(os.path.dirname(env_etc.boost_dist))
- ok = True
- source = []
- for s in src.split(";"):
- cpp = "%s.cpp" % s
- file_name = os.path.join(test_dir, cpp)
- if (not os.path.isfile(file_name)):
- print "Warning: source file not available:", show_string(file_name)
- ok = False
- else:
- source.append(os.path.join(prefix, cpp))
- if (ok):
- if (not tst in all_tst):
- all_tst.append(tst)
- env.SharedLibrary(target="#lib/%s" % pyd, source=source)
- all_tst = [os.path.join(test_dir, tst+".py") for tst in all_tst]
- #
- if (sys.platform == "linux2"):
- base_lib = libtbx.env.under_build(path="base/lib")
- if (os.path.isdir(base_lib)):
- env_prog = env.Clone()
- env_prog.Append(LIBPATH=[base_lib])
- env_prog.Append(LIBS=[
- "-lpython%d.%d" % sys.version_info[:2],
- "-lpthread",
- "-lutil",
- "-ldl"])
- exe = env_prog.Program(
- target="boost/libs/python/test/exec_dynamic",
- source=[os.path.join(prefix, "exec.cpp")])
- libtbx.env.write_dispatcher_in_bin(
- source_file=exe[0].get_abspath(),
- target_file="boost_libs_python_test_exec_dynamic")
- all_tst.append("$ boost_libs_python_test_exec_dynamic %s"
- % show_string(os.path.join(test_dir, "exec.py")))
- #
- if (os.name != "nt"):
- env.SharedLibrary(
- target="#lib/boost_adaptbx_char_array_ext",
- source=["char_array_ext.cpp"])
- all_tst.append(
- libtbx.env.under_dist("boost_adaptbx", "tests/tst_char_array.py"))
- #
- if (os.name == "nt"):
- boost_python_run_tests = \
- "%s\\boost_python_run_tests.bat" % libtbx.env.build_path
- f = open(boost_python_run_tests, "w")
- for tst in all_tst:
- if (tst.startswith("$ ")):
- print >> f, 'call %s' % tst[2:]
- else:
- print >> f, 'call libtbx.python %s' % show_string(tst)
- f.close()
- else:
- boost_python_run_tests = \
- "%s/boost_python_run_tests.csh" % libtbx.env.build_path
- f = open(boost_python_run_tests, "w")
- print >> f, "#! /bin/csh -f"
- print >> f, "set verbose"
- for tst in all_tst:
- if (tst.startswith("$ ")):
- print >> f, tst[2:]
- else:
- print >> f, 'libtbx.python "%s"' % show_string(tst)
- f.close()
- os.chmod(boost_python_run_tests, 0755)
-
def write_type_id_eq_h():
unsigned_types = [
"unsigned short",
diff --git a/work/cctbx_sources/cbflib_adaptbx/SConscript b/work/cctbx_sources/cbflib_adaptbx/SConscript
index 78c1297..dffc247 100644
--- a/work/cctbx_sources/cbflib_adaptbx/SConscript
+++ b/work/cctbx_sources/cbflib_adaptbx/SConscript
@@ -14,7 +14,6 @@ env_etc.cbflib_common_includes = [
env_etc.libtbx_include,
env_etc.scitbx_include,
env_etc.boost_adaptbx_include,
- env_etc.boost_include,
env_etc.cbflib_dist, # for the adaptor cpp files
env_etc.cbflib_include[0], # for the cbflib c-files
env_etc.cbflib_include[1], # for the cbflib c-files
diff --git a/work/cctbx_sources/cctbx/SConscript b/work/cctbx_sources/cctbx/SConscript
index 6ec7c93..2dfb442 100644
--- a/work/cctbx_sources/cctbx/SConscript
+++ b/work/cctbx_sources/cctbx/SConscript
@@ -10,7 +10,6 @@ env_etc.cctbx_common_includes = [
env_etc.scitbx_include,
env_etc.chiltbx_include,
env_etc.omptbx_include,
- env_etc.boost_include,
]
env = env_base.Clone(
diff --git a/work/cctbx_sources/fable/SConscript b/work/cctbx_sources/fable/SConscript
index bf8e198..b6acccf 100644
--- a/work/cctbx_sources/fable/SConscript
+++ b/work/cctbx_sources/fable/SConscript
@@ -13,7 +13,6 @@ if (not env_etc.no_boost_python):
env_etc.libtbx_include,
env_etc.fable_include,
env_etc.boost_adaptbx_include,
- env_etc.boost_include,
env_etc.python_include])
env.SharedLibrary(
target="#lib/fable_ext",
diff --git a/work/cctbx_sources/fable/libtbx_config b/work/cctbx_sources/fable/libtbx_config
index d456588..f00ae86 100644
--- a/work/cctbx_sources/fable/libtbx_config
+++ b/work/cctbx_sources/fable/libtbx_config
@@ -1,4 +1,4 @@
{
- "modules_required_for_build": ["boost"],
+ "modules_required_for_build": [],
"modules_required_for_use": ["boost_adaptbx"],
}
diff --git a/work/cctbx_sources/fftw3tbx/SConscript b/work/cctbx_sources/fftw3tbx/SConscript
index ecc3a03..4fc1ec1 100755
--- a/work/cctbx_sources/fftw3tbx/SConscript
+++ b/work/cctbx_sources/fftw3tbx/SConscript
@@ -8,7 +8,6 @@ env_etc.fftw3tbx_dist = libtbx.env.dist_path("fftw3tbx")
env_etc.fftw3tbx_common_includes = [
env_etc.libtbx_include,
env_etc.scitbx_include,
- env_etc.boost_include,
]
base_include = libtbx.env.under_build("base/include")
diff --git a/work/cctbx_sources/gltbx/SConscript b/work/cctbx_sources/gltbx/SConscript
index 56a7115..f6214a4 100644
--- a/work/cctbx_sources/gltbx/SConscript
+++ b/work/cctbx_sources/gltbx/SConscript
@@ -7,7 +7,6 @@ env_etc.gltbx_common_includes = [
env_etc.libtbx_include,
env_etc.gltbx_include,
env_etc.scitbx_include,
- env_etc.boost_include,
]
if (not env_etc.no_boost_python):
diff --git a/work/cctbx_sources/iotbx/SConscript b/work/cctbx_sources/iotbx/SConscript
index df17856..c5cf7da 100644
--- a/work/cctbx_sources/iotbx/SConscript
+++ b/work/cctbx_sources/iotbx/SConscript
@@ -10,7 +10,6 @@ env_etc.iotbx_common_includes = [
env_etc.iotbx_include,
env_etc.cctbx_include,
env_etc.scitbx_include,
- env_etc.boost_include,
env_etc.boost_adaptbx_include,
]
@@ -37,7 +36,6 @@ if (not env_etc.no_boost_python):
env_etc.include_registry.append(
env=env,
paths=[env_etc.libtbx_include,
- env_etc.boost_include,
env_etc.python_include])
env.SharedLibrary(
target="#lib/iotbx_wildcard_ext",
diff --git a/work/cctbx_sources/mmtbx/SConscript b/work/cctbx_sources/mmtbx/SConscript
index 0532878..9bcaeb2 100755
--- a/work/cctbx_sources/mmtbx/SConscript
+++ b/work/cctbx_sources/mmtbx/SConscript
@@ -10,7 +10,6 @@ env_etc.mmtbx_common_includes = [
env_etc.mmtbx_include,
env_etc.cctbx_include,
env_etc.scitbx_include,
- env_etc.boost_include,
]
if (not env_etc.no_boost_python):
diff --git a/work/cctbx_sources/omptbx/libtbx_config b/work/cctbx_sources/omptbx/libtbx_config
index d456588..f00ae86 100644
--- a/work/cctbx_sources/omptbx/libtbx_config
+++ b/work/cctbx_sources/omptbx/libtbx_config
@@ -1,4 +1,4 @@
{
- "modules_required_for_build": ["boost"],
+ "modules_required_for_build": [],
"modules_required_for_use": ["boost_adaptbx"],
}
diff --git a/work/cctbx_sources/rstbx/SConscript b/work/cctbx_sources/rstbx/SConscript
index 2213c2f..232b5d7 100644
--- a/work/cctbx_sources/rstbx/SConscript
+++ b/work/cctbx_sources/rstbx/SConscript
@@ -11,7 +11,6 @@ env_etc.rstbx_common_includes = [
env_etc.scitbx_include,
env_etc.chiltbx_include,
env_etc.omptbx_include,
- env_etc.boost_include,
]
env = env_base.Clone(SHLINKFLAGS=env_etc.shlinkflags)
diff --git a/work/cctbx_sources/scitbx/SConscript b/work/cctbx_sources/scitbx/SConscript
index f30b9db..10e0967 100644
--- a/work/cctbx_sources/scitbx/SConscript
+++ b/work/cctbx_sources/scitbx/SConscript
@@ -9,7 +9,6 @@ env_etc.scitbx_common_includes = [
env_etc.scitbx_include,
env_etc.omptbx_include,
env_etc.boost_adaptbx_include,
- env_etc.boost_include,
]
SConscript("error/SConscript")
diff --git a/work/cctbx_sources/scitbx/libtbx_config b/work/cctbx_sources/scitbx/libtbx_config
index 87cc3c7..d147819 100644
--- a/work/cctbx_sources/scitbx/libtbx_config
+++ b/work/cctbx_sources/scitbx/libtbx_config
@@ -1,4 +1,4 @@
{
- "modules_required_for_build": ["boost"],
+ "modules_required_for_build": [],
"modules_required_for_use": ["boost_adaptbx", "omptbx"],
}
diff --git a/work/cctbx_sources/scitbx/libtbx_refresh.py b/work/cctbx_sources/scitbx/libtbx_refresh.py
index 10d4ee0..c8374b2 100644
--- a/work/cctbx_sources/scitbx/libtbx_refresh.py
+++ b/work/cctbx_sources/scitbx/libtbx_refresh.py
@@ -13,8 +13,7 @@ if (self.env.is_ready_for_build()):
generate_all.refresh(array_family=os.path.dirname(target_dir))
#
warn_if_unexpected_md5_hexdigest(
- path=self.env.under_dist(
- module_name="boost", path="boost/random/mersenne_twister.hpp"),
+ path="@GENTOO_PORTAGE_EPREFIX@/usr/include/boost/random/mersenne_twister.hpp",
expected_md5_hexdigests=[
"a2533c79a21f0f773f2e0d29a37371b0", # CVS revision 1.21
"378432b5b280c9c0c894f7c80f0dad92", # CVS revision 1.20
diff --git a/work/cctbx_sources/smtbx/SConscript b/work/cctbx_sources/smtbx/SConscript
index f5031ee..02f81a4 100644
--- a/work/cctbx_sources/smtbx/SConscript
+++ b/work/cctbx_sources/smtbx/SConscript
@@ -7,7 +7,6 @@ env_etc.smtbx_common_includes = [
env_etc.cctbx_include,
env_etc.scitbx_include,
env_etc.chiltbx_include,
- env_etc.boost_include,
]
env = env_base.Clone(
diff --git a/work/cctbx_sources/spotfinder/SConscript b/work/cctbx_sources/spotfinder/SConscript
index 1d280d4..9dc9195 100644
--- a/work/cctbx_sources/spotfinder/SConscript
+++ b/work/cctbx_sources/spotfinder/SConscript
@@ -13,7 +13,6 @@ env_etc.spotfinder_common_includes = [
env_etc.iotbx_include,
os.path.dirname(env_etc.spotfinder_dist),
env_etc.boost_adaptbx_include,
- env_etc.boost_include,
env_etc.annlib_dist,
env_etc.annlib_include[0],
env_etc.annlib_include[1],
diff --git a/work/cctbx_sources/tntbx/SConscript b/work/cctbx_sources/tntbx/SConscript
index e773186..ee29f10 100755
--- a/work/cctbx_sources/tntbx/SConscript
+++ b/work/cctbx_sources/tntbx/SConscript
@@ -10,7 +10,6 @@ env_etc.tntbx_common_includes = [
env_etc.tntbx_include,
env_etc.tntbx_tnt_include,
env_etc.scitbx_include,
- env_etc.boost_include,
]
Import("env_base", "env_etc")
--
1.7.1.1