File: iotbx_with_system_libraries.patch

package info (click to toggle)
cctbx 2024.10%2Bds2%2B~3.22.1%2Bds1-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, trixie
  • size: 136,708 kB
  • sloc: python: 892,916; cpp: 299,439; ansic: 22,625; fortran: 18,268; javascript: 2,046; sh: 1,114; sql: 632; csh: 519; java: 368; makefile: 317; xml: 25
file content (64 lines) | stat: -rw-r--r-- 1,935 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
From: =?utf-8?q?Picca_Fr=C3=A9d=C3=A9ric-Emmanuel?= <picca@debian.org>
Date: Mon, 1 Aug 2022 14:57:30 +0200
Subject: iotbx with system libraries

- build extensions without the antlr3c sources files.
---
 iotbx/cif/boost_python/SConscript | 41 +++------------------------------------
 1 file changed, 3 insertions(+), 38 deletions(-)

diff --git a/iotbx/cif/boost_python/SConscript b/iotbx/cif/boost_python/SConscript
index 49837af..ce701da 100644
--- a/iotbx/cif/boost_python/SConscript
+++ b/iotbx/cif/boost_python/SConscript
@@ -2,47 +2,12 @@ import libtbx.load_env
 import os
 Import("env_iotbx_boost_python_ext", "env_etc")
 env = env_iotbx_boost_python_ext.Clone()
-env.Append(CPPDEFINES=["ANTLR3_NODEBUGGER"]) # XXX not exactly sure why we need this
+env.Append(LIBS=["antlr3c"]) # XXX not exactly sure why we need this
 
-antlr3_dist = libtbx.env.under_dist("ucif", "antlr3")
-antlr3_include = libtbx.env.under_dist("ucif", "antlr3/include")
-
-antlr3_src_files = [
-  "antlr3baserecognizer.c",
-  "antlr3basetree.c",
-  "antlr3basetreeadaptor.c",
-  "antlr3bitset.c",
-  "antlr3collections.c",
-  "antlr3commontoken.c",
-  "antlr3commontree.c",
-  "antlr3commontreeadaptor.c",
-  "antlr3commontreenodestream.c",
-  "antlr3convertutf.c",
-  "antlr3cyclicdfa.c",
-  "antlr3debughandlers.c",
-  "antlr3encodings.c",
-  "antlr3exception.c",
-  "antlr3filestream.c",
-  "antlr3inputstream.c",
-  "antlr3intstream.c",
-  "antlr3lexer.c",
-  "antlr3parser.c",
-  "antlr3rewritestreams.c",
-  "antlr3string.c",
-  "antlr3tokenstream.c",
-  "antlr3treeparser.c",
-]
-
-prefix = "#ucif/antlr3/src"
-source = [os.path.join(prefix, file_name) for file_name in antlr3_src_files]
-source.extend([
+source = [
   "cif_ext.cpp",
   "#ucif/cifParser.cpp",
   "#ucif/cifLexer.cpp",
-])
-
-env_etc.include_registry.append(
-  env=env,
-  paths=[antlr3_include, antlr3_dist])
+  ]
 
 env.SharedLibrary(target="#lib/iotbx_cif_ext", source=source)