From cbfdf38c78c590207f8bca0bc500528d8789a24f Mon Sep 17 00:00:00 2001 From: Shlomi Fish Date: Mon, 24 Aug 2020 20:18:29 +0300 Subject: [PATCH] appveyor fix #4: docbook xsltproc cygwin path hack --- .appveyor.yml | 1 + fortune-mod/util/FortuneMod_GenManPage_App.pm | 21 ++++++++++++------- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 9284d5b..e9484bb 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -30,6 +30,7 @@ test_script: # Python3 confuses the recode build so only add it here. - SET PATH=%PATH%;C:\Python35-x64 - SET FORTUNE_TEST_DEBUG=1 + - SET DOCMAKE_PATH_PREFIX="C:\cygwin64\bin;" - perl CI-testing/continuous-integration-testing.pl --gen="MSYS Makefiles" cache: - C:\msys64\mingw64 diff --git a/fortune-mod/util/FortuneMod_GenManPage_App.pm b/fortune-mod/util/FortuneMod_GenManPage_App.pm index d0ca1be..2f2b3ab 100644 --- a/fortune-mod/util/FortuneMod_GenManPage_App.pm +++ b/fortune-mod/util/FortuneMod_GenManPage_App.pm @@ -42,15 +42,22 @@ sub run $out_basename = $basename if ( not defined $out_basename ); die "missing --src-dir" if ( not $CMAKE_CURRENT_SOURCE_DIR ); - __PACKAGE__->do_system( + { + local %ENV = %ENV; + if ( my $path_prefix = delete( $ENV{DOCMAKE_PATH_PREFIX} ) ) { - cmd => [ - "docmake", - "manpages", + $ENV{PATH} = $path_prefix . $ENV{PATH}; + } + __PACKAGE__->do_system( + { + cmd => [ + "docmake", + "manpages", "${CMAKE_CURRENT_SOURCE_DIR}/${subdir}/${basename}.docbook5.xml", - ], - }, - ); + ], + }, + ); + } path("${CMAKE_CURRENT_SOURCE_DIR}/${subdir}/${dest_basename}.man") ->spew_utf8( -- 2.40.0