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.
31 lines
932 B
Makefile
31 lines
932 B
Makefile
# $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)
|
|
|
|
USE_LANGUAGES= c
|
|
CONFIGURE_ARGS+= --with-included-gettext
|
|
CONFIGURE_ARGS+= --disable-csharp
|
|
CONFIGURE_ENV+= PKGLOCALEDIR=${PKGLOCALEDIR}
|
|
MAKE_ENV+= PKGLOCALEDIR=${PKGLOCALEDIR}
|
|
|
|
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
|
|
EGDIR= ${PREFIX}/share/examples/gettext
|
|
LOCALEDIR= ${PREFIX}/${PKGLOCALEDIR}/locale
|
|
|
|
REQD_DIRS+= ${LOCALEDIR}
|
|
REQD_FILES+= ${EGDIR}/locale.alias ${LOCALEDIR}/locale.alias
|
|
|
|
.include "../../converters/libiconv/buildlink3.mk"
|
|
.include "../../mk/bsd.pkg.mk"
|