diff options
author | jlam <jlam@pkgsrc.org> | 2002-10-16 22:07:47 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2002-10-16 22:07:47 +0000 |
commit | 4b4d51ab11d397c057e0728f609bf8133808a305 (patch) | |
tree | 1e108b834023e97525ae009232f72763cba0107a /devel/gettext-lib | |
parent | 5e0f8541d917656d446162d05d49b9c218d51adf (diff) | |
download | pkgsrc-4b4d51ab11d397c057e0728f609bf8133808a305.tar.gz |
Create GETTEXT_REQD variable that defaults to "0.10.35nb1" and represents
the version of the gettext library needed by a package. The system libintl
is considered to be equivalent to "gettext-lib-0.10.35nb1". Add a few
additional bits to fool newer configure scripts into accepting the system
libintl if GETTEXT_REQD == 0.10.35nb1.
Diffstat (limited to 'devel/gettext-lib')
-rw-r--r-- | devel/gettext-lib/buildlink2.mk | 42 |
1 files changed, 32 insertions, 10 deletions
diff --git a/devel/gettext-lib/buildlink2.mk b/devel/gettext-lib/buildlink2.mk index 0f9f35bcec3..ccddf6d68b3 100644 --- a/devel/gettext-lib/buildlink2.mk +++ b/devel/gettext-lib/buildlink2.mk @@ -1,11 +1,12 @@ -# $NetBSD: buildlink2.mk,v 1.6 2002/10/07 19:11:16 jlam Exp $ +# $NetBSD: buildlink2.mk,v 1.7 2002/10/16 22:07:47 jlam Exp $ .if !defined(GETTEXT_BUILDLINK2_MK) GETTEXT_BUILDLINK2_MK= # defined .include "../../mk/bsd.prefs.mk" -BUILDLINK_DEPENDS.gettext?= gettext-lib>=0.10.35nb1 +GETTEXT_REQD?= 0.10.35nb1 +BUILDLINK_DEPENDS.gettext?= gettext-lib>=${GETTEXT_REQD} BUILDLINK_PKGSRCDIR.gettext?= ../../devel/gettext-lib .if defined(USE_GNU_GETTEXT) @@ -14,7 +15,21 @@ _NEED_GNU_GETTEXT= YES _BLNK_LIBINTL_LIST!= ${ECHO} /usr/lib/libintl.* . if exists(/usr/include/libintl.h) && \ (${_BLNK_LIBINTL_LIST} != "/usr/lib/libintl.*") -_NEED_GNU_GETTEXT= NO +# +# Consider the base system libintl to be gettext-lib-0.10.35nb1. +# +# XXX This isn't correct on Linux systems, as it may cause the installation +# XXX of the pkgsrc gettext-lib even if the system one is the latest +# XXX version. +# +_GETTEXT_PKG= gettext-lib-0.10.35nb1 +_GETTEXT_DEPENDS= ${BUILDLINK_DEPENDS.gettext} +_NEED_GNU_GETTEXT!= \ + if ${PKG_ADMIN} pmatch '${_GETTEXT_DEPENDS}' ${_GETTEXT_PKG}; then \ + ${ECHO} "NO"; \ + else \ + ${ECHO} "YES"; \ + fi . else _NEED_GNU_GETTEXT= YES . endif @@ -50,16 +65,23 @@ BUILDLINK_TARGETS+= gettext-libintl-la # configure script fails to detect if libintl.a is the genuine GNU gettext # or not. # -_BLNK_INTLLIBS= # empty +_BLNK_INCINTL= # empty +_BLNK_LIBINTL= # empty .if ${_NEED_GNU_GETTEXT} == "YES" -_BLNK_INTLLIBS+= -L${BUILDLINK_PREFIX.gettext}/lib -_BLNK_INTLLIBS+= -Wl,-R${BUILDLINK_PREFIX.gettext}/lib +_BLNK_INCINTL+= -I${BUILDLINK_PREFIX.gettext}/include +_BLNK_LIBINTL+= -L${BUILDLINK_PREFIX.gettext}/lib +_BLNK_LIBINTL+= -Wl,-R${BUILDLINK_PREFIX.gettext}/lib .endif -_BLNK_INTLLIBS+= -lintl +_BLNK_LIBINTL+= -lintl .if defined(GNU_CONFIGURE) -INTLLIBS= ${_BLNK_INTLLIBS} -LIBS+= ${INTLLIBS} -CONFIGURE_ENV+= INTLLIBS="${INTLLIBS}" +LIBS+= ${_BLNK_LIBINTL} +CONFIGURE_ENV+= INTLLIBS="${_BLNK_LIBINTL}" +. if ${_NEED_GNU_GETTEXT} == "NO" +#CONFIGURE_ENV+= INCINTL="${_BLNK_INCINTL}" +#CONFIGURE_ENV+= LIBINTL="${_BLNK_LIBINTL}" +#CONFIGURE_ENV+= gt_cv_func_gnugettext_libintl="yes" +CONFIGURE_ENV+= gt_cv_func_gnugettext1_libintl="yes" +. endif .endif .if ${_NEED_GNU_GETTEXT} == "NO" |