Description: <short summary of the patch>
 TODO: Put a short summary on the line above and replace this paragraph
 with a longer explanation of this change. Complete the meta-information
 with other relevant fields (see below for details). To make it easier, the
 information below has been extracted from the changelog. Adjust it or drop
 it.
 .
 axiom (20170501-11) unstable; urgency=medium
 .
   * build-dep latest gcl
Author: Camm Maguire <camm@debian.org>

---
The information above should follow the Patch Tagging Guidelines, please
checkout https://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:

Origin: (upstream|backport|vendor|other), (<patch-url>|commit:<commit-id>)
Bug: <upstream-bugtracker-url>
Bug-Debian: https://bugs.debian.org/<bugnumber>
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
Forwarded: (no|not-needed|<patch-forwarded-url>)
Applied-Upstream: <version>, (<commit-url>|commit:<commid-id>)
Reviewed-By: <name and email of someone who approved/reviewed the patch>
Last-Update: 2023-02-12

--- axiom-20170501.orig/books/bookvol5.pamphlet
+++ axiom-20170501/books/bookvol5.pamphlet
@@ -39698,7 +39698,7 @@ linker       linker arguments (e.g. libr
 \begin{chunk}{defun validateOutputDirectory}
 (defun |validateOutputDirectory| (x)
  "Validate the output directory"
- (let ((dirname (car x)))
+ (let ((dirname (|pathname| (car x))))
   (when (and (pathname-directory dirname) (null (probe-file dirname)))
    dirname)))
 
@@ -47592,10 +47592,7 @@ nrlib/index.kaf
     (system::chdir (string dirarg))
     (setq allfiles (directory "*"))
     (system::chdir thisdir)
-     (mapcan #'(lambda (f)
-      (when (string-equal (pathname-type f) "nrlib")
-       (list (concatenate 'string (namestring f) "/"
-                          vmlisp::*index-filename*)))) allfiles))))
+    (directory (concatenate 'string "*.nrlib/" vmlisp::*index-filename*)))))
  (let (thisdir nrlibs object only dir key  (|$forceDatabaseUpdate| t) noexpose)
   (declare (special |$forceDatabaseUpdate| vmlisp::*index-filename*
                     |$ConstructorCache|))
@@ -48230,9 +48227,8 @@ Here I'll try to outline the interp data
     (setq modemapspos (file-position out))
     (print (database-modemaps struct) out)
     (finish-output out)
-    (setq obj
-     (pathname-name
-       (first (last (pathname-directory (database-object struct))))))
+    (let ((dob (database-object struct)))
+       (setq obj (if dob (pathname-name (first (last (pathname-directory dob)))) "NIL")))
     (setq concategory (database-constructorcategory struct))
     (if concategory  ; if category then write data else write nil
      (progn
@@ -48839,8 +48835,8 @@ filetype and filemode. We also UPCASE ev
 \begin{chunk}{defun pathname}
 (defun |pathname| (p)
  (cond
-  ((null p) p)
-  ((pathnamep p) p)((symbolp p) (pathname (string p)))
+  ((symbolp p) (pathname (string p)));((null p) p)
+  ((pathnamep p) p)
   ((null (consp p)) (pathname p))
   (t
    (when (> (|#| p) 2) (setq p (cons (elt p 0) (cons (elt p 1) nil))))
