Ports: Add groff

This port is exceptionally useful in the ports ecosystem, as it will
allow us to read ROFF manual pages within the system.
This commit is contained in:
Liav A 2023-08-12 19:12:57 +03:00 committed by Tim Schumacher
parent d905498fb6
commit c2d9d0277f
5 changed files with 76 additions and 0 deletions

View file

@ -104,6 +104,7 @@ This list is also available at [ports.serenityos.net](https://ports.serenityos.n
| [`grep`](grep/) | GNU Grep | 3.10 | https://www.gnu.org/software/grep/ |
| [`grepcidr`](grepcidr/) | grepcidr | 2.0 | http://www.pc-tools.net/unix/grepcidr/ |
| [`griffon`](griffon/) | The Griffon Legend | 1.0 | https://www.scummvm.org/games/#games-griffon |
| [`groff`](groff/) | GNU roff | 1.22.4 | https://www.gnu.org/software/groff/ |
| [`gsl`](gsl/) | GNU Scientific Library | 2.7.1 | https://www.gnu.org/software/gsl/ |
| [`guile`](guile/) | The GNU guile programming language | 3.0.8 | https://www.gnu.org/software/guile/ |
| [`gzip`](gzip/) | GNU gzip | 1.12 | https://www.gnu.org/software/gzip/ |

15
Ports/groff/package.sh Executable file
View file

@ -0,0 +1,15 @@
#!/usr/bin/env -S bash ../.port_include.sh
port='groff'
version='1.22.4'
useconfigure='true'
use_fresh_config_sub='true'
config_sub_paths=('build-aux/config.sub')
files=(
"https://ftpmirror.gnu.org/gnu/groff/groff-${version}.tar.gz e78e7b4cb7dec310849004fa88847c44701e8d133b5d4c13057d876c1bad0293"
)
depends=(
'libiconv'
)
configopts=(
'--with-doc=no'
)

View file

@ -0,0 +1,23 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Liav A <liavalb@gmail.com>
Date: Sat, 12 Aug 2023 19:14:23 +0300
Subject: [PATCH] Include config.h in math.h
Otherwise the build will fail due to #define(s) not being included.
---
lib/math.in.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/math.in.h b/lib/math.in.h
index c30fc202c0d31b7df331a9910dae0842511589ba..2b595710530c99ec4f4a6681e4e2b623716028d1 100644
--- a/lib/math.in.h
+++ b/lib/math.in.h
@@ -33,6 +33,8 @@
# include <fp.h>
#endif
+#include <config.h>
+
#ifndef _GL_INLINE_HEADER_BEGIN
#error "Please include config.h first."
#endif

View file

@ -0,0 +1,23 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Liav A <liavalb@gmail.com>
Date: Sat, 12 Aug 2023 19:15:27 +0300
Subject: [PATCH] Don't redeclare signbit function
We have it already implemented so simply use what we have.
---
lib/math.in.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/math.in.h b/lib/math.in.h
index 2b595710530c99ec4f4a6681e4e2b623716028d1..419ab4a609ce0ecd753bb9673819144d81836d8b 100644
--- a/lib/math.in.h
+++ b/lib/math.in.h
@@ -2344,7 +2344,7 @@ _GL_WARN_REAL_FLOATING_DECL (isnan);
#endif
-#if @GNULIB_SIGNBIT@
+#if 0
# if (@REPLACE_SIGNBIT_USING_GCC@ \
&& (!defined __cplusplus || __cplusplus < 201103))
# undef signbit

View file

@ -0,0 +1,14 @@
# Patches for groff on SerenityOS
## `0001-Include-config.h-in-math.h.patch`
Include config.h in math.h
Otherwise the build will fail due to #define(s) not being included.
## `0002-Don-t-redeclare-signbit-function.patch`
Don't redeclare signbit function
We have it already implemented so simply use what we have.