From db3d2b48e890e6f8ddc009fbd14f8a914edbbc71 Mon Sep 17 00:00:00 2001 From: Daniel Veillard Date: Tue, 28 Oct 2003 14:33:17 +0000 Subject: [PATCH] applied patch from Roumen Petrov for bug #124539 when building outside the * configure.in python/Makefile.am python/tests/Makefile.am: applied patch from Roumen Petrov for bug #124539 when building outside the source directory * libxslt/xsltutils.c: fixed the way to grab the line number from the document, use the predefiend libxml2 API which mate it work with both 2.5.x and 2.6.x Daniel --- ChangeLog | 9 +++++++++ configure.in | 5 ++++- libxslt/xsltutils.c | 13 +------------ libxslt/xsltwin32config.h | 6 +++--- python/Makefile.am | 5 +++-- python/tests/Makefile.am | 8 +++++--- 6 files changed, 25 insertions(+), 21 deletions(-) diff --git a/ChangeLog b/ChangeLog index cef2c3f..82990e3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +Tue Oct 28 15:30:54 CET 2003 Daniel Veillard + + * configure.in python/Makefile.am python/tests/Makefile.am: applied + patch from Roumen Petrov for bug #124539 when building outside the + source directory + * libxslt/xsltutils.c: fixed the way to grab the line number from + the document, use the predefiend libxml2 API which mate it work + with both 2.5.x and 2.6.x + Mon Oct 27 08:57:43 HKT 2003 William Brack * libxslt/xslt.c: put in #undef for IS_BLANK macros to fix diff --git a/configure.in b/configure.in index 3459469..4394549 100644 --- a/configure.in +++ b/configure.in @@ -304,6 +304,7 @@ AC_ARG_WITH(libxml-src, [ --with-libxml-src=[DIR] For libxml thats not installed yet (sets all three above)], LIBXML_SRC="$withval" ) +AC_SUBST(LIBXML_SRC) dnl dnl where is xml2-config @@ -440,8 +441,10 @@ dnl for the spec file RELDATE=`date +'%a %b %e %Y'` AC_SUBST(RELDATE) +( cd $srcdir rm -f COPYING.LIB COPYING -ln -s Copyright COPYING +$LN_S Copyright COPYING +) AC_OUTPUT([ diff --git a/libxslt/xsltutils.c b/libxslt/xsltutils.c index 3339aae..7203fcf 100644 --- a/libxslt/xsltutils.c +++ b/libxslt/xsltutils.c @@ -415,18 +415,7 @@ xsltPrintErrorContext(xsltTransformContextPtr ctxt, file = doc->URL; } else { - /* - * Try to find contextual informations to report - */ - if (node->type == XML_ELEMENT_NODE) { - line = (int) node->content; - } else if ((node->prev != NULL) && - (node->prev->type == XML_ELEMENT_NODE)) { - line = (int) node->prev->content; - } else if ((node->parent != NULL) && - (node->parent->type == XML_ELEMENT_NODE)) { - line = (int) node->parent->content; - } + line = xmlGetLineNo(node); if ((node->doc != NULL) && (node->doc->URL != NULL)) file = node->doc->URL; if (node->name != NULL) diff --git a/libxslt/xsltwin32config.h b/libxslt/xsltwin32config.h index 66126c6..71e35f7 100644 --- a/libxslt/xsltwin32config.h +++ b/libxslt/xsltwin32config.h @@ -21,21 +21,21 @@ extern "C" { * * the version string like "1.2.3" */ -#define LIBXSLT_DOTTED_VERSION "1.0.34" +#define LIBXSLT_DOTTED_VERSION "1.0.33" /** * LIBXSLT_VERSION: * * the version number: 1.2.3 value is 1002003 */ -#define LIBXSLT_VERSION 10034 +#define LIBXSLT_VERSION 10033 /** * LIBXSLT_VERSION_STRING: * * the version number string, 1.2.3 value is "1002003" */ -#define LIBXSLT_VERSION_STRING "10034" +#define LIBXSLT_VERSION_STRING "10033" /** * WITH_XSLT_DEBUG: diff --git a/python/Makefile.am b/python/Makefile.am index b6ac577..b13c430 100644 --- a/python/Makefile.am +++ b/python/Makefile.am @@ -7,7 +7,8 @@ INCLUDES = \ -I$(PYTHON_INCLUDES) \ $(LIBXML_CFLAGS) \ -I$(top_srcdir)/libxslt \ - -I$(top_srcdir) + -I$(top_srcdir) \ + -I../libexslt DOCS_DIR = $(datadir)/doc/libxslt-python-$(LIBXSLT_VERSION) # libxsltclass.txt is generated @@ -46,7 +47,7 @@ install-data-local: @INSTALL@ -m 0644 libxslt.py $(DESTDIR)$(pythondir) $(mkinstalldirs) $(DESTDIR)$(DOCS_DIR) @(for doc in $(DOCS) ; \ - do @INSTALL@ -m 0644 $$doc $(DESTDIR)$(DOCS_DIR) ; done) + do @INSTALL@ -m 0644 $(srcdir)/$$doc $(DESTDIR)$(DOCS_DIR) ; done) GENERATE = generator.py API_DESC = $(top_srcdir)/doc/libxslt-api.xml $(srcdir)/libxslt-python-api.xml diff --git a/python/tests/Makefile.am b/python/tests/Makefile.am index 936cf6e..2458688 100644 --- a/python/tests/Makefile.am +++ b/python/tests/Makefile.am @@ -17,8 +17,10 @@ EXTRA_DIST = $(TESTSPY) $(XMLS) $(EXTRAS) if WITH_PYTHON tests: $(TESTSPY) - -@(PYTHONPATH="..:../.libs:$(srcdir)/.." ; export PYTHONPATH; \ - for test in $(TESTSPY) ; do echo "-- $$test" ; $(PYTHON) $(srcdir)/$$test ; done) + -@(PYTHONPATH="`pwd`/..:`pwd`/../.libs:$(srcdir)/.."; \ + if test "x$(LIBXML_SRC)" != "x" ; then PYTHONPATH="$$PYTHONPATH:$(LIBXML_SRC)/python:$(LIBXML_SRC)/python/.libs"; fi; \ + export PYTHONPATH; \ + for test in $(TESTSPY) ; do echo "-- $$test" ; (cd $(srcdir) && $(PYTHON) $$test ); done) else tests: endif @@ -29,5 +31,5 @@ clean: install-data-local: $(mkinstalldirs) $(DESTDIR)$(EXAMPLE_DIR) -(for test in $(TESTSPY) $(XMLS) $(EXTRAS); \ - do @INSTALL@ -m 0644 $$test $(DESTDIR)$(EXAMPLE_DIR) ; done) + do @INSTALL@ -m 0644 $(srcdir)/$$test $(DESTDIR)$(EXAMPLE_DIR) ; done) -- 2.7.4