Skip to content

Commit f8aa5b2

Browse files
D4ntealexcrichton
authored andcommitted
Allow to specify custom path for Perl (#49)
* Allow to specify custom path for Perl Env var OPENSSL_SRC_PERL can be set to specify a path to the perl binary to use to call the openssl perl scripts. Resolves #45 * Fallback to PERL env var if OPENSSL_SRC_PERL is not set
1 parent 6c789af commit f8aa5b2

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ jobs:
122122
shell: bash
123123
- name: Use strawberry perl
124124
if: startsWith(matrix.os, 'windows')
125-
run: echo ::add-path::C:/Strawberry/perl/bin
125+
run: echo ::set-env name=OPENSSL_SRC_PERL::C:/Strawberry/perl/bin/perl
126126
shell: bash
127127
- run: |
128128
set -e

src/lib.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,9 @@ impl Build {
7777
cp_r(&source_dir(), &inner_dir);
7878
apply_patches(target, &inner_dir);
7979

80-
let mut configure = Command::new("perl");
80+
let perl_program =
81+
env::var("OPENSSL_SRC_PERL").unwrap_or(env::var("PERL").unwrap_or("perl".to_string()));
82+
let mut configure = Command::new(perl_program);
8183
configure.arg("./Configure");
8284
if host.contains("pc-windows-gnu") {
8385
configure.arg(&format!("--prefix={}", sanitize_sh(&install_dir)));

0 commit comments

Comments
 (0)