Hi,

i just noticed that groff(1), or specifically groff_mdoc(7), still puts
the string "OpenBSD 5.0" into manual footers, even in 5.1 and -current.
This is due to the line

  .ds doc-default-operating-system OpenBSD\~5.0

in the file

  /usr/local/share/groff/1.21/tmac/mdoc/doc-common

Up to OpenBSD 4.8, when groff(1) 1.15 used to be in base system,
this had to be fixed for each release (bleah), see

  http://www.openbsd.org/cgi-bin/cvsweb/src/sys/conf/newvers.sh#rev1.108

For OpenBSD 4.9, the groff.mdoc 1.15 bricolage port was released
with "OpenBSD 4.8"; i guess nobody noticed (oops):

  
http://www.openbsd.org/cgi-bin/cvsweb/ports/textproc/groff.mdoc/files/mdoc/Attic/doc-common

For OpenBSD 5.0, i imported groff 1.21 into the ports tree, and the
string happened to be just "OpenBSD" without a version number.
During the 5.0-current phase, it was fixed to read "OpenBSD 5.0"
and then forgotten:

  
http://www.openbsd.org/cgi-bin/cvsweb/ports/textproc/groff/patches/patch-tmac_doc-common

What can we do?

Option (1)
----------
Patch and bump the groff port for each release -
similar to what we did in base, in the past.
Downside: I must not forget to do that.

Option (2)
----------
Automatically patch doc-common during the build of the
groff port, using uname(1).  This doesn't seem to help at all,
because the groff package content would change at -beta time,
which means it would still need a bump.

Option (3)
----------
Use the .pso macro to spawn an "uname -r" subprocess directly
from the doc-common macro file, such that the version number
is retrieved from the system for each manual being built.
Apart from this kind of shelling out being exceedingly ugly,
it makes versioning matters even worse:  The package content
of all packages with USE_GROFF would change at -beta time but
the groff package signature would not.  So technically,
if i understand correctly, all packages would need a bump (ugh)?

So, i tend to propose option (1), even though i dislike it,
see below for a patch.

While here, silence the ridiculous chatting in contrib/hdtbl/examples.

What do you think?
  Ingo


Index: Makefile
===================================================================
RCS file: /cvs/ports/textproc/groff/Makefile,v
retrieving revision 1.17
diff -u -p -r1.17 Makefile
--- Makefile    26 Feb 2012 22:28:34 -0000      1.17
+++ Makefile    27 May 2012 10:43:22 -0000
@@ -2,7 +2,7 @@
 
 COMMENT =              GNU troff typesetter
 DISTNAME =             groff-1.21
-REVISION =             7
+REVISION =             8
 
 CATEGORIES =           textproc
 HOMEPAGE =             http://www.gnu.org/software/groff/
Index: patches/patch-tmac_doc-common
===================================================================
RCS file: /cvs/ports/textproc/groff/patches/patch-tmac_doc-common,v
retrieving revision 1.2
diff -u -p -r1.2 patch-tmac_doc-common
--- patches/patch-tmac_doc-common       4 Dec 2011 15:41:26 -0000       1.2
+++ patches/patch-tmac_doc-common       27 May 2012 10:43:22 -0000
@@ -1,12 +1,12 @@
 $OpenBSD: patch-tmac_doc-common,v 1.2 2011/12/04 15:41:26 schwarze Exp $
 chunk 1: Keep traditional OpenBSD page headers (local change).
-chunk 2+3: Sync with mandoc: more architectures (accepted upstream).
+chunk 2+3: Sync with mandoc: more architectures (also in upstream CVS).
 chunk 4: default value for the .Os macro (local change).
 chunk 5-9: More OS versions (from upstream CVS).
 chunk 10: Handle .Dd Mdocdate (local change).
 chunk 11: Do not use an ugly double dash in the NAME line (local change).
 --- tmac/doc-common.orig       Fri Dec 31 08:33:09 2010
-+++ tmac/doc-common    Sun Oct 30 23:21:38 2011
++++ tmac/doc-common    Sun May 27 11:58:21 2012
 @@ -231,17 +231,17 @@
  .
  .\" an alternative, more detailed scheme for naming the manual sections
@@ -121,7 +121,7 @@ chunk 11: Do not use an ugly double dash
  .\" NS override this in `mdoc.local', if necessary
  .
 -.ds doc-default-operating-system BSD
-+.ds doc-default-operating-system OpenBSD\~5.0
++.ds doc-default-operating-system OpenBSD\~5.1
  .
  .
  .\" NS doc-operating-system global string
@@ -142,16 +142,17 @@ chunk 11: Do not use an ugly double dash
  .
  .ds doc-operating-system-OpenBSD-2.0  2.0
  .ds doc-operating-system-OpenBSD-2.1  2.1
-@@ -487,6 +515,8 @@
+@@ -487,6 +515,9 @@
  .ds doc-operating-system-OpenBSD-4.6  4.6
  .ds doc-operating-system-OpenBSD-4.7  4.7
  .ds doc-operating-system-OpenBSD-4.8  4.8
 +.ds doc-operating-system-OpenBSD-4.9  4.9
 +.ds doc-operating-system-OpenBSD-5.0  5.0
++.ds doc-operating-system-OpenBSD-5.1  5.1
  .
  .ds doc-operating-system-FreeBSD-1.0     1.0
  .ds doc-operating-system-FreeBSD-1.1     1.1
-@@ -543,6 +573,8 @@
+@@ -543,6 +574,8 @@
  .ds doc-operating-system-FreeBSD-7.3     7.3
  .ds doc-operating-system-FreeBSD-8.0     8.0
  .ds doc-operating-system-FreeBSD-8.1     8.1
@@ -160,7 +161,7 @@ chunk 11: Do not use an ugly double dash
  .
  .ds doc-operating-system-Darwin-8.0.0  8.0.0
  .ds doc-operating-system-Darwin-8.1.0  8.1.0
-@@ -563,6 +595,16 @@
+@@ -563,6 +596,16 @@
  .ds doc-operating-system-Darwin-9.4.0  9.4.0
  .ds doc-operating-system-Darwin-9.5.0  9.5.0
  .ds doc-operating-system-Darwin-9.6.0  9.6.0
@@ -177,7 +178,7 @@ chunk 11: Do not use an ugly double dash
  .
  .ds doc-operating-system-DragonFly-1.0    1.0
  .ds doc-operating-system-DragonFly-1.1    1.1
-@@ -581,6 +623,11 @@
+@@ -581,6 +624,11 @@
  .ds doc-operating-system-DragonFly-2.4    2.4
  .ds doc-operating-system-DragonFly-2.6    2.6
  .ds doc-operating-system-DragonFly-2.8    2.8
@@ -189,7 +190,7 @@ chunk 11: Do not use an ugly double dash
  .
  .de Os
  .  ds doc-command-name
-@@ -685,7 +732,9 @@
+@@ -685,7 +733,9 @@
  .  ds doc-command-name
  .
  .  ie \n[.$] \{\
@@ -200,7 +201,7 @@ chunk 11: Do not use an ugly double dash
  .      ds doc-date-string \$1\~\$2 \$3
  .    el \{\
  .      ds doc-date-string "\*[doc-date-\n[mo]]
-@@ -859,7 +908,7 @@
+@@ -859,7 +909,7 @@
  .\" NS width register `Nd' set above
  .
  .de Nd
Index: patches/patch-contrib_hdtbl_examples_common_roff
===================================================================
RCS file: 
/cvs/ports/textproc/groff/patches/patch-contrib_hdtbl_examples_common_roff,v
retrieving revision 1.1
diff -u -p -r1.1 patch-contrib_hdtbl_examples_common_roff
--- patches/patch-contrib_hdtbl_examples_common_roff    4 Dec 2011 15:41:26 
-0000       1.1
+++ patches/patch-contrib_hdtbl_examples_common_roff    27 May 2012 10:43:22 
-0000
@@ -1,25 +1,32 @@
 $OpenBSD: patch-contrib_hdtbl_examples_common_roff,v 1.1 2011/12/04 15:41:26 
schwarze Exp $
-Do not depend on bash (from upstream CVS).
 --- contrib/hdtbl/examples/common.roff.orig    Fri Dec 31 08:33:09 2010
-+++ contrib/hdtbl/examples/common.roff Sun Oct 23 19:25:35 2011
-@@ -65,7 +65,7 @@ along with this program. If not, see <http://www.gnu.o
++++ contrib/hdtbl/examples/common.roff Sun May 27 12:41:37 2012
+@@ -64,9 +64,8 @@ along with this program. If not, see <http://www.gnu.o
+ .\"   **      standard form of the Unix date-command,                 **
  .\"   **      for example "Sun Dec  5 22:27:57     2004"              **
  .\"   ******************************************************************
++.\" deactivated to avoid noise in the build logs
  .de date
 -.  pso bash -c "echo -n .ds *date\ ;date"
-+.  pso sh -c "echo -n .ds *date\ ;date"
- .  tm \\*[*date] ***
+-.  tm \\*[*date] ***
  ..
  .
-@@ -83,9 +83,9 @@ along with this program. If not, see <http://www.gnu.o
- .  ds * \\$1\"
- .  substring * 0 0
- .  ie "\\*[*]"s" \
+ .
+@@ -79,16 +78,8 @@ along with this program. If not, see <http://www.gnu.o
+ .\"   **                      reg *time gets the difference of the    **
+ .\"   **                              end- and start-time (seconds)   **
+ .\"   ******************************************************************
++.\" deactivated to avoid noise in the build logs
+ .de time
+-.  ds * \\$1\"
+-.  substring * 0 0
+-.  ie "\\*[*]"s" \
 -.    pso bash -c "echo -n .nr *time 0+;date +%s"
-+.    pso sh -c "echo -n .nr *time 0+;date +%s"
- .  el \{\
+-.  el \{\
 -.   pso bash -c "echo -n .nr *time -;date +%s"
-+.   pso sh -c "echo -n .nr *time -;date +%s"
- .   nr *time 0-\\n[*time]
- .   tm elapsed time: \\n[*time] seconds
- .  \}
+-.   nr *time 0-\\n[*time]
+-.   tm elapsed time: \\n[*time] seconds
+-.  \}
+ ..
+ .
+ .

Reply via email to