summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsbd <sbd@pkgsrc.org>2012-08-29 09:01:01 +0000
committersbd <sbd@pkgsrc.org>2012-08-29 09:01:01 +0000
commitc01d4e412642a0cf956088f806a8a002f78ef90c (patch)
treee1e255edac0821ce7e5087fc480a1ffacab95c22
parentdb831e6aca062910a10e446467915f376d202a6e (diff)
downloadpkgsrc-c01d4e412642a0cf956088f806a8a002f78ef90c.tar.gz
Problem:
1) The libintl.h from gettext-lib renames the gettext functions so that they are prefixed with 'libintl_' (So that the functions named in libintl don't conflict with any that maybe in libc). 2) gettext-tools is _always_ built with gettext-lib. 3) The tools architecture may make gettext-tools a build dependence or someone may choose to install gettext-tools. 4) The OS has built in gettext. 5) For some reason ${PREFIX}/include is add to the compiler search path and libintl.h from gettext-lib is found before the system one. The result is that all the gettext functions are renamed to have the 'libintl_' prefix but libintl is not linked with and the following happens: ${FILENAME}: undefined reference to `libintl_gettext' ${FILENAME}: undefined reference to `libintl_textdomain' ${FILENAME}: undefined reference to `libintl_bindtextdomain' collect2: error: ld returned 1 exit status Solution: Hide libintl.h from gettext-lib in ${PREFIX}/include/gettext then add that to the compiler search path when realy needed. This should permanently fix PR's pkg/24326 pkg/36201 pkg/40153 pkg/43129 pkg/44009 and pkg/44016. Bump PKGREVISION.
-rw-r--r--devel/gettext-lib/Makefile4
-rw-r--r--devel/gettext-lib/PLIST4
-rw-r--r--devel/gettext-lib/buildlink3.mk4
3 files changed, 8 insertions, 4 deletions
diff --git a/devel/gettext-lib/Makefile b/devel/gettext-lib/Makefile
index 082bf32d6f2..64a5eba1b21 100644
--- a/devel/gettext-lib/Makefile
+++ b/devel/gettext-lib/Makefile
@@ -1,8 +1,9 @@
-# $NetBSD: Makefile,v 1.52 2011/04/12 17:41:28 adam Exp $
+# $NetBSD: Makefile,v 1.53 2012/08/29 09:01:01 sbd Exp $
.include "../../devel/gettext/Makefile.common"
PKGNAME= ${DISTNAME:S/-/-lib-/}
+PKGREVISION= 1
SVR4_PKGNAME= gttli
COMMENT= Internationalized Message Handling Library (libintl)
@@ -16,6 +17,7 @@ CFLAGS+= ${CFLAGS.${ICONV_TYPE}-iconv}
CFLAGS.gnu-iconv+= -DHAVE_GNU_ICONV
INSTALL_MAKE_FLAGS= ${MAKE_FLAGS} localedir=${EGDIR}
+INSTALL_MAKE_FLAGS+= includedir=${PREFIX}/include/gettext
CONFIGURE_DIRS= gettext-runtime
BUILD_DIRS= gettext-runtime/intl
diff --git a/devel/gettext-lib/PLIST b/devel/gettext-lib/PLIST
index d01d91781b9..8c9c7f2374a 100644
--- a/devel/gettext-lib/PLIST
+++ b/devel/gettext-lib/PLIST
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.5 2009/06/14 17:48:45 joerg Exp $
-include/libintl.h
+@comment $NetBSD: PLIST,v 1.6 2012/08/29 09:01:01 sbd Exp $
+include/gettext/libintl.h
lib/libintl.la
share/examples/gettext/locale.alias
diff --git a/devel/gettext-lib/buildlink3.mk b/devel/gettext-lib/buildlink3.mk
index aa8c305e8f2..96d23690ea9 100644
--- a/devel/gettext-lib/buildlink3.mk
+++ b/devel/gettext-lib/buildlink3.mk
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink3.mk,v 1.33 2011/04/15 09:24:33 adam Exp $
+# $NetBSD: buildlink3.mk,v 1.34 2012/08/29 09:01:01 sbd Exp $
BUILDLINK_TREE+= gettext
@@ -34,6 +34,8 @@ CHECK_BUILTIN.gettext:= no
# A built-in gettext is always going to use a built-in iconv.
.if !empty(USE_BUILTIN.gettext:M[yY][eE][sS])
USE_BUILTIN.iconv= yes
+.else
+BUILDLINK_INCDIRS.gettext+= include/gettext
.endif
.include "../../converters/libiconv/buildlink3.mk"