|
@@ -22,7 +22,7 @@ def main():
|
|
parser.add_argument(
|
|
parser.add_argument(
|
|
'--platform-name',
|
|
'--platform-name',
|
|
dest='platformName',
|
|
dest='platformName',
|
|
- choices=['windows', 'android', 'mac', 'ios', 'linux'],
|
|
|
|
|
|
+ choices=['windows', 'android', 'mac', 'ios'],
|
|
default=VcpkgBuilder.defaultPackagePlatformName(),
|
|
default=VcpkgBuilder.defaultPackagePlatformName(),
|
|
)
|
|
)
|
|
args = parser.parse_args()
|
|
args = parser.parse_args()
|
|
@@ -30,17 +30,14 @@ def main():
|
|
packageSystemDir = Path(__file__).resolve().parents[1]
|
|
packageSystemDir = Path(__file__).resolve().parents[1]
|
|
opensslPackageSourceDir = packageSystemDir / 'OpenSSL'
|
|
opensslPackageSourceDir = packageSystemDir / 'OpenSSL'
|
|
outputDir = packageSystemDir / f'OpenSSL-{args.platformName}'
|
|
outputDir = packageSystemDir / f'OpenSSL-{args.platformName}'
|
|
- opensslPatch = opensslPackageSourceDir / 'set_openssl_port_to_1_1_1_b.patch'
|
|
|
|
|
|
+ opensslPatch = opensslPackageSourceDir / 'set_openssl_port_to_1_1_1_m.patch'
|
|
|
|
|
|
enableStdioOnIOS = opensslPackageSourceDir / 'enable-stdio-on-iOS.patch'
|
|
enableStdioOnIOS = opensslPackageSourceDir / 'enable-stdio-on-iOS.patch'
|
|
|
|
|
|
- cmakeFindFile = opensslPackageSourceDir / f'FindOpenSSL_{args.platformName}.cmake.template'
|
|
|
|
- if not cmakeFindFile.exists():
|
|
|
|
- cmakeFindFile = opensslPackageSourceDir / 'FindOpenSSL.cmake.template'
|
|
|
|
|
|
+ cmakeFindFile = opensslPackageSourceDir / 'FindOpenSSL.cmake.template'
|
|
cmakeFindFileTemplate = cmakeFindFile.open().read()
|
|
cmakeFindFileTemplate = cmakeFindFile.open().read()
|
|
|
|
|
|
useStaticLibsForPlatform = {
|
|
useStaticLibsForPlatform = {
|
|
- 'linux': False,
|
|
|
|
'android': True,
|
|
'android': True,
|
|
'mac': True,
|
|
'mac': True,
|
|
'ios': True,
|
|
'ios': True,
|
|
@@ -50,7 +47,7 @@ def main():
|
|
with TemporaryDirectory() as tempdir:
|
|
with TemporaryDirectory() as tempdir:
|
|
tempdir = Path(tempdir)
|
|
tempdir = Path(tempdir)
|
|
builder = VcpkgBuilder(packageName='OpenSSL', portName='openssl', vcpkgDir=tempdir, targetPlatform=args.platformName, static=useStaticLibsForPlatform[args.platformName])
|
|
builder = VcpkgBuilder(packageName='OpenSSL', portName='openssl', vcpkgDir=tempdir, targetPlatform=args.platformName, static=useStaticLibsForPlatform[args.platformName])
|
|
- builder.cloneVcpkg('f44fb85b341b8f58815b95c84d8488126b251570')
|
|
|
|
|
|
+ builder.cloneVcpkg('b86c0c35b88e2bf3557ff49dc831689c2f085090')
|
|
builder.bootstrap()
|
|
builder.bootstrap()
|
|
builder.patch(opensslPatch)
|
|
builder.patch(opensslPatch)
|
|
builder.patch(enableStdioOnIOS)
|
|
builder.patch(enableStdioOnIOS)
|
|
@@ -64,23 +61,21 @@ def main():
|
|
builder.writePackageInfoFile(
|
|
builder.writePackageInfoFile(
|
|
outputDir,
|
|
outputDir,
|
|
settings={
|
|
settings={
|
|
- 'PackageName': f'OpenSSL-1.1.1b-rev2-{args.platformName}',
|
|
|
|
|
|
+ 'PackageName': f'OpenSSL-1.1.1m-rev1-{args.platformName}',
|
|
'URL': 'https://github.com/openssl/openssl',
|
|
'URL': 'https://github.com/openssl/openssl',
|
|
'License': 'OpenSSL',
|
|
'License': 'OpenSSL',
|
|
'LicenseFile': 'OpenSSL/LICENSE'
|
|
'LicenseFile': 'OpenSSL/LICENSE'
|
|
},
|
|
},
|
|
)
|
|
)
|
|
|
|
|
|
- extraLibs = []
|
|
|
|
- compileDefs = []
|
|
|
|
|
|
+ crypto_library_dependencies = ''
|
|
if args.platformName == 'windows':
|
|
if args.platformName == 'windows':
|
|
- extraLibs.append('crypt32.lib')
|
|
|
|
|
|
+ crypto_library_dependencies = 'crypt32.lib ws2_32.lib'
|
|
builder.writeCMakeFindFile(
|
|
builder.writeCMakeFindFile(
|
|
outputDir,
|
|
outputDir,
|
|
template=cmakeFindFileTemplate,
|
|
template=cmakeFindFileTemplate,
|
|
templateEnv={
|
|
templateEnv={
|
|
- 'CUSTOM_ADDITIONAL_LIBRARIES':extraLibs,
|
|
|
|
- 'CUSTOM_ADDITIONAL_COMPILE_DEFINITIONS':compileDefs,
|
|
|
|
|
|
+ 'CRYPTO_LIBRARY_DEPENDENCIES':crypto_library_dependencies
|
|
},
|
|
},
|
|
)
|
|
)
|
|
|
|
|