All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Torsten Bögershausen" <tboegi@web.de>
Cc: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>, git@vger.kernel.org
Subject: Re: Re*: [PATCH/RFC] Change t0204-gettext-reencode-sanity.sh to pass under Mac OSX
Date: Sun, 11 Mar 2012 14:38:42 -0700	[thread overview]
Message-ID: <7vzkbmvmvx.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <4F5D14CD.6080507@web.de> ("Torsten =?utf-8?Q?B=C3=B6gershaus?= =?utf-8?Q?en=22's?= message of "Sun, 11 Mar 2012 22:10:37 +0100")

Torsten Bögershausen <tboegi@web.de> writes:

> On 03/11/2012 08:22 PM, Junio C Hamano wrote:
> ...
>>   * Is USE_GETTEXT_SCHEME=gnu the right thing for Mac OS X?  It may
>>     make this test pass, but does it not break other things?  Does
>>     Mac OS X come with a working gettext.sh to help i18n of shell
>>     scripts?  Does it also give eval_gettext?
> When I remember it right, the following comes from the Fink
> installation on my machine:
> which gettext
> /sw/bin/gettext
>
> which gettext.sh
> /sw/bin/gettext.sh
>
> None of the machines here (Mac OS X, Ubuntu 10.04.4 LTS, OpenSuse 12.1)
> has a eval_gettext

No, we do not expect a standalone eval_gettext program.  If you
dot-source gettext.sh, some systems give you the eval_gettext shell
function, while there are other systems that don't.  Gnu systems
that ship with /usr/bin/gettext.sh do give you eval_gettext while
Solaris is known not to. I do not know what your system does, and
that was what the question was about.  What does this say there?

	$ (. gettext.sh; eval_gettext frotz; echo $?)

>>   * If so, Mac OS X users shouldn't have to say that from the command
>>     line of "make". Do we need a Makefile update?
> Good question.
> I couldn't find any setup of USE_GETTEXT_SCHEME in Makefile
> (except when NO_GETTEXT is set), do I need to run configure?
> So far the Makefile worked for all my systems here.

You shouldn't have to muck with autoconf around here. It is one of
the design goals of our Makefile to work out of the box on major
platforms as long as the prerequisites like POSIX compliant tools
and use of GNU make are met. An optional configure support comes
into the picture only once we know what we want to have in the
Makefile to be tweaked.

Also, as you noticed, even though we mention USE_GETTEXT_SCHEME in
the Makefile, no platforms with explicit support needs to tweak it;
if git-sh-i18n.sh can figure out what to do without having to rely
on any tweak in the Makefile, we would prefer to keep it that way.

What is curious about your system is that git-sh-i18n.sh should have
figured out that you want INTERNAL_GETTEXT_SH_SCHEME to be gnu by
itself, without any need for "make USE_GETTEXT_SCHEME=gnu", with
these lines:

                ...
        elif type gettext.sh >/dev/null 2>&1
        then
                # GNU libintl's gettext.sh
                GIT_INTERNAL_GETTEXT_SH_SCHEME=gnu
        elif test ...

as long as you have /sw/bin/gettext.sh on your PATH, that is.

So I am not sure what's broken.

>>   * If not, what is the appropriate value for USE_GETTEXT_SCHEME on=
>>     Mac OS X?  If the answer is not "fallthrough", do we need a
>>     Makefile update?
> My guess is that "gettext_without_eval_gettext" would be right
> (if we have Fink installed)

Are you sure that after dot-sourcing /sw/bin/gettext.sh, you do not
have eval_gettext?  If you do, then I think it can be set to gnu.

Ævar, I am wondering if the auto-detection part of git-sh-i18n
should read more like this to make sure when we declare gnu we know
eval_gettext is available.  What do you think?

 git-sh-i18n.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/git-sh-i18n.sh b/git-sh-i18n.sh
index d5fae99..a17688b 100644
--- a/git-sh-i18n.sh
+++ b/git-sh-i18n.sh
@@ -27,7 +27,7 @@ then
 elif test -n "$GIT_GETTEXT_POISON"
 then
 	GIT_INTERNAL_GETTEXT_SH_SCHEME=poison
-elif type gettext.sh >/dev/null 2>&1
+elif (. gettext.sh && eval_gettext frotz) >/dev/null 2>&1
 then
 	# GNU libintl's gettext.sh
 	GIT_INTERNAL_GETTEXT_SH_SCHEME=gnu

  reply	other threads:[~2012-03-11 21:38 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-05 19:39 [PATCH/RFC] Change t0204-gettext-reencode-sanity.sh to pass under Mac OSX Torsten Bögershausen
2012-03-05 20:39 ` Junio C Hamano
2012-03-07 21:03   ` Ævar Arnfjörð Bjarmason
2012-03-07 21:34     ` Junio C Hamano
2012-03-07 21:43       ` Ævar Arnfjörð Bjarmason
2012-03-07 21:58         ` Junio C Hamano
2012-03-07 22:04           ` Ævar Arnfjörð Bjarmason
2012-03-07 23:36             ` Junio C Hamano
2012-03-07 23:42               ` Junio C Hamano
2012-03-08  5:54               ` Torsten Bögershausen
2012-03-08  7:23                 ` Johannes Sixt
2012-03-08  9:21                   ` Torsten Bögershausen
2012-03-08 12:07                     ` Torsten Bögershausen
2012-03-09 22:30               ` Re*: " Junio C Hamano
2012-03-10 22:28                 ` Torsten Bögershausen
2012-03-11  6:36                   ` Junio C Hamano
2012-03-11 15:11                   ` Torsten Bögershausen
2012-03-11 19:22                     ` Junio C Hamano
2012-03-11 21:10                       ` Torsten Bögershausen
2012-03-11 21:38                         ` Junio C Hamano [this message]
2012-03-12 20:58                           ` Torsten Bögershausen
2012-03-12 21:25                             ` Junio C Hamano
2012-03-13 19:19                               ` Torsten Bögershausen
2012-03-13 19:32                                 ` Junio C Hamano
2012-03-12  5:46                     ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7vzkbmvmvx.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=tboegi@web.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.