Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unbundle windows #22

Merged
merged 22 commits into from
May 16, 2022
Merged
Show file tree
Hide file tree
Changes from 21 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .ci_support/win_64_.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,7 @@ pin_run_as_build:
max_pin: x.x.x
target_platform:
- win-64
zlib_ng:
- '2.0'
zstd:
- '1.5'
2 changes: 1 addition & 1 deletion .github/CODEOWNERS

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

67 changes: 67 additions & 0 deletions recipe/0000-zlib-compat.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
diff -ruN -x __pycache__ -x obj -x '*~' -x tags -x TAGS c-blosc2-2.1.1.orig/blosc/blosc2.c c-blosc2-2.1.1/blosc/blosc2.c
--- c-blosc2-2.1.1.orig/blosc/blosc2.c 2022-05-07 12:51:50.000000000 +0200
+++ c-blosc2-2.1.1/blosc/blosc2.c 2022-05-16 16:23:28.752331241 +0200
@@ -435,15 +435,15 @@
static int zlib_wrap_compress(const char* input, size_t input_length,
char* output, size_t maxout, int clevel) {
int status;
- uLongf cl = (uLongf)maxout;
-#ifdef ZLIB_COMPAT
- status = compress2(
-#elif defined(HAVE_ZLIB_NG)
+#if defined(HAVE_ZLIB_NG) && ! defined(ZLIB_COMPAT)
+ size_t cl = maxout;
status = zng_compress2(
+ (uint8_t*)output, &cl, (uint8_t*)input, input_length, clevel);
#else
+ uLongf cl = (uLongf)maxout;
status = compress2(
-#endif
(Bytef*)output, &cl, (Bytef*)input, (uLong)input_length, clevel);
+#endif
if (status != Z_OK) {
return 0;
}
@@ -453,15 +453,15 @@
static int zlib_wrap_decompress(const char* input, size_t compressed_length,
char* output, size_t maxout) {
int status;
- uLongf ul = (uLongf)maxout;
-#ifdef ZLIB_COMPAT
- status = uncompress(
-#elif defined(HAVE_ZLIB_NG)
+#if defined(HAVE_ZLIB_NG) && ! defined(ZLIB_COMPAT)
+ size_t ul = maxout;
status = zng_uncompress(
+ (uint8_t*)output, &ul, (uint8_t*)input, compressed_length);
#else
+ uLongf ul = (uLongf)maxout;
status = uncompress(
-#endif
(Bytef*)output, &ul, (Bytef*)input, (uLong)compressed_length);
+#endif
if (status != Z_OK) {
return 0;
}
diff -ruN -x __pycache__ -x obj -x '*~' -x tags -x TAGS c-blosc2-2.1.1.orig/compat/filegen.c c-blosc2-2.1.1/compat/filegen.c
--- c-blosc2-2.1.1.orig/compat/filegen.c 2022-05-07 12:51:50.000000000 +0200
+++ c-blosc2-2.1.1/compat/filegen.c 2022-05-15 21:29:11.284903070 +0200
@@ -33,6 +33,7 @@


int main(int argc, char *argv[]) {
+ setvbuf(stdout, NULL, _IONBF, 0);
BLOSC_UNUSED_PARAM(argc);
static int32_t data[SIZE];
static int32_t data_out[SIZE];
diff -ruN -x __pycache__ -x obj -x '*~' -x tags -x TAGS c-blosc2-2.1.1.orig/tests/CMakeLists.txt c-blosc2-2.1.1/tests/CMakeLists.txt
--- c-blosc2-2.1.1.orig/tests/CMakeLists.txt 2022-05-07 12:51:50.000000000 +0200
+++ c-blosc2-2.1.1/tests/CMakeLists.txt 2022-05-11 19:10:40.206391532 +0200
@@ -16,6 +16,7 @@

# Some tests will be enabled only for Unix
if(WIN32)
+ continue()
if(target STREQUAL test_nolock OR
target STREQUAL test_noinit OR
target STREQUAL test_compressor OR
7 changes: 3 additions & 4 deletions recipe/bld.bat
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
setlocal EnableDelayedExpansion
rmdir /s /q internal-complibs\lz4-*
rmdir /s /q internal-complibs\zstd-*
rmdir /s /q internal-complibs

mkdir build
if errorlevel 1 exit 1
Expand All @@ -22,14 +21,14 @@ cmake -G "NMake Makefiles" ^
-DBLOSC_INSTALL=ON ^
-DPREFER_EXTERNAL_LZ4:BOOL=ON ^
-DPREFER_EXTERNAL_ZSTD:BOOL=ON ^
-DPREFER_EXTERNAL_ZLIB:BOOL=OFF ^
-DPREFER_EXTERNAL_ZLIB:BOOL=ON ^
"%SRC_DIR%"
if errorlevel 1 exit 1

cmake --build . --config Release
if errorlevel 1 exit 1

ctest -C release
ctest -C release --output-on-failure --timeout 120
if errorlevel 1 exit 1

cmake --build . --target install --config Release
Expand Down
7 changes: 5 additions & 2 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@ package:
source:
url: https://github.com/Blosc/{{ name }}/archive/v{{ version }}.tar.gz
sha256: a8cbedefb8ed3b83629534ec8b4a822ffcdb1576e13dfb93107361551d32e6e9
patches:
- 0000-zlib-compat.patch

build:
number: 0
number: 1
run_exports:
- {{ pin_subpackage('c-blosc2') }}

Expand All @@ -23,7 +25,7 @@ requirements:
host:
- lz4-c
- zstd
- zlib-ng # [unix]
- zlib-ng

test:
commands:
Expand Down Expand Up @@ -51,3 +53,4 @@ extra:
recipe-maintainers:
- FrancescAlted
- hmaarrfk
- zklaus