Skip to content

Commit 2ab8cee

Browse files
committed
Merge pull request #639 from hashdist/johannr/petsc-ssl
Build PETSc with ssl only when a dependency
2 parents 24ba426 + 354b50d commit 2ab8cee

2 files changed

Lines changed: 13 additions & 1 deletion

File tree

pkgs/openssl/openssl.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
extends: [autotools_package]
22

33
dependencies:
4-
build: [zlib]
4+
build: [pkg-config, zlib]
55

66
sources:
77
- url: https://www.openssl.org/source/openssl-1.0.1g.tar.gz
@@ -46,3 +46,7 @@ build_stages:
4646
bash: |
4747
#./config --prefix=$ARTIFACT shared zlib-dynamic -I$ZLIB_DIR/include -Wl,-rpath=$ARTIFACT/lib -Wl,-rpath=$ZLIB_DIR/lib
4848
./Configure --prefix=$ARTIFACT shared zlib-dynamic -I$ZLIB_DIR/include darwin64-x86_64-cc enable-ec_nistp-64_gcc_128
49+
50+
when_build_dependency:
51+
- prepend_path: PKG_CONFIG_PATH
52+
value: '${ARTIFACT}/lib/pkgconfig'

pkgs/petsc/petsc.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,14 @@ def configure(ctx, stage_args):
6969
# must explicitly set --with-debugging=0 to disable debugging
7070
conf_lines.append('--with-debugging=%d' % stage_args['debug'])
7171

72+
# Special case, openssl provides ssl
73+
if 'OPENSSL' in ctx.dependency_dir_vars:
74+
conf_lines.append('--with-ssl=1')
75+
conf_lines.append('--with-ssl-dir=${OPENSSL_DIR}')
76+
else:
77+
# Disable ssl when not a dependency
78+
conf_lines.append('--with-ssl=0')
79+
7280
# Special case, --with-blas-dir does not work with OpenBLAS
7381
if 'OPENBLAS' in ctx.dependency_dir_vars:
7482
if ctx.parameters['platform'] == 'Darwin':

0 commit comments

Comments
 (0)