From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id D64111382C5 for ; Fri, 11 Dec 2020 12:22:26 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D6A78E0973; Fri, 11 Dec 2020 12:22:25 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 9983FE095D for ; Fri, 11 Dec 2020 12:22:25 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id B3D79340FB2 for ; Fri, 11 Dec 2020 12:22:23 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 1A88F39F for ; Fri, 11 Dec 2020 12:22:22 +0000 (UTC) From: "Lars Wendler" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Lars Wendler" Message-ID: <1607689338.21fccd433a95f545ac5407c0f58020bd010a38c6.polynomial-c@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: app-text/mandoc/, app-text/mandoc/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: app-text/mandoc/files/mandoc-1.14.5-r1-www-install.patch app-text/mandoc/files/mandoc.cron-r0 app-text/mandoc/mandoc-1.14.5-r1.ebuild app-text/mandoc/metadata.xml X-VCS-Directories: app-text/mandoc/ app-text/mandoc/files/ X-VCS-Committer: polynomial-c X-VCS-Committer-Name: Lars Wendler X-VCS-Revision: 21fccd433a95f545ac5407c0f58020bd010a38c6 X-VCS-Branch: master Date: Fri, 11 Dec 2020 12:22:22 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 8d5ce7eb-dec7-425f-b77c-0bd59c7ee580 X-Archives-Hash: ad09b329fc40b0ca1cf4c24a69bd3347 commit: 21fccd433a95f545ac5407c0f58020bd010a38c6 Author: epsilonKNOT aisha cc> AuthorDate: Sun Nov 29 01:47:52 2020 +0000 Commit: Lars Wendler gentoo org> CommitDate: Fri Dec 11 12:22:18 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=21fccd43 app-text/mandoc: allow mandoc as default man provider only supports using gzip Add musl patch from Wolfgang Mueller oriole.systems> Closes: https://bugs.gentoo.org/616776 Package-Manager: Portage-3.0.10, Repoman-3.0.2 Signed-off-by: Aisha Tammy aisha.cc> Signed-off-by: Lars Wendler gentoo.org> .../files/mandoc-1.14.5-r1-www-install.patch | 19 ++++ app-text/mandoc/files/mandoc.cron-r0 | 6 ++ app-text/mandoc/mandoc-1.14.5-r1.ebuild | 118 +++++++++++++++++++++ app-text/mandoc/metadata.xml | 4 + 4 files changed, 147 insertions(+) diff --git a/app-text/mandoc/files/mandoc-1.14.5-r1-www-install.patch b/app-text/mandoc/files/mandoc-1.14.5-r1-www-install.patch new file mode 100644 index 00000000000..2395f1ce66b --- /dev/null +++ b/app-text/mandoc/files/mandoc-1.14.5-r1-www-install.patch @@ -0,0 +1,19 @@ +diff --git a/Makefile b/Makefile +index f4e2954..191c7e2 100644 +--- a/Makefile ++++ b/Makefile +@@ -535,9 +535,11 @@ soelim: $(SOELIM_OBJS) + # --- maintainer targets --- + + www-install: www +- $(INSTALL_DATA) mandoc.css $(HTDOCDIR) +- $(INSTALL_DATA) $(WWW_MANS) $(HTDOCDIR)/man +- $(INSTALL_DATA) $(WWW_INCS) $(HTDOCDIR)/includes ++ mkdir -p $(DESTDIR)$(HTDOCDIR)/man ++ mkdir -p $(DESTDIR)$(HTDOCDIR)/includes ++ $(INSTALL_DATA) mandoc.css $(DESTDIR)$(HTDOCDIR) ++ $(INSTALL_DATA) $(WWW_MANS) $(DESTDIR)$(HTDOCDIR)/man ++ $(INSTALL_DATA) $(WWW_INCS) $(DESTDIR)$(HTDOCDIR)/includes + + depend: config.h + mkdep -f Makefile.depend $(CFLAGS) $(SRCS) diff --git a/app-text/mandoc/files/mandoc.cron-r0 b/app-text/mandoc/files/mandoc.cron-r0 new file mode 100644 index 00000000000..78556490176 --- /dev/null +++ b/app-text/mandoc/files/mandoc.cron-r0 @@ -0,0 +1,6 @@ +#!/bin/sh + +# need MANPATH +. /etc/profile.env + +exec nice makewhatis -T utf8 2>/dev/null diff --git a/app-text/mandoc/mandoc-1.14.5-r1.ebuild b/app-text/mandoc/mandoc-1.14.5-r1.ebuild new file mode 100644 index 00000000000..f138ef991ac --- /dev/null +++ b/app-text/mandoc/mandoc-1.14.5-r1.ebuild @@ -0,0 +1,118 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit toolchain-funcs + +DESCRIPTION="Suite of tools compiling mdoc and man" +HOMEPAGE="https://mdocml.bsd.lv/" +SRC_URI="https://mdocml.bsd.lv/snapshots/${P}.tar.gz" + +LICENSE="ISC" +SLOT="0" +KEYWORDS="~amd64 ~ppc64 ~x86" +IUSE="cgi system-man" + +RDEPEND="sys-libs/zlib + system-man? ( !sys-apps/man-db ) +" +DEPEND="${RDEPEND} + cgi? ( sys-libs/zlib[static-libs] ) +" +BDEPEND=" + cgi? ( app-text/highlight ) +" + +PATCHES=( "${FILESDIR}"/${PN}-1.14.5-r1-www-install.patch ) + +pkg_pretend() { + if use system-man ; then + # only support uncompressed and gzip + [[ -n ${PORTAGE_COMPRESS+unset} ]] && \ + [[ "${PORTAGE_COMPRESS}" == "gzip" || "${PORTAGE_COMPRESS}" == "" ]] || \ + ewarn "only PORTAGE_COMPRESS=gzip or '' is supported, man pages will not be indexed" + fi +} + +src_prepare() { + default + + # The db-install change is to support parallel installs. + sed -i \ + -e '/ar rs/s:ar:$(AR):' \ + -e '/^db-install:/s:$: base-install:' \ + Makefile || die + + # make-4.3 doesn't like the CC line (bug #706024) + # and "echo -n" is not portable + sed \ + -e "s@^\(CC=\).*\$@\1\"$(tc-getCC)\"@" \ + -e 's@echo -n@printf@g' \ + -i configure || die + + cat <<-EOF > "configure.local" + PREFIX="${EPREFIX}/usr" + BINDIR="${EPREFIX}/usr/bin" + SBINDIR="${EPREFIX}/usr/sbin" + LIBDIR="${EPREFIX}/usr/$(get_libdir)" + MANDIR="${EPREFIX}/usr/share/man" + INCLUDEDIR="${EPREFIX}/usr/include/mandoc" + EXAMPLEDIR="${EPREFIX}/usr/share/examples/mandoc" + MANPATH_DEFAULT="${EPREFIX}/usr/man:${EPREFIX}/usr/share/man:${EPREFIX}/usr/local/man:${EPREFIX}/usr/local/share/man" + + CFLAGS="${CFLAGS} ${CPPFLAGS}" + LDFLAGS="${LDFLAGS}" + AR="$(tc-getAR)" + CC="$(tc-getCC)" + # The STATIC variable is only used by man.cgi. + STATIC= + + # conflicts with sys-apps/groff + BINM_SOELIM=msoelim + MANM_ROFF=mandoc_roff + # conflicts with sys-apps/man-pages + MANM_MAN=mandoc_man + + # fix utf-8 locale on musl + $(usex elibc_musl UTF8_LOCALE=C.UTF-8 '') + EOF + use system-man || cat <<-EOF >> "configure.local" + BINM_MAN=mman + BINM_APROPOS=mapropos + BINM_WHATIS=mwhatis + BINM_MAKEWHATIS=mmakewhatis + MANM_MDOC=mandoc_mdoc + MANM_EQN=mandoc_eqn + MANM_TBL=mandoc_tbl + MANM_MANCONF=mman.conf + EOF + if use cgi; then + cp cgi.h{.example,} || die + fi + if [[ -n "${MANDOC_CGI_H}" ]]; then + cp "${MANDOC_CGI_H}" cgi.h || die + fi +} + +src_compile() { + default + use cgi && emake man.cgi +} + +src_install() { + emake DESTDIR="${D}" install + use cgi && emake DESTDIR="${D}" cgi-install www-install + + if use system-man ; then + exeinto /etc/cron.daily + newexe "${FILESDIR}"/mandoc.cron-r0 mandoc + fi +} + +pkg_postinst() { + if use system-man ; then + elog "Generating mandoc database" + makewhatis || die + fi +} diff --git a/app-text/mandoc/metadata.xml b/app-text/mandoc/metadata.xml index aebca33be17..814b35c6240 100644 --- a/app-text/mandoc/metadata.xml +++ b/app-text/mandoc/metadata.xml @@ -4,4 +4,8 @@ base-system@gentoo.org + + build man.cgi web plugin for viewing man pages + set as the default man provider +