updated on Thu Jan 26 00:18:00 UTC 2012
[aur-mirror.git] / xml2 / 01_use_libxml2_instead_of_libxml.patch
blob975060ed34913a411daccf4af924b7572c37d172
1 #! /bin/sh /usr/share/dpatch/dpatch-run
2 ## 01_use_libxml2_instead_of_libxml.dpatch by Daniel Leidert
3 ## <daniel.leidert@wgdd.de>
4 ##
5 ## DP: Make use of libxml2 instead of libxml
7 @DPATCH@
8 diff -urNad xml2-0.4~/2xml.c xml2-0.4/2xml.c
9 --- xml2-0.4~/2xml.c 2003-12-24 21:28:48.000000000 +0100
10 +++ xml2-0.4/2xml.c 2008-03-12 09:32:17.345380803 +0100
11 @@ -24,7 +24,7 @@
12 #include <assert.h>
13 #include <ctype.h>
15 -#include <HTMLparser.h>
16 +#include <libxml/HTMLparser.h>
18 int do_html;
19 int in_tag = 0;
20 @@ -104,7 +104,7 @@
21 fputs("/>",stdout);
22 else {
23 const htmlElemDesc *elem = NULL;
24 - if (do_html) elem = htmlTagLookup(name);
25 + if (do_html) elem = htmlTagLookup((xmlChar *) name);
26 finish_tag();
27 if (NULL == elem || (!elem->endTag && !elem->empty)) {
28 fputs("</",stdout);
29 diff -urNad xml2-0.4~/Makefile.am xml2-0.4/Makefile.am
30 --- xml2-0.4~/Makefile.am 2008-02-07 16:58:13.000000000 +0100
31 +++ xml2-0.4/Makefile.am 2008-03-12 09:32:17.345380803 +0100
32 @@ -1,9 +1,9 @@
33 -AM_CPPFLAGS = $(XML_CFLAGS)
34 +AM_CFLAGS = $(XML_CFLAGS)
35 bin_PROGRAMS = xml2 2xml csv2 2csv
36 xml2_SOURCES = xml2.c
37 -xml2_LDADD = -lxml
38 +xml2_LDADD = $(XML_LIBS)
39 2xml_SOURCES = 2xml.c
40 -2xml_LDADD = -lxml
41 +2xml_LDADD = $(XML_LIBS)
42 csv2_SOURCES = csv2.c
43 2csv_SOURCES = 2csv.c
45 diff -urNad xml2-0.4~/configure.ac xml2-0.4/configure.ac
46 --- xml2-0.4~/configure.ac 2008-02-07 17:11:54.000000000 +0100
47 +++ xml2-0.4/configure.ac 2008-03-12 09:32:17.345380803 +0100
48 @@ -11,7 +11,7 @@
49 AC_PROG_CC
51 # Checks for libraries.
52 -PKG_CHECK_MODULES(XML, libxml)
53 +PKG_CHECK_MODULES(XML, libxml-2.0)
54 AC_SUBST(XML_LIBS)
55 AC_SUBST(XML_CFLAGS)
57 diff -urNad xml2-0.4~/xml2.c xml2-0.4/xml2.c
58 --- xml2-0.4~/xml2.c 2001-10-28 05:29:46.000000000 +0100
59 +++ xml2-0.4/xml2.c 2008-03-12 09:32:17.345380803 +0100
60 @@ -24,8 +24,8 @@
61 #include <string.h>
62 #include <ctype.h>
64 -#include <parser.h>
65 -#include <HTMLparser.h>
66 +#include <libxml/parser.h>
67 +#include <libxml/HTMLparser.h>
69 struct node