1 %define __strip %{_mingw32_strip}
2 %define __objdump %{_mingw32_objdump}
3 %define _use_internal_dependency_generator 0
4 %define __find_requires %{_mingw32_findrequires}
5 %define __find_provides %{_mingw32_findprovides}
10 Summary: XQilla is an XQuery and XPath 2.0 library, built on top of Xerces-C
13 Group: Development/Libraries
15 URL: http://xqilla.sourceforge.net/HomePage
16 Source0: http://downloads.sourceforge.net/xqilla/XQilla-%{version}.tar.gz
17 Source1: http://www.apache.org/dist/xerces/c/2/sources/xerces-c-src_2_8_0.tar.gz
19 # Patch from Xerces-C.
20 Patch1000: xerces-c-dllwrap.patch
22 # Use ifdef WIN32 instead of MSVC-specific tests.
23 Patch1001: xqilla-xmark-test-win32.patch
25 # XQC (the C API) does not work. The library part compiles OK but for
26 # reasons unknown the symbols never get added to the libxqilla.dll.a
27 # implib. The patch disables those sample programs.
28 Patch1002: xqilla-no-xqc-tests.patch
30 # XQLexer uses EOF symbol from stdio.
31 Patch1003: xqilla-lexer-cstdio.patch
33 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
36 BuildRequires: mingw32-filesystem >= 35
37 BuildRequires: mingw32-gcc
38 BuildRequires: mingw32-gcc-c++
39 BuildRequires: mingw32-binutils
41 BuildRequires: mingw32-xerces-c >= 2.8.0
43 BuildRequires: autoconf, automake, libtool
44 BuildRequires: doxygen, graphviz
48 XQilla is an XQuery and XPath 2.0 implementation written in C++ and based
49 on Xerces-C. It implements the DOM 3 XPath API, as well as having it's own
50 more powerful API. It conforms to the W3C proposed recomendation of XQuery
55 %setup -q -a 1 -n XQilla-%{version}
57 pushd xerces-c-src_2_8_0
67 # XQilla requires a _built_ copy of Xerces-C. Thus we have to build
68 # one first, copying much of the code from 'mingw32-xerces-c.spec'.
69 # Native Fedora package instead patches the configure script to look
70 # at the installed copy.
71 pushd xerces-c-src_2_8_0
72 export XERCESCROOT="$PWD"
73 cd $XERCESCROOT/src/xercesc
74 CXXFLAGS="%{_mingw32_cflags}" \
75 CFLAGS="%{_mingw32_cflags}" \
84 -P %{_mingw32_prefix} \
85 -C --libdir="%{_mingw32_libdir}" -C --host=%{_mingw32_host}
86 %{__make} DLLWRAP=%{_mingw32_dllwrap}
91 libtoolize --force --copy
92 automake --add-missing --copy --force
95 MINGW32_CFLAGS="%{_mingw32_cflags} -DXQILLA_APIS" \
96 MINGW32_CXXFLAGS="%{_mingw32_cflags} -DXQILLA_APIS" \
97 %{_mingw32_configure} \
100 --with-xerces=$(pwd)/xerces-c-src_2_8_0
105 rm -rf $RPM_BUILD_ROOT
107 export CPPROG="cp -p"
108 make install DESTDIR=$RPM_BUILD_ROOT
109 find $RPM_BUILD_ROOT -name '*.la' -exec rm -f '{}' ';'
110 mkdir -p $RPM_BUILD_ROOT%{_defaultdocdir}/%{name}-%{version}
111 cp -pr ChangeLog LICENSE $RPM_BUILD_ROOT%{_defaultdocdir}/%{name}-%{version}
112 cp -pr docs/dom3-api docs/simple-api \
113 $RPM_BUILD_ROOT%{_defaultdocdir}/%{name}-%{version}
114 for file in `find $RPM_BUILD_ROOT%{_defaultdocdir}/%{name}-%{version}`; do\
115 if ! [ -s "$file" ]; then rm -f "$file"; fi;
120 rm -rf $RPM_BUILD_ROOT
124 %defattr(-,root,root)
126 %{_mingw32_bindir}/i686-pc-mingw32-xqilla.exe
127 %{_mingw32_bindir}/libxqilla-5.dll
128 %{_mingw32_libdir}/libxqilla.dll.a
129 %{_mingw32_includedir}/xqc.h
130 %{_mingw32_includedir}/xqilla/
134 * Sat Feb 21 2009 Richard W.M. Jones <rjones@redhat.com> - 2.2.0-3
135 - Rebuild for mingw32-gcc 4.4
137 * Wed Feb 18 2009 Richard W.M. Jones <rjones@redhat.com> - 2.2.0-1
138 - Initial RPM release.