diff options
author | jlam <jlam@pkgsrc.org> | 2002-08-23 01:22:40 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2002-08-23 01:22:40 +0000 |
commit | 14351923a102f5199790a9d4eeaff5d808ff7c8f (patch) | |
tree | ca2cd6085660d49adcb63e408955d7fd00079067 /devel/gettext-lib | |
parent | c54334b972d29ee3ab379fc4919d57cb20250a75 (diff) | |
download | pkgsrc-14351923a102f5199790a9d4eeaff5d808ff7c8f.tar.gz |
Merge devel/gettext-lib from buildlink2 back into the main trunk. This
package is used to build shells/bash2, which is needed to use buildlink2
on Darwin.
Diffstat (limited to 'devel/gettext-lib')
-rw-r--r-- | devel/gettext-lib/Makefile | 11 | ||||
-rw-r--r-- | devel/gettext-lib/buildlink2.mk | 71 |
2 files changed, 80 insertions, 2 deletions
diff --git a/devel/gettext-lib/Makefile b/devel/gettext-lib/Makefile index ee50509323e..272fd1ad34c 100644 --- a/devel/gettext-lib/Makefile +++ b/devel/gettext-lib/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.13 2002/08/19 19:20:34 seb Exp $ +# $NetBSD: Makefile,v 1.14 2002/08/23 01:22:40 jlam Exp $ # FreeBSD Id: Makefile,v 1.1.1.1 1998/08/09 15:13:33 kuriyama Exp # @@ -14,8 +14,13 @@ HOMEPAGE= http://www.gnu.org/software/gettext/gettext.html COMMENT= tools for providing messages in different languages, libintl only CONFLICTS= gettext<=0.10.35 + +# gettext-lib is needed to bootstrap shell/bash2, which is needed to +# bootstrap buildlink2. +# +USE_BUILDLINK2= no + GNU_CONFIGURE= yes -USE_BUILDLINK_ONLY= yes USE_LIBTOOL= yes LTCONFIG_OVERRIDE= ${WRKSRC}/ltconfig CONFIGURE_ARGS+= --with-included-gettext @@ -35,3 +40,5 @@ do-install: ${_PKG_SILENT}${_PKG_DEBUG}cd ${WRKSRC}/intl && ${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} ${MAKE_FLAGS} -f ${MAKEFILE} ${INSTALL_TARGET} .include "../../mk/bsd.pkg.mk" + +LDFLAGS:= ${LDFLAGS:N-L${LOCALBASE}/lib*} diff --git a/devel/gettext-lib/buildlink2.mk b/devel/gettext-lib/buildlink2.mk new file mode 100644 index 00000000000..24458179e02 --- /dev/null +++ b/devel/gettext-lib/buildlink2.mk @@ -0,0 +1,71 @@ +# $NetBSD: buildlink2.mk,v 1.2 2002/08/23 01:22:40 jlam Exp $ + +.if !defined(GETTEXT_BUILDLINK2_MK) +GETTEXT_BUILDLINK2_MK= # defined + +.include "../../mk/bsd.prefs.mk" + +BUILDLINK_DEPENDS.gettext?= gettext-lib>=0.10.35nb1 +BUILDLINK_PKGSRCDIR.gettext?= ../../devel/gettext-lib + +.if defined(USE_GNU_GETTEXT) +_NEED_GNU_GETTEXT= YES +.else +. if exists(/usr/include/libintl.h) +_NEED_GNU_GETTEXT= NO +. else +_NEED_GNU_GETTEXT= YES +. endif +# +# Solaris has broken (for the purposes of pkgsrc) version of zlib and +# gettext. +# +_INCOMPAT_GETTEXT= SunOS-*-* +INCOMPAT_GETTEXT?= # empty +. for _pattern_ in ${_INCOMPAT_GETTEXT} ${INCOMPAT_GETTEXT} +. if !empty(MACHINE_PLATFORM:M${_pattern_}) +_NEED_GNU_GETTEXT= YES +. endif +. endfor +.endif + +.if ${_NEED_GNU_GETTEXT} == "YES" +BUILDLINK_PACKAGES+= gettext +EVAL_PREFIX+= BUILDLINK_PREFIX.gettext=gettext-lib +BUILDLINK_PREFIX.gettext_DEFAULT= ${LOCALBASE} +.else +BUILDLINK_PREFIX.gettext= /usr +.endif + +BUILDLINK_FILES.gettext= include/libintl.h +BUILDLINK_FILES.gettext+= lib/libintl.* + +BUILDLINK_TARGETS+= gettext-buildlink + +# Add -lintl to LIBS in CONFIGURE_ENV to work around broken gettext.m4: +# gettext.m4 does not add -lintl where it should, and the resulting +# configure script fails to detect if libintl.a is the genuine GNU gettext +# or not. +# +_BLNK_INTLLIBS= # empty +.if ${_NEED_GNU_GETTEXT} == "YES" +_BLNK_INTLLIBS+= -L${BUILDLINK_DIR}/lib +. if ${_USE_RPATH} == "yes" +_BLNK_INTLLIBS+= -Wl,-R${BUILDLINK_PREFIX.gettext}/lib +. endif +.endif +_BLNK_INTLLIBS+= -lintl +.if defined(GNU_CONFIGURE) +INTLLIBS= ${_BLNK_INTLLIBS} +LIBS+= ${INTLLIBS} +CONFIGURE_ENV+= INTLLIBS="${INTLLIBS}" +.endif + +.if ${_NEED_GNU_GETTEXT} == "NO" +LIBTOOL_ARCHIVE_UNTRANSFORM_SED+= \ + -e "s|${LOCALBASE}/lib/libintl.la|-L${BUILDLINK_PREFIX.gettext}/lib -lintl|g" +.endif + +gettext-buildlink: _BUILDLINK_USE + +.endif # GETTEXT_BUILDLINK2_MK |