summaryrefslogtreecommitdiff
path: root/textproc/xmlcatmgr
diff options
context:
space:
mode:
authorriastradh <riastradh>2013-05-10 22:33:55 +0000
committerriastradh <riastradh>2013-05-10 22:33:55 +0000
commit047f74796510ccc52577530f7f292018cc795882 (patch)
tree742623151a23a3f5911df031ac804f8601fc7b47 /textproc/xmlcatmgr
parente7d29c5f5453c439cab65511e5c2c2876d6a9a7e (diff)
downloadpkgsrc-047f74796510ccc52577530f7f292018cc795882.tar.gz
Make xmlcatmgr and catalogs.mk cross-compilable.
Diffstat (limited to 'textproc/xmlcatmgr')
-rw-r--r--textproc/xmlcatmgr/Makefile23
-rw-r--r--textproc/xmlcatmgr/catalogs.mk5
2 files changed, 20 insertions, 8 deletions
diff --git a/textproc/xmlcatmgr/Makefile b/textproc/xmlcatmgr/Makefile
index 67c734e8238..127c7fa1b9f 100644
--- a/textproc/xmlcatmgr/Makefile
+++ b/textproc/xmlcatmgr/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.33 2012/10/25 06:57:08 asau Exp $
+# $NetBSD: Makefile,v 1.34 2013/05/10 22:33:55 riastradh Exp $
#
DISTNAME= xmlcatmgr-2.2
@@ -27,16 +27,25 @@ REQD_DIRS= ${PREFIX}/share/sgml ${PREFIX}/share/xml
INSTALLATION_DIRS+= share/examples/xmlcatmgr
+.include "../../mk/bsd.prefs.mk"
+
+.if empty(USE_CROSS_COMPILE:M[yY][eE][sS])
+XMLCATMGR= ${WRKSRC}/xmlcatmgr
+.else
+TOOL_DEPENDS+= ${PKGNAME}:../../textproc/xmlcatmgr
+XMLCATMGR= ${PREFIX}/bin/xmlcatmgr
+.endif
+
post-build:
@${ECHO} "Creating SGML catalogs..."
- @${WRKSRC}/xmlcatmgr -sc ${WRKDIR}/catalog.etc.sgml create
- @${WRKSRC}/xmlcatmgr -sc ${WRKDIR}/catalog.sgml create
- @${WRKSRC}/xmlcatmgr -sc ${WRKDIR}/catalog.etc.sgml add \
+ @${XMLCATMGR} -sc ${WRKDIR}/catalog.etc.sgml create
+ @${XMLCATMGR} -sc ${WRKDIR}/catalog.sgml create
+ @${XMLCATMGR} -sc ${WRKDIR}/catalog.etc.sgml add \
CATALOG ${PREFIX}/share/sgml/catalog
@${ECHO} "Creating XML catalogs..."
- @${WRKSRC}/xmlcatmgr -c ${WRKDIR}/catalog.etc.xml create
- @${WRKSRC}/xmlcatmgr -c ${WRKDIR}/catalog.xml create
- @${WRKSRC}/xmlcatmgr -c ${WRKDIR}/catalog.etc.xml add \
+ @${XMLCATMGR} -c ${WRKDIR}/catalog.etc.xml create
+ @${XMLCATMGR} -c ${WRKDIR}/catalog.xml create
+ @${XMLCATMGR} -c ${WRKDIR}/catalog.etc.xml add \
nextCatalog ${PREFIX}/share/xml/catalog
post-install:
diff --git a/textproc/xmlcatmgr/catalogs.mk b/textproc/xmlcatmgr/catalogs.mk
index 92a3e5ae43a..d04f3fa43d9 100644
--- a/textproc/xmlcatmgr/catalogs.mk
+++ b/textproc/xmlcatmgr/catalogs.mk
@@ -1,4 +1,4 @@
-# $NetBSD: catalogs.mk,v 1.19 2009/06/14 22:58:09 joerg Exp $
+# $NetBSD: catalogs.mk,v 1.20 2013/05/10 22:33:55 riastradh Exp $
#
# This Makefile fragment is intended to be included by packages that install
# catalog files or DTDs. It takes care of registering them into the right
@@ -59,6 +59,9 @@ DEINSTALL_TEMPLATES+= ../../textproc/xmlcatmgr/files/deinstall.tmpl
PRINT_PLIST_AWK+= /^share\/(sgml|xml)\/catalog$$/ \
{ print "@comment in xmlcatmgr: " $$0; next; }
+# We need the xmlcatmgr tool and the catalogues, so TOOL_DEPEND and
+# buildlink3.
+TOOL_DEPENDS+= xmlcatmgr-[0-9]*:../../textproc/xmlcatmgr
.include "../../textproc/xmlcatmgr/buildlink3.mk"
.endif # XMLCATMGR_CATALOGS_MK