diff --git a/srcpkgs/mdocml/patches/stdout.patch b/srcpkgs/mdocml/patches/stdout.patch new file mode 100644 index 00000000000..460acf0118a --- /dev/null +++ b/srcpkgs/mdocml/patches/stdout.patch @@ -0,0 +1,42 @@ +--- main.c.orig ++++ main.c +@@ -551,10 +551,10 @@ + + /* Stop here until moved to the foreground. */ + +- tc_pgid = tcgetpgrp(STDIN_FILENO); ++ tc_pgid = tcgetpgrp(tag_files->ofd); + if (tc_pgid != man_pgid) { + if (tc_pgid == pager_pid) { +- (void)tcsetpgrp(STDIN_FILENO, ++ (void)tcsetpgrp(tag_files->ofd, + man_pgid); + if (signum == SIGTTIN) + continue; +@@ -567,7 +567,7 @@ + /* Once in the foreground, activate the pager. */ + + if (pager_pid) { +- (void)tcsetpgrp(STDIN_FILENO, pager_pid); ++ (void)tcsetpgrp(tag_files->ofd, pager_pid); + kill(pager_pid, SIGCONT); + } else + pager_pid = spawn_pager(tag_files); +@@ -1082,7 +1082,7 @@ + break; + default: + (void)setpgid(pager_pid, 0); +- (void)tcsetpgrp(STDIN_FILENO, pager_pid); ++ (void)tcsetpgrp(tag_files->ofd, pager_pid); + #if HAVE_PLEDGE + if (pledge("stdio rpath tmppath tty proc", NULL) == -1) + err((int)MANDOCLEVEL_SYSERR, "pledge"); +@@ -1100,7 +1100,7 @@ + + /* Do not start the pager before controlling the terminal. */ + +- while (tcgetpgrp(STDIN_FILENO) != getpid()) ++ while (tcgetpgrp(STDOUT_FILENO) != getpid()) + nanosleep(&timeout, NULL); + + execvp(argv[0], argv); diff --git a/srcpkgs/mdocml/template b/srcpkgs/mdocml/template index d5fff6b7a4c..ab31dc0933a 100644 --- a/srcpkgs/mdocml/template +++ b/srcpkgs/mdocml/template @@ -1,7 +1,7 @@ # Template file for 'mdocml' pkgname=mdocml version=1.13.4 -revision=1 +revision=2 build_style=configure makedepends="sqlite-devel zlib-devel" depends="less"