[PATCH] configure.ac: link with -liconv for locale_charset()

2014-03-11 Thread Dmitry Marakasov
On e.g. FreeBSD 10.x, the following situation is common:
- there's iconv implementation in libc, which has no locale_charset()
  function
- there's GNU libiconv installed from Ports Collection

Git build process
- detects that iconv is in libc and thus -liconv is not needed for it
- detects locale_charset in -liconv, but for some reason doesn't add it
  to CHARSET_LIB (as it would do with -lcharset if locale_charset() was
  found there instead of -liconv)
- git doesn't build due to unresolved external locale_charset()

Fix this by adding -liconv to CHARSET_LIB if locale_charset() is
detected in this library.

Signed-off-by: Dmitry Marakasov amd...@amdmi3.ru
---
 configure.ac | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git configure.ac configure.ac
index 2f43393..3f5c644 100644
--- configure.ac
+++ configure.ac
@@ -890,7 +890,7 @@ GIT_CONF_SUBST([HAVE_STRINGS_H])
 # and libcharset does
 CHARSET_LIB=
 AC_CHECK_LIB([iconv], [locale_charset],
-   [],
+   [CHARSET_LIB=-liconv],
[AC_CHECK_LIB([charset], [locale_charset],
  [CHARSET_LIB=-lcharset])])
 GIT_CONF_SUBST([CHARSET_LIB])
-- 
1.9.0

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] configure.ac: link with -liconv for locale_charset()

2014-03-11 Thread Dmitry Marakasov
* Junio C Hamano (gits...@pobox.com) wrote:

  On e.g. FreeBSD 10.x, the following situation is common:
  - there's iconv implementation in libc, which has no locale_charset()
function
  - there's GNU libiconv installed from Ports Collection
 
  Git build process
  - detects that iconv is in libc and thus -liconv is not needed for it
  - detects locale_charset in -liconv, but for some reason doesn't add it
to CHARSET_LIB (as it would do with -lcharset if locale_charset() was
found there instead of -liconv)
  - git doesn't build due to unresolved external locale_charset()
 
  Fix this by adding -liconv to CHARSET_LIB if locale_charset() is
  detected in this library.
 
  Signed-off-by: Dmitry Marakasov amd...@amdmi3.ru
  ---
 
 Looks sensible; Dilyan, any comments?

Addendum: build logs before and after the fix:

http://people.freebsd.org/~amdmi3/git-iconv-fail.log
http://people.freebsd.org/~amdmi3/git-iconv-fixed.log

-- 
Dmitry Marakasov   .   55B5 0596 FF1E 8D84 5F56  9510 D35A 80DD F9D2 F77D
amd...@amdmi3.ru  ..:  jabber: amd...@jabber.ruhttp://www.amdmi3.ru
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] configure.ac: link with -liconv for locale_charset()

2014-03-11 Thread Dmitry Marakasov
* Junio C Hamano (gits...@pobox.com) wrote:

 Looks sensible; Dilyan, any comments?

Another addendum, comment from Tijl Coosemans t...@freebsd.org who
just fixed this problem in FreeBSD ports (differently):

---
Please let upstream know they should either use iconv from libc +
nl_langinfo from libc, or iconv from libiconv + locale_charset from
libiconv, but not mix the two.  Actually they could just always use
nl_langinfo when it's available because locale_charset is not much
more than an alias for it.
---

The fix used in ports was to just disable check for libcharset.h:

http://www.freebsd.org/cgi/query-pr.cgi?pr=187326#reply3

-- 
Dmitry Marakasov   .   55B5 0596 FF1E 8D84 5F56  9510 D35A 80DD F9D2 F77D
amd...@amdmi3.ru  ..:  jabber: amd...@jabber.ruhttp://www.amdmi3.ru
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] contrib/git-subtree: Use /bin/sh interpreter instead of /bin/bash

2013-05-20 Thread Dmitry Marakasov
Use /bin/sh interpreter instead of /bin/bash for contrib/git-subtree:
it's required for systems which don't use bash by default (for example,
FreeBSD), while there seem to be no bashisms in the script (confirmed
by looking through the source and tesing subtree functionality with
FreeBSD's /bin/sh) to require specifically bash and not the generic
posix shell.

Signed-off-by: Dmitry Marakasov amd...@amdmi3.ru
---
 contrib/subtree/git-subtree.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/contrib/subtree/git-subtree.sh b/contrib/subtree/git-subtree.sh
index 8a23f58..5701376 100755
--- a/contrib/subtree/git-subtree.sh
+++ b/contrib/subtree/git-subtree.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 #
 # git-subtree.sh: split/join git repositories in subdirectories of this one
 #
-- 
1.8.2.3
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html