From 2b2288a17e84044d5e27aa42c2249306afc52a77 Mon Sep 17 00:00:00 2001 From: lanruo Date: Thu, 17 Aug 2023 11:46:08 +0800 Subject: [PATCH] fix groff build failed (cherry picked from commit b1bf1e84a88f3217b4628da22c94788278376b0c) --- groff-1.22.4-sw.patch | 82 +++++++++++++++++++++++++++++++++++++++++++ groff.spec | 12 +++++-- 2 files changed, 91 insertions(+), 3 deletions(-) create mode 100644 groff-1.22.4-sw.patch diff --git a/groff-1.22.4-sw.patch b/groff-1.22.4-sw.patch new file mode 100644 index 0000000..3f5e3eb --- /dev/null +++ b/groff-1.22.4-sw.patch @@ -0,0 +1,82 @@ +diff -Naur groff-1.22.4.org/configure groff-1.22.4.sw/configure +--- groff-1.22.4.org/configure 2022-02-14 01:50:40.730000000 +0000 ++++ groff-1.22.4.sw/configure 2022-02-14 01:52:50.330000000 +0000 +@@ -7038,6 +7038,12 @@ + # (according to the test results of Bruno Haible's ieeefp/fenv_default.m4 + # and the GCC 4.1.2 manual). + case "$host_cpu" in ++ sw_64*) ++ if test -n "$GCC"; then ++ # GCC has the option -mieee. ++ CPPFLAGS="$CPPFLAGS -mieee" ++ fi ++ ;; + alpha*) + # On Alpha systems, a compiler option provides the behaviour. + # See the ieee(3) manual page, also available at +@@ -11032,6 +11038,10 @@ + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ;; + ++ sw_64* ) ++ gl_cv_host_cpu_c_abi=sw_64 ++ ;; ++ + alphaev[4-8] | alphaev56 | alphapca5[67] | alphaev6[78] ) + gl_cv_host_cpu_c_abi=alpha + ;; +diff -Naur groff-1.22.4.org/gnulib_m4/fpieee.m4 groff-1.22.4.sw/gnulib_m4/fpieee.m4 +--- groff-1.22.4.org/gnulib_m4/fpieee.m4 2022-02-14 01:50:40.920000000 +0000 ++++ groff-1.22.4.sw/gnulib_m4/fpieee.m4 2022-02-14 02:02:42.650000000 +0000 +@@ -30,6 +30,12 @@ + # (according to the test results of Bruno Haible's ieeefp/fenv_default.m4 + # and the GCC 4.1.2 manual). + case "$host_cpu" in ++ sw_64*) ++ if test -n "$GCC"; then ++ # GCC has the option -mieee. ++ CPPFLAGS="$CPPFLAGS -mieee" ++ fi ++ ;; + alpha*) + # On Alpha systems, a compiler option provides the behaviour. + # See the ieee(3) manual page, also available at +diff -Naur groff-1.22.4.org/gnulib_m4/host-cpu-c-abi.m4 groff-1.22.4.sw/gnulib_m4/host-cpu-c-abi.m4 +--- groff-1.22.4.org/gnulib_m4/host-cpu-c-abi.m4 2022-02-14 01:50:40.910000000 +0000 ++++ groff-1.22.4.sw/gnulib_m4/host-cpu-c-abi.m4 2022-02-14 02:02:15.450000000 +0000 +@@ -91,6 +91,12 @@ + ;; + + changequote(,)dnl ++ sw_64* ) ++changequote([,])dnl ++ gl_cv_host_cpu_c_abi=sw_64 ++ ;; ++ ++changequote(,)dnl + alphaev[4-8] | alphaev56 | alphapca5[67] | alphaev6[78] ) + changequote([,])dnl + gl_cv_host_cpu_c_abi=alpha +@@ -355,6 +361,9 @@ + #ifndef __x86_64__ + #undef __x86_64__ + #endif ++#ifndef __sw_64__ ++#undef __sw_64__ ++#endif + #ifndef __alpha__ + #undef __alpha__ + #endif +diff -Naur groff-1.22.4.org/src/include/config.hin groff-1.22.4.sw/src/include/config.hin +--- groff-1.22.4.org/src/include/config.hin 2022-02-14 01:50:40.860000000 +0000 ++++ groff-1.22.4.sw/src/include/config.hin 2022-02-14 02:03:30.230000000 +0000 +@@ -10,6 +10,9 @@ + #ifndef __x86_64__ + #undef __x86_64__ + #endif ++#ifndef __sw_64__ ++#undef __sw_64__ ++#endif + #ifndef __alpha__ + #undef __alpha__ + #endif diff --git a/groff.spec b/groff.spec index f37d100..47937a4 100644 --- a/groff.spec +++ b/groff.spec @@ -2,16 +2,17 @@ %{!?with_x:%global with_x 1} Name: groff Version: 1.22.4 -Release: 10 +Release: 11 Summary: A typesetting system License: GPLv3+ and GFDL and BSD and MIT URL: http://www.gnu.org/software/groff/ Source: http://ftp.gnu.org/gnu/groff/groff-%{version}.tar.gz +Patch3000: groff-1.22.4-sw.patch BuildRequires: gcc, gcc-c++ texinfo BuildRequires: git, netpbm-progs, perl-generators, psutils, ghostscript -BuildRequires: libXaw-devel, libXmu-devel -BuildRequires: jbig2dec-libs +BuildRequires: libXaw-devel, libXmu-devel, automake +BuildRequires: jbig2dec-libs Requires: coreutils Requires: %{name}-base = %{version}-%{release} @@ -95,7 +96,9 @@ done # fix absolute symlink to relative symlink rm -f %{buildroot}%{_docdir}/%{name}-%{version}/pdf/mom-pdf.pdf +%ifnarch sw_64 ln -s ../examples/mom/mom-pdf.pdf %{buildroot}%{_docdir}/%{name}-%{version}/pdf/mom-pdf.pdf +%endif # rename groff downloadable postscript fonts(bz #477394) for file in $(find %{buildroot}%{_datadir}/%{name}/%{version}/font/devps -name "*.pfa"); do @@ -320,6 +323,9 @@ make check %{_infodir}/groff.info* %changelog +* Tue Apr 11 2023 yangchenguang - 1.22.4-10.kb1 +- KYOS-F: fix groff build failed (ones #2279) + * Tue Oct 25 2022 yanglongkang - 1.22.4-10 - rebuild for next release