|
1 | 1 | import multiprocessing |
2 | 2 | import os |
3 | | -from pathlib import Path |
4 | 3 | import platform |
5 | 4 | import subprocess |
6 | 5 | import sys |
7 | 6 | import tarfile |
8 | 7 | import zipfile |
9 | 8 | from dataclasses import dataclass |
10 | 9 | from distutils.errors import DistutilsError |
| 10 | +from pathlib import Path |
11 | 11 | from urllib.parse import urljoin |
12 | 12 | from urllib.request import urlcleanup |
13 | 13 |
|
@@ -361,40 +361,41 @@ def _build_libxslt(self, env, prefix_arg, host_arg): |
361 | 361 | subprocess.check_call(['make', f'-j{multiprocessing.cpu_count() + 1}'], cwd=str(libxslt_dir), env=env) |
362 | 362 | subprocess.check_call(['make', f'-j{multiprocessing.cpu_count() + 1}', 'install'], cwd=str(libxslt_dir), env=env) |
363 | 363 |
|
| 364 | + |
364 | 365 | def _build_xmlsec1(self, env, prefix_arg, host_arg): |
365 | | - self.info('Building xmlsec1') |
366 | | - xmlsec1_dir = next(self.build_libs_dir.glob('xmlsec1-*')) |
367 | | - subprocess.check_call( |
368 | | - [ |
369 | | - './configure', |
370 | | - prefix_arg, |
371 | | - '--disable-shared', |
372 | | - '--disable-gost', |
373 | | - '--enable-md5', |
374 | | - '--enable-ripemd160', |
375 | | - '--disable-crypto-dl', |
376 | | - '--enable-static=yes', |
377 | | - '--enable-shared=no', |
378 | | - '--enable-static-linking=yes', |
379 | | - '--with-default-crypto=openssl', |
380 | | - f'--with-openssl={self.prefix_dir}', |
381 | | - f'--with-libxml={self.prefix_dir}', |
382 | | - f'--with-libxslt={self.prefix_dir}', |
383 | | - *host_arg, |
384 | | - ], |
385 | | - cwd=str(xmlsec1_dir), |
386 | | - env=env, |
387 | | - ) |
388 | | - include_flags = [ |
389 | | - f'-I{self.prefix_dir / "include"}', |
390 | | - f'-I{self.prefix_dir / "include" / "libxml"}', |
391 | | - ] |
392 | | - subprocess.check_call( |
393 | | - ['make', f'-j{multiprocessing.cpu_count() + 1}', *include_flags], |
394 | | - cwd=str(xmlsec1_dir), |
395 | | - env=env, |
396 | | - ) |
397 | | - subprocess.check_call(['make', f'-j{multiprocessing.cpu_count() + 1}', 'install'], cwd=str(xmlsec1_dir), env=env) |
| 366 | + self.info('Building xmlsec1') |
| 367 | + xmlsec1_dir = next(self.build_libs_dir.glob('xmlsec1-*')) |
| 368 | + subprocess.check_call( |
| 369 | + [ |
| 370 | + './configure', |
| 371 | + prefix_arg, |
| 372 | + '--disable-shared', |
| 373 | + '--disable-gost', |
| 374 | + '--enable-md5', |
| 375 | + '--enable-ripemd160', |
| 376 | + '--disable-crypto-dl', |
| 377 | + '--enable-static=yes', |
| 378 | + '--enable-shared=no', |
| 379 | + '--enable-static-linking=yes', |
| 380 | + '--with-default-crypto=openssl', |
| 381 | + f'--with-openssl={self.prefix_dir}', |
| 382 | + f'--with-libxml={self.prefix_dir}', |
| 383 | + f'--with-libxslt={self.prefix_dir}', |
| 384 | + *host_arg, |
| 385 | + ], |
| 386 | + cwd=str(xmlsec1_dir), |
| 387 | + env=env, |
| 388 | + ) |
| 389 | + include_flags = [ |
| 390 | + f'-I{self.prefix_dir / "include"}', |
| 391 | + f'-I{self.prefix_dir / "include" / "libxml"}', |
| 392 | + ] |
| 393 | + subprocess.check_call( |
| 394 | + ['make', f'-j{multiprocessing.cpu_count() + 1}', *include_flags], |
| 395 | + cwd=str(xmlsec1_dir), |
| 396 | + env=env, |
| 397 | + ) |
| 398 | + subprocess.check_call(['make', f'-j{multiprocessing.cpu_count() + 1}', 'install'], cwd=str(xmlsec1_dir), env=env) |
398 | 399 |
|
399 | 400 |
|
400 | 401 | __all__ = ('CrossCompileInfo', 'LibXmlsecDependencyBuilder') |
0 commit comments