summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2022-09-12 17:48:40 +0100
committerSam James <sam@gentoo.org>2022-09-12 17:48:40 +0100
commit49e4d668bc441ec4db407b51edeab5af14b798af (patch)
tree913343dab31856881e2f27d5e81a64bb0eb3df25 /sys-apps
parentnet-libs/libsmi: fix configure tests with Clang 15 (diff)
downloadgentoo-49e4d668bc441ec4db407b51edeab5af14b798af.tar.gz
gentoo-49e4d668bc441ec4db407b51edeab5af14b798af.tar.bz2
gentoo-49e4d668bc441ec4db407b51edeab5af14b798af.zip
sys-apps/man2html: fix configure tests with Clang 15
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sys-apps')
-rw-r--r--sys-apps/man2html/files/man-1.6g-clang-15-configure.patch81
-rw-r--r--sys-apps/man2html/man2html-1.6g-r1.ebuild52
2 files changed, 133 insertions, 0 deletions
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
new file mode 100644
index 000000000000..783693059e2f
--- /dev/null
+++ b/sys-apps/man2html/files/man-1.6g-clang-15-configure.patch
@@ -0,0 +1,81 @@
+--- a/configure
++++ b/configure
+@@ -223,7 +223,7 @@ compile="$CC $DEFS conftest.c -o conftest $LIBS >/dev/null 2>&1"
+ echo checking for ANSI C header files
+ echo "#include <stdlib.h>
+ #include <string.h>
+-main() { exit(0); strerror(0); }" > conftest.c
++int main() { exit(0); strerror(0); }" > conftest.c
+ eval $compile
+ if test -s conftest && ./conftest 2>/dev/null; then
+ DEFS="$DEFS -DSTDC_HEADERS"
+@@ -236,7 +236,8 @@ rm -f conftest conftest.c
+
+ echo checking for sys/termios.h
+ echo "#include <sys/termios.h>
+-main() { exit(0); }" > conftest.c
++#include <stdlib.h>
++int main() { exit(0); }" > conftest.c
+ eval $compile
+ if test -s conftest && ./conftest 2>/dev/null; then
+ DEFS="$DEFS -DTERMIOS_HEADER"
+@@ -245,8 +246,9 @@ rm -f conftest conftest.c
+
+ echo checking for POSIX.1 header files
+ echo "#include <unistd.h>
++#include <stdlib.h>
+ #ifdef _POSIX_VERSION
+-main() { exit(0); }
++int main() { exit(0); }
+ #else
+ # error no _POSIX_VERSION
+ #endif" > conftest.c
+@@ -258,7 +260,8 @@ rm -f conftest conftest.c
+
+ echo checking for BSD string and memory functions
+ echo "#include <strings.h>
+-main() { exit(0); rindex(0, 0); bzero(0, 0); }" > conftest.c
++#include <stdlib.h>
++int main() { exit(0); rindex(0, 0); bzero(0, 0); }" > conftest.c
+ eval $compile
+ if test -s conftest ; then :
+ else DEFS="$DEFS -DUSG"
+@@ -267,7 +270,8 @@ rm -f conftest conftest.c
+
+ echo checking whether sys/types.h defines uid_t
+ echo '#include <sys/types.h>
+-main() { uid_t x; exit(0); }' > conftest.c
++#include <stdlib.h>
++int main() { uid_t x; exit(0); }' > conftest.c
+ eval $compile
+ if test -s conftest ; then :
+ else
+@@ -300,7 +304,7 @@ char *alloca ();
+ #endif
+ #endif
+ #endif
+-main() { char *p = (char *) alloca(1); exit(0); }' > conftest.c
++int main() { char *p = (char *) alloca(1); exit(0); }' > conftest.c
+ eval $compile
+ if test -s conftest ; then :
+ elif test -d /usr/ucblib; then LIBS="$LIBS -L/usr/ucblib -lucb"
+@@ -312,7 +316,7 @@ rm -f conftest conftest.c
+ if [ $usenls = true ]; then
+ echo checking for nls
+ echo '#include <nl_types.h>
+- main() {nl_catd catfd; exit(0); }' > conftest.c
++ int main() {nl_catd catfd; exit(0); }' > conftest.c
+ eval $compile
+ if test -s conftest && ./conftest 2>/dev/null; then :
+ else
+@@ -329,8 +333,9 @@ echo checking for getopt.h
+ echo '#define _GNU_SOURCE
+ #include <getopt.h>
+ #include <stdio.h>
++#include <stdlib.h>
+ struct option long_opts[] = { { "", no_argument, NULL, 0 } };
+-main() { exit(0); }' > conftest.c
++int main() { exit(0); }' > conftest.c
+ eval $compile
+ if test -s conftest ; then
+ manpathoption="--path"
diff --git a/sys-apps/man2html/man2html-1.6g-r1.ebuild b/sys-apps/man2html/man2html-1.6g-r1.ebuild
new file mode 100644
index 000000000000..e9d4766f3b43
--- /dev/null
+++ b/sys-apps/man2html/man2html-1.6g-r1.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit edo toolchain-funcs
+
+MY_P="man-${PV}"
+
+DESCRIPTION="Standard commands to read man pages"
+HOMEPAGE="http://primates.ximian.com/~flucifredi/man/"
+SRC_URI="http://primates.ximian.com/~flucifredi/man/${MY_P}.tar.gz"
+S="${WORKDIR}/${MY_P}"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+
+RDEPEND="!sys-apps/man"
+
+PATCHES=(
+ "${FILESDIR}"/man-1.6f-man2html-compression-2.patch
+ "${FILESDIR}"/man-1.6-cross-compile.patch
+ "${FILESDIR}"/man-1.6g-compress.patch #205147
+ "${FILESDIR}"/man-1.6g-clang-15-configure.patch
+)
+
+src_configure() {
+ tc-export CC BUILD_CC
+
+ # Just a stub to disable configure check. man2html doesn't use it.
+ export COMPRESS=true
+ edo ./configure \
+ -confdir=/etc \
+ +sgid +fhs \
+ +lang none
+}
+
+src_compile() {
+ emake {src,man2html}/Makefile
+ emake -C src version.h
+ emake -C man2html
+}
+
+src_install() {
+ # A little faster to run this by hand than `emake install`.
+ cd man2html || die
+
+ dobin man2html
+ doman man2html.1
+ dodoc README TODO
+}