File 0002-build-Add-missing-troff-macros.patch of Package ovn

From dd57e211b7b7d734cf419b50a096e22bed440171 Mon Sep 17 00:00:00 2001
From: Ferdinand Thiessen <rpm@fthiessen.de>
Date: Mon, 7 Mar 2022 16:38:54 +0100
Subject: [PATCH 2/4] build: Add missing troff macros

---
 NOTICE                     |   2 +-
 debian/copyright.in        |   2 +-
 lib/common-syn.man         |   4 +
 lib/common.man             |   7 ++
 lib/ovn.tmac               | 190 +++++++++++++++++++++++++++++++++++++
 manpages.mk                |   2 +-
 utilities/ovn-detrace.1.in |   2 +-
 7 files changed, 205 insertions(+), 4 deletions(-)
 create mode 100644 lib/common-syn.man
 create mode 100644 lib/common.man
 create mode 100644 lib/ovn.tmac

diff --git a/NOTICE b/NOTICE
index 6030b8bc1..7c88878f7 100644
--- a/NOTICE
+++ b/NOTICE
@@ -17,7 +17,7 @@ Portions of this software were developed at the National Center
 for Supercomputing Applications (NCSA) at the University of
 Illinois at Urbana-Champaign.
 
-lib/ovs.tmac includes troff macros written by Eric S. Raymond
+lib/ovn.tmac includes troff macros written by Eric S. Raymond
 and Werner Lemberg.
 
 m4/include_next.m4 and m4/absolute-header.m4
diff --git a/debian/copyright.in b/debian/copyright.in
index 9ad00340f..2fbbfd960 100644
--- a/debian/copyright.in
+++ b/debian/copyright.in
@@ -133,7 +133,7 @@ License:
 
         lib/crc32c.c
 
-* lib/ovs.tmac in the source distribution, and manpages in the
+* lib/ovn.tmac in the source distribution, and manpages in the
   binaries, includes troff macros from groff 1.21 that contain the
   following notice:
 
diff --git a/lib/common-syn.man b/lib/common-syn.man
new file mode 100644
index 000000000..3b8055186
--- /dev/null
+++ b/lib/common-syn.man
@@ -0,0 +1,4 @@
+.IP "Common options:"
+[\fB\-h\fR | \fB\-\-help\fR]
+[\fB\-V\fR | \fB\-\-version\fR]
+
diff --git a/lib/common.man b/lib/common.man
new file mode 100644
index 000000000..41b8e2f96
--- /dev/null
+++ b/lib/common.man
@@ -0,0 +1,7 @@
+.IP "\fB\-h\fR"
+.IQ "\fB\-\-help\fR"
+Prints a brief help message to the console.
+.
+.IP "\fB\-V\fR"
+.IQ "\fB\-\-version\fR"
+Prints version information to the console.
diff --git a/lib/ovn.tmac b/lib/ovn.tmac
new file mode 100644
index 000000000..98154b12d
--- /dev/null
+++ b/lib/ovn.tmac
@@ -0,0 +1,190 @@
+.\" -*- nroff -*-
+.\" ovn.tmac
+.\"
+.\" Open Virtual Network troff macro library
+.
+.
+.\" Continuation line for .IP.
+.de IQ
+.  br
+.  ns
+.  IP "\\$1"
+..
+.
+.\" Introduces a sub-subsection
+.de ST
+.  PP
+.  RS -0.15in
+.  I "\\$1"
+.  RE
+..
+.
+.\" The content between the lines below is from an-ext.tmac in groff
+.\" 1.21, with some modifications.
+.\" ----------------------------------------------------------------------
+.\" an-ext.tmac
+.\"
+.\" Written by Eric S. Raymond <esr@thyrsus.com>
+.\"            Werner Lemberg <wl@gnu.org>
+.\"
+.\" Version 2007-Feb-02
+.\"
+.\" Copyright (C) 2007, 2009, 2011 Free Software Foundation, Inc.
+.\" You may freely use, modify and/or distribute this file.
+.\"
+.\"
+.\" The code below provides extension macros for the `man' macro package.
+.\" Care has been taken to make the code portable; groff extensions are
+.\" properly hidden so that all troff implementations can use it without
+.\" changes.
+.\"
+.\" With groff, this file is sourced by the `man' macro package itself.
+.\" Man page authors who are concerned about portability might add the
+.\" used macros directly to the prologue of the man page(s).
+.
+.
+.\" Convention: Auxiliary macros and registers start with `m' followed
+.\"             by an uppercase letter or digit.
+.
+.
+.\" Declare start of command synopsis.  Sets up hanging indentation.
+.de SY
+.  ie !\\n(mS \{\
+.    nh
+.    nr mS 1
+.    nr mA \\n(.j
+.    ad l
+.    nr mI \\n(.i
+.  \}
+.  el \{\
+.    br
+.    ns
+.  \}
+.
+.  HP \w'\fB\\$1\fP\ 'u
+.  B "\\$1"
+..
+.
+.
+.\" End of command synopsis.  Restores adjustment.
+.de YS
+.  in \\n(mIu
+.  ad \\n(mA
+.  hy \\n(HY
+.  nr mS 0
+..
+.
+.
+.\" Declare optional option.
+.de OP
+.  ie \\n(.$-1 \
+.    RI "[\fB\\$1\fP" "\ \\$2" "]"
+.  el \
+.    RB "[" "\\$1" "]"
+..
+.
+.
+.\" Start URL.
+.de UR
+.  ds m1 \\$1\"
+.  nh
+.  if \\n(mH \{\
+.    \" Start diversion in a new environment.
+.    do ev URL-div
+.    do di URL-div
+.  \}
+..
+.
+.
+.\" End URL.
+.de UE
+.  ie \\n(mH \{\
+.    br
+.    di
+.    ev
+.
+.    \" Has there been one or more input lines for the link text?
+.    ie \\n(dn \{\
+.      do HTML-NS "<a href=""\\*(m1"">"
+.      \" Yes, strip off final newline of diversion and emit it.
+.      do chop URL-div
+.      do URL-div
+\c
+.      do HTML-NS </a>
+.    \}
+.    el \
+.      do HTML-NS "<a href=""\\*(m1"">\\*(m1</a>"
+\&\\$*\"
+.  \}
+.  el \
+\\*(la\\*(m1\\*(ra\\$*\"
+.
+.  hy \\n(HY
+..
+.
+.
+.\" Start email address.
+.de MT
+.  ds m1 \\$1\"
+.  nh
+.  if \\n(mH \{\
+.    \" Start diversion in a new environment.
+.    do ev URL-div
+.    do di URL-div
+.  \}
+..
+.
+.
+.\" End email address.
+.de ME
+.  ie \\n(mH \{\
+.    br
+.    di
+.    ev
+.
+.    \" Has there been one or more input lines for the link text?
+.    ie \\n(dn \{\
+.      do HTML-NS "<a href=""mailto:\\*(m1"">"
+.      \" Yes, strip off final newline of diversion and emit it.
+.      do chop URL-div
+.      do URL-div
+\c
+.      do HTML-NS </a>
+.    \}
+.    el \
+.      do HTML-NS "<a href=""mailto:\\*(m1"">\\*(m1</a>"
+\&\\$*\"
+.  \}
+.  el \
+\\*(la\\*(m1\\*(ra\\$*\"
+.
+.  hy \\n(HY
+..
+.
+.
+.\" Continuation line for .TP header.
+.de TQ
+.  br
+.  ns
+.  TP \\$1\" no doublequotes around argument!
+..
+.
+.
+.\" Start example.
+.de EX
+.  nr mE \\n(.f
+.  nf
+.  nh
+.  ft CW
+..
+.
+.
+.\" End example.
+.de EE
+.  ft \\n(mE
+.  fi
+.  hy \\n(HY
+..
+.
+.\" EOF
+.\" ----------------------------------------------------------------------
diff --git a/manpages.mk b/manpages.mk
index 9f7a0ced3..d4af0b2c6 100644
--- a/manpages.mk
+++ b/manpages.mk
@@ -4,7 +4,7 @@ utilities/ovn-detrace.1: \
 	utilities/ovn-detrace.1.in \
 	lib/common-syn.man \
 	lib/common.man \
-	lib/ovs.tmac
+	lib/ovn.tmac
 utilities/ovn-detrace.1.in:
 lib/common-syn.man:
 lib/common.man:
diff --git a/utilities/ovn-detrace.1.in b/utilities/ovn-detrace.1.in
index 7feba0766..3469318c7 100644
--- a/utilities/ovn-detrace.1.in
+++ b/utilities/ovn-detrace.1.in
@@ -1,4 +1,4 @@
-.so lib/ovs.tmac
+.so lib/ovn.tmac
 .TH ovn\-detrace 1 "@VERSION@" "OVN" "OVN Manual"
 .\" This program's name:
 .ds PN ovn\-detrace
-- 
2.35.1

openSUSE Build Service is sponsored by