summaryrefslogtreecommitdiff
path: root/devel
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2005-05-19 20:08:44 +0000
committerjlam <jlam@pkgsrc.org>2005-05-19 20:08:44 +0000
commitdc4de4f4d70fb3edcc2b9d66b54561f6c0d5829f (patch)
tree5251820a7214b238db9522067d4dec7cdc97fe12 /devel
parentdf9989cb0790dd7577b42264239c7978c79279fd (diff)
downloadpkgsrc-dc4de4f4d70fb3edcc2b9d66b54561f6c0d5829f.tar.gz
We can only use the subst.mk framework if the files are relative to
${WRKSRC}. Just directly create the msgfmt wrapper in the proper target. Also, note that the msgfmt handling should eventually migrate to the tools framework so that build dependencies and binary paths are correct.
Diffstat (limited to 'devel')
-rw-r--r--devel/gettext-lib/builtin.mk26
1 files changed, 14 insertions, 12 deletions
diff --git a/devel/gettext-lib/builtin.mk b/devel/gettext-lib/builtin.mk
index 266a7536ae8..4c645c5b32c 100644
--- a/devel/gettext-lib/builtin.mk
+++ b/devel/gettext-lib/builtin.mk
@@ -1,4 +1,4 @@
-# $NetBSD: builtin.mk,v 1.18 2005/04/19 14:55:30 epg Exp $
+# $NetBSD: builtin.mk,v 1.19 2005/05/19 20:08:44 jlam Exp $
.for _lib_ in intl
. if !defined(_BLNK_LIB_FOUND.${_lib_})
@@ -173,19 +173,21 @@ CONFIGURE_ARGS+= --without-libintl-prefix
USE_PERL5?= build
CONFIGURE_ENV+= MSGFMT=${BUILDLINK_DIR}/bin/msgfmt
-SUBST_CLASSES+= fix-msgfmt
-SUBST_STAGE.fix-msgfmt= post-wrapper
-SUBST_MESSAGE.fix-msgfmt= "Fixing paths in msgfmt wrapper."
-SUBST_FILES.fix-msgfmt= ${BUILDLINK_DIR}/bin/msgfmt
-SUBST_SED.fix-msgfmt= -e 's|@PERL@|${PERL5}|g'
-SUBST_SED.fix-msgfmt+= -e 's|@MSGFMT@|${BUILDLINK_PREFIX.gettext}/bin/msgfmt|g'
-
+# XXX _USE_NEW_TOOLS=yes should make "msgfmt" and "msgfmt-plural" into
+# XXX tools that can be specified via USE_TOOLS. They would replace
+# XXX BUILD_USES_MSGFMT and USE_MSGFMT_PLURALS.
+# XXX
BUILDLINK_TARGETS+= buildlink-msgfmt
-buildlink-msgfmt:
- @${MKDIR} -p ${BUILDLINK_DIR}/bin
- @${CP} ../../devel/gettext/files/msgfmt.pl ${BUILDLINK_DIR}/bin/msgfmt
- @${CHMOD} +x ${BUILDLINK_DIR}/bin/msgfmt
+buildlink-msgfmt: ${BUILDLINK_DIR}/bin/msgfmt
+
+${BUILDLINK_DIR}/bin/msgfmt: ${.CURDIR}/../../devel/gettext/files/msgfmt.pl
+ @${MKDIR} ${.TARGET:H}
+ @${CAT} ${.ALLSRC} | \
+ ${SED} -e "s|@PERL@|"${PERL5:Q}"|g" \
+ -e "s|@MSGFMT@|"${BUILDLINK_PREFIX.gettext:Q}/bin/msgfmt"|g" \
+ > ${.TARGET}
+ @${CHMOD} +x ${.TARGET}
.endif
.endif # CHECK_BUILTIN.gettext