git: e65518f713e1 - main - print/texlive-base: latexmk -- fix command line passed to ps
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 21 Mar 2023 17:19:18 UTC
The branch main has been updated by tcberner:
URL: https://cgit.FreeBSD.org/ports/commit/?id=e65518f713e111fcb8ae9ecb43b7006a1776d2cf
commit e65518f713e111fcb8ae9ecb43b7006a1776d2cf
Author: Tobias C. Berner <tcberner@FreeBSD.org>
AuthorDate: 2023-03-20 14:49:30 +0000
Commit: Tobias C. Berner <tcberner@FreeBSD.org>
CommitDate: 2023-03-21 17:16:54 +0000
print/texlive-base: latexmk -- fix command line passed to ps
Linux ps supports
-u userlist
Select by effective user ID (EUID) or name. This selects
the processes whose effective user name or ID is in
userlist.
whereas FreeBSD ps uses
-U Display the processes belonging to the specified usernames.
This fixes the error message seen when running latexmk:
> latexmk foo.tex
[...]
ps: illegal argument: Tobias
usage: ps [-aCcdefHhjlmrSTuvwXxZ] [-O fmt | -o fmt] [-G gid[,gid...]]
[-J jid[,jid...]] [-M core] [-N system]
[-p pid[,pid...]] [-t tty[,tty...]] [-U user[,user...]]
ps [-L]
[...]
---
print/texlive-base/Makefile | 2 +-
...texk_texlive_linked__scripts_latexmk_latexmk.pl | 41 ++++++++++++++++++++++
2 files changed, 42 insertions(+), 1 deletion(-)
diff --git a/print/texlive-base/Makefile b/print/texlive-base/Makefile
index 5b59023d575f..c58292d67f7e 100644
--- a/print/texlive-base/Makefile
+++ b/print/texlive-base/Makefile
@@ -1,6 +1,6 @@
PORTNAME= texlive
PORTVERSION= ${TEXLIVE_VERSION}
-PORTREVISION= 13
+PORTREVISION= 14
CATEGORIES= print
MASTER_SITES= TEX_CTAN/systems/texlive/${TEXLIVE_YEAR}
PKGNAMESUFFIX= -base
diff --git a/print/texlive-base/files/patch-texk_texlive_linked__scripts_latexmk_latexmk.pl b/print/texlive-base/files/patch-texk_texlive_linked__scripts_latexmk_latexmk.pl
new file mode 100644
index 000000000000..c850adce6115
--- /dev/null
+++ b/print/texlive-base/files/patch-texk_texlive_linked__scripts_latexmk_latexmk.pl
@@ -0,0 +1,41 @@
+--- texk/texlive/linked_scripts/latexmk/latexmk.pl.orig 2023-03-20 14:47:33 UTC
++++ texk/texlive/linked_scripts/latexmk/latexmk.pl
+@@ -1107,17 +1107,17 @@ else {
+ #
+ # The following works on Solaris, LINUX, HP-UX, IRIX
+ # Use -f to get full listing, including command line arguments.
+- # Use -u $ENV{USER} to get all processes started by current user (not just
++ # Use -U $ENV{USER} to get all processes started by current user (not just
+ # those associated with current terminal), but none of other users'
+ # processes.
+ # However, the USER environment variable may not exist. Windows uses
+ # USERNAME instead. (And this propagates to a situation of
+ # unix-emulation software running under Windows.)
+ if ( exists $ENV{USER} ) {
+- $pscmd = "ps -f -u $ENV{USER}";
++ $pscmd = "ps -f -U $ENV{USER}";
+ }
+ elsif ( exists $ENV{USERNAME} ) {
+- $pscmd = "ps -f -u $ENV{USERNAME}";
++ $pscmd = "ps -f -U $ENV{USERNAME}";
+ }
+ else {
+ $pscmd = "ps -f";
+@@ -1134,7 +1134,7 @@ else {
+ # But (19 Aug 2010), the truncation doesn't happen on RHEL4 and 5,
+ # unless the output is written to a terminal. So the --width
+ # option is now unnecessary
+- # $pscmd = "ps --width 200 -f -u $ENV{USER}";
++ # $pscmd = "ps --width 200 -f -U $ENV{USER}";
+ }
+ elsif ( $^O eq "darwin" ) {
+ # OS-X on Macintosh
+@@ -1155,7 +1155,7 @@ else {
+ $ps_previewer = $ps_previewer_landscape = 'NONE';
+ # Others
+ $lpr_pdf = 'lpr %O %S';
+- $pscmd = "ps -ww -u $ENV{USER}";
++ $pscmd = "ps -ww -U $ENV{USER}";
+ }
+ }
+