Subject: Re: [PATCH] Problem with gettext on Debian Linux
To: Eric Gillespie <epg@netbsd.org>
From: Jeremy C. Reed <reed@reedmedia.net>
List: tech-pkg
Date: 04/16/2005 16:50:03
Here is what I use on my Linux systems. Some of it is unrelated, but see
the converters/libiconv/builtin.mk below:

Index: devel/gettext-lib/buildlink3.mk
===================================================================
RCS file: /cvsroot/pkgsrc/devel/gettext-lib/buildlink3.mk,v
retrieving revision 1.21
diff -b -u -r1.21 buildlink3.mk
--- devel/gettext-lib/buildlink3.mk	3 Oct 2004 00:13:27 -0000	1.21
+++ devel/gettext-lib/buildlink3.mk	16 Apr 2005 23:40:11 -0000
@@ -11,9 +11,8 @@
 BUILDLINK_PACKAGES+=	gettext

 .if !empty(GETTEXT_BUILDLINK3_MK:M+)
-BUILDLINK_DEPENDS.gettext+=	gettext-lib>=0.10.35nb1
-BUILDLINK_RECOMMENDED.gettext+=	gettext-lib>=0.11.5nb4
-BUILDLINK_PKGSRCDIR.gettext?=	../../devel/gettext-lib
+BUILDLINK_DEPENDS.gettext+=	gettext-runtime>=0.14.1
+BUILDLINK_PKGSRCDIR.gettext?=	../../wip/gettext-runtime
 .endif	# GETTEXT_BUILDLINK3_MK

 # libiconv/buildlink3.mk is included by gettext-lib/builtin.mk
Index: devel/gettext-lib/builtin.mk
===================================================================
RCS file: /cvsroot/pkgsrc/devel/gettext-lib/builtin.mk,v
retrieving revision 1.17
diff -b -u -r1.17 builtin.mk
--- devel/gettext-lib/builtin.mk	11 Dec 2004 00:32:16 -0000	1.17
+++ devel/gettext-lib/builtin.mk	16 Apr 2005 23:40:12 -0000
@@ -29,10 +29,9 @@
 .  endif
 .  if !empty(IS_BUILTIN.gettext:M[yY][eE][sS])
 # XXX
-# XXX Consider the native libintl to be gettext-lib-0.10.35nb1 until we
-# XXX find a way to more accurately determine the version.
+# XXX Consider the native libintl to be gettext-runtime-0.14.1
 # XXX
-BUILTIN_PKG.gettext=	gettext-lib-0.10.35nb1
+BUILTIN_PKG.gettext=	gettext-runtime-0.14.1
 BUILDLINK_VARS+=	BUILTIN_PKG.gettext
 .  endif
 .endif	# IS_BUILTIN.gettext
@@ -91,7 +90,7 @@
 	fi
 .    endif
 #
-# The listed platforms have an implementation of gettext that isn't
+# The listed platforms have an implementation of libintl that isn't
 # GNUish enough.
 #
 _INCOMPAT_GETTEXT=	SunOS-*-*
@@ -133,9 +132,9 @@
 #
 # Determine if we need to include the libiconv buildlink3.mk file.
 # We need to if we're using the pkgsrc gettext, and the version is
-# at least gettext>=0.11.5nb1.
+# at least gettext-runtime>=0.14.1.
 #
-_GETTEXT_ICONV_DEPENDS=	gettext-lib>=0.11.5nb1
+_GETTEXT_ICONV_DEPENDS=	gettext-runtime>=0.14.1
 .  if !defined(_GETTEXT_NEEDS_ICONV)
 _GETTEXT_NEEDS_ICONV?=	no
 .    for _depend_ in ${BUILDLINK_DEPENDS.gettext}
Index: converters/libiconv/builtin.mk
===================================================================
RCS file: /cvsroot/pkgsrc/converters/libiconv/builtin.mk,v
retrieving revision 1.6
diff -b -u -r1.6 builtin.mk
--- converters/libiconv/builtin.mk	28 Aug 2004 06:05:31 -0000	1.6
+++ converters/libiconv/builtin.mk	16 Apr 2005 23:40:12 -0000
@@ -55,6 +55,15 @@
 BUILDLINK_VARS+=	IS_BUILTIN.iconv
 .endif	# IS_BUILTIN.iconv

+.if (${OPSYS} == "Linux") && exists(${_ICONV_H})
+USE_BUILTIN.iconv!=	\
+	if ${GREP} -q "This file is part of the GNU C Library" ${_ICONV_H}; then \
+		${ECHO} "yes";						\
+	else								\
+		${ECHO} "no";						\
+	fi
+.endif
+
 .if !defined(USE_BUILTIN.iconv)
 USE_BUILTIN.iconv?=	${IS_BUILTIN.iconv}
 PREFER.iconv?=		pkgsrc


Index: mk/automake.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mk/automake.mk,v
retrieving revision 1.8
diff -b -u -r1.8 automake.mk
--- mk/automake.mk	13 Aug 2004 14:19:24 -0000	1.8
+++ mk/automake.mk	16 Apr 2005 23:41:43 -0000
@@ -30,7 +30,8 @@
 ACLOCAL=		${LOCALBASE}/bin/aclocal-${_AUTOMAKE_API_VERSION}

 .if defined(BUILD_USES_GETTEXT_M4)
-BUILD_DEPENDS+=		{gettext-0.10.35nb1,gettext-m4-[0-9]*}:../../devel/gettext-m4
+#BUILD_DEPENDS+=		gettext-tools-[0-9]*}:../../wip/gettext-tools
+#BUILD_DEPENDS+=		{gettext-0.10.35nb1,gettext-m4-[0-9]*}:../../devel/gettext-m4
 .endif

 .include "../mk/autoconf.mk"
Index: mk/bsd.pkg.use.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mk/bsd.pkg.use.mk,v
retrieving revision 1.8
diff -b -u -r1.8 bsd.pkg.use.mk
--- mk/bsd.pkg.use.mk	9 Apr 2005 23:16:45 -0000	1.8
+++ mk/bsd.pkg.use.mk	16 Apr 2005 23:41:44 -0000
@@ -58,7 +58,7 @@

 .if defined(BUILD_USES_MSGFMT) && \
     (!exists(/usr/bin/msgfmt) || ${_USE_GNU_GETTEXT} == "yes")
-BUILD_DEPENDS+=		gettext>=0.10.35nb1:../../devel/gettext
+BUILD_DEPENDS+=		gettext-tools>=0.10.35nb1:../../wip/gettext-tools
 .endif

 ### PKG_USE_KERBEROS


I also need to look at yours.

 Jeremy C. Reed

 	  	 	 BSD News, BSD tutorials, BSD links
	  	 	 http://www.bsdnewsletter.com/