Skip to content

Commit

Permalink
Set and clear XML_CATALOG_FILES on activation and deactivation, respe…
Browse files Browse the repository at this point in the history
  • Loading branch information
hattne committed Jan 9, 2023
1 parent b89ab98 commit 39918ba
Show file tree
Hide file tree
Showing 9 changed files with 42 additions and 1 deletion.
2 changes: 2 additions & 0 deletions recipe/activate.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
set xml_catalog_files_libxslt=%XML_CATALOG_FILES%
set XML_CATALOG_FILES=%CONDA_PREFIX%\etc\xml\catalog
2 changes: 2 additions & 0 deletions recipe/activate.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
$Env:xml_catalog_files_libxslt = "$Env:XML_CATALOG_FILES"
$Env:XML_CATALOG_FILES = "$Env:CONDA_PREFIX\etc\xml\catalog"
4 changes: 4 additions & 0 deletions recipe/activate.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

export xml_catalog_files_libxslt="${XML_CATALOG_FILES}"
export XML_CATALOG_FILES="${CONDA_PREFIX}/etc/xml/catalog"
8 changes: 8 additions & 0 deletions recipe/bld.bat
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
5 changes: 5 additions & 0 deletions recipe/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 6 additions & 0 deletions recipe/deactivate.bat
Original file line number Diff line number Diff line change
@@ -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=
6 changes: 6 additions & 0 deletions recipe/deactivate.ps1
Original file line number Diff line number Diff line change
@@ -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 = ''
8 changes: 8 additions & 0 deletions recipe/deactivate.sh
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down

1 comment on commit 39918ba

@jakirkham
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@celestino-amado, please raise an issue on the feedstock instead of commenting on the commit. Thanks!

Please sign in to comment.