Skip to content

Commit 054c34f

Browse files
authored
Add ecl subproject
1 parent 6df039c commit 054c34f

File tree

5 files changed

+36
-3
lines changed

5 files changed

+36
-3
lines changed

src/meson.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ png = dependency(['libpng', 'png', 'png16'], version: '>=1.2')
118118
zlib = dependency('zlib', version: '>=1.2.11')
119119
# We actually want >= 20231212, but the version number is not updated in the pkgconfig
120120
# https://github.com/conda-forge/eclib-feedstock/issues/48
121-
ec = dependency('eclib', version: '>=20231211', required: false)
121+
ec = dependency('eclib', version: '>=20231211', required: false, disabler: true)
122122
# Cannot be found via pkg-config
123123
ecm = cc.find_library('ecm')
124124
gmpxx = dependency('gmpxx')

src/sage/libs/meson.build

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
sirocco = cc.find_library('sirocco', required: false, disabler: true)
22
# cannot be found via pkg-config
33
ecl = cc.find_library('ecl', required: false, disabler: true)
4+
if not ecl.found()
5+
ecl_proj = subproject('ecl')
6+
ecl = ecl_proj.get_variable('ecl_dep')
7+
endif
48
braiding = dependency('libbraiding', required: false)
59
if not braiding.found()
610
# Fallback since pkg-config support was only added in v1.3.1
@@ -39,14 +43,18 @@ extension_data = {
3943
'meataxe': files('meataxe.pyx'),
4044
}
4145

42-
dependencies = [py_dep, braiding, cysignals, ecl, ecm, gc, gmp, homfly]
46+
dependencies = [py_dep, cysignals, ecl, gc, gmp]
4347

4448
foreach name, pyx : extension_data
4549
deps = dependencies
4650
if name == 'sirocco'
4751
deps += [sirocco]
4852
elif name == 'meataxe'
4953
deps += [mtx]
54+
elif name == 'homfly'
55+
deps += [homfly]
56+
elif name == 'libecm'
57+
deps += [ecm]
5058
endif
5159

5260
py.extension_module(
@@ -62,14 +70,18 @@ endforeach
6270
extension_data_cpp = {'braiding': files('braiding.pyx')}
6371

6472
foreach name, pyx : extension_data_cpp
73+
deps = dependencies
74+
if name == 'braiding'
75+
deps += [braiding]
76+
endif
6577
py.extension_module(
6678
name,
6779
sources: pyx,
6880
subdir: 'sage/libs',
6981
install: true,
7082
override_options: ['cython_language=cpp'],
7183
include_directories: [inc_cpython, inc_rings],
72-
dependencies: dependencies,
84+
dependencies: deps,
7385
)
7486
endforeach
7587

subprojects/ecl.wrap

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[wrap-git]
2+
url = https://gitlab.com/embeddable-common-lisp/ecl.git
3+
revision = 24.5.10
4+
depth = 1
5+
patch_directory = ecl
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
project('ecl', 'c',
2+
meson_version : '>=0.57.0',
3+
)
4+
5+
mod = import('unstable-external_project')
6+
subdir('src')
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
proj = mod.add_project('configure',
2+
configure_options : [
3+
'--enable-manual=no',
4+
'--enable-unicode=yes',
5+
'--with-defsystem'
6+
],
7+
)
8+
9+
ecl_dep = proj.dependency('ecl')
10+
meson.override_dependency('ecl', ecl_dep)

0 commit comments

Comments
 (0)