mirror of
https://github.com/pentoo/pentoo-overlay
synced 2025-12-15 21:02:30 +01:00
73 lines
2.3 KiB
Diff
73 lines
2.3 KiB
Diff
From ceeeda49b280648d76b0928e97cbcb1e398cb392 Mon Sep 17 00:00:00 2001
|
|
From: Alban Diquet <nabla.c0d3@gmail.com>
|
|
Date: Sat, 22 Sep 2018 21:14:51 -0700
|
|
Subject: [PATCH] Add a --do-not-clean build command; fixes #42
|
|
|
|
---
|
|
build_tasks.py | 31 ++++++++++++++++++-------------
|
|
1 file changed, 18 insertions(+), 13 deletions(-)
|
|
|
|
diff --git a/build_tasks.py b/build_tasks.py
|
|
index 2bc0836..91bcf9b 100644
|
|
--- a/build_tasks.py
|
|
+++ b/build_tasks.py
|
|
@@ -342,34 +342,36 @@ def include_path(self) -> Path:
|
|
return self.src_path
|
|
|
|
|
|
-
|
|
@task
|
|
-def build_zlib(ctx):
|
|
+def build_zlib(ctx, do_not_clean=False):
|
|
print('ZLIB: Starting...')
|
|
zlib_cfg = ZlibBuildConfig(CURRENT_PLATFORM)
|
|
- zlib_cfg.clean()
|
|
- zlib_cfg.fetch_source()
|
|
+ if do_not_clean:
|
|
+ zlib_cfg.clean()
|
|
+ zlib_cfg.fetch_source()
|
|
zlib_cfg.build(ctx)
|
|
print('ZLIB: All done')
|
|
|
|
|
|
@task
|
|
-def build_legacy_openssl(ctx):
|
|
+def build_legacy_openssl(ctx, do_not_clean=False):
|
|
print('OPENSSL LEGACY: Starting...')
|
|
ssl_legacy_cfg = LegacyOpenSslBuildConfig(CURRENT_PLATFORM)
|
|
- ssl_legacy_cfg.clean()
|
|
- ssl_legacy_cfg.fetch_source()
|
|
+ if do_not_clean:
|
|
+ ssl_legacy_cfg.clean()
|
|
+ ssl_legacy_cfg.fetch_source()
|
|
zlib_cfg = ZlibBuildConfig(CURRENT_PLATFORM)
|
|
ssl_legacy_cfg.build(ctx, zlib_lib_path=zlib_cfg.libz_path, zlib_include_path=zlib_cfg.include_path)
|
|
print('OPENSSL LEGACY: All done')
|
|
|
|
|
|
@task
|
|
-def build_modern_openssl(ctx):
|
|
+def build_modern_openssl(ctx, do_not_clean=False):
|
|
print('OPENSSL MODERN: Starting...')
|
|
ssl_modern_cfg = ModernOpenSslBuildConfig(CURRENT_PLATFORM)
|
|
- ssl_modern_cfg.clean()
|
|
- ssl_modern_cfg.fetch_source()
|
|
+ if do_not_clean:
|
|
+ ssl_modern_cfg.clean()
|
|
+ ssl_modern_cfg.fetch_source()
|
|
zlib_cfg = ZlibBuildConfig(CURRENT_PLATFORM)
|
|
ssl_modern_cfg.build(ctx, zlib_lib_path=zlib_cfg.libz_path, zlib_include_path=zlib_cfg.include_path)
|
|
print('OPENSSL MODERN: All done')
|
|
@@ -391,6 +393,9 @@ def build_nassl(ctx):
|
|
ctx.run(f'python setup.py build_ext -i {extra_args}')
|
|
|
|
|
|
-@task(pre=[build_zlib, build_legacy_openssl, build_modern_openssl, build_nassl])
|
|
-def build_all(ctx):
|
|
- pass
|
|
+@task
|
|
+def build_all(ctx, do_not_clean=False):
|
|
+ build_zlib(ctx, do_not_clean)
|
|
+ build_legacy_openssl(ctx, do_not_clean)
|
|
+ build_modern_openssl(ctx, do_not_clean)
|
|
+ build_nassl(ctx)
|