From: Richard W.M. Jones <"Richard W.M. Jones "> Date: Thu, 19 Feb 2009 15:46:29 +0000 (+0000) Subject: Added XQilla 2.2.0. X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=bb548aa14e0195ac59f6258ed7e46a981127966c;p=fedora-mingw.git Added XQilla 2.2.0. --- diff --git a/.hgignore b/.hgignore index 47470a6..8b3d21b 100644 --- a/.hgignore +++ b/.hgignore @@ -158,5 +158,6 @@ w32api/w32api-3.11-src.tar.gz w32api/w32api-3.12-mingw32-src.tar.gz xerces-c/xerces-c-src_2_8_0.tar.gz xqilla/XQilla-2.1.3.tar.gz +xqilla/XQilla-2.2.0.tar.gz xqilla/xerces-c-src_2_8_0.tar.gz zlib/zlib-1.2.3.tar.gz diff --git a/xerces-c/mingw32-xerces-c.spec b/xerces-c/mingw32-xerces-c.spec index 92848e8..3a6cc12 100644 --- a/xerces-c/mingw32-xerces-c.spec +++ b/xerces-c/mingw32-xerces-c.spec @@ -71,6 +71,7 @@ find -name runConfigure | while read f; do sed -i -e 's/-w -O -DNDEBUG/-DNDEBUG/g' $f done +# NB: This is duplicated in 'mingw32-xqilla.spec'. cd $XERCESCROOT/src/xercesc CXXFLAGS="%{_mingw32_cflags}" \ CFLAGS="%{_mingw32_cflags}" \ diff --git a/xqilla/mingw32-xqilla.spec b/xqilla/mingw32-xqilla.spec index 1fd0dd4..98774c3 100644 --- a/xqilla/mingw32-xqilla.spec +++ b/xqilla/mingw32-xqilla.spec @@ -5,7 +5,7 @@ %define __find_provides %{_mingw32_findprovides} Name: mingw32-xqilla -Version: 2.1.3 +Version: 2.2.0 Release: 1%{?dist} Summary: XQilla is an XQuery and XPath 2.0 library, built on top of Xerces-C @@ -16,7 +16,16 @@ URL: http://xqilla.sourceforge.net/HomePage Source0: http://downloads.sourceforge.net/xqilla/XQilla-%{version}.tar.gz Source1: http://www.apache.org/dist/xerces/c/2/sources/xerces-c-src_2_8_0.tar.gz -Patch1: xqilla-xercesc-libdir.patch +# Patch from Xerces-C. +Patch1000: xerces-c-dllwrap.patch + +# Use ifdef WIN32 instead of MSVC-specific tests. +Patch1001: xqilla-xmark-test-win32.patch + +# XQC (the C API) does not work. The library part compiles OK but for +# reasons unknown the symbols never get added to the libxqilla.dll.a +# implib. The patch disables those sample programs. +Patch1002: xqilla-no-xqc-tests.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch @@ -27,12 +36,10 @@ BuildRequires: mingw32-gcc-c++ BuildRequires: mingw32-binutils BuildRequires: mingw32-xerces-c >= 2.8.0 +BuildRequires: flex BuildRequires: autoconf, automake, libtool BuildRequires: doxygen, graphviz -%define xercesc_dir xerces-c-src_2_8_0 -%define xercesc_build_root %{_builddir}/%{xercesc_dir} - %description XQilla is an XQuery and XPath 2.0 implementation written in C++ and based @@ -42,21 +49,51 @@ and XPath 2.0. %prep -%setup -q -b 1 -n XQilla-%{version} -%patch1 +%setup -q -a 1 -n XQilla-%{version} + +pushd xerces-c-src_2_8_0 +%patch1000 -p1 +popd + +%patch1001 -p1 +%patch1002 -p1 %build +# XQilla requires a _built_ copy of Xerces-C. Thus we have to build +# one first, copying much of the code from 'mingw32-xerces-c.spec'. +# Native Fedora package instead patches the configure script to look +# at the installed copy. +pushd xerces-c-src_2_8_0 +export XERCESCROOT="$PWD" +cd $XERCESCROOT/src/xercesc +CXXFLAGS="%{_mingw32_cflags}" \ +CFLAGS="%{_mingw32_cflags}" \ +./runConfigure \ + -pmingw-msys \ + -c%{_mingw32_cc} \ + -x%{_mingw32_cxx} \ + -minmem \ + -nwinsock \ + -tWin32 \ + -b32 \ + -P %{_mingw32_prefix} \ + -C --libdir="%{_mingw32_libdir}" -C --host=%{_mingw32_host} +%{__make} DLLWRAP=%{_mingw32_dllwrap} +popd + rm -f aclocal.m4 aclocal libtoolize --force --copy automake --add-missing --copy --force autoconf +MINGW32_CFLAGS="%{_mingw32_cflags} -DXQILLA_APIS" \ +MINGW32_CXXFLAGS="%{_mingw32_cflags} -DXQILLA_APIS" \ %{_mingw32_configure} \ --disable-static \ --disable-rpath \ - --with-xerces=%{xercesc_build_root} + --with-xerces=$(pwd)/xerces-c-src_2_8_0 make %{?_smp_mflags} @@ -82,10 +119,13 @@ rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) %doc LICENSE -%{_mingw32_bindir}/foo.dll -%{_mingw32_libdir}/foo.dll.a +%{_mingw32_bindir}/i686-pc-mingw32-xqilla.exe +%{_mingw32_bindir}/libxqilla-5.dll +%{_mingw32_libdir}/libxqilla.dll.a +%{_mingw32_includedir}/xqc.h +%{_mingw32_includedir}/xqilla/ %changelog -* Wed Feb 18 2009 Richard W.M. Jones - 2.1.3-1 +* Wed Feb 18 2009 Richard W.M. Jones - 2.2.0-1 - Initial RPM release. diff --git a/xqilla/xerces-c-dllwrap.patch b/xqilla/xerces-c-dllwrap.patch new file mode 100644 index 0000000..377ce21 --- /dev/null +++ b/xqilla/xerces-c-dllwrap.patch @@ -0,0 +1,16 @@ +--- xerces-c-src_2_8_0/src/xercesc/Makefile.incl.orig 2009-02-18 15:47:24.000000000 +0000 ++++ xerces-c-src_2_8_0/src/xercesc/Makefile.incl 2009-02-18 15:47:45.000000000 +0000 +@@ -459,11 +459,12 @@ + endif + + #=============== MINGW SPECIFIC OPTIONS ========================= ++DLLWRAP = dllwrap + ifeq (${PLATFORM}, MINGW) + PLATFORM_COMPILE_OPTIONS = -D${PLATFORM} -fexceptions -D__GNUWIN32__ -DWIN32 -D_WINDOWS -DNDEBUG -DPLATFORM_WIN32 + + ifeq (${LIBTYPE},shared) +- MAKE_SHARED = dllwrap --export-all-symbols --driver-name ${CXX} ${LDFLAGS} ++ MAKE_SHARED = $(DLLWRAP) --export-all-symbols --driver-name ${CXX} ${LDFLAGS} + MAKE_SHARED_C = ${CC} -D${PLATFORM} ${LDFLAGS} + else + PLATFORM_COMPILE_OPTIONS += -DXML_LIBRARY # switch off import/export diff --git a/xqilla/xqilla-no-xqc-tests.patch b/xqilla/xqilla-no-xqc-tests.patch new file mode 100644 index 0000000..b324b07 --- /dev/null +++ b/xqilla/xqilla-no-xqc-tests.patch @@ -0,0 +1,32 @@ +--- XQilla-2.2.0/Makefile.am 2008-12-03 18:19:55.000000000 +0000 ++++ XQilla-2.2.0.mingw/Makefile.am 2009-02-19 15:16:31.000000000 +0000 +@@ -6,7 +6,7 @@ + LDADD = libxqilla.la + + bin_PROGRAMS = xqilla +-noinst_PROGRAMS = xqtsRunner xmarkRunner simple-basic simple-context-item xqc-basic xqc-context-item ++noinst_PROGRAMS = xqtsRunner xmarkRunner simple-basic simple-context-item + + if BUILD_DOM_SAMPLES + noinst_PROGRAMS += dom-basic dom-context-item dom-resolver +@@ -622,14 +622,14 @@ + src/samples/dom-api/dom-resolver.cpp + + # Dummy C++ source to cause C++ linking. +-nodist_EXTRA_xqc_basic_SOURCES = dummy.cpp +-xqc_basic_SOURCES = \ +-src/samples/xqc-api/xqc-basic.c ++#nodist_EXTRA_xqc_basic_SOURCES = dummy.cpp ++#xqc_basic_SOURCES = \ ++#src/samples/xqc-api/xqc-basic.c + + # Dummy C++ source to cause C++ linking. +-nodist_EXTRA_xqc_context_item_SOURCES = dummy.cpp +-xqc_context_item_SOURCES = \ +-src/samples/xqc-api/xqc-context-item.c ++#nodist_EXTRA_xqc_context_item_SOURCES = dummy.cpp ++#xqc_context_item_SOURCES = \ ++#src/samples/xqc-api/xqc-context-item.c + + LEXERFILE = $(top_srcdir)/src/lexer/XQLexer.cpp + LEXTEMPLATE = $(top_srcdir)/src/lexer/XQLexer.l diff --git a/xqilla/xqilla-xmark-test-win32.patch b/xqilla/xqilla-xmark-test-win32.patch new file mode 100644 index 0000000..52f2329 --- /dev/null +++ b/xqilla/xqilla-xmark-test-win32.patch @@ -0,0 +1,11 @@ +--- XQilla-2.2.0/tests/xmark/xmark.cpp 2008-12-08 15:46:05.000000000 +0000 ++++ XQilla-2.2.0.mingw/tests/xmark/xmark.cpp 2009-02-19 14:29:55.000000000 +0000 +@@ -68,7 +68,7 @@ + time(&tt); + + struct tm *tm_p; +-#ifdef _MSC_VER ++#ifdef WIN32 + tm_p = localtime(&tt); + #else + struct tm tm;