summaryrefslogtreecommitdiffstats
path: root/debian/patches/libstdc++-man-3cxx.diff
blob: f0b9c11211ba09c2ec9ae9db2028b4bd51590df1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# DP: Install libstdc++ man pages with suffix .3cxx instead of .3

--- a/src/libstdc++-v3/doc/doxygen/user.cfg.in
+++ b/src/libstdc++-v3/doc/doxygen/user.cfg.in
@@ -2135,7 +2135,7 @@ MAN_OUTPUT             = man
 # The default value is: .3.
 # This tag requires that the tag GENERATE_MAN is set to YES.
 
-MAN_EXTENSION          = .3
+MAN_EXTENSION          = .3cxx
 
 # The MAN_SUBDIR tag determines the name of the directory created within
 # MAN_OUTPUT in which the man pages are placed. If defaults to man followed by
--- a/src/libstdc++-v3/scripts/run_doxygen
+++ b/src/libstdc++-v3/scripts/run_doxygen
@@ -262,6 +262,9 @@ fi
 if $do_man; then
 echo ::
 echo :: Fixing up the man pages...
+mkdir -p $outdir/man/man3
+mv $outdir/man/man3cxx/* $outdir/man/man3/
+rmdir $outdir/man/man3cxx
 cd $outdir/man/man3
 
 # File names with embedded spaces (EVIL!) need to be....?  renamed or removed?
@@ -291,7 +294,7 @@ cxxflags="-Og -g -std=gnu++23"
 $gxx $cppflags $cxxflags ${srcdir}/doc/doxygen/stdheader.cc -o ./stdheader || exit 1
 # Doxygen outputs something like "\fC#include <unique_lock\&.h>\fP" and
 # we want that internal header to be replaced with something like <mutex>.
-problematic=`grep -E -l '#include <.*h>' [a-z]*.3`
+problematic=`grep -E -l '#include <.*h>' [a-z]*.3 [a-z]*.3cxx`
 for f in $problematic; do
     # this is also slow, but safe and easy to debug
     oldh=`sed -n '/fC#include </s/.*<\(.*\)>.*/\1/p' $f`
@@ -303,7 +306,7 @@ rm stdheader
 # Some of the pages for generated modules have text that confuses certain
 # implementations of man(1), e.g. on GNU/Linux.  We need to have another
 # top-level *roff tag to /stop/ the .SH NAME entry.
-problematic=`grep -E --files-without-match '^\.SH SYNOPSIS' [A-Z]*.3`
+problematic=`grep -E --files-without-match '^\.SH SYNOPSIS' [A-Z]*.3cxx`
 #problematic='Containers.3 Sequences.3 Assoc_containers.3 Iterator_types.3'
 
 for f in $problematic; do
@@ -317,7 +320,7 @@ a\
 done
 
 # Also, break this (generated) line up.  It's ugly as sin.
-problematic=`grep -l '[^^]Definition at line' *.3`
+problematic=`grep -l '[^^]Definition at line' *.3 *.3cxx`
 for f in $problematic; do
     sed 's/Definition at line/\
 .PP\
@@ -435,8 +438,8 @@ for f in ios streambuf istream ostream i
 	 istringstream ostringstream stringstream filebuf ifstream \
 	 ofstream fstream string
 do
-    echo ".so man3/std::basic_${f}.3" > std::${f}.3
-    echo ".so man3/std::basic_${f}.3" > std::w${f}.3
+    echo ".so man3/std::basic_${f}.3cxx" > std::${f}.3cxx
+    echo ".so man3/std::basic_${f}.3cxx" > std::w${f}.3cxx
 done
 
 echo ::