diff --git a/textproc/par/Makefile b/textproc/par/Makefile index 238299d2229..1243746d246 100644 --- a/textproc/par/Makefile +++ b/textproc/par/Makefile @@ -1,11 +1,9 @@ -# $OpenBSD: Makefile,v 1.24 2019/07/12 20:50:10 sthen Exp $ - COMMENT= paragraph reflow for email VERSION= 1.52 DISTNAME= Par${VERSION:S/.//} PKGNAME= par-${VERSION} -REVISION= 1 +REVISION= 2 CATEGORIES= textproc FIX_EXTRACT_PERMISSIONS=Yes @@ -16,6 +14,7 @@ MAINTAINER= Gregor Best # custom PERMIT_PACKAGE= Yes +# uses pledge() WANTLIB += c MASTER_SITES= ${HOMEPAGE} diff --git a/textproc/par/patches/patch-par_c b/textproc/par/patches/patch-par_c new file mode 100644 index 00000000000..4e33f79063a --- /dev/null +++ b/textproc/par/patches/patch-par_c @@ -0,0 +1,25 @@ +Index: par.c +--- par.c.orig ++++ par.c +@@ -20,6 +20,7 @@ + #include + #include + #include ++#include + + #undef NULL + #define NULL ((void *) 0) +@@ -730,6 +731,13 @@ int main(int argc, const char * const *argv) + /* Set the current locale from the environment: */ + + setlocale(LC_ALL,""); ++ ++/* setlocale() needs "rpath", so do the syscall after it */ ++ ++ if (pledge("stdio", NULL) == -1) { ++ wcscpy(errmsg, L"pledge\n"); ++ goto parcleanup; ++ } + + /* Process environment variables: */ + diff --git a/textproc/par/patches/patch-protoMakefile b/textproc/par/patches/patch-protoMakefile index e343b14d642..456818c1e0b 100644 --- a/textproc/par/patches/patch-protoMakefile +++ b/textproc/par/patches/patch-protoMakefile @@ -1,4 +1,3 @@ -$OpenBSD: patch-protoMakefile,v 1.1 2001/03/17 15:49:09 wilfried Exp $ --- protoMakefile.orig Thu Feb 24 06:15:08 2000 +++ protoMakefile Fri Mar 16 20:31:55 2001 @@ -93,7 +93,7 @@ E = diff --git a/textproc/par/pkg/PLIST b/textproc/par/pkg/PLIST index 8ac7ae29fe7..b76d2eedcbf 100644 --- a/textproc/par/pkg/PLIST +++ b/textproc/par/pkg/PLIST @@ -1,4 +1,3 @@ -@comment $OpenBSD: PLIST,v 1.4 2009/06/25 00:33:41 jolan Exp $ @conflict rancid-* -bin/par +@bin bin/par @man man/man1/par.1