Skip to content

Commit

Permalink
Merge pull request #63 from regro-cf-autotick-bot/rebuild-libxml2212-…
Browse files Browse the repository at this point in the history
…0-1_hcbe940
  • Loading branch information
vtraag authored Dec 1, 2023
2 parents a8c6bcc + c59aada commit c1c6077
Show file tree
Hide file tree
Showing 12 changed files with 59 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .ci_support/linux_64_.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ libblas:
liblapack:
- 3.9 *netlib
libxml2:
- '2.11'
- '2.12'
target_platform:
- linux-64
zip_keys:
Expand Down
2 changes: 1 addition & 1 deletion .ci_support/linux_aarch64_.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ libblas:
liblapack:
- 3.9 *netlib
libxml2:
- '2.11'
- '2.12'
target_platform:
- linux-aarch64
zip_keys:
Expand Down
2 changes: 1 addition & 1 deletion .ci_support/linux_ppc64le_.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ libblas:
liblapack:
- 3.9 *netlib
libxml2:
- '2.11'
- '2.12'
target_platform:
- linux-ppc64le
zip_keys:
Expand Down
7 changes: 7 additions & 0 deletions .ci_support/migrations/libxml2212.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
__migrator:
build_number: 1
kind: version
migration_number: 1
libxml2:
- '2.12'
migrator_ts: 1700445986.2150207
2 changes: 1 addition & 1 deletion .ci_support/osx_64_.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ libblas:
liblapack:
- 3.9 *netlib
libxml2:
- '2.11'
- '2.12'
macos_machine:
- x86_64-apple-darwin13.4.0
target_platform:
Expand Down
2 changes: 1 addition & 1 deletion .ci_support/osx_arm64_.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ libblas:
liblapack:
- 3.9 *netlib
libxml2:
- '2.11'
- '2.12'
macos_machine:
- arm64-apple-darwin20.0.0
target_platform:
Expand Down
2 changes: 1 addition & 1 deletion .ci_support/win_64_.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ libblas:
liblapack:
- 3.9 *netlib
libxml2:
- '2.11'
- '2.12'
target_platform:
- win-64
vc:
Expand Down
6 changes: 3 additions & 3 deletions .scripts/build_steps.sh

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

6 changes: 3 additions & 3 deletions .scripts/run_osx_build.sh

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

8 changes: 5 additions & 3 deletions .scripts/run_win_build.bat

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

32 changes: 32 additions & 0 deletions recipe/0001_xml_const.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
diff --git a/src/io/graphml.c b/src/io/graphml.c
index 402f8e472..c320a6c05 100644
--- a/src/io/graphml.c
+++ b/src/io/graphml.c
@@ -344,7 +344,11 @@ static void igraph_i_graphml_parser_state_set_error_from_varargs(
}

static void igraph_i_graphml_parser_state_set_error_from_xmlerror(
+#if LIBXML_VERSION < 21200 /* Versions < 2.12.0: */
struct igraph_i_graphml_parser_state *state, const xmlErrorPtr error
+#else /* Versions >= 2.12.0, introduces const errors: */
+ struct igraph_i_graphml_parser_state *state, const xmlError* error
+#endif
) {
const size_t max_error_message_length = 4096;

@@ -1530,7 +1534,14 @@ static void igraph_i_libxml_generic_error_handler(void* ctx, const char* msg, ..
va_end(args);
}

-static void igraph_i_libxml_structured_error_handler(void* ctx, xmlErrorPtr error) {
+#define STRING2(x) #x
+#define STRING(x) STRING2(x)
+#pragma message "LibXML version: " STRING(LIBXML_VERSION)
+#if LIBXML_VERSION < 21200 /* Versions < 2.12.0: */
+ static void igraph_i_libxml_structured_error_handler(void* ctx, xmlErrorPtr error) {
+#else /* Versions >= 2.12.0, introduces const errors: */
+ static void igraph_i_libxml_structured_error_handler(void* ctx, const xmlError* error) {
+#endif
struct igraph_i_graphml_parser_state* state = (struct igraph_i_graphml_parser_state*) ctx;
igraph_i_graphml_parser_state_set_error_from_xmlerror(state, error);
}
4 changes: 3 additions & 1 deletion recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@ source:
fn: {{ name }}-{{ version }}.tar.gz
url: https://github.com/igraph/igraph/releases/download/{{ version }}/{{ name }}-{{ version }}.tar.gz
sha256: ac5fa94ae6fd1eace651e4b235e99c056479a5c5d0d641aed30240ac33b19403
patches:
- 0001_xml_const.patch

build:
skip: true # [win and vc<14]
number: 0
number: 1
script_env:
- F2C_EXTERNAL_ARITH_HEADER={{ RECIPE_DIR }}/arith_arm64.h # [arm64]

Expand Down

0 comments on commit c1c6077

Please sign in to comment.