Use STDPORTS.

This commit is contained in:
sperber 2002-02-21 14:00:42 +00:00
parent d5dcfe983d
commit f097c07cbf
1 changed files with 9 additions and 7 deletions

View File

@ -76,11 +76,13 @@
(cond (cond
((procedure? and-then) ((procedure? and-then)
(run (| (begin (man section key man-path)) (run (| (begin (man section key man-path))
(begin (and-then key section))))) (begin (and-then key section)))
stdports))
(else (else
(run (| (begin (man section key man-path)) (run (| (begin (man section key man-path))
(,@rman/rman ,@and-then (,@rman/rman ,@and-then
-r ,(reference-template entry section)))))))) -r ,(reference-template entry section)))
stdports)))))
(if (not (zero? status)) (if (not (zero? status))
(http-error http-reply/internal-error #f (http-error http-reply/internal-error #f
@ -105,8 +107,7 @@
(if (not (zero? (if (not (zero?
(with-env (("MANPATH" . ,(string-join man-path ":"))) (with-env (("MANPATH" . ,(string-join man-path ":")))
(run (,@rman/man ,@(if section `(,section) '()) ,key) (run (,@rman/man ,@(if section `(,section) '()) ,key)
(< /dev/null) stdports))))
(> 2 /dev/null)))))
(http-error http-reply/not-found #f "man page not found"))))) (http-error http-reply/not-found #f "man page not found")))))
(define man-default-sections (define man-default-sections
@ -153,8 +154,8 @@
(define (cat-n-decode file) (define (cat-n-decode file)
(let ((ext (file-name-extension file))) (let ((ext (file-name-extension file)))
(cond (cond
((string=? ".gz" ext) (run (,@rman/gzcat ,file))) ((string=? ".gz" ext) (run (,@rman/gzcat ,file) stdports))
((string=? ".Z" ext) (run (,@rman/zcat ,file))) ((string=? ".Z" ext) (run (,@rman/zcat ,file) stdports))
(else (call-with-input-file (else (call-with-input-file
file file
(lambda (port) (lambda (port)
@ -164,5 +165,6 @@
(if (not (zero? (run (| (begin (cat-n-decode file)) (if (not (zero? (run (| (begin (cat-n-decode file))
(begin (begin
(with-cwd (file->man-directory file) (with-cwd (file->man-directory file)
(exec-epf (,@rman/nroff)))))))) (exec-epf (,@rman/nroff)))))
stdports)))
(http-error http-reply/not-found #f "man page not found"))) (http-error http-reply/not-found #f "man page not found")))