diff --git a/.azure-pipelines/azure-pipelines-linux.yml b/.azure-pipelines/azure-pipelines-linux.yml index c822fd4..2943cc8 100755 --- a/.azure-pipelines/azure-pipelines-linux.yml +++ b/.azure-pipelines/azure-pipelines-linux.yml @@ -8,16 +8,28 @@ jobs: vmImage: ubuntu-latest strategy: matrix: - linux_64_: - CONFIG: linux_64_ + linux_64_with_icuno: + CONFIG: linux_64_with_icuno UPLOAD_PACKAGES: 'True' DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 - linux_aarch64_: - CONFIG: linux_aarch64_ + linux_64_with_icuyes: + CONFIG: linux_64_with_icuyes UPLOAD_PACKAGES: 'True' DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 - linux_ppc64le_: - CONFIG: linux_ppc64le_ + linux_aarch64_with_icuno: + CONFIG: linux_aarch64_with_icuno + UPLOAD_PACKAGES: 'True' + DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 + linux_aarch64_with_icuyes: + CONFIG: linux_aarch64_with_icuyes + UPLOAD_PACKAGES: 'True' + DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 + linux_ppc64le_with_icuno: + CONFIG: linux_ppc64le_with_icuno + UPLOAD_PACKAGES: 'True' + DOCKER_IMAGE: quay.io/condaforge/linux-anvil-ppc64le + linux_ppc64le_with_icuyes: + CONFIG: linux_ppc64le_with_icuyes UPLOAD_PACKAGES: 'True' DOCKER_IMAGE: quay.io/condaforge/linux-anvil-ppc64le timeoutInMinutes: 360 diff --git a/.azure-pipelines/azure-pipelines-osx.yml b/.azure-pipelines/azure-pipelines-osx.yml index 7708e23..65d40dc 100755 --- a/.azure-pipelines/azure-pipelines-osx.yml +++ b/.azure-pipelines/azure-pipelines-osx.yml @@ -8,11 +8,17 @@ jobs: vmImage: macOS-12 strategy: matrix: - osx_64_: - CONFIG: osx_64_ + osx_64_with_icuno: + CONFIG: osx_64_with_icuno UPLOAD_PACKAGES: 'True' - osx_arm64_: - CONFIG: osx_arm64_ + osx_64_with_icuyes: + CONFIG: osx_64_with_icuyes + UPLOAD_PACKAGES: 'True' + osx_arm64_with_icuno: + CONFIG: osx_arm64_with_icuno + UPLOAD_PACKAGES: 'True' + osx_arm64_with_icuyes: + CONFIG: osx_arm64_with_icuyes UPLOAD_PACKAGES: 'True' timeoutInMinutes: 360 variables: {} diff --git a/.ci_support/linux_64_.yaml b/.ci_support/linux_64_with_icuno.yaml similarity index 95% rename from .ci_support/linux_64_.yaml rename to .ci_support/linux_64_with_icuno.yaml index e8b161e..1882081 100644 --- a/.ci_support/linux_64_.yaml +++ b/.ci_support/linux_64_with_icuno.yaml @@ -22,6 +22,8 @@ libiconv: - '1' target_platform: - linux-64 +with_icu: +- 'no' xz: - '5' zip_keys: diff --git a/.ci_support/linux_64_with_icuyes.yaml b/.ci_support/linux_64_with_icuyes.yaml new file mode 100644 index 0000000..1a34d42 --- /dev/null +++ b/.ci_support/linux_64_with_icuyes.yaml @@ -0,0 +1,33 @@ +VERBOSE_AT: +- V=1 +c_compiler: +- gcc +c_compiler_version: +- '12' +c_stdlib: +- sysroot +c_stdlib_version: +- '2.17' +cdt_name: +- cos7 +channel_sources: +- conda-forge +channel_targets: +- conda-forge main +docker_image: +- quay.io/condaforge/linux-anvil-cos7-x86_64 +icu: +- '75' +libiconv: +- '1' +target_platform: +- linux-64 +with_icu: +- 'yes' +xz: +- '5' +zip_keys: +- - c_stdlib_version + - cdt_name +zlib: +- '1' diff --git a/.ci_support/linux_aarch64_.yaml b/.ci_support/linux_aarch64_with_icuno.yaml similarity index 96% rename from .ci_support/linux_aarch64_.yaml rename to .ci_support/linux_aarch64_with_icuno.yaml index 36e53b5..6e8cf0e 100644 --- a/.ci_support/linux_aarch64_.yaml +++ b/.ci_support/linux_aarch64_with_icuno.yaml @@ -26,6 +26,8 @@ libiconv: - '1' target_platform: - linux-aarch64 +with_icu: +- 'no' xz: - '5' zip_keys: diff --git a/.ci_support/linux_aarch64_with_icuyes.yaml b/.ci_support/linux_aarch64_with_icuyes.yaml new file mode 100644 index 0000000..28fa16b --- /dev/null +++ b/.ci_support/linux_aarch64_with_icuyes.yaml @@ -0,0 +1,37 @@ +BUILD: +- aarch64-conda_cos7-linux-gnu +VERBOSE_AT: +- V=1 +c_compiler: +- gcc +c_compiler_version: +- '12' +c_stdlib: +- sysroot +c_stdlib_version: +- '2.17' +cdt_arch: +- aarch64 +cdt_name: +- cos7 +channel_sources: +- conda-forge +channel_targets: +- conda-forge main +docker_image: +- quay.io/condaforge/linux-anvil-cos7-x86_64 +icu: +- '75' +libiconv: +- '1' +target_platform: +- linux-aarch64 +with_icu: +- 'yes' +xz: +- '5' +zip_keys: +- - c_stdlib_version + - cdt_name +zlib: +- '1' diff --git a/.ci_support/linux_ppc64le_.yaml b/.ci_support/linux_ppc64le_with_icuno.yaml similarity index 95% rename from .ci_support/linux_ppc64le_.yaml rename to .ci_support/linux_ppc64le_with_icuno.yaml index 1733a78..9a2d59d 100644 --- a/.ci_support/linux_ppc64le_.yaml +++ b/.ci_support/linux_ppc64le_with_icuno.yaml @@ -22,6 +22,8 @@ libiconv: - '1' target_platform: - linux-ppc64le +with_icu: +- 'no' xz: - '5' zip_keys: diff --git a/.ci_support/linux_ppc64le_with_icuyes.yaml b/.ci_support/linux_ppc64le_with_icuyes.yaml new file mode 100644 index 0000000..b8d38d5 --- /dev/null +++ b/.ci_support/linux_ppc64le_with_icuyes.yaml @@ -0,0 +1,33 @@ +VERBOSE_AT: +- V=1 +c_compiler: +- gcc +c_compiler_version: +- '12' +c_stdlib: +- sysroot +c_stdlib_version: +- '2.17' +cdt_name: +- cos7 +channel_sources: +- conda-forge +channel_targets: +- conda-forge main +docker_image: +- quay.io/condaforge/linux-anvil-ppc64le +icu: +- '75' +libiconv: +- '1' +target_platform: +- linux-ppc64le +with_icu: +- 'yes' +xz: +- '5' +zip_keys: +- - c_stdlib_version + - cdt_name +zlib: +- '1' diff --git a/.ci_support/osx_64_.yaml b/.ci_support/osx_64_with_icuno.yaml similarity index 95% rename from .ci_support/osx_64_.yaml rename to .ci_support/osx_64_with_icuno.yaml index 5e60621..b0a7ce8 100644 --- a/.ci_support/osx_64_.yaml +++ b/.ci_support/osx_64_with_icuno.yaml @@ -24,6 +24,8 @@ macos_machine: - x86_64-apple-darwin13.4.0 target_platform: - osx-64 +with_icu: +- 'no' xz: - '5' zlib: diff --git a/.ci_support/osx_64_with_icuyes.yaml b/.ci_support/osx_64_with_icuyes.yaml new file mode 100644 index 0000000..73a0b95 --- /dev/null +++ b/.ci_support/osx_64_with_icuyes.yaml @@ -0,0 +1,32 @@ +MACOSX_DEPLOYMENT_TARGET: +- '10.13' +MACOSX_SDK_VERSION: +- '10.13' +VERBOSE_AT: +- V=1 +c_compiler: +- clang_bootstrap +c_compiler_version: +- '16' +c_stdlib: +- macosx_deployment_target +c_stdlib_version: +- '10.13' +channel_sources: +- conda-forge +channel_targets: +- conda-forge main +icu: +- '75' +libiconv: +- '1' +macos_machine: +- x86_64-apple-darwin13.4.0 +target_platform: +- osx-64 +with_icu: +- 'yes' +xz: +- '5' +zlib: +- '1' diff --git a/.ci_support/osx_arm64_.yaml b/.ci_support/osx_arm64_with_icuno.yaml similarity index 95% rename from .ci_support/osx_arm64_.yaml rename to .ci_support/osx_arm64_with_icuno.yaml index 707996d..4b6f8d1 100644 --- a/.ci_support/osx_arm64_.yaml +++ b/.ci_support/osx_arm64_with_icuno.yaml @@ -24,6 +24,8 @@ macos_machine: - arm64-apple-darwin20.0.0 target_platform: - osx-arm64 +with_icu: +- 'no' xz: - '5' zlib: diff --git a/.ci_support/osx_arm64_with_icuyes.yaml b/.ci_support/osx_arm64_with_icuyes.yaml new file mode 100644 index 0000000..566ab30 --- /dev/null +++ b/.ci_support/osx_arm64_with_icuyes.yaml @@ -0,0 +1,32 @@ +MACOSX_DEPLOYMENT_TARGET: +- '11.0' +MACOSX_SDK_VERSION: +- '11.0' +VERBOSE_AT: +- V=1 +c_compiler: +- clang_bootstrap +c_compiler_version: +- '16' +c_stdlib: +- macosx_deployment_target +c_stdlib_version: +- '11.0' +channel_sources: +- conda-forge +channel_targets: +- conda-forge main +icu: +- '75' +libiconv: +- '1' +macos_machine: +- arm64-apple-darwin20.0.0 +target_platform: +- osx-arm64 +with_icu: +- 'yes' +xz: +- '5' +zlib: +- '1' diff --git a/.ci_support/win_64_.yaml b/.ci_support/win_64_.yaml index 268bcbe..9bf9c89 100644 --- a/.ci_support/win_64_.yaml +++ b/.ci_support/win_64_.yaml @@ -12,5 +12,7 @@ libiconv: - '1' target_platform: - win-64 +with_icu: +- 'no' zlib: - '1' diff --git a/.scripts/build_steps.sh b/.scripts/build_steps.sh index a5836e8..ba4b251 100755 --- a/.scripts/build_steps.sh +++ b/.scripts/build_steps.sh @@ -72,7 +72,6 @@ else --suppress-variables ${EXTRA_CB_OPTIONS:-} \ --clobber-file "${CI_SUPPORT}/clobber_${CONFIG}.yaml" \ --extra-meta flow_run_id="${flow_run_id:-}" remote_url="${remote_url:-}" sha="${sha:-}" - ( startgroup "Inspecting artifacts" ) 2> /dev/null # inspect_artifacts was only added in conda-forge-ci-setup 4.6.0 diff --git a/README.md b/README.md index 2f42561..77a6852 100644 --- a/README.md +++ b/README.md @@ -35,38 +35,73 @@ Current build status - + - + - + - + - + + + + + + + + + + + + + + + + diff --git a/recipe/bld.bat b/recipe/bld.bat index 51aa646..32307ef 100644 --- a/recipe/bld.bat +++ b/recipe/bld.bat @@ -1,7 +1,7 @@ cd win32 -cscript configure.js compiler=msvc iconv=yes icu=no zlib=yes lzma=no python=no ^ +cscript configure.js compiler=msvc iconv=yes icu=%with_icu% zlib=yes lzma=no python=no ^ threads=ctls ^ prefix=%LIBRARY_PREFIX% ^ include=%LIBRARY_INC% ^ diff --git a/recipe/build.sh b/recipe/build.sh index c7bdab0..d08bd89 100755 --- a/recipe/build.sh +++ b/recipe/build.sh @@ -2,28 +2,28 @@ # Get an updated config.sub and config.guess cp $BUILD_PREFIX/share/libtool/build-aux/config.* . -./autogen.sh +NOCONFIGURE=1 ./autogen.sh -if [[ `uname` == "Linux" ]]; then +if [[ ${target_platform} == linux-* ]]; then # workaround weird configure behaviour where it decides # it doesn't need libiconv - export LDFLAGS="-L${PREFIX}/lib -liconv" + export LDFLAGS="${LDFLAGS} -liconv" fi -export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$PREFIX/lib/pkgconfig - ./configure --prefix="${PREFIX}" \ --build=${BUILD} \ --host=${HOST} \ --with-iconv="${PREFIX}" \ --with-zlib="${PREFIX}" \ - --with-icu \ + --with-icu="${with_icu}" \ --with-lzma="${PREFIX}" \ --with-ftp \ --with-legacy \ --with-python=no \ --with-tls \ - --enable-static=no || cat config.log + --enable-static=no \ + || cat config.log + make -j${CPU_COUNT} ${VERBOSE_AT} if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" != "1" || "${CROSSCOMPILING_EMULATOR}" != "" ]]; then @@ -32,6 +32,10 @@ fi make install +if [[ ${target_platform} == linux-* ]]; then + ${NM} -g ${PREFIX}/lib/libxml2.so | cut -b 18- +fi + # Remove large documentation files that can take up to 6.6/9.2MB of the install # size. # https://github.com/conda-forge/libxml2-feedstock/issues/57 diff --git a/recipe/conda_build_config.yaml b/recipe/conda_build_config.yaml index afe48d9..8f2ac22 100644 --- a/recipe/conda_build_config.yaml +++ b/recipe/conda_build_config.yaml @@ -2,3 +2,7 @@ c_compiler: # [osx] - clang_bootstrap # [osx] cxx_compiler: # [osx] - clang_bootstrap # [osx] + +with_icu: +- yes # [not win] +- no diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 7b2536b..a7f1cf5 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -1,4 +1,4 @@ -{% set version = "2.12.7" %} +{% set version = "2.13.3" %} package: name: libxml2 @@ -6,12 +6,12 @@ package: source: url: https://gitlab.gnome.org/GNOME/libxml2/-/archive/v{{ version }}/libxml2-v{{ version }}.tar.gz - sha256: a7c1277f4e859883ff3aaa09a545561b7515e078a97eb240bb92bf5a03ae03fc + sha256: 8d1cd15fc95345cc1ce99f7ea5d070bc14e886bafb12ed74b0993a2133f45d69 patches: - 0002-Make-and-install-a-pkg-config-file-on-Windows.patch build: - number: 4 + number: 0 run_exports: # remove symbols at minor versions according to # https://abi-laboratory.pro/tracker/timeline/libxml2/ @@ -32,17 +32,21 @@ requirements: - m2-patch # [win] - libiconv # [not win] host: - - icu # [not win] - libiconv + - icu # [with_icu == "yes"] - xz # [not win] - zlib + run_constrained: + - icu <0.0a0 # [with_icu != "yes"] test: requires: - ripgrep files: - test.xml + - test_catalog.xml commands: + - echo on - xmllint test.xml # ensure (de)activation scripts for bash-on-win do not contain crlf line endings; # ripgrep will return exit code 1 if no match is found, which is what we want after @@ -51,6 +55,34 @@ test: - rg \r %CONDA_PREFIX%\etc\conda\{{ task }}.d\libxml2_{{ task }}.sh & if %ERRORLEVEL% NEQ 1 (exit 0) else (exit 1) # [win] {% endfor %} + - mkdir -p "${PREFIX}/etc/xml" # [not win] + - mkdir "%PREFIX%\etc\xml" # [win] + - cp test_catalog.xml "${PREFIX}/etc/xml/catalog" # [not win] + - copy test_catalog.xml "%PREFIX%\etc\xml\catalog" # [win] + + - xmlcatalog "" "http://www.w3.org/2001/xml.xsd" | grep -x -F -e "file://test-uri-override" # [not win] + - xmlcatalog "" "http://www.w3.org/2001/xml.xsd" | findstr /X "/C:file://test-uri-override" # [win] + # If fallback to system catalog is desired, test below with xml-common added to yum_requirements.txt. + # - xmlcatalog "" "http://www.w3.org/2009/01/xml.xsd" | grep -x -F -e "file:///usr/share/xml/xml.xsd" # [linux] + + - rm "${PREFIX}/etc/xml/catalog" # [not win] + - del "%PREFIX%\etc\xml\catalog" # [win] + + # If fallback to system catalog is desired, test below with xml-common added to yum_requirements.txt. + # - xmlcatalog "" "http://www.w3.org/2001/xml.xsd" | grep -x -F -e "file:///usr/share/xml/xml.xsd" # [linux] + + - xmlcatalog "" "test-id" | grep -x -F -e "No entry for URI test-id" # [not win] + - xmlcatalog "" "test-id" | findstr /X "/C:No entry for URI test-id" # [win] + - xmlcatalog "test_catalog.xml" "test-id" | grep -x -F -e "file://test-uri" # [not win] + - xmlcatalog "test_catalog.xml" "test-id" | findstr /X "/C:file://test-uri" # [win] + + - export XML_CATALOG_FILES="file://$(pwd)/test_catalog.xml" # [not win] + - set "XML_CATALOG_FILES=file://%CD:\=/%/test_catalog.xml" # [win] + - xmlcatalog "" "test-id" | grep -x -F -e "file://test-uri" # [not win] + - xmlcatalog "" "test-id" | findstr /X "/C:file://test-uri" # [win] + - xmlcatalog "" "http://www.w3.org/2009/01/xml.xsd" | grep -x -F -e "No entry for URI http://www.w3.org/2009/01/xml.xsd" # [not win] + - xmlcatalog "" "http://www.w3.org/2009/01/xml.xsd" | findstr /X "/C:No entry for URI http://www.w3.org/2009/01/xml.xsd" # [win] + about: home: http://xmlsoft.org/ license: MIT diff --git a/recipe/test_catalog.xml b/recipe/test_catalog.xml new file mode 100644 index 0000000..b77eddd --- /dev/null +++ b/recipe/test_catalog.xml @@ -0,0 +1,6 @@ + + + + + +
VariantStatus
linux_64linux_64_with_icuno - variant + variant
linux_aarch64linux_64_with_icuyes - variant + variant
linux_ppc64lelinux_aarch64_with_icuno - variant + variant
osx_64linux_aarch64_with_icuyes - variant + variant
osx_arm64linux_ppc64le_with_icuno - variant + variant + +
linux_ppc64le_with_icuyes + + variant + +
osx_64_with_icuno + + variant + +
osx_64_with_icuyes + + variant + +
osx_arm64_with_icuno + + variant + +
osx_arm64_with_icuyes + + variant