commit:     0ce56d4b619d47990b776cdb8500259012c54204
Author:     Necktwi Ozfguah <necktwi <AT> ferryfair <DOT> com>
AuthorDate: Thu Feb 28 05:42:44 2019 +0000
Commit:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Thu Feb 28 10:44:02 2019 +0000
URL:        https://gitweb.gentoo.org/proj/musl.git/commit/?id=0ce56d4b

sys-apps/groff: signbit support is assumed when crossbuilt.

It should be done with musl as it is done with glibc.

Package-Manager: Portage-2.3.51, Repoman-2.3.11
Signed-off-by: Necktwi Ozfguah <necktwi <AT> ferryfair.com>
Signed-off-by: Anthony G. Basile <blueness <AT> gentoo.org>

 sys-apps/groff/Manifest                            |   1 +
 .../files/groff-1.19.2-man-unicode-dashes.patch    |  24 +++++
 .../groff/files/groff-1.22.2-parallel-mom.patch    |  96 +++++++++++++++++++
 .../groff/files/groff-1.22.3-parallel-mom.patch    |  11 +++
 sys-apps/groff/files/groff-1.22.4-musl.patch       |  52 +++++++++++
 sys-apps/groff/groff-1.22.4.ebuild                 | 102 +++++++++++++++++++++
 sys-apps/groff/metadata.xml                        |   8 ++
 7 files changed, 294 insertions(+)

diff --git a/sys-apps/groff/Manifest b/sys-apps/groff/Manifest
new file mode 100644
index 0000000..67a1953
--- /dev/null
+++ b/sys-apps/groff/Manifest
@@ -0,0 +1 @@
+DIST groff-1.22.4.tar.gz 4137480 BLAKE2B 
cdda8a7e8e42b8d8991656ecfbffe0cd0ed5d8932467cab2f3c1eecb3365f4a5c03321b6ed929d451c3dfb00a46046a781303a1c55c4aa65eb7d178fb36b1cbc
 SHA512 
1c42d3cd71efaf067b5850945d9097fa1f0fadd5e2b6ba7446bd9d4f439fe1ad058e4ddb0d4e0f503682137dfc7c822944ce1e3e5cf981673f8ba197ea77126d

diff --git a/sys-apps/groff/files/groff-1.19.2-man-unicode-dashes.patch 
b/sys-apps/groff/files/groff-1.19.2-man-unicode-dashes.patch
new file mode 100644
index 0000000..276460f
--- /dev/null
+++ b/sys-apps/groff/files/groff-1.19.2-man-unicode-dashes.patch
@@ -0,0 +1,24 @@
+format dashes as dashes so as to not confuse people
+
+http://bugs.gentoo.org/16108
+http://bugs.gentoo.org/17580
+http://bugs.gentoo.org/121502
+
+--- a/tmac/man.local
++++ b/tmac/man.local
+@@ -1,2 +1,6 @@
+ .\" This file is loaded after an-old.tmac.
+ .\" Put any local modifications to an-old.tmac here.
++.if '\*[.T]'utf8' \{\
++.  char \- \N'45'
++.  char  - \N'45'
++.\}
+--- a/tmac/mdoc.local
++++ b/tmac/mdoc.local
+@@ -1,2 +1,6 @@
+ .\" This file is loaded after doc.tmac.
+ .\" Put any local modifications to doc.tmac here.
++.if '\*[.T]'utf8' \{\
++.  char \- \N'45'
++.  char  - \N'45'
++.\}

diff --git a/sys-apps/groff/files/groff-1.22.2-parallel-mom.patch 
b/sys-apps/groff/files/groff-1.22.2-parallel-mom.patch
new file mode 100644
index 0000000..7cf3c22
--- /dev/null
+++ b/sys-apps/groff/files/groff-1.22.2-parallel-mom.patch
@@ -0,0 +1,96 @@
+From 9f3af719383ab525c86ee0f514e268ef8494330a Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <[email protected]>
+Date: Fri, 6 Dec 2013 20:40:10 -0500
+Subject: [PATCH] fix parallel build w/gropdf and mom examples
+
+The contrib/mom/examples/ directory uses the helper script from
+src/devices/gropdf/.  Currently though, parallel builds might fail
+like so:
+
+...
+make[2]: Entering directory `.../groff-1.22.2/contrib/mom'
+GROFF_COMMAND_PREFIX= GROFF_BIN_PATH="`echo .../groff-1.22.2/src/roff/groff 
.../groff-1.22.2/src/roff/troff .../groff-1.22.2/src/devices/grops 
.../groff-1.22.2/src/devices/gropdf | sed -e 's|  *|:|g'`" 
PDFMOM_BIN_PATH=".../groff-1.22.2/src/devices/gropdf" 
.../groff-1.22.2/src/devices/gropdf/pdfmom -F.../groff-1.22.2/font 
-F.../groff-1.22.2/font -M.../groff-1.22.2/tmac -M.../groff-1.22.2/tmac -M. 
examples/letter.mom >examples/letter.pdf
+GROFF_COMMAND_PREFIX= GROFF_BIN_PATH="`echo .../groff-1.22.2/src/roff/groff 
.../groff-1.22.2/src/roff/troff .../groff-1.22.2/src/devices/grops 
.../groff-1.22.2/src/devices/gropdf | sed -e 's|  *|:|g'`" 
PDFMOM_BIN_PATH=".../groff-1.22.2/src/devices/gropdf" 
.../groff-1.22.2/src/devices/gropdf/pdfmom -F.../groff-1.22.2/font 
-F.../groff-1.22.2/font -M.../groff-1.22.2/tmac -M.../groff-1.22.2/tmac -M. 
examples/mom-pdf.mom >examples/mom-pdf.pdf
+/bin/sh: .../groff-1.22.2/src/devices/gropdf/pdfmom: No such file or directory
+make[2]: *** [examples/letter.pdf] Error 127
+/bin/sh: .../groff-1.22.2/src/devices/gropdf/pdfmom: No such file or directory
+make[2]: *** [examples/mom-pdf.pdf] Error 127
+make[2]: Leaving directory `.../groff-1.22.2/contrib/mom'
+make[1]: *** [contrib/mom] Error 2
+...
+make[2]: Entering directory `.../groff-1.22.2/src/devices/gropdf'
+sed -f .../groff-1.22.2/arch/misc/shdeps.sed \
+       -e "s|@VERSION@|1.22.2|" \
+       -e "s|@PERLPATH@|/usr/bin/perl|" ./pdfmom.pl >pdfmom
+
+The top level makefile tries to account for this in general with OTHERDIRS,
+but looks like src/devices/gropdf/ was added to this variable (which holds
+contrib/mom/ too) because gropdf installs a shell script, and the other
+prog vars require it to be a dir of things to compile.
+
+Declare a new prog var for holding shell scripts.
+
+URL: http://crbug.com/324116
+URL: https://bugs.gentoo.org/487276
+Signed-off-by: Mike Frysinger <[email protected]>
+
+2013-12-06  Mike Frysinger  <[email protected]>
+
+       * Makefile.in (SHPROGDIRS): Declare.
+       (PROGDIRS): Add $(SHPROGDIRS).
+       (OTHERDIRS): Delete src/devices/gropdf.
+       ($(SHPROGDIRS):): Add to existing rule.
+       ($(OTHERDIRS):): Depend on $(SHPROGDIRS).
+---
+ Makefile.in | 8 +++++---
+ 1 file changed, 5 insertions(+), 3 deletions(-)
+
+diff --git a/Makefile.in b/Makefile.in
+index a794de7..8e478af 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -602,12 +602,15 @@ CCPROGDIRS=\
+   src/utils/addftinfo
+ CPROGDIRS=\
+   src/utils/pfbtops
++SHPROGDIRS=\
++  src/devices/gropdf
+ PROGDEPDIRS=\
+   arch/misc
+ PROGDIRS=\
+   $(PROGDEPDIRS) \
+   $(CCPROGDIRS) \
+   $(CPROGDIRS) \
++  $(SHPROGDIRS) \
+   $(XPROGDIRS)
+ DEVDIRS=\
+   font/devps \
+@@ -637,7 +640,6 @@ OTHERDIRS=\
+   contrib/glilypond \
+   contrib/hdtbl \
+   contrib/pdfmark \
+-  src/devices/gropdf \
+   font/devpdf \
+   contrib/mom \
+   contrib/gdiffmk
+@@ -778,7 +780,7 @@ $(CCPROGDIRS): FORCE $(LIBDIRS)
+         -f $(top_srcdir)/Makefile.ccpg \
+         -f Makefile.dep $(do)
+ 
+-$(DEVDIRS) $(XDEVDIRS) $(OTHERDEVDIRS) $(TTYDEVDIRS): FORCE $(PROGDEPDIRS) 
$(CCPROGDIRS) $(CPROGDIRS)
++$(DEVDIRS) $(XDEVDIRS) $(OTHERDEVDIRS) $(TTYDEVDIRS) $(SHPROGDIRS): FORCE 
$(PROGDEPDIRS) $(CCPROGDIRS) $(CPROGDIRS)
+       @$(ENVSETUP); \
+       if test $(srcdir) = .; then \
+         srcdir=.; \
+@@ -809,7 +811,7 @@ $(GNULIBDIRS): FORCE
+         $(MAKE) ACLOCAL=: AUTOCONF=: AUTOHEADER=: AUTOMAKE=: $(do) ;; \
+       esac
+ 
+-$(OTHERDIRS): $(PROGDEPDIRS) $(CCPROGDIRS) $(CPROGDIRS)
++$(OTHERDIRS): $(PROGDEPDIRS) $(CCPROGDIRS) $(CPROGDIRS) $(SHPROGDIRS)
+ 
+ $(INCDIRS) $(PROGDEPDIRS) $(OTHERDIRS): FORCE
+       @$(ENVSETUP); \
+-- 
+1.8.4.3
+

diff --git a/sys-apps/groff/files/groff-1.22.3-parallel-mom.patch 
b/sys-apps/groff/files/groff-1.22.3-parallel-mom.patch
new file mode 100644
index 0000000..10661ac
--- /dev/null
+++ b/sys-apps/groff/files/groff-1.22.3-parallel-mom.patch
@@ -0,0 +1,11 @@
+--- groff-1.22.3/Makefile.in
++++ groff-1.22.3/Makefile.in
+@@ -864,7 +864,7 @@
+         -f $(top_srcdir)/Makefile.ccpg \
+         -f Makefile.dep $(do)
+ 
+-$(DEVDIRS) $(XDEVDIRS) $(OTHERDEVDIRS) $(TTYDEVDIRS): FORCE \
++$(DEVDIRS) $(XDEVDIRS) $(OTHERDEVDIRS) $(TTYDEVDIRS) $(SHPROGDIRS): FORCE \
+               $(PROGDEPDIRS) $(CCPROGDIRS) $(CPROGDIRS)
+       @$(ENVSETUP); \
+       if test $(srcdir) = .; then \

diff --git a/sys-apps/groff/files/groff-1.22.4-musl.patch 
b/sys-apps/groff/files/groff-1.22.4-musl.patch
new file mode 100644
index 0000000..0ed0e09
--- /dev/null
+++ b/sys-apps/groff/files/groff-1.22.4-musl.patch
@@ -0,0 +1,52 @@
+diff --git a/gnulib_m4/signbit.m4 b/gnulib_m4/signbit.m4
+index 9e7884d..ef1ed6f 100644
+--- a/gnulib_m4/signbit.m4
++++ b/gnulib_m4/signbit.m4
+@@ -29,12 +29,12 @@ AC_DEFUN([gl_SIGNBIT],
+         [gl_cv_func_signbit=yes],
+         [gl_cv_func_signbit=no],
+         [case "$host_os" in
+-                          # Guess yes on glibc systems.
+-           *-gnu* | gnu*) gl_cv_func_signbit="guessing yes" ;;
+-                          # Guess yes on native Windows.
+-           mingw*)        gl_cv_func_signbit="guessing yes" ;;
+-                          # If we don't know, assume the worst.
+-           *)             gl_cv_func_signbit="guessing no" ;;
++                                  # Guess yes on glibc systems.
++           *-gnu* | gnu* | *musl*) gl_cv_func_signbit="guessing yes" ;;
++                                  # Guess yes on native Windows.
++           mingw*)                gl_cv_func_signbit="guessing yes" ;;
++                                  # If we don't know, assume the worst.
++           *)                     gl_cv_func_signbit="guessing no" ;;
+          esac
+         ])
+     ])
+@@ -60,17 +60,17 @@ AC_DEFUN([gl_SIGNBIT],
+         [gl_cv_func_signbit_gcc=yes],
+         [gl_cv_func_signbit_gcc=no],
+         [case "$host_os" in
+-                          # Guess yes on glibc systems.
+-           *-gnu* | gnu*) gl_cv_func_signbit_gcc="guessing yes" ;;
+-                          # Guess yes on mingw, no on MSVC.
+-           mingw*)        if test -n "$GCC"; then
+-                            gl_cv_func_signbit_gcc="guessing yes"
+-                          else
+-                            gl_cv_func_signbit_gcc="guessing no"
+-                          fi
+-                          ;;
+-                          # If we don't know, assume the worst.
+-           *)             gl_cv_func_signbit_gcc="guessing no" ;;
++                                  # Guess yes on glibc systems.
++           *-gnu* | gnu* | *musl*) gl_cv_func_signbit_gcc="guessing yes" ;;
++                                  # Guess yes on mingw, no on MSVC.
++           mingw*)                if test -n "$GCC"; then
++                                     gl_cv_func_signbit_gcc="guessing yes"
++                                  else
++                                     gl_cv_func_signbit_gcc="guessing no"
++                                  fi
++                                  ;;
++                                  # If we don't know, assume the worst.
++           *)                     gl_cv_func_signbit_gcc="guessing no" ;;
+          esac
+         ])
+     ])

diff --git a/sys-apps/groff/groff-1.22.4.ebuild 
b/sys-apps/groff/groff-1.22.4.ebuild
new file mode 100644
index 0000000..20bcc24
--- /dev/null
+++ b/sys-apps/groff/groff-1.22.4.ebuild
@@ -0,0 +1,102 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit toolchain-funcs
+
+MY_P="${P/_/.}"
+
+DESCRIPTION="Text formatter used for man pages"
+HOMEPAGE="https://www.gnu.org/software/groff/groff.html";
+SRC_URI="mirror://gnu/groff/${MY_P}.tar.gz
+       mirror://gnu-alpha/groff/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+[[ "${PV}" == *_rc* ]] || \
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 
~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux 
~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris 
~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="examples X"
+
+RDEPEND="
+       X? (
+               x11-libs/libX11
+               x11-libs/libXt
+               x11-libs/libXmu
+               x11-libs/libXaw
+               x11-libs/libSM
+               x11-libs/libICE
+       )"
+DEPEND="${RDEPEND}
+       dev-lang/perl
+       sys-apps/texinfo"
+
+DOCS=( BUG-REPORT ChangeLog MORE.STUFF NEWS PROBLEMS PROJECTS README TODO )
+
+S="${WORKDIR}/${MY_P}"
+
+PATCHES=(
+       "${FILESDIR}"/${PN}-1.19.2-man-unicode-dashes.patch #16108 #17580 
#121502
+       "${FILESDIR}"/${PN}-1.22.4-musl.patch
+)
+
+src_prepare() {
+       default
+
+       # honor Gentoo's docdir
+       sed -i -e "s|^docdir =.*|docdir = 
\"${EPREFIX%/}/usr/share/doc/${PF}\"|g" \
+               Makefile.in \
+               || die "failed to modify Makefile.in"
+
+       local pfx=$(usex prefix ' Prefix' '')
+       cat <<-EOF >> tmac/mdoc.local
+       .ds volume-operating-system Gentoo${pfx}
+       .ds operating-system Gentoo${pfx}/${KERNEL}
+       .ds default-operating-system Gentoo${pfx}/${KERNEL}
+       EOF
+
+       # make sure we don't get a crappy `g' nameprefix on UNIX systems with 
real
+       # troff (GROFF_G macro runs some test to see, its own troff doesn't 
satisfy)
+       sed -i -e 's/^[ \t]\+g=g$/g=/' configure || die
+}
+
+src_configure() {
+       local myeconfargs=(
+               --with-appresdir="${EPREFIX%/}"/usr/share/X11/app-defaults
+               $(use_with X x)
+       )
+       econf "${myeconfargs[@]}"
+}
+
+src_compile() {
+       if tc-is-cross-compiler ; then
+               local CROSS_ARGS=(
+                       GROFFBIN="$(type -P groff)"
+                       TROFFBIN="$(type -P troff)"
+                       GROFF_BIN_DIR=
+                       GROFF_BIN_PATH=
+               )
+       else
+               unset CROSS_ARGS
+       fi
+
+       emake AR="$(tc-getAR)" "${CROSS_ARGS[@]}"
+}
+
+src_install() {
+       default
+
+       # The following links are required for man #123674
+       dosym eqn /usr/bin/geqn
+       dosym tbl /usr/bin/gtbl
+
+       if ! use examples ; then
+               # The pdf files might not be generated if ghostscript is 
unavailable. #602020
+               local pdf="${ED%/}/usr/share/doc/${PF}/examples/mom/mom-pdf.pdf"
+               if [[ -e ${pdf} ]] ; then
+                       # Keep mom-pdf.pdf since it's more of a manual than an 
example. #454196 #516732
+                       mv "${pdf}" "${ED%/}"/usr/share/doc/${PF}/pdf/ || die
+               fi
+               rm -rf "${ED%/}"/usr/share/doc/${PF}/examples
+       fi
+}

diff --git a/sys-apps/groff/metadata.xml b/sys-apps/groff/metadata.xml
new file mode 100644
index 0000000..56c1244
--- /dev/null
+++ b/sys-apps/groff/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd";>
+<pkgmetadata>
+<maintainer type="project">
+       <email>[email protected]</email>
+       <name>Gentoo Base System</name>
+</maintainer>
+</pkgmetadata>

Reply via email to