Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 29 May 2001 17:07:33 +0300
From:      Maxim Sobolev <sobomax@FreeBSD.ORG>
To:        Konstantin Chuguev <Konstantin.Chuguev@dante.org.uk>
Cc:        ports@FreeBSD.ORG, demon@FreeBSD.ORG, gnome@FreeBSD.ORG
Subject:   Re: devel/gettext upgrade [patch]
Message-ID:  <3B13AD24.9C59C0A9@FreeBSD.org>
References:  <200105291031.f4TAVLt05758@vega.vega.com> <3B13A3BA.E8506681@dante.org.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.
--------------9CFCEAD237C75C6A4EE7E050
Content-Type: text/plain; charset=koi8-r
Content-Transfer-Encoding: 7bit

Konstantin Chuguev wrote:

> Maxim Sobolev wrote:
>
> > Hi folks,
> >
> > Since I did not receive any response from demon regarding my
> > comments on his patch I've picked up the ball and did the work
> > by myself. Attached please find resulting patch, please review
> > it and let me know what do you think. Following are major changes
> > compared to demon's version:
> >
> > - GNU iconv library used instead of BSD iconv. Unfortunately
> >   due to some strange reason gettext doesn't work with BSD
> >   iconv. For example when I'm defining LANG env. variable to
> >   ru_RU.KOI8-R I see `____' instead of Russian messages in
> >   all localised programs linked against libintl. This problem
> >   disappears when GNU iconv is used instead. I hope Konstantin
> >   will look into this problem and provide a fix before his
> >   BSD iconv will be imported into base system;
> >
>
> I'd like to see some details. In the current implementation, '_' is used for
> characters non-existent in a destination charset. Conversion is completely
> locale-independent, i.e. always produces the same result for particular pair
> (src_charset, dst_charset), no matter what LANG and LC_* are set to.
> I believe this is something to do with gettext's use of iconv. Where can I
> get the new gettext to look at?

Attached please find a patch for the surrent gettext port. Just remove old
gettext, build/install new, build some gettext program and try to get some non-en
messages from it.

> >
> > - PLIST is now sorted properly;
> >
> > - charset.alias now being installed into libdata/ where it
> >   belongs instead of lib/;
> >
>
> Here is another thing: iconv also uses (its own) charset.aliases. I wonder if
> it would be useful to merge them into one file...

Maybe, lets address it when the first problem is solved.

-Maxim

--------------9CFCEAD237C75C6A4EE7E050
Content-Type: text/plain; charset=koi8-r;
 name="gettext-bsdiconv.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="gettext-bsdiconv.diff"

Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/devel/gettext/Makefile,v
retrieving revision 1.21
diff -d -u -r1.21 Makefile
--- Makefile	2000/06/16 21:49:54	1.21
+++ Makefile	2001/05/29 14:03:42
@@ -6,17 +6,25 @@
 #
 
 PORTNAME=	gettext
-PORTVERSION=	0.10.35
+PORTVERSION=	0.10.38
 CATEGORIES=	devel
 MASTER_SITES=	${MASTER_SITE_GNU}
 MASTER_SITE_SUBDIR=	gettext
 
 MAINTAINER=	reg@FreeBSD.org
 
+LIB_DEPENDS=	iconv.2:${PORTSDIR}/converters/iconv
+
 USE_LIBTOOL=	yes
 INSTALLS_SHLIB=	yes
+CONFIGURE_ENV=	CPPFLAGS="-I${LOCALBASE}/include" \
+		LDFLAGS="-L${LOCALBASE}/lib"
 
 PLIST_SUB=	LOCALBASE=${LOCALBASE} X11BASE=${X11BASE}
+
+MAN3=		bind_textdomain_codeset.3 bindtextdomain.3 dcgettext.3 \
+		dcngettext.3 dgettext.3 dngettext.3 gettext.3 ngettext.3 \
+		textdomain.3
 
 pre-configure:
 	${RM} ${WRKSRC}/doc/gettext.info*
Index: distinfo
===================================================================
RCS file: /home/ncvs/ports/devel/gettext/distinfo,v
retrieving revision 1.2
diff -d -u -r1.2 distinfo
--- distinfo	1998/12/01 22:38:45	1.2
+++ distinfo	2001/05/29 14:03:42
@@ -1 +1 @@
-MD5 (gettext-0.10.35.tar.gz) = f29d32b82217b9d89fcda66328752acc
+MD5 (gettext-0.10.38.tar.gz) = c807f357ea5e5324adf7ad3d52c40c84
Index: pkg-plist
===================================================================
RCS file: /home/ncvs/ports/devel/gettext/pkg-plist,v
retrieving revision 1.17
diff -d -u -r1.17 pkg-plist
--- pkg-plist	2000/06/16 10:37:52	1.17
+++ pkg-plist	2001/05/29 14:03:42
@@ -5,26 +5,56 @@
 bin/msgfmt
 bin/msgmerge
 bin/msgunfmt
+bin/ngettext
 bin/xgettext
+include/libintl.h
 @unexec install-info --delete %D/info/gettext.info %D/info/dir
 info/gettext.info
 @exec install-info %D/info/gettext.info %D/info/dir
-include/libintl.h
 lib/libintl.a
 lib/libintl.so
 lib/libintl.so.1
+libdata/charset.alias
+share/aclocal/codeset.m4
 share/aclocal/gettext.m4
+share/aclocal/glibc21.m4
+share/aclocal/iconv.m4
+share/aclocal/isc-posix.m4
 share/aclocal/lcmessage.m4
 share/aclocal/progtest.m4
+share/doc/gettext/bind_textdomain_codeset.3.html
+share/doc/gettext/bindtextdomain.3.html
+share/doc/gettext/gettext.3.html
+share/doc/gettext/gettext_1.html
+share/doc/gettext/gettext_10.html
+share/doc/gettext/gettext_11.html
+share/doc/gettext/gettext_12.html
+share/doc/gettext/gettext_13.html
+share/doc/gettext/gettext_14.html
+share/doc/gettext/gettext_2.html
+share/doc/gettext/gettext_3.html
+share/doc/gettext/gettext_4.html
+share/doc/gettext/gettext_5.html
+share/doc/gettext/gettext_6.html
+share/doc/gettext/gettext_7.html
+share/doc/gettext/gettext_8.html
+share/doc/gettext/gettext_9.html
+share/doc/gettext/gettext_foot.html
+share/doc/gettext/gettext_toc.html
+share/doc/gettext/ngettext.3.html
+share/doc/gettext/textdomain.3.html
+share/emacs/site-lisp/po-mode.el
 share/gettext/ABOUT-NLS
-share/gettext/po/Makefile.in.in
 share/gettext/intl/ChangeLog
 share/gettext/intl/Makefile.in
 share/gettext/intl/VERSION
 share/gettext/intl/bindtextdom.c
-share/gettext/intl/cat-compat.c
+share/gettext/intl/config.charset
 share/gettext/intl/dcgettext.c
+share/gettext/intl/dcigettext.c
+share/gettext/intl/dcngettext.c
 share/gettext/intl/dgettext.c
+share/gettext/intl/dngettext.c
 share/gettext/intl/explodename.c
 share/gettext/intl/finddomain.c
 share/gettext/intl/gettext.c
@@ -34,30 +64,49 @@
 share/gettext/intl/intl-compat.c
 share/gettext/intl/l10nflist.c
 share/gettext/intl/libgettext.h
-share/gettext/intl/linux-msg.sed
+share/gettext/intl/libgnuintl.h
 share/gettext/intl/loadinfo.h
 share/gettext/intl/loadmsgcat.c
+share/gettext/intl/localcharset.c
+share/gettext/intl/locale.alias
 share/gettext/intl/localealias.c
-share/gettext/intl/po2tbl.sed.in
-share/gettext/intl/xopen-msg.sed
+share/gettext/intl/ngettext.c
+share/gettext/intl/plural.c
+share/gettext/intl/plural.y
+share/gettext/intl/ref-add.sin
+share/gettext/intl/ref-del.sin
 share/gettext/intl/textdomain.c
+share/gettext/po/Makefile.in.in
+share/locale/cs/LC_MESSAGES/gettext.mo
 share/locale/da/LC_MESSAGES/gettext.mo
 share/locale/de/LC_MESSAGES/gettext.mo
+share/locale/el/LC_MESSAGES/gettext.mo
+share/locale/en@boldquot/LC_MESSAGES/gettext.mo
+share/locale/en@quot/LC_MESSAGES/gettext.mo
 share/locale/es/LC_MESSAGES/gettext.mo
+share/locale/et/LC_MESSAGES/gettext.mo
 share/locale/fr/LC_MESSAGES/gettext.mo
+share/locale/gl/LC_MESSAGES/gettext.mo
+share/locale/id/LC_MESSAGES/gettext.mo
+share/locale/it/LC_MESSAGES/gettext.mo
+share/locale/ja/LC_MESSAGES/gettext.mo
 share/locale/ko/LC_MESSAGES/gettext.mo
+share/locale/locale.alias
 share/locale/nl/LC_MESSAGES/gettext.mo
+share/locale/nn/LC_MESSAGES/gettext.mo
 share/locale/no/LC_MESSAGES/gettext.mo
-share/locale/no@nynorsk/LC_MESSAGES/gettext.mo
 share/locale/pl/LC_MESSAGES/gettext.mo
 share/locale/pt/LC_MESSAGES/gettext.mo
+share/locale/pt_BR/LC_MESSAGES/gettext.mo
+share/locale/ru/LC_MESSAGES/gettext.mo
 share/locale/sl/LC_MESSAGES/gettext.mo
 share/locale/sv/LC_MESSAGES/gettext.mo
-share/locale/locale.alias
-share/emacs/site-lisp/po-mode.el
-@dirrm share/gettext/intl
+share/locale/tr/LC_MESSAGES/gettext.mo
+share/locale/zh/LC_MESSAGES/gettext.mo
 @dirrm share/gettext/po
+@dirrm share/gettext/intl
 @dirrm share/gettext
+@dirrm share/doc/gettext
 @unexec rmdir %D/share/locale/*/LC_MESSAGES 2>/dev/null || true
 @unexec rmdir %D/share/locale/* 2>/dev/null || true
 @unexec rmdir %D/share/locale 2>/dev/null || true
Index: files/patch-ad
===================================================================
RCS file: /home/ncvs/ports/devel/gettext/files/patch-ad,v
retrieving revision 1.2
diff -d -u -r1.2 patch-ad
--- files/patch-ad	1998/12/06 15:30:16	1.2
+++ files/patch-ad	2001/05/29 14:03:42
@@ -11,14 +11,3 @@
  	  else : ; fi; \
  	done
  
---- doc/Makefile.in.orig	Thu Dec  3 20:12:35 1998
-+++ doc/Makefile.in	Thu Dec  3 20:12:51 1998
-@@ -79,7 +79,7 @@
- LIBOBJS = @LIBOBJS@
- LIBTOOL = @LIBTOOL@
- LN_S = @LN_S@
--MAKEINFO = @MAKEINFO@
-+MAKEINFO = @MAKEINFO@ --no-split
- MKINSTALLDIRS = @MKINSTALLDIRS@
- MSGFMT = @MSGFMT@
- NM = @NM@
Index: files/patch-ae
===================================================================
RCS file: /home/ncvs/ports/devel/gettext/files/patch-ae,v
retrieving revision 1.4
diff -d -u -r1.4 patch-ae
--- files/patch-ae	2000/01/22 08:20:01	1.4
+++ files/patch-ae	2001/05/29 14:03:42
@@ -1,6 +1,9 @@
---- configure.orig	Fri May  1 07:48:25 1998
-+++ configure	Wed Feb 17 02:05:55 1999
-@@ -837,13 +837,13 @@
+
+$FreeBSD$
+
+--- configure.orig	Wed May 23 23:48:44 2001
++++ configure	Tue May 29 11:11:43 2001
+@@ -980,13 +980,13 @@
  # Run test in a subshell; some versions of sh will print an error if
  # an executable is not found, even if stderr is redirected.
  # Redirect stdin to placate older versions of autoconf.  Sigh.
@@ -18,8 +21,8 @@
 +#fi
  
  echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
- echo "configure:850: checking for working autoconf" >&5
-@@ -863,13 +863,13 @@
+ echo "configure:993: checking for working autoconf" >&5
+@@ -1006,13 +1006,13 @@
  # Run test in a subshell; some versions of sh will print an error if
  # an executable is not found, even if stderr is redirected.
  # Redirect stdin to placate older versions of autoconf.  Sigh.
@@ -37,17 +40,8 @@
 +#fi
  
  echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
- echo "configure:876: checking for working autoheader" >&5
-@@ -3958,7 +3958,7 @@
-    fi
-    
- 
--      l=
-+      l=l
-    
- 
-          test -d po || mkdir po
-@@ -4004,7 +4004,7 @@
+ echo "configure:1019: checking for working autoheader" >&5
+@@ -4855,7 +4855,7 @@
    ;;
  esac
  fi
Index: files/patch-af
===================================================================
RCS file: patch-af
diff -N patch-af
--- /tmp/cvslKvnR33947	Tue May 29 07:03:46 2001
+++ /dev/null	Tue May 29 07:00:24 2001
@@ -1,10 +0,0 @@
---- misc/locale.alias.orig	Sat Oct 19 23:40:54 1996
-+++ misc/locale.alias	Thu Dec  3 20:11:52 1998
-@@ -40,6 +40,7 @@
- icelandic       is_IS.ISO-8859-1
- italian         it_CH.ISO-8859-1
- japanese	ja_JP.EUC
-+korean		ko_KR.EUC
- norwegian       no_NO.ISO-8859-1
- polish          pl_PL.ISO-8859-2
- portuguese      pt_PT.ISO-8859-1
Index: files/patch-ah
===================================================================
RCS file: patch-ah
diff -N patch-ah
--- /tmp/cvsIhlfn33947	Tue May 29 07:03:46 2001
+++ /dev/null	Tue May 29 07:00:24 2001
@@ -1,11 +0,0 @@
---- intl/Makefile.in.orig	Wed Feb 17 02:18:40 1999
-+++ intl/Makefile.in	Wed Feb 17 02:30:13 1999
-@@ -119,7 +119,7 @@
- 	    $(top_srcdir)/mkinstalldirs $(libdir) $(includedir); \
- 	  fi; \
- 	  $(INSTALL_DATA) intlh.inst $(includedir)/libintl.h; \
--	  $(INSTALL_DATA) libintl.a $(libdir)/libintl.a; \
-+	  $(LIBTOOL) --mode=install $(INSTALL) libintl.$la $(DESTDIR)$(libdir)/libintl.$la; \
- 	else \
- 	  : ; \
- 	fi
Index: files/patch-ai
===================================================================
RCS file: patch-ai
diff -N patch-ai
--- /tmp/cvsEFSbb33947	Tue May 29 07:03:46 2001
+++ /dev/null	Tue May 29 07:00:24 2001
@@ -1,12 +0,0 @@
---- m4/gettext.m4.orig	Fri Dec 24 20:23:44 1999
-+++ m4/gettext.m4	Fri Dec 24 20:25:52 1999
-@@ -73,6 +73,9 @@
- 		INSTOBJEXT=.mo
- 	      fi
- 	    fi
-+	    if test "$gt_cv_func_gettext_libintl" = "yes"; then
-+		INTLLIBS='-lintl'
-+	    fi
- 	])
- 
-         if test "$CATOBJEXT" = "NONE"; then
Index: files/patch-doc::Makefile.in
===================================================================
RCS file: patch-doc::Makefile.in
diff -N patch-doc::Makefile.in
--- /dev/null	Tue May 29 07:00:24 2001
+++ patch-doc::Makefile.in	Tue May 29 07:03:42 2001
@@ -0,0 +1,23 @@
+
+$FreeBSD$
+
+--- doc/Makefile.in.orig	Wed May 23 23:48:53 2001
++++ doc/Makefile.in	Tue May 29 11:38:28 2001
+@@ -97,7 +97,7 @@
+ aclocaldir = @aclocaldir@
+ lispdir = @lispdir@
+ 
+-docdir = $(prefix)/doc/@PACKAGE@
++docdir = $(prefix)/share/doc/@PACKAGE@
+ dvidir = $(docdir)
+ psdir = $(docdir)
+ pdfdir = $(docdir)
+@@ -108,7 +108,7 @@
+ SED = sed
+ RM = rm -f
+ 
+-MAKEINFO = env LANG= LANGUAGE= @MAKEINFO@
++MAKEINFO = env LANG= LANGUAGE= @MAKEINFO@ --no-split
+ 
+ info_TEXINFOS = gettext.texi
+ gettext_TEXINFOS = iso-639.texi iso-3166.texi
Index: files/patch-intl::Makefile.in
===================================================================
RCS file: patch-intl::Makefile.in
diff -N patch-intl::Makefile.in
--- /dev/null	Tue May 29 07:00:24 2001
+++ patch-intl::Makefile.in	Tue May 29 07:03:42 2001
@@ -0,0 +1,44 @@
+
+$FreeBSD$
+
+--- intl/Makefile.in	2001/05/29 08:54:24	1.1
++++ intl/Makefile.in	2001/05/29 09:00:12
+@@ -51,7 +51,7 @@
+ YFLAGS = --name-prefix=__gettext
+ 
+ DEFS = -DLOCALEDIR=\"$(localedir)\" -DLOCALE_ALIAS_PATH=\"$(aliaspath)\" \
+--DLIBDIR=\"$(libdir)\" @DEFS@
++-DLIBDIR=\"$(prefix)/libdata\" @DEFS@
+ CPPFLAGS = @CPPFLAGS@
+ CFLAGS = @CFLAGS@
+ LDFLAGS = @LDFLAGS@
+@@ -151,11 +151,11 @@
+ 	  : ; \
+ 	fi
+ 	if test '@USE_INCLUDED_LIBINTL@' = yes; then \
+-	  $(mkinstalldirs) $(DESTDIR)$(libdir); \
+-	  temp=$(DESTDIR)$(libdir)/t-charset.alias; \
+-	  dest=$(DESTDIR)$(libdir)/charset.alias; \
+-	  if test -f $(DESTDIR)$(libdir)/charset.alias; then \
+-	    orig=$(DESTDIR)$(libdir)/charset.alias; \
++	  $(mkinstalldirs) $(DESTDIR)$(prefix)/libdata; \
++	  temp=$(DESTDIR)$(prefix)/libdata/t-charset.alias; \
++	  dest=$(DESTDIR)$(prefix)/libdata/charset.alias; \
++	  if test -f $(DESTDIR)$(prefix)/libdata/charset.alias; then \
++	    orig=$(DESTDIR)$(prefix)/libdata/charset.alias; \
+ 	    sed -f ref-add.sed $$orig > $$temp; \
+ 	    $(INSTALL_DATA) $$temp $$dest; \
+ 	    rm -f $$temp; \
+@@ -217,9 +217,9 @@
+ 	  : ; \
+ 	fi
+ 	if test '@USE_INCLUDED_LIBINTL@' = yes; then \
+-	  if test -f $(DESTDIR)$(libdir)/charset.alias; then \
+-	    temp=$(DESTDIR)$(libdir)/t-charset.alias; \
+-	    dest=$(DESTDIR)$(libdir)/charset.alias; \
++	  if test -f $(DESTDIR)$(prefix)/libdata/charset.alias; then \
++	    temp=$(DESTDIR)$(prefix)/libdata/t-charset.alias; \
++	    dest=$(DESTDIR)$(prefix)/libdata/charset.alias; \
+ 	    sed -f ref-del.sed $$dest > $$temp; \
+ 	    if grep '^# Packages using this file: $$' $$temp > /dev/null; then \
+ 	      rm -f $$dest; \
Index: files/patch-lib::Makefile.in
===================================================================
RCS file: patch-lib::Makefile.in
diff -N patch-lib::Makefile.in
--- /dev/null	Tue May 29 07:00:24 2001
+++ patch-lib::Makefile.in	Tue May 29 07:03:46 2001
@@ -0,0 +1,38 @@
+
+$FreeBSD$
+
+--- lib/Makefile.in	2001/05/29 08:54:24	1.1
++++ lib/Makefile.in	2001/05/29 08:59:30
+@@ -116,11 +116,11 @@
+ noinst_HEADERS = c-ctype.h error.h fstrcmp.h getline.h getopt.h hash.h lbrkprop.h linebreak.h mbswidth.h obstack.h printf-parse.h printf.h system.h pathmax.h
+ 
+ 
+-DEFS = -DLIBDIR=\"$(libdir)\" @DEFS@
++DEFS = -DLIBDIR=\"$(prefix)/libdata\" @DEFS@
+ INCLUDES = -I. -I$(srcdir) -I.. -I../intl
+ 
+-charset_alias = $(DESTDIR)$(libdir)/charset.alias
+-charset_tmp = $(DESTDIR)$(libdir)/charset.tmp
++charset_alias = $(DESTDIR)$(prefix)/libdata/charset.alias
++charset_tmp = $(DESTDIR)$(prefix)/libdata/charset.tmp
+ 
+ SUFFIXES = .sed .sin
+ 
+@@ -349,7 +349,7 @@
+ mostlyclean distclean maintainer-clean
+ 
+ 
+-# The following is needed in order to install a simple file in $(libdir)
++# The following is needed in order to install a simple file in $(prefix)/libdata
+ # which is shared with other installed packages. We use a list of referencing
+ # packages so that "make uninstall" will remove the file if and only if it
+ # is not used by another installed package.
+@@ -358,7 +358,7 @@
+ 
+ all-local: charset.alias ref-add.sed ref-del.sed
+ install-exec-local: all-local
+-	$(mkinstalldirs) $(DESTDIR)$(libdir)
++	$(mkinstalldirs) $(DESTDIR)$(prefix)/libdata
+ 	if test -f $(charset_alias); then \
+ 	  sed -f ref-add.sed $(charset_alias) > $(charset_tmp) ; \
+ 	  $(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \
Index: files/patch-man::Makefile.in
===================================================================
RCS file: patch-man::Makefile.in
diff -N patch-man::Makefile.in
--- /dev/null	Tue May 29 07:00:24 2001
+++ patch-man::Makefile.in	Tue May 29 07:03:46 2001
@@ -0,0 +1,14 @@
+
+$FreeBSD$
+
+--- man/Makefile.in	2001/05/29 08:45:39	1.1
++++ man/Makefile.in	2001/05/29 08:46:06
+@@ -101,7 +101,7 @@
+ 
+ VERSION = @VERSION@
+ mandir = @mandir@
+-docdir = $(prefix)/doc/@PACKAGE@
++docdir = $(prefix)/share/doc/@PACKAGE@
+ htmldir = $(docdir)
+ 
+ AUTOMAKE_OPTIONS = 1.2 gnits

--------------9CFCEAD237C75C6A4EE7E050--


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3B13AD24.9C59C0A9>