diff --git a/recipe/activate.bat b/recipe/activate.bat new file mode 100644 index 0000000..6f7667c --- /dev/null +++ b/recipe/activate.bat @@ -0,0 +1,2 @@ +set xml_catalog_files_libxslt=%XML_CATALOG_FILES% +set XML_CATALOG_FILES=%CONDA_PREFIX%\etc\xml\catalog diff --git a/recipe/activate.ps1 b/recipe/activate.ps1 new file mode 100644 index 0000000..9c771e1 --- /dev/null +++ b/recipe/activate.ps1 @@ -0,0 +1,2 @@ +$Env:xml_catalog_files_libxslt = "$Env:XML_CATALOG_FILES" +$Env:XML_CATALOG_FILES = "$Env:CONDA_PREFIX\etc\xml\catalog" diff --git a/recipe/activate.sh b/recipe/activate.sh new file mode 100644 index 0000000..6e1c408 --- /dev/null +++ b/recipe/activate.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +export xml_catalog_files_libxslt="${XML_CATALOG_FILES}" +export XML_CATALOG_FILES="${CONDA_PREFIX}/etc/xml/catalog" diff --git a/recipe/bld.bat b/recipe/bld.bat index 3a36a50..bd94898 100644 --- a/recipe/bld.bat +++ b/recipe/bld.bat @@ -24,3 +24,11 @@ del %LIBRARY_PREFIX%\bin\runsuite.exe || exit 1 del %LIBRARY_PREFIX%\bin\runtest.exe || exit 1 del %LIBRARY_PREFIX%\bin\runxmlconf.exe || exit 1 copy %LIBRARY_LIB%\libxml2.lib %LIBRARY_LIB%\xml2.lib || exit 1 + +setlocal EnableDelayedExpansion +for %%F in (activate deactivate) DO ( + if not exist %PREFIX%\etc\conda\%%F.d mkdir %PREFIX%\etc\conda\%%F.d + copy %RECIPE_DIR%\%%F.bat %PREFIX%\etc\conda\%%F.d\%PKG_NAME%_%%F.bat + copy %RECIPE_DIR%\%%F.ps1 %PREFIX%\etc\conda\%%F.d\%PKG_NAME%_%%F.ps1 + copy %RECIPE_DIR%\%%F.sh %PREFIX%\etc\conda\%%F.d\%PKG_NAME%_%%F.sh +) diff --git a/recipe/build.sh b/recipe/build.sh index 05f5e7c..56d4a3b 100644 --- a/recipe/build.sh +++ b/recipe/build.sh @@ -35,3 +35,8 @@ make install rm -rf ${PREFIX}/share/doc rm -rf ${PREFIX}/share/gtk-doc rm -rf ${PREFIX}/share/man + +for f in "activate" "deactivate"; do + mkdir -p "${PREFIX}/etc/conda/${f}.d" + cp "${RECIPE_DIR}/${f}.sh" "${PREFIX}/etc/conda/${f}.d/${PKG_NAME}_${f}.sh" +done diff --git a/recipe/deactivate.bat b/recipe/deactivate.bat new file mode 100644 index 0000000..45799c9 --- /dev/null +++ b/recipe/deactivate.bat @@ -0,0 +1,6 @@ +if defined xml_catalog_files_libxslt ( + set XML_CATALOG_FILES=%xml_catalog_files_libxslt% +) else ( + set XML_CATALOG_FILES= +) +set xml_catalog_files_libxslt= diff --git a/recipe/deactivate.ps1 b/recipe/deactivate.ps1 new file mode 100644 index 0000000..5c36433 --- /dev/null +++ b/recipe/deactivate.ps1 @@ -0,0 +1,6 @@ +if ($Env:xml_catalog_files_libxslt) { + $Env:XML_CATALOG_FILES = "$Env:xml_catalog_files_libxslt" +} else { + $Env:XML_CATALOG_FILES = '' +} +$Env:xml_catalog_files_libxslt = '' diff --git a/recipe/deactivate.sh b/recipe/deactivate.sh new file mode 100644 index 0000000..1d341fa --- /dev/null +++ b/recipe/deactivate.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +if test -n "${xml_catalog_files_libxslt}"; then + export XML_CATALOG_FILES="${xml_catalog_files_libxslt}" +else + unset XML_CATALOG_FILES +fi +unset xml_catalog_files_libxslt diff --git a/recipe/meta.yaml b/recipe/meta.yaml index a4b4161..07e7e46 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -12,7 +12,7 @@ source: - 0004-CVE-2017-8872.patch build: - number: 0 + number: 1 run_exports: # remove symbols at minor versions. # https://abi-laboratory.pro/tracker/timeline/libxml2/