From 210e6ac7afe65c7c56ad686c558a81d99abfdc1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=BCtzel?= Date: Sun, 15 Dec 2024 13:42:52 +0100 Subject: [PATCH] octave: work around issue with MinGW makeinfo When trying to use the MinGW version of `makeinfo` displaying a help message fails with an error like the following: ``` Can't call method "name" on an undefined value at makeinfo line 508. ``` That is a regression. Restore the work-around that was used previously and was removed in https://github.com/msys2/MINGW-packages/commit/cacaa18d5ddc6a8197974f2e795a96e1eb3224cb --- mingw-w64-octave/0005-makeinfo-perl.patch | 22 ++++++++++++++++++++++ mingw-w64-octave/PKGBUILD | 11 +++++++---- 2 files changed, 29 insertions(+), 4 deletions(-) create mode 100644 mingw-w64-octave/0005-makeinfo-perl.patch diff --git a/mingw-w64-octave/0005-makeinfo-perl.patch b/mingw-w64-octave/0005-makeinfo-perl.patch new file mode 100644 index 0000000000000..619d0edf53c7f --- /dev/null +++ b/mingw-w64-octave/0005-makeinfo-perl.patch @@ -0,0 +1,22 @@ +# HG changeset patch +# User Markus Mützel +# Date 1647626170 -3600 +# Fri Mar 18 18:56:10 2022 +0100 +# Branch stable +# Node ID fa26a529cf60ee8e048390eac38c33f92d4d8b11 +# Parent 4d2da8a3dca69327150b4ecc5e6b7bb9630877e5 +Set up for correctly executing makeinfo perl script on Windows. +* scripts/startup/version-rcfile: On Windows, perl scripts cannot be executed +using the shebang mechanism. Set up for calling it with perl explicitly instead. +diff -r 4d2da8a3dca6 -r fa26a529cf60 scripts/startup/version-rcfile +--- a/scripts/startup/version-rcfile Thu Mar 17 16:41:42 2022 +0100 ++++ b/scripts/startup/version-rcfile Fri Mar 18 18:56:10 2022 +0100 +@@ -25,3 +25,8 @@ + if (strcmp (PAGER (), "less") && isempty (getenv ("LESS"))) + PAGER_FLAGS ('-e -X -P"-- less ?pB(%pB\\%):--. (f)orward, (b)ack, (q)uit$"'); + endif ++ ++## On Windows, perl scripts must be run using the perl interpreter ++[~, tempval] = system ("cygpath -w /usr/bin"); ++makeinfo_program (sprintf ("%s && cd %s && perl makeinfo", tempval(1:2), strtrim (tempval))); ++clear ("tempval"); diff --git a/mingw-w64-octave/PKGBUILD b/mingw-w64-octave/PKGBUILD index d7aee7c82e976..35ed61f08349c 100644 --- a/mingw-w64-octave/PKGBUILD +++ b/mingw-w64-octave/PKGBUILD @@ -43,7 +43,7 @@ depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" "${MINGW_PACKAGE_PREFIX}-readline" "${MINGW_PACKAGE_PREFIX}-suitesparse" "${MINGW_PACKAGE_PREFIX}-sundials" - "${MINGW_PACKAGE_PREFIX}-texinfo" + "texinfo" "${MINGW_PACKAGE_PREFIX}-zlib") makedepends=("${MINGW_PACKAGE_PREFIX}-autotools" "${MINGW_PACKAGE_PREFIX}-cc" @@ -63,12 +63,14 @@ optdepends=("unzip: for decompressing .zip archives" "${MINGW_PACKAGE_PREFIX}-portaudio: audio support") source=(https://ftp.gnu.org/gnu/octave/octave-$pkgver.tar.xz{,.sig} "0002-mk-doc-cache-path.patch" - "0003-no-community-support.patch") + "0003-no-community-support.patch" + "0005-makeinfo-perl.patch") validpgpkeys=('DBD9C84E39FE1AAE99F04446B05F05B75D36644B') # John W. Eaton sha256sums=('712468513db7e13b76f28c4b82cdba7d6f3f634c836ddb27a7a8fe9d708145f3' 'SKIP' 'aa5bd559d9774abc0f0c930a606762d1e452cc90278d16d8ae83561c0cae3bf8' - 'e53af21ad087e10a2906506589aab89ab8b43f4e3e4994b4c28e4d8ae83639ad') + 'e53af21ad087e10a2906506589aab89ab8b43f4e3e4994b4c28e4d8ae83639ad' + '2df9666d75bb8dd4f549ec857c75aa3ec64b21fd3c9aa25a0d4127b284ec6822') apply_patch_with_msg() { for _patch in "$@" @@ -82,7 +84,8 @@ prepare() { cd "${_realname}-${pkgver}" apply_patch_with_msg \ - 0002-mk-doc-cache-path.patch + 0002-mk-doc-cache-path.patch \ + 0005-makeinfo-perl.patch if [[ ${MINGW_PACKAGE_PREFIX} == *-clang-* ]]; then apply_patch_with_msg \