From MAILER-DAEMON Fri May 01 09:45:57 2015 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1YoBGP-0008ML-Eo for mharc-groff-commit@gnu.org; Fri, 01 May 2015 09:45:57 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43581) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YoBGN-0008ME-7C for groff-commit@gnu.org; Fri, 01 May 2015 09:45:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YoBGM-00014c-8P for groff-commit@gnu.org; Fri, 01 May 2015 09:45:55 -0400 Received: from vcs.savannah.gnu.org ([140.186.70.72]:32918) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YoBGM-00014Y-5d for groff-commit@gnu.org; Fri, 01 May 2015 09:45:54 -0400 Received: from wl by vcs.savannah.gnu.org with local (Exim 4.72) (envelope-from ) id 1YoBGL-0002aS-4n for groff-commit@gnu.org; Fri, 01 May 2015 13:45:53 +0000 Date: Fri, 01 May 2015 13:45:53 +0000 Message-Id: To: groff-commit@gnu.org Subject: [groff] 01/01: * tmac/tmac.am (TMACNORMALFILES): Add `zh.tmac'. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit In-Reply-To: groff@gnu.org References: <20150501134552.9910.23510@vcs.savannah.gnu.org> X-Git-Repo: groff X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Rev: f2825a4eb2810c0feec4f8e9c7f8910e26198983 Auto-Submitted: auto-generated From: Werner LEMBERG X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.72 X-BeenThere: groff-commit@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: groff@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 May 2015 13:45:56 -0000 wl pushed a commit to branch master in repository groff. commit f2825a4eb2810c0feec4f8e9c7f8910e26198983 Author: Werner Lemberg Date: Fri May 1 15:45:31 2015 +0200 * tmac/tmac.am (TMACNORMALFILES): Add `zh.tmac'. --- ChangeLog | 4 ++++ tmac/tmac.am | 3 ++- 2 files changed, 6 insertions(+), 1 deletions(-) diff --git a/ChangeLog b/ChangeLog index c5f05a1..2b7a18a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2015-05-01 Werner LEMBERG + + * tmac/tmac.am (TMACNORMALFILES): Add `zh.tmac'. + 2015-04-30 Darcy SHEN Fix Savannah bug #44941. diff --git a/tmac/tmac.am b/tmac/tmac.am index 7705c99..b778d84 100644 --- a/tmac/tmac.am +++ b/tmac/tmac.am @@ -89,7 +89,8 @@ TMACNORMALFILES = \ tmac/cs.tmac \ tmac/hyphen.cs \ tmac/hyphenex.cs \ - tmac/ja.tmac + tmac/ja.tmac \ + tmac/zh.tmac NORMALFILES = `echo $(TMACNORMALFILES) | sed -e "s|tmac/||g"` # TMACSTRIPFILES are built from their unstripped version (-u) From MAILER-DAEMON Sun May 03 18:03:10 2015 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1Yp1yg-0000pt-JF for mharc-groff-commit@gnu.org; Sun, 03 May 2015 18:03:10 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47650) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yp1yd-0000pA-HE for groff-commit@gnu.org; Sun, 03 May 2015 18:03:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yp1yb-00018a-Kq for groff-commit@gnu.org; Sun, 03 May 2015 18:03:07 -0400 Received: from vcs.savannah.gnu.org ([140.186.70.72]:43311) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yp1yb-00018W-GW for groff-commit@gnu.org; Sun, 03 May 2015 18:03:05 -0400 Received: from bgarrigues by vcs.savannah.gnu.org with local (Exim 4.72) (envelope-from ) id 1Yp1ya-0002Tv-Jv for groff-commit@gnu.org; Sun, 03 May 2015 22:03:04 +0000 Date: Sun, 03 May 2015 22:03:04 +0000 Message-Id: To: groff-commit@gnu.org Subject: [groff] 01/01: Fix Savannah bug #44768 (Solaris 10 compatibility issues). MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit In-Reply-To: groff@gnu.org References: <20150503220304.9504.30885@vcs.savannah.gnu.org> X-Git-Repo: groff X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Rev: 64db09953a9f725077c4697bc290906f9770a80d Auto-Submitted: auto-generated From: Bertrand Garrigues X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.72 X-BeenThere: groff-commit@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: groff@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 May 2015 22:03:09 -0000 bgarrigues pushed a commit to branch master in repository groff. commit 64db09953a9f725077c4697bc290906f9770a80d Author: Bertrand Garrigues Date: Mon May 4 00:01:35 2015 +0200 Fix Savannah bug #44768 (Solaris 10 compatibility issues). * m4/groff.m4 (GROFF_DIFF_D): new macro to check if `diff' has option -D, and search for `gdiff' if not (new variable DIFF_PROG will contain the `diff' program to be used). * m4/groff.m4 (GROFF_HAVE_TEST_EF_OPTION): new macro to check if `test' supports the option -ef (created new variable HAVE_TEST_EF_OPTION). * m4/groff.m4 (GROFF_BASH): new macro to search for `bash' (new variable BASH_PROG will contain the full path to `bash' or `/bin/sh' if `bash' was not found). * configure.ac: use the 3 new macros defined in m4/groff.m4. * contrib/gdiffmk/gdiffmk.am: set HAVE_TEST_EF_OPTION, BASH_PROG, DIFF_PROG in the generated script `gdiffmk'. * contrib/gdiffmk/gdiffmk.sh: - Fix incorrect space after '!' in sed script regex. - `test -ef' is not portable: If `bash' is not available and the shell does not support `test -ef', the option to pass a third argument as the output file is disabled. - Report an error if `diff' does not support -D option. - GNU diff and Solaris diff support -D, but #ifndef / #endif are treated differently (GNU adds a '!' in the #endif): modify the regexs in the sed script accordingly. --- ChangeLog | 33 ++++++++++++++++++++++++++++++++- configure.ac | 3 +++ contrib/gdiffmk/gdiffmk.am | 3 +++ contrib/gdiffmk/gdiffmk.sh | 35 ++++++++++++++++++++++++----------- m4/groff.m4 | 39 +++++++++++++++++++++++++++++++++++++++ 5 files changed, 101 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2b7a18a..0cafdd0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,34 @@ +2015-05-03 Bertrand Garrigues + + Fix Savannah bug #44768 (Solaris 10 compatibility issues). + + * m4/groff.m4 (GROFF_DIFF_D): new macro to check if `diff' has + option -D, and search for `gdiff' if not (new variable DIFF_PROG + will contain the `diff' program to be used). + + * m4/groff.m4 (GROFF_HAVE_TEST_EF_OPTION): new macro to check if + `test' supports the option -ef (created new variable + HAVE_TEST_EF_OPTION). + + * m4/groff.m4 (GROFF_BASH): new macro to search for `bash' (new + variable BASH_PROG will contain the full path to `bash' or + `/bin/sh' if `bash' was not found). + + * configure.ac: use the 3 new macros defined in m4/groff.m4. + + * contrib/gdiffmk/gdiffmk.am: set HAVE_TEST_EF_OPTION, BASH_PROG, + DIFF_PROG in the generated script `gdiffmk'. + + * contrib/gdiffmk/gdiffmk.sh: + - Fix incorrect space after '!' in sed script regex. + - `test -ef' is not portable: If `bash' is not available and the + shell does not support `test -ef', the option to pass a third + argument as the output file is disabled. + - Report an error if `diff' does not support -D option. + - GNU diff and Solaris diff support -D, but #ifndef / #endif are + treated differently (GNU adds a '!' in the #endif): modify the + regexs in the sed script accordingly. + 2015-05-01 Werner LEMBERG * tmac/tmac.am (TMACNORMALFILES): Add `zh.tmac'. @@ -16,7 +47,7 @@ * src/devices/gropdf/gropdf.pl: If module Compress::Zlib is not available fallback to producing uncompressed PDF and output a warning. - + 2015-04-22 Bjarni Ingi Gislason Fix Savannah bug #44894. diff --git a/configure.ac b/configure.ac index 74b27aa..e25548f 100644 --- a/configure.ac +++ b/configure.ac @@ -171,6 +171,9 @@ GROFF_HTML_PROGRAMS GROFF_PDFDOC_PROGRAMS GROFF_PNMTOPS_NOSETPAGE GROFF_MAKE_RM +GROFF_DIFF_D +GROFF_HAVE_TEST_EF_OPTION +GROFF_BASH gl_GLIBC21 gl_LOCALCHARSET diff --git a/contrib/gdiffmk/gdiffmk.am b/contrib/gdiffmk/gdiffmk.am index d69f566..0308bd1 100644 --- a/contrib/gdiffmk/gdiffmk.am +++ b/contrib/gdiffmk/gdiffmk.am @@ -47,6 +47,9 @@ EXTRA_DIST += \ gdiffmk: $(gdiffmk_srcdir)/gdiffmk.sh sed -e "s|[@]BINDIR[@]|$(bindir)|g" \ -e "s|[@]VERSION[@]|$(VERSION)|g" \ + -e "s|[@]HAVE_TEST_EF_OPTION[@]|$(HAVE_TEST_EF_OPTION)|g" \ + -e "s|[@]BASH_PROG[@]|$(BASH_PROG)|g" \ + -e "s|[@]DIFF_PROG[@]|$(DIFF_PROG)|g" \ -e $(SH_SCRIPT_SED_CMD) $(gdiffmk_srcdir)/gdiffmk.sh >$@ chmod +x $@ diff --git a/contrib/gdiffmk/gdiffmk.sh b/contrib/gdiffmk/gdiffmk.sh index 4b01538..5f6ce00 100644 --- a/contrib/gdiffmk/gdiffmk.sh +++ b/contrib/gdiffmk/gdiffmk.sh @@ -1,4 +1,4 @@ -#! /bin/sh +#!@BASH_PROG@ # Copyright (C) 2004-2014 Free Software Foundation, Inc. # Written by Mike Bianchi > # Thanks to Peter Bray for debugging. @@ -39,6 +39,8 @@ groff \`.mc' requests added to indicate how it is different from FILE1. Either FILE1 or FILE2 can be standard input, but not both. OUTPUT Copy of FILE2 with \`.mc' commands added. \`-' means standard output (the default). + If the shell's 'test' does not support option -ef, OUTPUT + can only be the standard output. OPTIONS: -a ADDMARK Mark for added groff source lines. Default: \`+'. @@ -55,7 +57,7 @@ OPTIONS: -x DIFFCMD Use a different diff(1) command; one that accepts the \`-Dname' option, such as GNU diff. -s SEDCMD Use a different sed(1) command; - one that accepts ????????????????????, such as GNU sed. + such as GNU sed. --version Print version information on the standard output and exit. --help Print this message on the standard error. " @@ -126,11 +128,19 @@ WouldClobber () { ;; esac - if test "$1" -ef "$3" + # BASH_PROG is set to /bin/sh if bash was not found + if test "$HAVE_TEST_EF_OPTION" = "no" -a "$BASH_PROG" = "/bin/sh" then Exit 3 \ - "The $2 and OUTPUT arguments both point to the same file," \ - "\`$1', and it would be overwritten." + "Your shell does support test -ef, [OUTPUT] can only be the" \ + "standard output." + else + if test "$1" -ef "$3" + then + Exit 3 \ + "The $2 and OUTPUT arguments both point to the same file," \ + "\`$1', and it would be overwritten." + fi fi } @@ -159,8 +169,10 @@ RequiresArgument () { return 0 } +HAVE_TEST_EF_OPTION=@HAVE_TEST_EF_OPTION@ +BASH_PROG=@BASH_PROG@ BADOPTION= -DIFFCMD=diff +DIFFCMD=@DIFF_PROG@ SEDCMD=sed D_option= br=.br @@ -232,7 +244,8 @@ done ${DIFFCMD} -Dx /dev/null /dev/null >/dev/null 2>&1 || Usage "The \`${DIFFCMD}' program does not accept" \ "the required \`-Dname' option. -Use GNU diff instead. See the \`-x DIFFCMD' option." +Use GNU diff instead. See the \`-x DIFFCMD' option. You can also +install GNU diff as gdiff on your system" if test -n "${BADOPTION}" then @@ -289,7 +302,7 @@ SED_SCRIPT=' p d } - /^#endif \/\* \(not\|!\) '"${LABEL}"'/ { + /^#endif \/\* [!not ]*'"${LABEL}"'/ { s/.*/.mc '"${DELETEMARK}"'/p a\ .mc @@ -314,8 +327,8 @@ then '"${MARK1}"' d } - /^#else \/\* '"${LABEL}"'/ ! { - /^#endif \/\* [!not ]*'"${LABEL}"'/ ! { + /^#else \/\* '"${LABEL}"'/ !{ + /^#endif \/\* [!not ]*'"${LABEL}"'/ !{ p d } @@ -334,7 +347,7 @@ then p d } - /^#endif \/\* \(not\|!\) '"${LABEL}"'/ { + /^#endif \/\* [!not ]*'"${LABEL}"'/ { i\ '"${MARK2}"'\ '"${br}"' diff --git a/m4/groff.m4 b/m4/groff.m4 index 166278c..7d9350a 100644 --- a/m4/groff.m4 +++ b/m4/groff.m4 @@ -1372,3 +1372,42 @@ EOF groff_is_rm_defined=`make -sf test_make_rm.mk` AC_MSG_RESULT([$groff_is_rm_defined]) rm -f test_make_rm.mk]) + +# Check if diff has option -D, for gdiffmk. If not, check if gdiff is +# available on the system and make the same test. If either diff or +# gdiff is working, it is set to DIFF_PROG. If -D option is not +# available, DIFF_PROG is left to diff (gdiffmk will report a +# problem). +AC_DEFUN([GROFF_DIFF_D], + [AC_MSG_CHECKING(for a diff program that supports option -D) + groff_has_diff_d_option=no + DIFF_PROG=diff + diff -Dx /dev/null /dev/null >/dev/null 2>&1 && groff_has_diff_d_option=yes + if test "$groff_has_diff_d_option" = no; then + AC_CHECK_PROGS([GDIFF], [gdiff]) + if test -n "$GDIFF"; then + "$GDIFF" -Dx /dev/null /dev/null >/dev/null 2>&1 && groff_has_diff_d_option=yes + if test "$groff_has_diff_d_option" = yes; then + DIFF_PROG="$GDIFF" + fi + fi + fi + AC_MSG_RESULT([$groff_has_diff_d_option]) + AC_SUBST([DIFF_PROG])]) + +# Check if `test' supports the option -ef. +AC_DEFUN([GROFF_HAVE_TEST_EF_OPTION], + [AC_MSG_CHECKING(whether test supports option -ef) + HAVE_TEST_EF_OPTION=no + test /dev/null -ef /dev/null > /dev/null 2>&1 && HAVE_TEST_EF_OPTION=yes + AC_MSG_RESULT([$HAVE_TEST_EF_OPTION]) + AC_SUBST([HAVE_TEST_EF_OPTION])]) + +# gdiffmk will attempt to use bash (for option -ef of 'test'). If bash +# is not available it will use /bin/sh. +AC_DEFUN([GROFF_BASH], + [AC_PATH_PROGS([BASH_PROG], [bash], [no]) + if test x$BASH_PROG = xno; then + BASH_PROG=/bin/sh + fi + AC_SUBST([BASH_PROG])]) From MAILER-DAEMON Fri May 08 09:14:43 2015 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1Yqi71-0006nK-8l for mharc-groff-commit@gnu.org; Fri, 08 May 2015 09:14:43 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36252) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yqi6y-0006n4-Qx for groff-commit@gnu.org; Fri, 08 May 2015 09:14:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yqi6w-0002PQ-Rp for groff-commit@gnu.org; Fri, 08 May 2015 09:14:40 -0400 Received: from vcs.savannah.gnu.org ([140.186.70.72]:33666) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yqi6w-0002PM-O4 for groff-commit@gnu.org; Fri, 08 May 2015 09:14:38 -0400 Received: from wl by vcs.savannah.gnu.org with local (Exim 4.72) (envelope-from ) id 1Yqi6w-0003uI-2J for groff-commit@gnu.org; Fri, 08 May 2015 13:14:38 +0000 Date: Fri, 08 May 2015 13:14:38 +0000 Message-Id: To: groff-commit@gnu.org Subject: [groff] 01/01: [groff] Make relocation really work. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit In-Reply-To: groff@gnu.org References: <20150508131438.14986.55061@vcs.savannah.gnu.org> X-Git-Repo: groff X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Rev: f9de108233d08be2dbdb7e2e5e068a0dbbd257fc Auto-Submitted: auto-generated From: Werner LEMBERG X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.72 X-BeenThere: groff-commit@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: groff@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 May 2015 13:14:42 -0000 wl pushed a commit to branch master in repository groff. commit f9de108233d08be2dbdb7e2e5e068a0dbbd257fc Author: Eli Zaretskii Date: Fri May 8 15:14:16 2015 +0200 [groff] Make relocation really work. See https://lists.gnu.org/archive/html/groff/2015-05/msg00000.html * src/roff/groff/groff.cpp: Include `relocate.h'. (main): Use `relocatep'. --- ChangeLog | 19 +++++++++++++++---- src/roff/groff/groff.cpp | 7 +++++-- 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0cafdd0..022f006 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,15 @@ -2015-05-03 Bertrand Garrigues +2015-05-08 Eli Zaretskii + + [groff] Make relocation really work. + + See + + https://lists.gnu.org/archive/html/groff/2015-05/msg00000.html + + * src/roff/groff/groff.cpp: Include `relocate.h'. + (main): Use `relocatep'. + +2015-05-03 Bertrand Garrigues Fix Savannah bug #44768 (Solaris 10 compatibility issues). @@ -131,7 +142,7 @@ * tmac/doc-common-u (Dt): Remove invalid leading whitespace. -2015-03-11 Deri James +2015-03-11 Deri James * src/devices/gropdf/gropdf.pl: Was not handling the final glyph correctly in the "standard" fonts which are not embedded. They @@ -139,7 +150,7 @@ remappiing code needs to be applied for them as well as the embedded downloadable fonts. -2015-03-11 Deri James +2015-03-11 Deri James * src/devices/gropdf/gropdf.pl: Fix problem remappiing ellipsis (affects all glyphs > 255). @@ -1700,7 +1711,7 @@ Version 1.22.3 released ($(SHPROGDIRS):): Add to existing rule. ($(OTHERDIRS):): Depend on $(SHPROGDIRS). -2013-12-08 Eric S. Raymond +2013-12-08 Eric S. Raymond Repository fully converted to git. diff --git a/src/roff/groff/groff.cpp b/src/roff/groff/groff.cpp index cd6e293..b36ceae 100644 --- a/src/roff/groff/groff.cpp +++ b/src/roff/groff/groff.cpp @@ -34,6 +34,7 @@ along with this program. If not, see . */ #include "device.h" #include "pipeline.h" #include "nonposix.h" +#include "relocate.h" #include "defs.h" #define GXDITVIEW "gxditview" @@ -469,8 +470,10 @@ int main(int argc, char **argv) f += '='; if (binpath && *binpath) f += binpath; - else - f += BINPATH; + else { + binpath = relocatep(BINPATH); + f += binpath; + } if (path && *path) { f += PATH_SEP_CHAR; f += path;