Skip to content

Commit

Permalink
octave: work around issue with MinGW makeinfo
Browse files Browse the repository at this point in the history
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
msys2@cacaa18
  • Loading branch information
mmuetzel committed Dec 15, 2024
1 parent 99b53c0 commit 210e6ac
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 4 deletions.
22 changes: 22 additions & 0 deletions mingw-w64-octave/0005-makeinfo-perl.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# HG changeset patch
# User Markus Mützel <[email protected]>
# 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");
11 changes: 7 additions & 4 deletions mingw-w64-octave/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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 "$@"
Expand All @@ -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 \
Expand Down

0 comments on commit 210e6ac

Please sign in to comment.