Skip to content

Commit e5fee25

Browse files
committed
imap client requires -lcrypto for php make
1 parent dc0c98f commit e5fee25

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/SPC/builder/extension/imap.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
namespace SPC\builder\extension;
66

77
use SPC\builder\Extension;
8+
use SPC\builder\linux\SystemUtil;
89
use SPC\exception\WrongUsageException;
910
use SPC\store\FileSystem;
1011
use SPC\util\CustomExt;
@@ -41,4 +42,16 @@ public function getUnixConfigureArg(bool $shared = false): string
4142
}
4243
return $arg;
4344
}
45+
46+
public function patchBeforeMake(): bool
47+
{
48+
if (PHP_OS_FAMILY !== 'Linux' || SystemUtil::isMuslDist()) {
49+
return false;
50+
}
51+
$extra_libs = trim(getenv('SPC_EXTRA_LIBS') . ' -lcrypt');
52+
f_putenv('SPC_EXTRA_LIBS=' . $extra_libs);
53+
return true;
54+
}
55+
56+
4457
}

0 commit comments

Comments
 (0)