Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/man2html/files/, sys-apps/man2html/
Date: Mon, 12 Sep 2022 16:51:53
Message-Id: 1663001320.49e4d668bc441ec4db407b51edeab5af14b798af.sam@gentoo
1 commit: 49e4d668bc441ec4db407b51edeab5af14b798af
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Mon Sep 12 16:48:40 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Mon Sep 12 16:48:40 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=49e4d668
7
8 sys-apps/man2html: fix configure tests with Clang 15
9
10 Signed-off-by: Sam James <sam <AT> gentoo.org>
11
12 .../files/man-1.6g-clang-15-configure.patch | 81 ++++++++++++++++++++++
13 sys-apps/man2html/man2html-1.6g-r1.ebuild | 52 ++++++++++++++
14 2 files changed, 133 insertions(+)
15
16 diff --git a/sys-apps/man2html/files/man-1.6g-clang-15-configure.patch b/sys-apps/man2html/files/man-1.6g-clang-15-configure.patch
17 new file mode 100644
18 index 000000000000..783693059e2f
19 --- /dev/null
20 +++ b/sys-apps/man2html/files/man-1.6g-clang-15-configure.patch
21 @@ -0,0 +1,81 @@
22 +--- a/configure
23 ++++ b/configure
24 +@@ -223,7 +223,7 @@ compile="$CC $DEFS conftest.c -o conftest $LIBS >/dev/null 2>&1"
25 + echo checking for ANSI C header files
26 + echo "#include <stdlib.h>
27 + #include <string.h>
28 +-main() { exit(0); strerror(0); }" > conftest.c
29 ++int main() { exit(0); strerror(0); }" > conftest.c
30 + eval $compile
31 + if test -s conftest && ./conftest 2>/dev/null; then
32 + DEFS="$DEFS -DSTDC_HEADERS"
33 +@@ -236,7 +236,8 @@ rm -f conftest conftest.c
34 +
35 + echo checking for sys/termios.h
36 + echo "#include <sys/termios.h>
37 +-main() { exit(0); }" > conftest.c
38 ++#include <stdlib.h>
39 ++int main() { exit(0); }" > conftest.c
40 + eval $compile
41 + if test -s conftest && ./conftest 2>/dev/null; then
42 + DEFS="$DEFS -DTERMIOS_HEADER"
43 +@@ -245,8 +246,9 @@ rm -f conftest conftest.c
44 +
45 + echo checking for POSIX.1 header files
46 + echo "#include <unistd.h>
47 ++#include <stdlib.h>
48 + #ifdef _POSIX_VERSION
49 +-main() { exit(0); }
50 ++int main() { exit(0); }
51 + #else
52 + # error no _POSIX_VERSION
53 + #endif" > conftest.c
54 +@@ -258,7 +260,8 @@ rm -f conftest conftest.c
55 +
56 + echo checking for BSD string and memory functions
57 + echo "#include <strings.h>
58 +-main() { exit(0); rindex(0, 0); bzero(0, 0); }" > conftest.c
59 ++#include <stdlib.h>
60 ++int main() { exit(0); rindex(0, 0); bzero(0, 0); }" > conftest.c
61 + eval $compile
62 + if test -s conftest ; then :
63 + else DEFS="$DEFS -DUSG"
64 +@@ -267,7 +270,8 @@ rm -f conftest conftest.c
65 +
66 + echo checking whether sys/types.h defines uid_t
67 + echo '#include <sys/types.h>
68 +-main() { uid_t x; exit(0); }' > conftest.c
69 ++#include <stdlib.h>
70 ++int main() { uid_t x; exit(0); }' > conftest.c
71 + eval $compile
72 + if test -s conftest ; then :
73 + else
74 +@@ -300,7 +304,7 @@ char *alloca ();
75 + #endif
76 + #endif
77 + #endif
78 +-main() { char *p = (char *) alloca(1); exit(0); }' > conftest.c
79 ++int main() { char *p = (char *) alloca(1); exit(0); }' > conftest.c
80 + eval $compile
81 + if test -s conftest ; then :
82 + elif test -d /usr/ucblib; then LIBS="$LIBS -L/usr/ucblib -lucb"
83 +@@ -312,7 +316,7 @@ rm -f conftest conftest.c
84 + if [ $usenls = true ]; then
85 + echo checking for nls
86 + echo '#include <nl_types.h>
87 +- main() {nl_catd catfd; exit(0); }' > conftest.c
88 ++ int main() {nl_catd catfd; exit(0); }' > conftest.c
89 + eval $compile
90 + if test -s conftest && ./conftest 2>/dev/null; then :
91 + else
92 +@@ -329,8 +333,9 @@ echo checking for getopt.h
93 + echo '#define _GNU_SOURCE
94 + #include <getopt.h>
95 + #include <stdio.h>
96 ++#include <stdlib.h>
97 + struct option long_opts[] = { { "", no_argument, NULL, 0 } };
98 +-main() { exit(0); }' > conftest.c
99 ++int main() { exit(0); }' > conftest.c
100 + eval $compile
101 + if test -s conftest ; then
102 + manpathoption="--path"
103
104 diff --git a/sys-apps/man2html/man2html-1.6g-r1.ebuild b/sys-apps/man2html/man2html-1.6g-r1.ebuild
105 new file mode 100644
106 index 000000000000..e9d4766f3b43
107 --- /dev/null
108 +++ b/sys-apps/man2html/man2html-1.6g-r1.ebuild
109 @@ -0,0 +1,52 @@
110 +# Copyright 1999-2022 Gentoo Authors
111 +# Distributed under the terms of the GNU General Public License v2
112 +
113 +EAPI=8
114 +
115 +inherit edo toolchain-funcs
116 +
117 +MY_P="man-${PV}"
118 +
119 +DESCRIPTION="Standard commands to read man pages"
120 +HOMEPAGE="http://primates.ximian.com/~flucifredi/man/"
121 +SRC_URI="http://primates.ximian.com/~flucifredi/man/${MY_P}.tar.gz"
122 +S="${WORKDIR}/${MY_P}"
123 +
124 +LICENSE="GPL-2"
125 +SLOT="0"
126 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
127 +
128 +RDEPEND="!sys-apps/man"
129 +
130 +PATCHES=(
131 + "${FILESDIR}"/man-1.6f-man2html-compression-2.patch
132 + "${FILESDIR}"/man-1.6-cross-compile.patch
133 + "${FILESDIR}"/man-1.6g-compress.patch #205147
134 + "${FILESDIR}"/man-1.6g-clang-15-configure.patch
135 +)
136 +
137 +src_configure() {
138 + tc-export CC BUILD_CC
139 +
140 + # Just a stub to disable configure check. man2html doesn't use it.
141 + export COMPRESS=true
142 + edo ./configure \
143 + -confdir=/etc \
144 + +sgid +fhs \
145 + +lang none
146 +}
147 +
148 +src_compile() {
149 + emake {src,man2html}/Makefile
150 + emake -C src version.h
151 + emake -C man2html
152 +}
153 +
154 +src_install() {
155 + # A little faster to run this by hand than `emake install`.
156 + cd man2html || die
157 +
158 + dobin man2html
159 + doman man2html.1
160 + dodoc README TODO
161 +}