Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

groff: fix build #65042

Closed
wants to merge 3 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
157 changes: 155 additions & 2 deletions Formula/groff.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ class Groff < Formula
url "https://ftp.gnu.org/gnu/groff/groff-1.22.4.tar.gz"
mirror "https://ftpmirror.gnu.org/groff/groff-1.22.4.tar.gz"
sha256 "e78e7b4cb7dec310849004fa88847c44701e8d133b5d4c13057d876c1bad0293"
license "GPL-3.0"
license "GPL-3.0-or-later"

livecheck do
url :stable
Expand All @@ -17,8 +17,21 @@ class Groff < Formula
sha256 "2966f4b562c30eb6679d6940b43f4b99b2b625433e6a218489f160eb76c7c360" => :sierra
end

depends_on "pkg-config" => :build
depends_on "ghostscript"
depends_on "netpbm"
depends_on "psutils"
depends_on "uchardet"

uses_from_macos "libiconv"
uses_from_macos "perl"

# See https://savannah.gnu.org/bugs/index.php?59276
# Fixed in 1.23.0
patch :DATA

def install
system "./configure", "--prefix=#{prefix}", "--without-x"
system "./configure", "--prefix=#{prefix}", "--without-x", "--with-uchardet"
system "make" # Separate steps required
system "make", "install"
end
Expand All @@ -28,3 +41,143 @@ def install
pipe_output("#{bin}/groff -a", "homebrew\n")
end
end
__END__
--- a/src/libs/libgroff/assert.cpp
+++ b/src/libs/libgroff/assert.cpp
@@ -16,6 +16,10 @@ for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */

+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <stdio.h>
#include <stdlib.h>
#include "assert.h"
--- a/src/libs/libgroff/errarg.cpp
+++ b/src/libs/libgroff/errarg.cpp
@@ -17,6 +17,10 @@ for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */

+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <stdio.h>
#include "assert.h"
#include "errarg.h"
--- a/src/libs/libgroff/error.cpp
+++ b/src/libs/libgroff/error.cpp
@@ -17,6 +17,10 @@ for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */

+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
--- a/src/preproc/eqn/eqn.ypp
+++ b/src/preproc/eqn/eqn.ypp
@@ -16,6 +16,10 @@ for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
%{
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
--- a/src/libs/libgroff/curtime.cpp
+++ b/src/libs/libgroff/curtime.cpp
@@ -15,6 +15,10 @@
The GNU General Public License version 2 (GPL2) is available in the
internet at <http://www.gnu.org/licenses/gpl-2.0.txt>. */

+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <errno.h>
#include <limits.h>
#include <stdlib.h>
--- a/src/libs/libgroff/device.cpp
+++ b/src/libs/libgroff/device.cpp
@@ -17,6 +17,7 @@ for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */

+#include "config.h"
#include <stdlib.h>
#include "device.h"
#include "defs.h"
--- a/src/libs/libgroff/fatal.cpp
+++ b/src/libs/libgroff/fatal.cpp
@@ -16,6 +16,7 @@ for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */

+#include "config.h"
#include <stdlib.h>

#define FATAL_ERROR_EXIT_CODE 3
--- a/src/libs/libgroff/string.cpp
+++ b/src/libs/libgroff/string.cpp
@@ -17,6 +17,10 @@ for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */

+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <stdlib.h>

#include "lib.h"
--- a/src/libs/libgroff/strsave.cpp
+++ b/src/libs/libgroff/strsave.cpp
@@ -17,6 +17,7 @@ for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */

+#include "config.h"
#include <string.h>
#include <stdlib.h>

--- a/src/preproc/eqn/text.cpp
+++ b/src/preproc/eqn/text.cpp
@@ -17,6 +17,7 @@ for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */

+#include "config.h"
#include <ctype.h>
#include <stdlib.h>
#include "eqn.h"
--- a/src/preproc/eqn/other.cpp
+++ b/src/preproc/eqn/other.cpp
@@ -17,6 +17,7 @@ for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */

+#include "config.h"
#include <stdlib.h>

#include "eqn.h"
--- a/src/preproc/pic/object.cpp
+++ b/src/preproc/pic/object.cpp
@@ -17,6 +17,8 @@ for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */

+#include "config.h"
+
#include <stdlib.h>

#include "pic.h"