mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-22 19:50:05 +02:00
Libxml2: allow the default catalog to be a directory.
This makes it easier for other packages to provide catalog entries. Used by docbook-xml and docbook-xslt.
This commit is contained in:
@@ -4,7 +4,7 @@ LICENSE="MIT"
|
||||
COPYRIGHT="1998-2003 Daniel Veillard. All Rights Reserved."
|
||||
SRC_URI="ftp://xmlsoft.org/libxml2/libxml2-2.8.0.tar.gz"
|
||||
CHECKSUM_SHA256="f2e2d0e322685193d1affec83b21dc05d599e17a7306d7b90de95bb5b9ac622a"
|
||||
REVISION="7"
|
||||
REVISION="8"
|
||||
ARCHITECTURES="x86_gcc2 x86 x86_64"
|
||||
SECONDARY_ARCHITECTURES="x86_gcc2 x86"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 5f1f102b9ca68a60598e75acd2dfcc03eedf48f0 Mon Sep 17 00:00:00 2001
|
||||
From 6db1eb950d7c25695085ceba0688c0fda21aec99 Mon Sep 17 00:00:00 2001
|
||||
From: Ingo Weinhold <ingo_weinhold@gmx.de>
|
||||
Date: Fri, 9 Aug 2013 03:04:24 +0200
|
||||
Subject: applying patch libxml2-2.8.0.patch
|
||||
@@ -60,7 +60,7 @@ index 2989325..162d348 100644
|
||||
1.8.3.4
|
||||
|
||||
|
||||
From af85142e9157eec3acd0b5f6d171eeb63a5dd6c5 Mon Sep 17 00:00:00 2001
|
||||
From d06473f826da81a99d33142030378e2301ca358a Mon Sep 17 00:00:00 2001
|
||||
From: Ingo Weinhold <ingo_weinhold@gmx.de>
|
||||
Date: Fri, 9 Aug 2013 20:15:20 +0200
|
||||
Subject: configure.in: hack to find python directories on Haiku
|
||||
@@ -91,7 +91,7 @@ index a5f86ca..ade0cf8 100644
|
||||
1.8.3.4
|
||||
|
||||
|
||||
From 077d229d4c92bbb11d5ce2dfa6ce9334b77c30db Mon Sep 17 00:00:00 2001
|
||||
From 0c143c7013080fdf83a863cf3bfbd730dbec1b6e Mon Sep 17 00:00:00 2001
|
||||
From: Ingo Weinhold <ingo_weinhold@gmx.de>
|
||||
Date: Fri, 9 Aug 2013 23:00:24 +0200
|
||||
Subject: python[/tests]/Makefile.am: $(datadir)/doc -> $(docdir)
|
||||
@@ -124,7 +124,7 @@ index 52c89fc..7549db9 100644
|
||||
1.8.3.4
|
||||
|
||||
|
||||
From 020e1f1fb2f2234d0a7222e03c6077e9df06e8fb Mon Sep 17 00:00:00 2001
|
||||
From 3751469e256a007663bebb0b2206b1700d73d5c7 Mon Sep 17 00:00:00 2001
|
||||
From: Oliver Tappe <zooey@hirschkaefer.de>
|
||||
Date: Fri, 18 Oct 2013 23:51:10 +0200
|
||||
Subject: Adjust libxml2 to use vendor-packages directory.
|
||||
@@ -150,3 +150,54 @@ index ade0cf8..522a2c0 100644
|
||||
--
|
||||
1.8.3.4
|
||||
|
||||
|
||||
From a7785e3256cfd57da9e21c11937cd6a4ab5b66a6 Mon Sep 17 00:00:00 2001
|
||||
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
|
||||
Date: Mon, 16 Jun 2014 22:26:17 +0200
|
||||
Subject: Allow XML_CATALOG_FILES to point to directories.
|
||||
|
||||
These are then recursively explored. Makes it much easier for packages
|
||||
to add stuff to the default catalogs
|
||||
|
||||
diff --git a/catalog.c b/catalog.c
|
||||
index fb586c1..cb74df0 100644
|
||||
--- a/catalog.c
|
||||
+++ b/catalog.c
|
||||
@@ -3149,6 +3149,7 @@ xmlInitializeCatalog(void) {
|
||||
if (catal != NULL) {
|
||||
/* the XML_CATALOG_FILES envvar is allowed to contain a
|
||||
space-separated list of entries. */
|
||||
+
|
||||
cur = catalogs;
|
||||
nextent = &catal->xml;
|
||||
while (*cur != '\0') {
|
||||
@@ -3160,10 +3161,26 @@ xmlInitializeCatalog(void) {
|
||||
cur++;
|
||||
path = (char *) xmlStrndup((const xmlChar *)paths, cur - paths);
|
||||
if (path != NULL) {
|
||||
+#if defined(HAIKU)
|
||||
+ /* On Haiku, we allow directories in that list, as well as files. */
|
||||
+ int addCatalog(const char* path, const struct stat* sb, int typeflag)
|
||||
+ {
|
||||
+ if (typeflag == FTW_F) {
|
||||
+ *nextent = xmlNewCatalogEntry(XML_CATA_CATALOG, NULL,
|
||||
+ NULL, BAD_CAST path, xmlCatalogDefaultPrefer, NULL);
|
||||
+ if (*nextent != NULL)
|
||||
+ nextent = &((*nextent)->next);
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+ }
|
||||
+ ftw(path, addCatalog, 3);
|
||||
+#else
|
||||
*nextent = xmlNewCatalogEntry(XML_CATA_CATALOG, NULL,
|
||||
NULL, BAD_CAST path, xmlCatalogDefaultPrefer, NULL);
|
||||
if (*nextent != NULL)
|
||||
nextent = &((*nextent)->next);
|
||||
+#endif
|
||||
xmlFree(path);
|
||||
}
|
||||
}
|
||||
--
|
||||
1.8.3.4
|
||||
|
||||
|
||||
Reference in New Issue
Block a user