aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--finance/gnucash-docs/Makefile4
-rw-r--r--textproc/docbook-sk/Makefile18
-rw-r--r--textproc/docbook-sk/pkg-plist76
-rw-r--r--textproc/gtk-doc/Makefile18
-rw-r--r--textproc/scrollkeeper/Makefile6
-rw-r--r--textproc/scrollkeeper/files/patch-configure6
-rw-r--r--textproc/scrollkeeper/files/patch-extract_dtds_Makefile.in2
-rw-r--r--textproc/scrollkeeper/files/patch-libs_Makefile.in12
-rw-r--r--textproc/scrollkeeper/files/patch-libs_extract.c11
-rw-r--r--textproc/scrollkeeper/files/patch-libs_install.c189
-rw-r--r--textproc/scrollkeeper/files/patch-libs_merge.c11
-rw-r--r--textproc/scrollkeeper/files/patch-libs_uninstall.c11
-rw-r--r--textproc/scrollkeeper/files/patch-libs_update-uri.c10
-rw-r--r--textproc/scrollkeeper/pkg-install6
-rw-r--r--textproc/scrollkeeper/pkg-plist1
15 files changed, 255 insertions, 126 deletions
diff --git a/finance/gnucash-docs/Makefile b/finance/gnucash-docs/Makefile
index 42dd5ea3d1fc..fd21dc11f1f9 100644
--- a/finance/gnucash-docs/Makefile
+++ b/finance/gnucash-docs/Makefile
@@ -7,6 +7,7 @@
PORTNAME= gnucash-docs
PORTVERSION= 1.8.3
+PORTREVISION= 1
CATEGORIES= finance gnome
MASTER_SITES= http://www.gnucash.org/pub/gnucash/sources/stable/ \
ftp://ftp.gnucash.org/pub/gnucash/sources/stable/ \
@@ -26,8 +27,5 @@ USE_GMAKE= yes
USE_GNOME= gnomeprefix gnomehack
GNU_CONFIGURE= yes
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include -I${X11BASE}/include"
-# XXX Note, this is a hack. When DocBook 4.1.2 has been merged into the
-# system XML catalog file, this line should be removed.
-MAKE_ENV= XML_CATALOG_FILES="${LOCALBASE}/share/sk/catalog ${LOCALBASE}/share/sk/docbook/catalog"
.include <bsd.port.mk>
diff --git a/textproc/docbook-sk/Makefile b/textproc/docbook-sk/Makefile
index dc1eed081c3c..3f91c8d50e89 100644
--- a/textproc/docbook-sk/Makefile
+++ b/textproc/docbook-sk/Makefile
@@ -7,6 +7,7 @@
PORTNAME= docbook-sk
PORTVERSION= 4.1.2
+PORTREVISION= 1
CATEGORIES= textproc
MASTER_SITES= http://www.docbook.org/xml/${PORTVERSION}/
DISTNAME= docbkx${PORTVERSION:S/.//g}
@@ -14,12 +15,21 @@ DISTNAME= docbkx${PORTVERSION:S/.//g}
MAINTAINER= gnome@FreeBSD.org
COMMENT= XML version of the DocBook DTD version controlled for ScrollKeeper
+RUN_DEPENDS= ${XMLCATMGR}:${PORTSDIR}/textproc/xmlcatmgr
+
USE_ZIP= yes
NO_BUILD= yes
NO_WRKSUBDIR= yes
-PLIST_SUB= DTD_VERSION=${PORTVERSION}
+PLIST_SUB= DTD_VERSION=${PORTVERSION} \
+ XMLCATMGR=${XMLCATMGR} \
+ DOCBOOKDIR=${DOCBOOKDIR} \
+ CATALOG_PORTS_SGML=${CATALOG_PORTS_SGML} \
+ CATALOG_PORTS_XML=${CATALOG_PORTS_XML}
-DOCBOOKDIR= ${PREFIX}/share/sk/${PORTNAME:S/-sk//}/${PORTVERSION}
+DOCBOOKDIR= ${PREFIX}/share/xml/${PORTNAME:S/-sk//}/${PORTVERSION}
+XMLCATMGR= ${LOCALBASE}/bin/xmlcatmgr
+CATALOG_PORTS_SGML= ${PREFIX}/share/sgml/catalog.ports
+CATALOG_PORTS_XML= ${PREFIX}/share/xml/catalog.ports
pre-install:
@[ -d ${DOCBOOKDIR}/ent ] || ${MKDIR} ${DOCBOOKDIR}/ent
@@ -29,4 +39,8 @@ do-install:
${INSTALL_DATA} ${WRKSRC}/$$file ${DOCBOOKDIR}/$$file; \
done
+post-install:
+ @${XMLCATMGR} -sc ${CATALOG_PORTS_SGML} add CATALOG ${DOCBOOKDIR}/docbook.cat
+ @${XMLCATMGR} -c ${CATALOG_PORTS_XML} add nextCatalog ${DOCBOOKDIR}/catalog.xml
+
.include <bsd.port.mk>
diff --git a/textproc/docbook-sk/pkg-plist b/textproc/docbook-sk/pkg-plist
index ebed68f3e469..2ee29f6034ba 100644
--- a/textproc/docbook-sk/pkg-plist
+++ b/textproc/docbook-sk/pkg-plist
@@ -1,36 +1,40 @@
-share/sk/docbook/%%DTD_VERSION%%/40chg.txt
-share/sk/docbook/%%DTD_VERSION%%/41chg.txt
-share/sk/docbook/%%DTD_VERSION%%/ChangeLog
-share/sk/docbook/%%DTD_VERSION%%/calstblx.dtd
-share/sk/docbook/%%DTD_VERSION%%/dbcentx.mod
-share/sk/docbook/%%DTD_VERSION%%/dbgenent.mod
-share/sk/docbook/%%DTD_VERSION%%/dbhierx.mod
-share/sk/docbook/%%DTD_VERSION%%/dbnotnx.mod
-share/sk/docbook/%%DTD_VERSION%%/dbpoolx.mod
-share/sk/docbook/%%DTD_VERSION%%/docbook.cat
-share/sk/docbook/%%DTD_VERSION%%/docbookx.dtd
-share/sk/docbook/%%DTD_VERSION%%/ent/iso-amsa.ent
-share/sk/docbook/%%DTD_VERSION%%/ent/iso-amsb.ent
-share/sk/docbook/%%DTD_VERSION%%/ent/iso-amsc.ent
-share/sk/docbook/%%DTD_VERSION%%/ent/iso-amsn.ent
-share/sk/docbook/%%DTD_VERSION%%/ent/iso-amso.ent
-share/sk/docbook/%%DTD_VERSION%%/ent/iso-amsr.ent
-share/sk/docbook/%%DTD_VERSION%%/ent/iso-box.ent
-share/sk/docbook/%%DTD_VERSION%%/ent/iso-cyr1.ent
-share/sk/docbook/%%DTD_VERSION%%/ent/iso-cyr2.ent
-share/sk/docbook/%%DTD_VERSION%%/ent/iso-dia.ent
-share/sk/docbook/%%DTD_VERSION%%/ent/iso-grk1.ent
-share/sk/docbook/%%DTD_VERSION%%/ent/iso-grk2.ent
-share/sk/docbook/%%DTD_VERSION%%/ent/iso-grk3.ent
-share/sk/docbook/%%DTD_VERSION%%/ent/iso-grk4.ent
-share/sk/docbook/%%DTD_VERSION%%/ent/iso-lat1.ent
-share/sk/docbook/%%DTD_VERSION%%/ent/iso-lat2.ent
-share/sk/docbook/%%DTD_VERSION%%/ent/iso-num.ent
-share/sk/docbook/%%DTD_VERSION%%/ent/iso-pub.ent
-share/sk/docbook/%%DTD_VERSION%%/ent/iso-tech.ent
-share/sk/docbook/%%DTD_VERSION%%/readme.txt
-share/sk/docbook/%%DTD_VERSION%%/soextblx.dtd
-@dirrm share/sk/docbook/%%DTD_VERSION%%/ent
-@dirrm share/sk/docbook/%%DTD_VERSION%%
-@dirrm share/sk/docbook
-@dirrm share/sk
+share/xml/docbook/%%DTD_VERSION%%/40chg.txt
+share/xml/docbook/%%DTD_VERSION%%/41chg.txt
+share/xml/docbook/%%DTD_VERSION%%/ChangeLog
+share/xml/docbook/%%DTD_VERSION%%/calstblx.dtd
+@unexec %%XMLCATMGR%% -c %%CATALOG_PORTS_XML%% remove %%DOCBOOKDIR%%/catalog.xmlshare/xml/docbook/%%DTD_VERSION%%/catalog.xml
+@exec %%XMLCATMGR%% -c %%CATALOG_PORTS_XML%% add nextCatalog %%DOCBOOKDIR%%/catalog.xml
+share/xml/docbook/%%DTD_VERSION%%/dbcentx.mod
+share/xml/docbook/%%DTD_VERSION%%/dbgenent.mod
+share/xml/docbook/%%DTD_VERSION%%/dbhierx.mod
+share/xml/docbook/%%DTD_VERSION%%/dbnotnx.mod
+share/xml/docbook/%%DTD_VERSION%%/dbpoolx.mod
+@unexec %%XMLCATMGR%% -sc %%CATALOG_PORTS_SGML%% remove %%DOCBOOKDIR%%/docbook.cat
+share/xml/docbook/%%DTD_VERSION%%/docbook.cat
+@exec %%XMLCATMGR%% -sc %%CATALOG_PORTS_SGML%% add CATALOG %%DOCBOOKDIR%%/docbook.cat
+share/xml/docbook/%%DTD_VERSION%%/docbookx.dtd
+share/xml/docbook/%%DTD_VERSION%%/ent/iso-amsa.ent
+share/xml/docbook/%%DTD_VERSION%%/ent/iso-amsb.ent
+share/xml/docbook/%%DTD_VERSION%%/ent/iso-amsc.ent
+share/xml/docbook/%%DTD_VERSION%%/ent/iso-amsn.ent
+share/xml/docbook/%%DTD_VERSION%%/ent/iso-amso.ent
+share/xml/docbook/%%DTD_VERSION%%/ent/iso-amsr.ent
+share/xml/docbook/%%DTD_VERSION%%/ent/iso-box.ent
+share/xml/docbook/%%DTD_VERSION%%/ent/iso-cyr1.ent
+share/xml/docbook/%%DTD_VERSION%%/ent/iso-cyr2.ent
+share/xml/docbook/%%DTD_VERSION%%/ent/iso-dia.ent
+share/xml/docbook/%%DTD_VERSION%%/ent/iso-grk1.ent
+share/xml/docbook/%%DTD_VERSION%%/ent/iso-grk2.ent
+share/xml/docbook/%%DTD_VERSION%%/ent/iso-grk3.ent
+share/xml/docbook/%%DTD_VERSION%%/ent/iso-grk4.ent
+share/xml/docbook/%%DTD_VERSION%%/ent/iso-lat1.ent
+share/xml/docbook/%%DTD_VERSION%%/ent/iso-lat2.ent
+share/xml/docbook/%%DTD_VERSION%%/ent/iso-num.ent
+share/xml/docbook/%%DTD_VERSION%%/ent/iso-pub.ent
+share/xml/docbook/%%DTD_VERSION%%/ent/iso-tech.ent
+share/xml/docbook/%%DTD_VERSION%%/readme.txt
+share/xml/docbook/%%DTD_VERSION%%/soextblx.dtd
+@dirrm share/xml/docbook/%%DTD_VERSION%%/ent
+@dirrm share/xml/docbook/%%DTD_VERSION%%
+@unexec /bin/rmdir %D/share/xml/docbook 2>/dev/null || /usr/bin/true
+@unexec /bin/rmdir %D/share/xml 2>/dev/null || /usr/bin/true
diff --git a/textproc/gtk-doc/Makefile b/textproc/gtk-doc/Makefile
index 86602e0c20b8..79278576d1cd 100644
--- a/textproc/gtk-doc/Makefile
+++ b/textproc/gtk-doc/Makefile
@@ -7,18 +7,18 @@
PORTNAME= gtk-doc
PORTVERSION= 1.1
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= textproc
MASTER_SITES= ftp://ftp.gtk.org/pub/gtk-doc/
MAINTAINER= gnome@freebsd.org
COMMENT= Code documentation system, originally for GTK+
-BROKEN= "Does not configure (different errors on 4.x and 5.x)"
-
-BUILD_DEPENDS= ${LOCALBASE}/share/sk/docbook/${DOCBOOK_VERSION}/docbook.cat:${PORTSDIR}/textproc/docbook-sk \
+BUILD_DEPENDS= jade:${PORTSDIR}/textproc/jade \
+ ${LOCALBASE}/share/xml/docbook/${DOCBOOK_VERSION}/docbook.cat:${PORTSDIR}/textproc/docbook-sk \
${LOCALBASE}/share/xsl/docbook/xhtml/chunk.xsl:${PORTSDIR}/textproc/docbook-xsl
RUN_DEPENDS= jade:${PORTSDIR}/textproc/jade \
+ ${LOCALBASE}/share/xml/docbook/${DOCBOOK_VERSION}/docbook.cat:${PORTSDIR}/textproc/docbook-sk \
${LOCALBASE}/share/xsl/docbook/xhtml/chunk.xsl:${PORTSDIR}/textproc/docbook-xsl
DOCBOOK_VERSION= 4.1.2
@@ -26,6 +26,12 @@ DOCBOOK_VERSION= 4.1.2
USE_PERL5= yes
GNU_CONFIGURE= yes
USE_GNOME= gnomehack gnometarget libxslt
-CONFIGURE_ARGS= --with-xml-catalog=${LOCALBASE}/share/sk/docbook/${DOCBOOK_VERSION}/docbook.cat
+CONFIGURE_ARGS= --with-xml-catalog=${LOCALBASE}/share/xml/catalog
+
+.include <bsd.port.pre.mk>
+
+.if ${PERL_LEVEL} < 500600
+IGNORE= gtk-doc requires Perl 5.6.x or higher
+.endif
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff --git a/textproc/scrollkeeper/Makefile b/textproc/scrollkeeper/Makefile
index 094911056ab1..2fc6ca5db607 100644
--- a/textproc/scrollkeeper/Makefile
+++ b/textproc/scrollkeeper/Makefile
@@ -7,7 +7,7 @@
PORTNAME= scrollkeeper
PORTVERSION= 0.3.12
-PORTREVISION= 2
+PORTREVISION= 3
PORTEPOCH= 1
CATEGORIES= textproc gnome
MASTER_SITES= ${MASTER_SITE_GNOME}
@@ -19,10 +19,10 @@ COMMENT= An Open Document Cataloging Project
LIB_DEPENDS= intl.5:${PORTSDIR}/devel/gettext
BUILD_DEPENDS= intltool-extract:${PORTSDIR}/textproc/intltool \
- ${LOCALBASE}/share/sk/docbook/${DOCBOOK_VERSION}/docbook.cat:${PORTSDIR}/textproc/docbook-sk \
+ ${LOCALBASE}/share/xml/docbook/${DOCBOOK_VERSION}/docbook.cat:${PORTSDIR}/textproc/docbook-sk \
${LOCALBASE}/share/xsl/docbook/xhtml/chunk.xsl:${PORTSDIR}/textproc/docbook-xsl
RUN_DEPENDS= intltool-extract:${PORTSDIR}/textproc/intltool \
- ${LOCALBASE}/share/sk/docbook/${DOCBOOK_VERSION}/docbook.cat:${PORTSDIR}/textproc/docbook-sk \
+ ${LOCALBASE}/share/xml/docbook/${DOCBOOK_VERSION}/docbook.cat:${PORTSDIR}/textproc/docbook-sk \
${LOCALBASE}/share/xsl/docbook/xhtml/chunk.xsl:${PORTSDIR}/textproc/docbook-xsl
# Don't use USE_X_PREFIX - the port doesn't really require X11 to run.
diff --git a/textproc/scrollkeeper/files/patch-configure b/textproc/scrollkeeper/files/patch-configure
index 7997aae40391..72eece1037bc 100644
--- a/textproc/scrollkeeper/files/patch-configure
+++ b/textproc/scrollkeeper/files/patch-configure
@@ -13,7 +13,7 @@
echo "$as_me:$LINENO: checking for docbook-dtd412-xml" >&5
echo $ECHO_N "checking for docbook-dtd412-xml... $ECHO_C" >&6
- if xmlcatalog /etc/xml/catalog "-//OASIS//DTD DocBook XML V4.1.2//EN" | grep "No entry" >/dev/null ; then
-+ if test ! -f $LOCALBASE/share/sk/docbook/4.1.2/docbook.cat ; then
++ if test ! -f $LOCALBASE/share/xml/docbook/4.1.2/docbook.cat ; then
echo "* ERROR * "
echo " "
- echo "Couldn't find the DocBook XML V4.1.2 DTD. Please make sure that you have the docbook-dtd412-xml package installed. If it is installed, the package probably did not register the DTD in the catalog properly. Consult http://scrollkeeper.sourceforge.net/docbook.shtml for more information."
@@ -21,8 +21,8 @@
echo " "
- { { echo "$as_me:$LINENO: error: DocBook XML V4.1.2 DTD not present in /etc/xml/catalog. Make sure docbook-dtd412-xml is installed and registers DTD in catalog." >&5
-echo "$as_me: error: DocBook XML V4.1.2 DTD not present in /etc/xml/catalog. Make sure docbook-dtd412-xml is installed and registers DTD in catalog." >&2;}
-+ { { echo "$as_me:$LINENO: error: DocBook XML V4.1.2 DTD not present in $LOCALBASE/share/sk. Make sure docbook-dtd412-xml is installed and registers DTD in catalog." >&5
-+echo "$as_me: error: DocBook XML V4.1.2 DTD not present in $LOCALBASE/share/sk. Make sure docbook-dtd412-xml is installed and registers DTD in catalog." >&2;}
++ { { echo "$as_me:$LINENO: error: DocBook XML V4.1.2 DTD not present in $LOCALBASE/share/xml. Make sure docbook-dtd412-xml is installed and registers DTD in catalog." >&5
++echo "$as_me: error: DocBook XML V4.1.2 DTD not present in $LOCALBASE/share/xml. Make sure docbook-dtd412-xml is installed and registers DTD in catalog." >&2;}
{ (exit 1); exit 1; }; }
fi
echo "$as_me:$LINENO: result: found" >&5
diff --git a/textproc/scrollkeeper/files/patch-extract_dtds_Makefile.in b/textproc/scrollkeeper/files/patch-extract_dtds_Makefile.in
index 0f0180e20448..d5a44cddaf16 100644
--- a/textproc/scrollkeeper/files/patch-extract_dtds_Makefile.in
+++ b/textproc/scrollkeeper/files/patch-extract_dtds_Makefile.in
@@ -5,7 +5,7 @@
am__quote = @am__quote@
install_sh = @install_sh@
-CATALOG = $(sysconfdir)/xml/catalog
-+CATALOG = %%LOCALBASE%%/share/sk/catalog
++CATALOG = %%LOCALBASE%%/share/xml/catalog
dtdsdir = $(datadir)/xml/scrollkeeper/dtds
dtds_HEADERS = scrollkeeper-omf.dtd scrollkeeper-cl.dtd
subdir = extract/dtds
diff --git a/textproc/scrollkeeper/files/patch-libs_Makefile.in b/textproc/scrollkeeper/files/patch-libs_Makefile.in
deleted file mode 100644
index d87fede54c3e..000000000000
--- a/textproc/scrollkeeper/files/patch-libs_Makefile.in
+++ /dev/null
@@ -1,12 +0,0 @@
---- libs/Makefile.in.orig Wed Apr 23 00:46:23 2003
-+++ libs/Makefile.in Wed Apr 23 00:46:54 2003
-@@ -144,7 +144,8 @@
- $(XML_CFLAGS) \
- $(XSLT_CFLAGS) \
- $(HOST_TYPE) \
-- -DSCROLLKEEPER_STATEDIR=\""$(localstatedir)"\"
-+ -DSCROLLKEEPER_STATEDIR=\""$(localstatedir)"\" \
-+ -DSK_XML_CATALOGS=\""%%LOCALBASE%%/share/sk/catalog %%LOCALBASE%%/share/sk/docbook/catalog"\"
-
-
- libscrollkeeper_la_SOURCES = \
diff --git a/textproc/scrollkeeper/files/patch-libs_extract.c b/textproc/scrollkeeper/files/patch-libs_extract.c
deleted file mode 100644
index 280fb7aceafd..000000000000
--- a/textproc/scrollkeeper/files/patch-libs_extract.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- libs/extract.c.orig Wed Apr 23 00:45:18 2003
-+++ libs/extract.c Wed Apr 23 00:45:58 2003
-@@ -54,6 +54,8 @@
- int temp1_fd, temp2_fd, errors_fd;
- #endif
-
-+ setenv("XML_CATALOG_FILES", SK_XML_CATALOGS, 1);
-+
- if (input_file == NULL ||
- stylesheets == NULL ||
- outputs == NULL) {
diff --git a/textproc/scrollkeeper/files/patch-libs_install.c b/textproc/scrollkeeper/files/patch-libs_install.c
index 30f873782bce..5e30af15fcb7 100644
--- a/textproc/scrollkeeper/files/patch-libs_install.c
+++ b/textproc/scrollkeeper/files/patch-libs_install.c
@@ -1,15 +1,178 @@
---- libs/install.c.orig Wed Jan 15 23:27:11 2003
-+++ libs/install.c Wed Jan 15 23:26:31 2003
-@@ -165,6 +165,12 @@
- char *toc_stylesheet_name, *index_name, *index_stylesheet_name, *uid;
-
- /*
-+ * Set up a custom catalog path.
-+ */
+--- libs/install.c.orig Tue Nov 4 02:42:22 2003
++++ libs/install.c Tue Nov 4 02:42:26 2003
+@@ -41,7 +41,7 @@
+ static int get_unique_doc_id(char *);
+ static void add_doc_to_scrollkeeper_docs(char *, char *, char *, int, char *);
+ static void add_doc_to_content_list(xmlNodePtr, char *, char **, char *, char *,
+- char *, char *, char *, int, int, char);
++ char *, char *, char *, int, int, char, char **);
+ static char *get_doc_property(xmlNodePtr, char *, char *);
+ static char *get_doc_parameter_value(xmlNodePtr, char *);
+ static char* remove_leading_and_trailing_white_spaces(char *);
+@@ -113,6 +113,10 @@
+
+ snprintf(command, 1024, "scrollkeeper-get-toc-from-docpath %s", docpath);
+ config_fid = popen(command, "r");
+
-+ setenv("XML_CATALOG_FILES", SK_XML_CATALOGS, 1);
++ if (config_fid == NULL)
++ return NULL;
+
-+ /*
- * Read in OMF file
- */
- omf_doc = xmlParseFile(omf_name);
+ fscanf(config_fid, "%s", tocpath);
+ if (pclose(config_fid))
+ return NULL;
+@@ -219,8 +223,13 @@
+ {
+ /* create full content list path names and read trees */
+ locale = get_doc_property(node, "language", "code");
+- if (!get_best_locale_dir(locale_dir, locale_name, scrollkeeper_dir, locale))
++ if (locale == NULL)
++ continue;
++ if (!get_best_locale_dir(locale_dir, locale_name, scrollkeeper_dir, locale)) {
++ xmlFree(locale);
+ continue;
++ }
++ xmlFree(locale);
+ snprintf(cl_filename, PATHLEN, "%s/scrollkeeper_cl.xml", locale_dir);
+ snprintf(cl_ext_filename, PATHLEN, "%s/scrollkeeper_extended_cl.xml", locale_dir);
+
+@@ -245,6 +254,8 @@
+ }
+
+ docpath = get_doc_property(node, "identifier", "url");
++ if (docpath == NULL)
++ continue;
+
+ /* add to scrollkeeper_docs */
+ unique_id = get_unique_doc_id(scrollkeeper_docs);
+@@ -252,7 +263,7 @@
+ locale_name);
+
+ format = get_doc_property(node, "format", "mime");
+- if (!strcmp(format, "text/xml"))
++ if (format && !strcmp(format, "text/xml"))
+ {
+ /* create TOC file and index file */
+
+@@ -304,6 +315,8 @@
+ }
+
+ uid = get_doc_property(node, "relation", "seriesid");
++ if (uid == NULL)
++ continue;
+
+ title = get_doc_parameter_value(node, "title");
+ strncpy(str, title, 1024);
+@@ -315,18 +328,25 @@
+ /* look for subject nodes */
+ if (!xmlStrcmp(s_node->name, (xmlChar *)"subject"))
+ {
+- char *category, *token, *rest;
++ char *category, *token, *rest, *complete_cat_token = NULL;
+
+ category = (char *)xmlGetProp(s_node, (xmlChar *)"category");
++ if (category == NULL)
++ continue;
+ token = strtok_r(category, SEP, &rest);
+ add_doc_to_content_list(cl_doc->children->children, token, &rest,
+- docpath, omf_name, title, format, uid, unique_id, 0, outputprefs);
+- free((void *)category);
++ docpath, omf_name, title, format, uid, unique_id, 0, outputprefs,
++ &complete_cat_token);
++ xmlFree(category);
++ free((void *)complete_cat_token);
+ category = (char *)xmlGetProp(s_node, (xmlChar *)"category");
+ token = strtok_r(category, SEP, &rest);
++ complete_cat_token = NULL;
+ add_doc_to_content_list(cl_ext_doc->children->children, token, &rest,
+- docpath, omf_name, title, format, uid, unique_id, 1, outputprefs);
+- free((void *)category);
++ docpath, omf_name, title, format, uid, unique_id, 1, outputprefs,
++ &complete_cat_token);
++ xmlFree(category);
++ free((void *)complete_cat_token);
+ }
+ }
+
+@@ -334,6 +354,9 @@
+ xmlFreeDoc(cl_doc);
+ xmlSaveFile(cl_ext_filename, cl_ext_doc);
+ xmlFreeDoc(cl_ext_doc);
++ xmlFree(docpath);
++ xmlFree(format);
++ xmlFree(uid);
+ }
+ }
+
+@@ -409,6 +432,7 @@
+ unique_id = id;
+ }
+
++ fclose (fid);
+ return unique_id + 1;
+ }
+
+@@ -472,32 +496,38 @@
+ static void add_doc_to_content_list(xmlNodePtr sect_node, char *cat_token, char **rest,
+ char *docpath, char *omf_name,
+ char *title, char *format, char *uid,
+- int id, int add_toc, char outputprefs)
++ int id, int add_toc, char outputprefs, char **complete_cat_token)
+ {
+- xmlNodePtr node, new_node, t_node, s_node;
++ xmlNodePtr node, new_node, s_node;
+
+ if (sect_node == NULL ||
+ cat_token == NULL)
+ return;
+
++ if (*complete_cat_token == NULL)
++ *complete_cat_token = strdup(cat_token);
++ else {
++ char *ptr;
++ ptr = malloc(strlen(*complete_cat_token) + strlen(cat_token) + 2);
++ sprintf(ptr, "%s%s", *complete_cat_token, cat_token);
++ free(*complete_cat_token);
++ *complete_cat_token = ptr;
++ }
++
+ /* these should all be <sect> nodes */
+ for(node = sect_node; node != NULL; node = node->next)
+ {
+ if (xmlStrcmp(node->name, (xmlChar *)"sect"))
+ continue;
+-
+- for(t_node = node->children; t_node != NULL; t_node = t_node->next)
+- {
+- /* these should be <title>, <sect> or <doc> nodes */
+- if (t_node->type == XML_ELEMENT_NODE &&
+- !xmlStrcmp(t_node->name, (xmlChar *)"title"))
+- break;
+- }
++
++ xmlChar *categorycode;
++
++ categorycode = xmlGetProp(node, (xmlChar *)"categorycode");
++ if (categorycode == NULL)
++ continue;
+
+ /* these should be the actual titles */
+- if (t_node != NULL && t_node->children != NULL &&
+- t_node->children->type == XML_TEXT_NODE &&
+- !xmlStrcmp((xmlChar *)cat_token, t_node->children->content))
++ if (!xmlStrcmp((xmlChar *)(*complete_cat_token), categorycode))
+ {
+ cat_token = strtok_r(NULL, SEP, rest);
+ if (cat_token == NULL)
+@@ -536,9 +566,11 @@
+ if (s_node != NULL)
+ add_doc_to_content_list(s_node, cat_token, rest,
+ docpath, omf_name, title, format,
+- uid, id, add_toc, outputprefs);
++ uid, id, add_toc, outputprefs, complete_cat_token);
+ return;
+ }
+ }
++
++ xmlFree(categorycode);
+ }
+ }
diff --git a/textproc/scrollkeeper/files/patch-libs_merge.c b/textproc/scrollkeeper/files/patch-libs_merge.c
deleted file mode 100644
index e5b559c52456..000000000000
--- a/textproc/scrollkeeper/files/patch-libs_merge.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- libs/merge.c.orig Thu Jan 16 01:40:06 2003
-+++ libs/merge.c Thu Jan 16 01:40:34 2003
-@@ -192,6 +192,8 @@
- char **lang_tab, *path;
- int i, lang_num, count;
- xmlDocPtr merged_tree, *tree_tab;
-+
-+ setenv("XML_CATALOG_FILES", SK_XML_CATALOGS, 1);
-
- lang_tab = sk_get_language_list();
-
diff --git a/textproc/scrollkeeper/files/patch-libs_uninstall.c b/textproc/scrollkeeper/files/patch-libs_uninstall.c
deleted file mode 100644
index f3439b34553e..000000000000
--- a/textproc/scrollkeeper/files/patch-libs_uninstall.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- libs/uninstall.c.orig Wed Jul 24 22:25:34 2002
-+++ libs/uninstall.c Thu Jan 16 01:50:53 2003
-@@ -70,6 +70,8 @@
- int start, end;
- char cl_filename[PATHLEN], cl_ext_filename[PATHLEN];
- xmlDocPtr cl_doc, cl_ext_doc;
-+
-+ setenv("XML_CATALOG_FILES", SK_XML_CATALOGS, 1);
-
- if (id_tab == NULL)
- return;
diff --git a/textproc/scrollkeeper/files/patch-libs_update-uri.c b/textproc/scrollkeeper/files/patch-libs_update-uri.c
deleted file mode 100644
index 435f61e1d55e..000000000000
--- a/textproc/scrollkeeper/files/patch-libs_update-uri.c
+++ /dev/null
@@ -1,10 +0,0 @@
---- libs/update-url.c.orig Thu Jan 16 01:41:36 2003
-+++ libs/update-url.c Thu Jan 16 01:41:40 2003
-@@ -33,6 +33,7 @@
- xmlNodePtr node;
- xmlDocPtr omf_doc;
-
-+ setenv("XML_CATALOG_FILES", SK_XML_CATALOGS, 1);
-
- /* Parse file and make sure it is well-formed */
- omf_doc = xmlParseFile(omf_name);
diff --git a/textproc/scrollkeeper/pkg-install b/textproc/scrollkeeper/pkg-install
index 85d16db25bad..5f288365002a 100644
--- a/textproc/scrollkeeper/pkg-install
+++ b/textproc/scrollkeeper/pkg-install
@@ -4,8 +4,8 @@ PATH=${PATH}:/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
export PATH
PREFIX=`xml2-config --prefix`
-ROOTCATALOG=${PREFIX}/share/sk/catalog
-CATALOG=${PREFIX}/share/sk/docbook/catalog
+ROOTCATALOG=${PREFIX}/share/xml/catalog
+CATALOG=${PREFIX}/share/xml/docbook/catalog
if [ "$2" = "PRE-INSTALL" ]; then
@@ -215,7 +215,7 @@ echo Found DocBook XSLT stylesheets in $xsldir
for version in current 1.39 1.40 1.41 1.42 1.43 1.44 1.45 1.46 1.47 \
1.48 1.49 1.50.0 1.51.0 1.52.0 1.52.1 1.52.2 1.53.0 1.54.0 \
1.54.1 1.55.0 1.56.0 1.56.1 1.57.0 1.58.0 1.58.1 1.59.0 \
- 1.59.1 1.60.0
+ 1.59.1 1.60.0 1.62.3
do
xmlcatalog --noout --add "rewriteSystem" \
"http://docbook.sourceforge.net/release/xsl/$version" \
diff --git a/textproc/scrollkeeper/pkg-plist b/textproc/scrollkeeper/pkg-plist
index 0d6743f3eb5c..7e1410434d4b 100644
--- a/textproc/scrollkeeper/pkg-plist
+++ b/textproc/scrollkeeper/pkg-plist
@@ -117,6 +117,5 @@ share/locale/zh_TW/LC_MESSAGES/scrollkeeper.mo
@dirrm share/gnome/omf/scrollkeeper
@unexec rm -f /var/log/scrollkeeper.log 2>/dev/null || true
@unexec rm -rf /var/db/scrollkeeper 2>/dev/null || true
-@unexec echo "If you are permantly removing this port, you should do a ``rm -rf %%LOCALBASE%%/share/sk/catalog %%LOCALBASE%%/share/sk/docbook/catalog`` to remove the XML catalogs that are left." | fmt
@exec touch -f /var/log/scrollkeeper.log
@exec mkdir -p /var/db/scrollkeeper