[Libreoffice-commits] core.git: configure.ac download.lst redland/ExternalPackage_raptor.mk redland/ExternalPackage_rasqal.mk redland/ExternalPackage_redland.mk redland/ExternalProject_raptor.mk redland/ExternalProject_rasqal.mk redland/ExternalProject_redland.mk redland/Library_raptor.mk redland/Library_rasqal.mk redland/Library_rdf.mk redland/LICENSE.txt redland/raptor redland/rasqal redland/README redland/redland redland/UnpackedTarball_raptor.mk redland/UnpackedTarball_rasqal.mk redland/UnpackedTarball_redland.mk RepositoryExternal.mk Repository.mk scp2/source

Michael Stahl mstahl at redhat.com
Wed Apr 3 03:17:31 PDT 2013


 Repository.mk                                      |    2 
 RepositoryExternal.mk                              |    8 
 configure.ac                                       |    4 
 download.lst                                       |    6 
 redland/ExternalPackage_raptor.mk                  |   21 
 redland/ExternalPackage_rasqal.mk                  |   12 
 redland/ExternalPackage_redland.mk                 |   18 
 redland/ExternalProject_raptor.mk                  |   16 
 redland/ExternalProject_rasqal.mk                  |   39 
 redland/ExternalProject_redland.mk                 |   48 
 redland/LICENSE.txt                                |   11 
 redland/Library_raptor.mk                          |   43 
 redland/Library_rasqal.mk                          |   69 
 redland/Library_rdf.mk                             |   72 
 redland/README                                     |    1 
 redland/UnpackedTarball_raptor.mk                  |   22 
 redland/UnpackedTarball_rasqal.mk                  |   18 
 redland/UnpackedTarball_redland.mk                 |   17 
 redland/raptor/raptor-1.4.18.aix.patch             |   21 
 redland/raptor/raptor-1.4.18.autotools.patch       |   66 
 redland/raptor/raptor-1.4.18.bundled-soname.patch  |   11 
 redland/raptor/raptor-1.4.18.cross.patch           |   35 
 redland/raptor/raptor-1.4.18.entities.patch        |  394 ---
 redland/raptor/raptor-1.4.18.fixes.patch           |   42 
 redland/raptor/raptor-1.4.18.legal.patch           |   18 
 redland/raptor/raptor-1.4.18.libxml.patch          |  117 -
 redland/raptor/raptor-1.4.18.libxslt.patch         |  116 -
 redland/raptor/raptor-1.4.18.mingw.patch           |   41 
 redland/raptor/raptor-1.4.18.no-soname.patch       |   11 
 redland/raptor/raptor-1.4.18.ooo_build.patch       |   43 
 redland/raptor/raptor-1.4.18.rindex.patch          |   62 
 redland/raptor/raptor-1.4.18.win32.patch           |   78 
 redland/raptor/raptor-android.patch.1              |   13 
 redland/raptor/raptor-bundled-soname.patch.1       |   13 
 redland/raptor/raptor-freebsd.patch.1              |   28 
 redland/raptor/raptor-mingw.patch.1                |   13 
 redland/raptor/raptor2.h                           | 2100 +++++++++++++++++++
 redland/raptor/raptor_config.h                     |  393 +++
 redland/rasqal/rasqal-0.9.16.aix.patch             |   44 
 redland/rasqal/rasqal-0.9.16.autotools.patch       |   58 
 redland/rasqal/rasqal-0.9.16.bundled-soname.patch  |   11 
 redland/rasqal/rasqal-0.9.16.legal.patch           |   18 
 redland/rasqal/rasqal-0.9.16.mingw.patch           |   11 
 redland/rasqal/rasqal-0.9.16.no-soname.patch       |   11 
 redland/rasqal/rasqal-0.9.16.ooo_build.patch       |   56 
 redland/rasqal/rasqal-0.9.16.win32.patch           |   43 
 redland/rasqal/rasqal-aix.patch.1                  |   25 
 redland/rasqal/rasqal-android.patch.1              |   14 
 redland/rasqal/rasqal-bundled-soname.patch.1       |   13 
 redland/rasqal/rasqal-freebsd.patch.1              |   28 
 redland/rasqal/rasqal-mingw.patch.1                |   13 
 redland/rasqal/rasqal-msvc.patch.1                 |   87 
 redland/rasqal/rasqal-pkgconfig.patch.1            |  512 ++++
 redland/rasqal/rasqal.h                            | 2221 +++++++++++++++++++++
 redland/redland/librdf.h                           |  434 ++++
 redland/redland/redland-1.0.8.aix.patch            |   21 
 redland/redland/redland-1.0.8.autotools.patch      |   78 
 redland/redland/redland-1.0.8.bundled-soname.patch |   11 
 redland/redland/redland-1.0.8.legal.patch          |   54 
 redland/redland/redland-1.0.8.mingw.patch          |   11 
 redland/redland/redland-1.0.8.no-soname.patch      |   11 
 redland/redland/redland-1.0.8.ooo_build.patch      |   22 
 redland/redland/redland-1.0.8.win32.patch          |  154 -
 redland/redland/redland-android.patch.1            |   14 
 redland/redland/redland-bundled-soname.patch.1     |   13 
 redland/redland/redland-freebsd.patch.1            |   28 
 redland/redland/redland-mingw.patch.1              |   13 
 redland/redland/redland-msvc.patch.1               |  146 +
 redland/redland/redland-pkgconfig.patch.1          |  619 +++++
 scp2/source/ooo/file_library_ooo.scp               |    8 
 70 files changed, 6983 insertions(+), 1861 deletions(-)

New commits:
commit d719c01c2f112d97b09aee008f9bfee57719eeed
Author: Michael Stahl <mstahl at redhat.com>
Date:   Mon Apr 1 12:41:18 2013 +0200

    Easter Bunny brings new redland tarballs
    
    upgrade raptor to 2.0.9, rasqal to 0.9.30, redland to 1.0.16:
    - new raptor depends on libxml2 version 2.6.27 and thus will _not_
      build against system libxml2 on Mac OS X 10.4/10.5
    - stop delivering raptor-config/rasqal-config, set env vars instead
      (which unfortunately requires patching configures, TODO: upstream that)
    - remove redundant configure flags
    - stop passing -Wl,no-inhibit-exec (causes HP-UX code to be built on Linux)
    - disable new rasqal build deps:
        --with-uuid-library=internal --with-digest-library=internal
    - disable redland "libltdl" nonsense via --disable-modular
    - fortunately openssl digest support has been removed too
    - drop raptor-1.4.18.ooo_build.patch, set RAPTOR2_CFLAGS/LIBS instead
    - drop raptor-1.4.18.autotools.patch:
      + FreeBSD parts moved to raptor-freebsd.patch.1
      + Android parts obsolete
      + don't know about the MinGW part (TODO)
    - from drop raptor-1.4.18.mingw.patch dropped the part defining parsers
      to be built, done via --enable-parsers
    - drop redland/raptor/raptor-1.4.18.cross.patch:
      the vsnprintf check is now done at runtime, and expat has been removed
    - drop raptor-1.4.18.aix.patch,redland-1.0.8.aix.patch:
      presumably don't need special check for V7BETA since it's released now
    - drop raptor-1.4.18.rindex.patch, index/rindex no longer used
    - drop raptor-1.4.18.entities.patch, fixed upstream in 2.0.7
    - drop raptor-1.4.18.fixes.patch, fixed upstream in 2.0.9
    - drop raptor-1.4.18.{libxml,libxslt}.patch: TODO
    - drop {raptor-1.4.18,rasqal-0.9.16,redland-1.0.8}.legal.patch:
      we don't care any more about Sun legal dept.
    - drop rasqal-0.9.16.ooo_build.patch, set RASQAL_CFLAGS/LIBS instead
    - drop rasqal-0.9.16.autotools.patch:
      + FreeBSD parts moved to rasqal-freebsd.patch.1
      + Android parts obsolete
      + MinGW part only for cygwin build
    - drop redland-1.0.8.autotools.patch:
      + FreeBSD parts moved to redland-freebsd.patch.1
      + Android parts obsolete
      + don't know about the MinGW part (TODO)
    - drop redland-1.0.8.ooo_build.patch,
      hopefully not necessary to disable utils build
    
    Change-Id: I9cc44928ba87392d69e809abe2236cec0e4a508a
    Reviewed-on: https://gerrit.libreoffice.org/3154
    Tested-by: LibreOffice gerrit bot <gerrit at libreoffice.org>
    Reviewed-by: Michael Stahl <mstahl at redhat.com>

diff --git a/Repository.mk b/Repository.mk
index 268eadc..a9262a7 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -535,7 +535,7 @@ $(eval $(call gb_Helper_register_libraries,PLAINLIBS_OOO, \
     propertyhdl \
     propertyhdl_x64 \
     qslnkmsi \
-    raptor \
+    raptor2 \
     rasqal \
     reg4allmsdoc \
     regactivex \
diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index 64c2b4da..295058f 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -878,7 +878,7 @@ else # !SYSTEM_REDLAND
 
 define gb_LinkTarget__use_redland_headers
 $(call gb_LinkTarget_set_include,$(1),\
-	-I$(call gb_UnpackedTarball_get_dir,redland)/librdf \
+	-I$(call gb_UnpackedTarball_get_dir,redland)/src \
 	$$(INCLUDE) \
 )
 
@@ -913,7 +913,7 @@ $(call gb_LinkTarget_use_libraries,$(1),\
 
 ifeq ($(OS),MACOSX)
 
-$(call gb_LinkTarget_add_libs,$(1),$(foreach replaceme,librasqal-lo.1 libraptor-lo.1,-dylib_file @loader_path/$(replaceme).dylib:$(gb_Library_OUTDIRLOCATION)/$(replaceme).dylib))
+$(call gb_LinkTarget_add_libs,$(1),$(foreach replaceme,librasqal-lo.$(RASQAL_MAJOR) libraptor2-lo.$(RAPTOR_MAJOR),-dylib_file @loader_path/$(replaceme).dylib:$(gb_Library_OUTDIRLOCATION)/$(replaceme).dylib))
 
 endif
 
@@ -924,14 +924,14 @@ else # ANDROID
 $(eval $(call gb_Helper_register_static_libraries,PLAINLIBS, \
 	rdf \
 	rasqal \
-	raptor \
+	raptor2 \
 ))
 
 define gb_LinkTarget__use_librdf
 $(call gb_LinkTarget_use_static_libraries,$(1),\
 	rdf \
 	rasqal \
-	raptor \
+	raptor2 \
 	crypto \
 )
 
diff --git a/configure.ac b/configure.ac
index 598e7da..1f4e2b1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -8581,8 +8581,8 @@ if test "$with_system_redland" = "yes"; then
     libo_MINGW_TRY_DLL([RASQAL], [librasqal])
     libo_MINGW_TRY_DLL([SQLITE3], [libsqlite3])
 else
-    RAPTOR_MAJOR="1"
-    RASQAL_MAJOR="1"
+    RAPTOR_MAJOR="0"
+    RASQAL_MAJOR="3"
     REDLAND_MAJOR="0"
 fi
 AC_SUBST(RAPTOR_MAJOR)
diff --git a/download.lst b/download.lst
index e0cf484..2ff86dab 100644
--- a/download.lst
+++ b/download.lst
@@ -73,9 +73,9 @@ export PIXMAN_TARBALL := c63f411b3ad147db2bcce1bf262a0e02-pixman-0.24.4.tar.bz2
 export PNG_TARBALL := 9e5d864bce8f06751bbd99962ecf4aad-libpng-1.5.10.tar.gz
 export POSTGRESQL_TARBALL := c0b4799ea9850eae3ead14f0a60e9418-postgresql-9.2.1.tar.bz2
 export PYTHON_TARBALL := b3b2524f72409d919a4137826a870a8f-Python-3.3.0.tar.bz2
-export RAPTOR_TARBALL := 284e768eeda0e2898b0d5bf7e26a016e-raptor-1.4.18.tar.gz
-export RASQAL_TARBALL := fca8706f2c4619e2fa3f8f42f8fc1e9d-rasqal-0.9.16.tar.gz
-export REDLAND_TARBALL := ca66e26082cab8bb817185a116db809b-redland-1.0.8.tar.gz
+export RAPTOR_TARBALL := 4ceb9316488b0ea01acf011023cf7fff-raptor2-2.0.9.tar.gz
+export RASQAL_TARBALL := b12c5f9cfdb6b04efce5a4a186b8416b-rasqal-0.9.30.tar.gz
+export REDLAND_TARBALL := 32f8e1417a64d3c6f2c727f9053f55ea-redland-1.0.16.tar.gz
 export RHINO_TARBALL := 798b2ffdc8bcfe7bca2cf92b62caf685-rhino1_5R5.zip
 export SWING_TARBALL := 35c94d2df8893241173de1d16b6034c0-swingExSrc.zip
 export TOMCAT_TARBALL := 2a177023f9ea8ec8bd00837605c5df1b-jakarta-tomcat-5.0.30-src.tar.gz
diff --git a/redland/ExternalPackage_raptor.mk b/redland/ExternalPackage_raptor.mk
index 05a2f05..a80e69e 100644
--- a/redland/ExternalPackage_raptor.mk
+++ b/redland/ExternalPackage_raptor.mk
@@ -11,24 +11,23 @@ $(eval $(call gb_ExternalPackage_ExternalPackage,raptor,raptor))
 
 $(eval $(call gb_ExternalPackage_use_external_project,raptor,raptor))
 
-$(eval $(call gb_ExternalPackage_add_file,raptor,bin/raptor-config,src/raptor-config))
-
 ifeq ($(OS),MACOSX)
-$(eval $(call gb_ExternalPackage_add_file,raptor,lib/libraptor-lo.1.dylib,src/.libs/libraptor-lo.1.dylib))
-$(eval $(call gb_ExternalPackage_add_file,raptor,lib/libraptor.dylib,src/.libs/libraptor-lo.1.dylib))
+$(eval $(call gb_ExternalPackage_add_file,raptor,lib/libraptor2-lo.$(RAPTOR_MAJOR).dylib,src/.libs/libraptor2-lo.$(RAPTOR_MAJOR).dylib))
+$(eval $(call gb_ExternalPackage_add_file,raptor,lib/libraptor2.dylib,src/.libs/libraptor2-lo.$(RAPTOR_MAJOR).dylib))
 else ifneq ($(filter IOS ANDROID,$(OS)),)
-$(eval $(call gb_ExternalPackage_add_file,raptor,lib/libraptor.a,src/.libs/libraptor.a))
+$(eval $(call gb_ExternalPackage_add_file,raptor,lib/libraptor2.a,src/.libs/libraptor2.a))
 else ifneq ($(filter WNTGCC,$(OS)$(COM)),)
-$(eval $(call gb_ExternalPackage_add_file,raptor,lib/libraptor.dll.a,src/.libs/libraptor.dll.a))
-$(eval $(call gb_ExternalPackage_add_file,raptor,bin/libraptor-1.dll,src/.libs/libraptor-1.dll))
+$(eval $(call gb_ExternalPackage_add_file,raptor,lib/libraptor2.dll.a,src/.libs/libraptor2.dll.a))
+$(eval $(call gb_ExternalPackage_add_file,raptor,bin/libraptor2-$(RAPTOR_MAJOR).dll,src/.libs/libraptor2-$(RAPTOR_MAJOR).dll))
 else ifneq ($(filter WNT,$(OS)),)
-$(eval $(call gb_ExternalPackage_add_file,raptor,lib/libraptor.a,src/.libs/libraptor.a))
-$(eval $(call gb_ExternalPackage_add_file,raptor,bin/libraptor.dll,src/.libs/libraptor.dll))
+$(eval $(call gb_ExternalPackage_add_file,raptor,lib/libraptor2.a,src/.libs/libraptor2.a))
+$(eval $(call gb_ExternalPackage_add_file,raptor,bin/libraptor2.dll,src/.libs/libraptor2.dll))
 else
-$(eval $(call gb_ExternalPackage_add_file,raptor,lib/libraptor-lo.so.1,src/.libs/libraptor-lo.so.1.1.0))
-$(eval $(call gb_ExternalPackage_add_file,raptor,lib/libraptor.so,src/.libs/libraptor-lo.so.1.1.0))
+$(eval $(call gb_ExternalPackage_add_file,raptor,lib/libraptor2-lo.so.$(RAPTOR_MAJOR),src/.libs/libraptor2-lo.so.$(RAPTOR_MAJOR).0.0))
+$(eval $(call gb_ExternalPackage_add_file,raptor,lib/libraptor2.so,src/.libs/libraptor2-lo.so.$(RAPTOR_MAJOR).0.0))
 endif
 
+$(eval $(call gb_ExternalPackage_add_file,raptor,inc/external/raptor2.h,src/raptor2.h))
 $(eval $(call gb_ExternalPackage_add_file,raptor,inc/external/raptor.h,src/raptor.h))
 
 # vim: set noet sw=4 ts=4:
diff --git a/redland/ExternalPackage_rasqal.mk b/redland/ExternalPackage_rasqal.mk
index 34b83e5..96280b3 100644
--- a/redland/ExternalPackage_rasqal.mk
+++ b/redland/ExternalPackage_rasqal.mk
@@ -11,22 +11,20 @@ $(eval $(call gb_ExternalPackage_ExternalPackage,rasqal,rasqal))
 
 $(eval $(call gb_ExternalPackage_use_external_project,rasqal,rasqal))
 
-$(eval $(call gb_ExternalPackage_add_file,rasqal,bin/rasqal-config,src/rasqal-config))
-
 ifeq ($(OS),MACOSX)
-$(eval $(call gb_ExternalPackage_add_file,rasqal,lib/librasqal-lo.1.dylib,src/.libs/librasqal-lo.1.dylib))
-$(eval $(call gb_ExternalPackage_add_file,rasqal,lib/librasqal.dylib,src/.libs/librasqal-lo.1.dylib))
+$(eval $(call gb_ExternalPackage_add_file,rasqal,lib/librasqal-lo.$(RASQAL_MAJOR).dylib,src/.libs/librasqal-lo.$(RASQAL_MAJOR).dylib))
+$(eval $(call gb_ExternalPackage_add_file,rasqal,lib/librasqal.dylib,src/.libs/librasqal-lo.$(RASQAL_MAJOR).dylib))
 else ifneq ($(filter IOS ANDROID,$(OS)),)
 $(eval $(call gb_ExternalPackage_add_file,rasqal,lib/librasqal.a,src/.libs/librasqal.a))
 else ifneq ($(filter WNTGCC,$(OS)$(COM)),)
 $(eval $(call gb_ExternalPackage_add_file,rasqal,lib/librasqal.dll.a,src/.libs/librasqal.dll.a))
-$(eval $(call gb_ExternalPackage_add_file,rasqal,bin/librasqal-1.dll,src/.libs/librasqal-1.dll))
+$(eval $(call gb_ExternalPackage_add_file,rasqal,bin/librasqal-$(RASQAL_MAJOR).dll,src/.libs/librasqal-$(RASQAL_MAJOR).dll))
 else ifneq ($(filter WNT,$(OS)),)
 $(eval $(call gb_ExternalPackage_add_file,rasqal,lib/librasqal.a,src/.libs/librasqal.a))
 $(eval $(call gb_ExternalPackage_add_file,rasqal,bin/librasqal.dll,src/.libs/librasqal.dll))
 else
-$(eval $(call gb_ExternalPackage_add_file,rasqal,lib/librasqal-lo.so.1,src/.libs/librasqal-lo.so.1.0.0))
-$(eval $(call gb_ExternalPackage_add_file,rasqal,lib/librasqal.so,src/.libs/librasqal-lo.so.1.0.0))
+$(eval $(call gb_ExternalPackage_add_file,rasqal,lib/librasqal-lo.so.$(RASQAL_MAJOR),src/.libs/librasqal-lo.so.$(RASQAL_MAJOR).0.0))
+$(eval $(call gb_ExternalPackage_add_file,rasqal,lib/librasqal.so,src/.libs/librasqal-lo.so.$(RASQAL_MAJOR).0.0))
 endif
 
 $(eval $(call gb_ExternalPackage_add_file,rasqal,inc/external/rasqal.h,src/rasqal.h))
diff --git a/redland/ExternalPackage_redland.mk b/redland/ExternalPackage_redland.mk
index eb0b4ff..5cf9207 100644
--- a/redland/ExternalPackage_redland.mk
+++ b/redland/ExternalPackage_redland.mk
@@ -12,19 +12,19 @@ $(eval $(call gb_ExternalPackage_ExternalPackage,redland,redland))
 $(eval $(call gb_ExternalPackage_use_external_project,redland,redland))
 
 ifeq ($(OS),MACOSX)
-$(eval $(call gb_ExternalPackage_add_file,redland,lib/librdf-lo.0.dylib,librdf/.libs/librdf-lo.0.dylib))
-$(eval $(call gb_ExternalPackage_add_file,redland,lib/librdf.dylib,librdf/.libs/librdf-lo.0.dylib))
+$(eval $(call gb_ExternalPackage_add_file,redland,lib/librdf-lo.$(REDLAND_MAJOR).dylib,src/.libs/librdf-lo.$(REDLAND_MAJOR).dylib))
+$(eval $(call gb_ExternalPackage_add_file,redland,lib/librdf.dylib,src/.libs/librdf-lo.$(REDLAND_MAJOR).dylib))
 else ifneq ($(filter IOS ANDROID,$(OS)),)
-$(eval $(call gb_ExternalPackage_add_file,redland,lib/librdf.a,librdf/.libs/librdf.a))
+$(eval $(call gb_ExternalPackage_add_file,redland,lib/librdf.a,src/.libs/librdf.a))
 else ifneq ($(filter WNTGCC,$(OS)$(COM)),)
-$(eval $(call gb_ExternalPackage_add_file,redland,lib/librdf.dll.a,librdf/.libs/librdf.dll.a))
-$(eval $(call gb_ExternalPackage_add_file,redland,bin/librdf-0.dll,librdf/.libs/librdf-0.dll))
+$(eval $(call gb_ExternalPackage_add_file,redland,lib/librdf.dll.a,src/.libs/librdf.dll.a))
+$(eval $(call gb_ExternalPackage_add_file,redland,bin/librdf-$(REDLAND_MAJOR).dll,src/.libs/librdf-$(REDLAND_MAJOR).dll))
 else ifneq ($(filter WNT,$(OS)),)
-$(eval $(call gb_ExternalPackage_add_file,redland,lib/librdf.a,librdf/.libs/librdf.a))
-$(eval $(call gb_ExternalPackage_add_file,redland,bin/librdf.dll,librdf/.libs/librdf.dll))
+$(eval $(call gb_ExternalPackage_add_file,redland,lib/librdf.a,src/.libs/librdf.a))
+$(eval $(call gb_ExternalPackage_add_file,redland,bin/librdf.dll,src/.libs/librdf.dll))
 else
-$(eval $(call gb_ExternalPackage_add_file,redland,lib/librdf-lo.so.0,librdf/.libs/librdf-lo.so.0.0.0))
-$(eval $(call gb_ExternalPackage_add_file,redland,lib/librdf.so,librdf/.libs/librdf-lo.so.0.0.0))
+$(eval $(call gb_ExternalPackage_add_file,redland,lib/librdf-lo.so.$(REDLAND_MAJOR),src/.libs/librdf-lo.so.$(REDLAND_MAJOR).0.0))
+$(eval $(call gb_ExternalPackage_add_file,redland,lib/librdf.so,src/.libs/librdf-lo.so.$(REDLAND_MAJOR).0.0))
 endif
 
 # vim: set noet sw=4 ts=4:
diff --git a/redland/ExternalProject_raptor.mk b/redland/ExternalProject_raptor.mk
index 48b3c52..173ce37 100644
--- a/redland/ExternalProject_raptor.mk
+++ b/redland/ExternalProject_raptor.mk
@@ -25,10 +25,9 @@ $(call gb_ExternalProject_get_state_target,raptor,build):
 		LIBXML2LIB="$(if $(filter YES,$(SYSTEM_LIBXML)),$(LIBXML_LIBS),-lxml2)" \
 		XSLTLIB="$(if $(filter YES,$(SYSTEM_LIBXSLT)),$(LIBXSLT_LIBS),-lxslt)" \
 		OBJDUMP="$(HOST_PLATFORM)-objdump" \
-		./configure --disable-static --enable-shared --disable-gtk-doc --with-openssl-digests \
-			--with-xml-parser=libxml --enable-parsers="rdfxml ntriples turtle trig guess rss-tag-soup" \
-			--without-bdb --without-sqlite --without-mysql --without-postgresql --without-threestore \
-			--with-regex-library=posix --with-decimal=none --with-www=xml \
+		./configure --disable-static --enable-shared --disable-gtk-doc \
+			--enable-parsers="rdfxml ntriples turtle trig guess rss-tag-soup" \
+			--with-www=xml \
 			--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM) --target=$(HOST_PLATFORM) \
 			lt_cv_cc_dll_switch="-shared" \
 		&& $(MAKE) \
@@ -40,13 +39,11 @@ $(call gb_ExternalProject_get_state_target,raptor,build):
 		CFLAGS="$(if $(debug),-g,-O) $(if $(filter TRUE,$(DISABLE_DYNLOADING)),-fvisibility=hidden) \
 		$(if $(filter GCCLINUXPOWERPC64,$(COM)$(OS)$(CPUNAME)),-mminimal-toc)" \
 		LDFLAGS="-L$(OUTDIR)/lib \
-		$(if $(filter LINUX FREEBSD,$(OS)),-Wl$(COMMA)-z$(COMMA)origin -Wl$(COMMA)-rpath$(COMMA)\\"\$$\$$ORIGIN:'\'\$$\$$ORIGIN/../ure-link/lib" -Wl$(COMMA)-noinhibit-exec) \
+			$(if $(filter LINUX FREEBSD,$(OS)),-Wl$(COMMA)-rpath-link$(COMMA)$(OUTDIR)/lib -Wl$(COMMA)-z$(COMMA)origin -Wl$(COMMA)-rpath$(COMMA)\\"\$$\$$ORIGIN:'\'\$$\$$ORIGIN/../ure-link/lib") \
 		$(if $(SYSBASE),$(if $(filter LINUX SOLARIS,$(OS)),-L$(SYSBASE)/lib -L$(SYSBASE)/usr/lib -lpthread -ldl))" \
 		CPPFLAGS="-I$(OUTDIR)/inc/external $(if $(SYSBASE),-I$(SYSBASE)/usr/include)" \
-		./configure --disable-gtk-doc --with-threads --with-openssl-digests \
-			--with-xml-parser=libxml --enable-parsers="rdfxml ntriples turtle trig guess rss-tag-soup" \
-			--without-bdb --without-sqlite --without-mysql --without-postgresql \
-			--without-threestone --with-regex-library=posix --with-decimal=none \
+		./configure --disable-gtk-doc \
+			 --enable-parsers="rdfxml ntriples turtle trig guess rss-tag-soup" \
 			--with-www=xml \
 			$(if $(filter YES,$(CROSS_COMPILING)),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \
 			$(if $(filter MACOSX,$(OS)),--prefix=/@.__________________________________________________OOO) \
@@ -57,4 +54,5 @@ $(call gb_ExternalProject_get_state_target,raptor,build):
 		&& $(MAKE) \
 	)
 endif
+
 # vim: set noet sw=4 ts=4:
diff --git a/redland/ExternalProject_rasqal.mk b/redland/ExternalProject_rasqal.mk
index e7c6fbb..2f550e2 100644
--- a/redland/ExternalProject_rasqal.mk
+++ b/redland/ExternalProject_rasqal.mk
@@ -19,6 +19,8 @@ $(eval $(call gb_ExternalProject_register_targets,rasqal,\
 	build \
 ))
 
+# note: this can intentionally only build against internal raptor (not system)
+
 ifeq ($(OS),WNT)
 $(call gb_ExternalProject_get_state_target,rasqal,build):
 	$(call gb_ExternalProject_run,build,\
@@ -27,10 +29,14 @@ $(call gb_ExternalProject_get_state_target,rasqal,build):
 		LIBXML2LIB="$(if $(filter YES,$(SYSTEM_LIBXML)),$(LIBXML_LIBS),-lxml2)" \
 		XSLTLIB="$(if $(filter YES,$(SYSTEM_LIBXSLT)),$(LIBXSLT_LIBS),-lxslt)" \
 		OBJDUMP="$(HOST_PLATFORM)-objdump" \
-		./configure --disable-static --enable-shared --disable-gtk-doc --with-openssl-digests \
-			--with-xml-parser=libxml --without-bdb --without-sqlite --without-mysql \
-			--without-postgresql --without-threestore \
-			--disable-pcre --with-decimal=none --with-www=xml \
+		PKG_CONFIG="" \
+		RAPTOR2_CFLAGS="-I$(OUTDIR)/inc/external" \
+		RAPTOR2_LIBS="-L$(OUTDIR)/lib -lraptor2" \
+		./configure --disable-static --enable-shared --disable-gtk-doc \
+			--disable-pcre \
+			--with-decimal=none \
+			--with-uuid-library=internal \
+			--with-digest-library=internal \
 			--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM) \
 			lt_cv_cc_dll_switch="-shared" \
 		&& $(MAKE) \
@@ -40,22 +46,27 @@ $(call gb_ExternalProject_get_state_target,rasqal,build):
 	$(call gb_ExternalProject_run,build,\
 		CFLAGS="$(if $(filter TRUE,$(DISABLE_DYNLOADING)),-fvisibility=hidden)" \
 		PATH="$(OUTDIR)/bin:$$PATH" \
-		LDFLAGS="-L$(OUTDIR)/lib \
-		$(if $(filter LINUX FREEBSD,$(OS)),-Wl$(COMMA)-z$(COMMA)origin -Wl$(COMMA)-rpath$(COMMA)\\"\$$\$$ORIGIN:'\'\$$\$$ORIGIN/../ure-link/lib" -Wl$(COMMA)-noinhibit-exec) \
+		LDFLAGS=" \
+			$(if $(filter LINUX FREEBSD,$(OS)),-Wl$(COMMA)-rpath-link$(COMMA)$(OUTDIR)/lib -Wl$(COMMA)-z$(COMMA)origin -Wl$(COMMA)-rpath$(COMMA)\\"\$$\$$ORIGIN:'\'\$$\$$ORIGIN/../ure-link/lib") \
 		$(if $(SYSBASE),$(if $(filter LINUX SOLARIS,$(OS)),-L$(SYSBASE)/lib -L$(SYSBASE)/usr/lib -lpthread -ldl)) \
 		$(if $(filter MACOSXNO,$(OS)$(SYSTEM_LIBXML)),-Wl$(COMMA)-dylib_file$(COMMA)@loader_path/../ure-link/lib/libxml2.2.dylib:$(OUTDIR)/lib/libxml2.2.dylib)" \
-		CPPFLAGS="-I$(OUTDIR)/inc/external $(if $(SYSBASE),-I$(SYSBASE)/usr/include)" \
-		./configure --disable-gtk-doc --with-threads --with-openssl-digests \
-			--with-xml-parser=libxml --without-bdb --without-sqlite --without-mysql \
-			--without-postgresql --without-threestone --with-regex-library=posix \
-			--with-decimal=none --with-www=xml \
+		$(if $(SYSBASE),CPPFLAGS="-I$(SYSBASE)/usr/include") \
+		PKG_CONFIG="" \
+		RAPTOR2_CFLAGS="-I$(OUTDIR)/inc/external" \
+		RAPTOR2_LIBS="-L$(OUTDIR)/lib -lraptor2" \
+		./configure --disable-gtk-doc \
+			--with-regex-library=posix \
+			--with-decimal=none \
+			--with-uuid-library=internal \
+			--with-digest-library=internal \
 			$(if $(filter YES,$(CROSS_COMPILING)),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \
 			$(if $(filter MACOSX,$(OS)),--prefix=/@.__________________________________________________OOO) \
 			$(if $(filter IOS ANDROID,$(OS)),--disable-shared,--disable-static) \
 		&& $(MAKE) \
-			$(if $(filter MACOSX,$(OS)),&& $(PERL) \
-            $(SOLARENV)/bin/macosx-change-install-names.pl shl OOO \
-            $(gb_Package_SOURCEDIR_rasqal)/src/.libs/librasqal-lo.1.dylib) \
+		$(if $(filter MACOSX,$(OS)),&& $(PERL) \
+			$(SOLARENV)/bin/macosx-change-install-names.pl shl OOO \
+			$(gb_Package_SOURCEDIR_rasqal)/src/.libs/librasqal-lo.$(RASQAL_MAJOR).dylib) \
 	)
 endif
+
 # vim: set noet sw=4 ts=4:
diff --git a/redland/ExternalProject_redland.mk b/redland/ExternalProject_redland.mk
index 6b796fc..59c171f 100644
--- a/redland/ExternalProject_redland.mk
+++ b/redland/ExternalProject_redland.mk
@@ -22,50 +22,56 @@ $(eval $(call gb_ExternalProject_register_targets,redland,\
 	build \
 ))
 
+# note: this can intentionally only build against internal raptor/rasqal
+
 ifeq ($(OS),WNT)
 $(call gb_ExternalProject_get_state_target,redland,build):
 	$(call gb_ExternalProject_run,build,\
-		PATH="$(OUTDIR)/bin:$$PATH" \
 		CC="$(CC) -mthreads $(if $(filter YES,$(MINGW_SHARED_GCCLIB)),-shared-libgcc)" \
 		CPPFLAGS="-I$(OUTDIR)/inc/external" \
 		LDFLAGS="-Wl$(COMMA)--no-undefined -Wl$(COMMA)--enable-runtime-pseudo-reloc-v2 -Wl$(COMMA)--export-all-symbols -L$(OUTDIR)/lib" \
-		LIBXML2LIB="$(if $(filter YES,$(SYSTEM_LIBXML)),$(LIBXML_LIBS),-lxml2)" \
-		XSLTLIB="$(if $(filter YES,$(SYSTEM_LIBXSLT)),$(LIBXSLT_LIBS),-lxslt)" \
 		OBJDUMP="$(HOST_PLATFORM)-objdump" \
-		./configure --disable-static --disable-gtk-doc --with-openssl-digests \
-			--with-xml-parser=libxml --with-raptor=system --with-rasqal=system \
-			--without-bdb --without-sqlite --without-mysql --without-postgresql \
-			--without-threestore --with-regex-library=posix --with-decimal=none \
-			--with-www=xml --build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM) \
+		PKG_CONFIG="" \
+		RAPTOR2_CFLAGS="-I$(OUTDIR)/inc/external" \
+		RAPTOR2_LIBS="-L$(OUTDIR)/lib -lraptor2  $(if $(filter YES,$(SYSTEM_LIBXML)),$(LIBXML_LIBS),-lxml2)" \
+		RASQAL_CFLAGS="-I$(OUTDIR)/inc/external" \
+		RASQAL_LIBS="-L$(OUTDIR)/lib -lrasqal" \
+		./configure --disable-static --disable-gtk-doc \
+			--disable-modular \
+			--without-bdb --without-sqlite --without-mysql \
+			--without-postgresql --without-threestore --without-virtuoso \
+			--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM) \
 			lt_cv_cc_dll_switch="-shared" \
-		&& cd librdf \
 		&& $(MAKE) \
 	)
 else
 $(call gb_ExternalProject_get_state_target,redland,build):
 	$(call gb_ExternalProject_run,build,\
 		CFLAGS="$(if $(filter TRUE,$(DISABLE_DYNLOADING)),-fvisibility=hidden)" \
-		PATH="$(OUTDIR)/bin:$$PATH" \
 		LDFLAGS="-L$(OUTDIR)/lib \
-		$(if $(filter LINUX FREEBSD,$(OS)),-Wl$(COMMA)-z$(COMMA)origin -Wl$(COMMA)-rpath$(COMMA)\\"\$$\$$ORIGIN:'\'\$$\$$ORIGIN/../ure-link/lib" -Wl$(COMMA)-noinhibit-exec) \
+		$(if $(filter LINUX FREEBSD,$(OS)),-Wl$(COMMA)-z$(COMMA)origin -Wl$(COMMA)-rpath$(COMMA)\\"\$$\$$ORIGIN:'\'\$$\$$ORIGIN/../ure-link/lib") \
 		$(if $(SYSBASE),$(if $(filter LINUX SOLARIS,$(OS)),-L$(SYSBASE)/lib -L$(SYSBASE)/usr/lib -lpthread -ldl)) \
-		$(if $(filter MACOSX,$(OS)), -Wl$(COMMA)-dylib_file$(COMMA)@loader_path/libraptor-lo.1.dylib:$(OUTDIR)/lib/libraptor-lo.1.dylib \
+		$(if $(filter MACOSX,$(OS)), -Wl$(COMMA)-dylib_file$(COMMA)@loader_path/libraptor-lo.$(RAPTOR_MAJOR).dylib:$(OUTDIR)/lib/libraptor-lo.$(RAPTOR_MAJOR).dylib \
 		$(if $(filter NO,$(SYSTEM_LIBXML)),-Wl$(COMMA)-dylib_file$(COMMA)@loader_path/../ure-link/lib/libxml2.2.dylib:$(OUTDIR)/lib/libxml2.2.dylib))" \
 		CPPFLAGS="-I$(OUTDIR)/inc/external $(if $(SYSBASE),-I$(SYSBASE)/usr/include)" \
-		./configure --disable-gtk-doc --with-openssl-digests \
-			--with-xml-parser=libxml --with-raptor=system --with-rasqal=system \
-			--without-bdb --without-sqlite --without-mysql --without-postgresql \
-			--without-threestone --with-regex-library=posix --with-decimal=none \
-			--with-www=xml \
+		PKG_CONFIG="" \
+		RAPTOR2_CFLAGS="-I$(OUTDIR)/inc/external" \
+		RAPTOR2_LIBS="-L$(OUTDIR)/lib -lraptor2  $(if $(filter YES,$(SYSTEM_LIBXML)),$(LIBXML_LIBS),-lxml2)" \
+		RASQAL_CFLAGS="-I$(OUTDIR)/inc/external" \
+		RASQAL_LIBS="-L$(OUTDIR)/lib -lrasqal" \
+		./configure --disable-gtk-doc \
+			--disable-modular \
+			--without-bdb --without-sqlite --without-mysql \
+			--without-postgresql --without-threestone --without-virtuoso \
 			$(if $(filter YES,$(CROSS_COMPILING)),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \
 			$(if $(filter MACOSX,$(OS)),--prefix=/@.__________________________________________________OOO) \
 			$(if $(filter IOS ANDROID,$(OS)),--disable-shared,--disable-static) \
 			$(if $(filter-out ANDROID,$(OS)),--with-threads) \
-		&& cd librdf \
 		&& $(MAKE) \
-			$(if $(filter MACOSX,$(OS)),&& $(PERL) \
-            $(SOLARENV)/bin/macosx-change-install-names.pl shl OOO \
-            $(gb_Package_SOURCEDIR_redland)/librdf/.libs/librdf-lo.0.dylib) \
+		$(if $(filter MACOSX,$(OS)),&& $(PERL) \
+			$(SOLARENV)/bin/macosx-change-install-names.pl shl OOO \
+			$(gb_Package_SOURCEDIR_redland)/librdf/.libs/librdf-lo.$(RASQAL_MAJOR).dylib) \
 	)
 endif
+
 # vim: set noet sw=4 ts=4:
diff --git a/redland/LICENSE.txt b/redland/LICENSE.txt
deleted file mode 100644
index a3a5fa8..0000000
--- a/redland/LICENSE.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-
-LGPL Disclaimer
-
-For the avoidance of doubt, except that if any license choice other 
-than GPL or LGPL is available it will apply instead, Sun elects to 
-use only the Lesser General Public License version 2.1 (LGPLv2) at 
-this time for any software where a choice of LGPL license versions 
-is made available with the language indicating that LGPLv2.1 or any 
-later version may be used, or where a choice of which version of the 
-LGPL is applied is otherwise unspecified.
-
diff --git a/redland/Library_raptor.mk b/redland/Library_raptor.mk
index cdb4cd4..96619f5 100644
--- a/redland/Library_raptor.mk
+++ b/redland/Library_raptor.mk
@@ -7,22 +7,23 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 #
 
-$(eval $(call gb_Library_Library,raptor))
+$(eval $(call gb_Library_Library,raptor2))
 
-$(eval $(call gb_Library_use_unpacked,raptor,raptor))
+$(eval $(call gb_Library_use_unpacked,raptor2,raptor))
 
-$(eval $(call gb_Library_use_externals,raptor,\
+$(eval $(call gb_Library_use_externals,raptor2,\
 	libxml2 \
 	libxslt \
 ))
 
-$(eval $(call gb_Library_set_warnings_not_errors,raptor))
+$(eval $(call gb_Library_set_warnings_not_errors,raptor2))
 
 #$(eval $(call gb_Library_add_ldflags,raptor,\
 	/DEF:$(SRCDIR)/redland/raptor/raptor.def \
 ))
 
-$(eval $(call gb_Library_add_defs,raptor,\
+$(eval $(call gb_Library_add_defs,raptor2,\
+	-DHAVE_CONFIG_H \
 	-DRAPTOR_INTERNAL \
 	-DWIN32 \
 	-DNDEBUG \
@@ -31,52 +32,48 @@ $(eval $(call gb_Library_add_defs,raptor,\
 	-DWIN32_EXPORTS \
 ))
 
-$(eval $(call gb_Library_add_generated_cobjects,raptor,\
-	UnpackedTarball/raptor/src/n3_lexer \
-	UnpackedTarball/raptor/src/n3_parser \
+$(eval $(call gb_Library_add_generated_cobjects,raptor2,\
 	UnpackedTarball/raptor/src/ntriples_parse \
 	UnpackedTarball/raptor/src/parsedate \
-	UnpackedTarball/raptor/src/raptor_feature \
+	UnpackedTarball/raptor/src/raptor_abbrev \
+	UnpackedTarball/raptor/src/raptor_avltree \
+	UnpackedTarball/raptor/src/raptor_concepts \
 	UnpackedTarball/raptor/src/raptor_general \
 	UnpackedTarball/raptor/src/raptor_guess \
-	UnpackedTarball/raptor/src/raptor_identifier \
 	UnpackedTarball/raptor/src/raptor_iostream \
+	UnpackedTarball/raptor/src/raptor_json_writer \
 	UnpackedTarball/raptor/src/raptor_libxml \
 	UnpackedTarball/raptor/src/raptor_locator \
+	UnpackedTarball/raptor/src/raptor_log \
+	UnpackedTarball/raptor/src/raptor_memstr \
 	UnpackedTarball/raptor/src/raptor_namespace \
-	UnpackedTarball/raptor/src/raptor_nfc \
-	UnpackedTarball/raptor/src/raptor_nfc_data \
+	UnpackedTarball/raptor/src/raptor_option \
 	UnpackedTarball/raptor/src/raptor_parse \
 	UnpackedTarball/raptor/src/raptor_qname \
 	UnpackedTarball/raptor/src/raptor_rdfxml \
 	UnpackedTarball/raptor/src/raptor_rfc2396 \
-	UnpackedTarball/raptor/src/raptor_rss \
-	UnpackedTarball/raptor/src/raptor_rss_common \
 	UnpackedTarball/raptor/src/raptor_sax2 \
 	UnpackedTarball/raptor/src/raptor_sequence \
 	UnpackedTarball/raptor/src/raptor_serialize \
 	UnpackedTarball/raptor/src/raptor_serialize_ntriples \
 	UnpackedTarball/raptor/src/raptor_serialize_rdfxml \
 	UnpackedTarball/raptor/src/raptor_serialize_rdfxmla \
-	UnpackedTarball/raptor/src/raptor_serialize_simple \
 	UnpackedTarball/raptor/src/raptor_set \
+	UnpackedTarball/raptor/src/raptor_statement \
 	UnpackedTarball/raptor/src/raptor_stringbuffer \
+	UnpackedTarball/raptor/src/raptor_syntax_description \
+	UnpackedTarball/raptor/src/raptor_term \
+	UnpackedTarball/raptor/src/raptor_turtle_writer \
+	UnpackedTarball/raptor/src/raptor_unicode \
 	UnpackedTarball/raptor/src/raptor_uri \
-	UnpackedTarball/raptor/src/raptor_utf8 \
-	UnpackedTarball/raptor/src/raptor_win32 \
 	UnpackedTarball/raptor/src/raptor_www \
-	UnpackedTarball/raptor/src/raptor_www_libxml \
 	UnpackedTarball/raptor/src/raptor_xml \
 	UnpackedTarball/raptor/src/raptor_xml_writer \
-	UnpackedTarball/raptor/src/raptor_xsd \
+	UnpackedTarball/raptor/src/snprintf \
 	UnpackedTarball/raptor/src/strcasecmp \
 	UnpackedTarball/raptor/src/turtle_common \
 	UnpackedTarball/raptor/src/turtle_lexer \
 	UnpackedTarball/raptor/src/turtle_parser \
-	UnpackedTarball/raptor/src/raptor_abbrev \
-	UnpackedTarball/raptor/src/raptor_avltree \
-	UnpackedTarball/raptor/src/raptor_statement \
-	UnpackedTarball/raptor/src/raptor_turtle_writer \
 ))
 
 
diff --git a/redland/Library_rasqal.mk b/redland/Library_rasqal.mk
index 7b20dcc..35b8945 100644
--- a/redland/Library_rasqal.mk
+++ b/redland/Library_rasqal.mk
@@ -15,7 +15,7 @@ $(eval $(call gb_Library_set_warnings_not_errors,rasqal))
 
 $(eval $(call gb_Library_use_external,rasqal,raptor_headers))
 
-$(eval $(call gb_Library_use_libraries,rasqal,raptor))
+$(eval $(call gb_Library_use_libraries,rasqal,raptor2))
 
 #$(eval $(call gb_Library_add_ldflags,rasqal,\
 	/DEF:$(SRCDIR)/redland/rasqal/rasqal.def \
@@ -31,28 +31,85 @@ $(eval $(call gb_Library_add_defs,rasqal,\
 	-D_MT \
 ))
 
+$(eval $(call gb_Library_set_include,rasqal,\
+	-I$(WORKDIR)/UnpackedTarball/rasqal/libmtwist \
+	$$(INCLUDE) \
+))
+
 $(eval $(call gb_Library_add_generated_cobjects,rasqal,\
+	UnpackedTarball/rasqal/libmtwist/mt \
+	UnpackedTarball/rasqal/libmtwist/seed \
+	UnpackedTarball/rasqal/src/rasqal_algebra \
+	UnpackedTarball/rasqal/src/rasqal_bindings \
+	UnpackedTarball/rasqal/src/rasqal_data_graph \
+	UnpackedTarball/rasqal/src/rasqal_dataset \
 	UnpackedTarball/rasqal/src/rasqal_datetime \
 	UnpackedTarball/rasqal/src/rasqal_decimal \
+	UnpackedTarball/rasqal/src/rasqal_digest \
+	UnpackedTarball/rasqal/src/rasqal_digest_md5 \
+	UnpackedTarball/rasqal/src/rasqal_digest_sha1 \
+	UnpackedTarball/rasqal/src/rasqal_double \
 	UnpackedTarball/rasqal/src/rasqal_engine \
+	UnpackedTarball/rasqal/src/rasqal_engine_algebra \
+	UnpackedTarball/rasqal/src/rasqal_engine_sort \
 	UnpackedTarball/rasqal/src/rasqal_expr \
+	UnpackedTarball/rasqal/src/rasqal_expr_datetimes \
+	UnpackedTarball/rasqal/src/rasqal_expr_evaluate \
+	UnpackedTarball/rasqal/src/rasqal_expr_numerics \
+	UnpackedTarball/rasqal/src/rasqal_expr_strings \
 	UnpackedTarball/rasqal/src/rasqal_feature \
+	UnpackedTarball/rasqal/src/rasqal_format_html \
+	UnpackedTarball/rasqal/src/rasqal_format_json \
+	UnpackedTarball/rasqal/src/rasqal_format_rdf \
+	UnpackedTarball/rasqal/src/rasqal_format_sparql_xml \
+	UnpackedTarball/rasqal/src/rasqal_format_sv \
+	UnpackedTarball/rasqal/src/rasqal_format_table \
+	UnpackedTarball/rasqal/src/rasqal_formula \
 	UnpackedTarball/rasqal/src/rasqal_general \
 	UnpackedTarball/rasqal/src/rasqal_graph_pattern \
+	UnpackedTarball/rasqal/src/rasqal_iostream \
 	UnpackedTarball/rasqal/src/rasqal_literal \
 	UnpackedTarball/rasqal/src/rasqal_map \
-	UnpackedTarball/rasqal/src/rasqal_query_results \
+	UnpackedTarball/rasqal/src/rasqal_prefix \
+	UnpackedTarball/rasqal/src/rasqal_projection \
 	UnpackedTarball/rasqal/src/rasqal_query \
+	UnpackedTarball/rasqal/src/rasqal_query_results \
+	UnpackedTarball/rasqal/src/rasqal_query_transform \
+	UnpackedTarball/rasqal/src/rasqal_query_write \
+	UnpackedTarball/rasqal/src/rasqal_random \
 	UnpackedTarball/rasqal/src/rasqal_raptor \
+	UnpackedTarball/rasqal/src/rasqal_regex \
 	UnpackedTarball/rasqal/src/rasqal_result_formats \
+	UnpackedTarball/rasqal/src/rasqal_row \
+	UnpackedTarball/rasqal/src/rasqal_row_compatible \
 	UnpackedTarball/rasqal/src/rasqal_rowsource \
-	UnpackedTarball/rasqal/src/rasqal_sparql_xml \
+	UnpackedTarball/rasqal/src/rasqal_rowsource_aggregation \
+	UnpackedTarball/rasqal/src/rasqal_rowsource_assignment \
+	UnpackedTarball/rasqal/src/rasqal_rowsource_distinct \
+	UnpackedTarball/rasqal/src/rasqal_rowsource_empty \
+	UnpackedTarball/rasqal/src/rasqal_rowsource_filter \
+	UnpackedTarball/rasqal/src/rasqal_rowsource_graph \
+	UnpackedTarball/rasqal/src/rasqal_rowsource_groupby \
+	UnpackedTarball/rasqal/src/rasqal_rowsource_having \
+	UnpackedTarball/rasqal/src/rasqal_rowsource_join \
+	UnpackedTarball/rasqal/src/rasqal_rowsource_project \
+	UnpackedTarball/rasqal/src/rasqal_rowsource_rowsequence \
+	UnpackedTarball/rasqal/src/rasqal_rowsource_slice \
+	UnpackedTarball/rasqal/src/rasqal_rowsource_sort \
+	UnpackedTarball/rasqal/src/rasqal_rowsource_triples \
+	UnpackedTarball/rasqal/src/rasqal_rowsource_union \
+	UnpackedTarball/rasqal/src/rasqal_service \
+	UnpackedTarball/rasqal/src/rasqal_solution_modifier \
+	UnpackedTarball/rasqal/src/rasqal_triple \
+	UnpackedTarball/rasqal/src/rasqal_triples_source \
+	UnpackedTarball/rasqal/src/rasqal_update \
+	UnpackedTarball/rasqal/src/rasqal_variable \
 	UnpackedTarball/rasqal/src/rasqal_xsd_datatypes \
-	UnpackedTarball/rasqal/src/rdql_lexer \
-	UnpackedTarball/rasqal/src/rdql_parser \
+	UnpackedTarball/rasqal/src/snprintf \
 	UnpackedTarball/rasqal/src/sparql_lexer \
 	UnpackedTarball/rasqal/src/sparql_parser \
-	UnpackedTarball/rasqal/src/strcasecmp \
+	UnpackedTarball/rasqal/src/timegm \
+	UnpackedTarball/rasqal/src/gettimeofday \
 ))
 
 
diff --git a/redland/Library_rdf.mk b/redland/Library_rdf.mk
index a4a3140..6fd3dd0 100644
--- a/redland/Library_rdf.mk
+++ b/redland/Library_rdf.mk
@@ -14,13 +14,11 @@ $(eval $(call gb_Library_use_unpacked,rdf,redland))
 $(eval $(call gb_Library_set_warnings_not_errors,rdf))
 
 $(eval $(call gb_Library_use_libraries,rdf,\
-	raptor \
+	raptor2 \
 	rasqal \
 ))
 
 $(eval $(call gb_Library_use_externals,rdf,\
-	openssl \
-	openssl_headers \
 	raptor_headers \
 	rasqal_headers \
 ))
@@ -39,39 +37,41 @@ $(eval $(call gb_Library_add_defs,rdf,\
 ))
 
 $(eval $(call gb_Library_add_generated_cobjects,rdf,\
-	UnpackedTarball/redland/librdf/rdf_concepts \
-	UnpackedTarball/redland/librdf/rdf_digest \
-	UnpackedTarball/redland/librdf/rdf_digest_md5 \
-	UnpackedTarball/redland/librdf/rdf_digest_openssl \
-	UnpackedTarball/redland/librdf/rdf_digest_sha1 \
-	UnpackedTarball/redland/librdf/rdf_files \
-	UnpackedTarball/redland/librdf/rdf_hash \
-	UnpackedTarball/redland/librdf/rdf_hash_cursor \
-	UnpackedTarball/redland/librdf/rdf_hash_memory \
-	UnpackedTarball/redland/librdf/rdf_heuristics \
-	UnpackedTarball/redland/librdf/rdf_init \
-	UnpackedTarball/redland/librdf/rdf_iterator \
-	UnpackedTarball/redland/librdf/rdf_list \
-	UnpackedTarball/redland/librdf/rdf_log \
-	UnpackedTarball/redland/librdf/rdf_model \
-	UnpackedTarball/redland/librdf/rdf_model_storage \
-	UnpackedTarball/redland/librdf/rdf_node \
-	UnpackedTarball/redland/librdf/rdf_parser \
-	UnpackedTarball/redland/librdf/rdf_parser_raptor \
-	UnpackedTarball/redland/librdf/rdf_query \
-	UnpackedTarball/redland/librdf/rdf_query_rasqal \
-	UnpackedTarball/redland/librdf/rdf_query_results \
-	UnpackedTarball/redland/librdf/rdf_query_triples \
-	UnpackedTarball/redland/librdf/rdf_serializer \
-	UnpackedTarball/redland/librdf/rdf_serializer_raptor \
-	UnpackedTarball/redland/librdf/rdf_statement \
-	UnpackedTarball/redland/librdf/rdf_storage \
-	UnpackedTarball/redland/librdf/rdf_storage_file \
-	UnpackedTarball/redland/librdf/rdf_storage_list \
-	UnpackedTarball/redland/librdf/rdf_storage_hashes \
-	UnpackedTarball/redland/librdf/rdf_stream \
-	UnpackedTarball/redland/librdf/rdf_uri \
-	UnpackedTarball/redland/librdf/rdf_utf8 \
+	UnpackedTarball/redland/src/rdf_concepts \
+	UnpackedTarball/redland/src/rdf_digest \
+	UnpackedTarball/redland/src/rdf_digest_md5 \
+	UnpackedTarball/redland/src/rdf_digest_sha1 \
+	UnpackedTarball/redland/src/rdf_files \
+	UnpackedTarball/redland/src/rdf_hash \
+	UnpackedTarball/redland/src/rdf_hash_cursor \
+	UnpackedTarball/redland/src/rdf_hash_memory \
+	UnpackedTarball/redland/src/rdf_heuristics \
+	UnpackedTarball/redland/src/rdf_init \
+	UnpackedTarball/redland/src/rdf_iterator \
+	UnpackedTarball/redland/src/rdf_list \
+	UnpackedTarball/redland/src/rdf_log \
+	UnpackedTarball/redland/src/rdf_model \
+	UnpackedTarball/redland/src/rdf_model_storage \
+	UnpackedTarball/redland/src/rdf_node \
+	UnpackedTarball/redland/src/rdf_node_common \
+	UnpackedTarball/redland/src/rdf_parser \
+	UnpackedTarball/redland/src/rdf_parser_raptor \
+	UnpackedTarball/redland/src/rdf_raptor \
+	UnpackedTarball/redland/src/rdf_query \
+	UnpackedTarball/redland/src/rdf_query_rasqal \
+	UnpackedTarball/redland/src/rdf_query_results \
+	UnpackedTarball/redland/src/rdf_serializer \
+	UnpackedTarball/redland/src/rdf_serializer_raptor \
+	UnpackedTarball/redland/src/rdf_statement \
+	UnpackedTarball/redland/src/rdf_statement_common \
+	UnpackedTarball/redland/src/rdf_storage \
+	UnpackedTarball/redland/src/rdf_storage_file \
+	UnpackedTarball/redland/src/rdf_storage_list \
+	UnpackedTarball/redland/src/rdf_storage_hashes \
+	UnpackedTarball/redland/src/rdf_storage_trees \
+	UnpackedTarball/redland/src/rdf_stream \
+	UnpackedTarball/redland/src/rdf_uri \
+	UnpackedTarball/redland/src/rdf_utf8 \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/redland/README b/redland/README
index 6ea6f95..c2b0b87 100644
--- a/redland/README
+++ b/redland/README
@@ -3,7 +3,6 @@ Redland RDF library (librdf) from [http://librdf.org/]
 == License ==
 [git:redland/LICENSE.txt]
 Triple-licensed: LGPL v2+/GPL v2+/Apache v2
-Note that Sun distributes this software only under LGPL v2
 
 == Description ==
 This module contains the third-party Redland RDF / librdf library, which
diff --git a/redland/UnpackedTarball_raptor.mk b/redland/UnpackedTarball_raptor.mk
index ad445fb..08f8b67 100644
--- a/redland/UnpackedTarball_raptor.mk
+++ b/redland/UnpackedTarball_raptor.mk
@@ -11,21 +11,15 @@ $(eval $(call gb_UnpackedTarball_UnpackedTarball,raptor))
 
 $(eval $(call gb_UnpackedTarball_set_tarball,raptor,$(RAPTOR_TARBALL)))
 
+# configure generated files for MSVC
+$(eval $(call gb_UnpackedTarball_add_file,raptor,src/raptor2.h,redland/raptor/raptor2.h))
+$(eval $(call gb_UnpackedTarball_add_file,raptor,src/raptor_config.h,redland/raptor/raptor_config.h))
+
 $(eval $(call gb_UnpackedTarball_add_patches,raptor,\
-	redland/raptor/raptor-1.4.18.legal.patch \
-	redland/raptor/raptor-1.4.18.autotools.patch \
-	redland/raptor/raptor-1.4.18.ooo_build.patch \
-	redland/raptor/raptor-1.4.18.win32.patch \
-	redland/raptor/raptor-1.4.18.fixes.patch \
-	redland/raptor/raptor-1.4.18.rindex.patch \
-	redland/raptor/raptor-1.4.18.aix.patch \
-	redland/raptor/raptor-1.4.18.entities.patch \
-	$(if $(filter-out WNT,$(OS)),redland/raptor/raptor-1.4.18.bundled-soname.patch) \
-	$(if $(filter YES,$(CROSS_COMPILING)),redland/raptor/raptor-1.4.18.cross.patch) \
-	$(if $(filter YES,$(SYSTEM_LIBXML)),redland/raptor/raptor-1.4.18.libxml.patch) \
-	$(if $(filter YES,$(SYSTEM_LIBXSLT)),redland/raptor/raptor-1.4.18.libxslt.patch) \
-	$(if $(filter ANDROID,$(OS)),redland/raptor/raptor-1.4.18.no-soname.patch) \
-	$(if $(filter WNTGCC,$(OS)$(COM)),redland/raptor/raptor-1.4.18.mingw.patch) \
+	redland/raptor/raptor-freebsd.patch.1 \
+	$(if $(filter WNTGCC,$(OS)$(COM)),redland/raptor/raptor-mingw.patch.1) \
+	$(if $(filter-out WNT,$(OS)),redland/raptor/raptor-bundled-soname.patch.1) \
+	$(if $(filter ANDROID,$(OS)),redland/raptor/raptor-android.patch.1) \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/redland/UnpackedTarball_rasqal.mk b/redland/UnpackedTarball_rasqal.mk
index 1b8e3e4..4da1944 100644
--- a/redland/UnpackedTarball_rasqal.mk
+++ b/redland/UnpackedTarball_rasqal.mk
@@ -11,15 +11,17 @@ $(eval $(call gb_UnpackedTarball_UnpackedTarball,rasqal))
 
 $(eval $(call gb_UnpackedTarball_set_tarball,rasqal,$(RASQAL_TARBALL)))
 
+# configure generated files for MSVC
+$(eval $(call gb_UnpackedTarball_add_file,rasqal,src/rasqal.h,redland/rasqal/rasqal.h))
+
 $(eval $(call gb_UnpackedTarball_add_patches,rasqal,\
-	redland/rasqal/rasqal-0.9.16.legal.patch \
-	redland/rasqal/rasqal-0.9.16.autotools.patch \
-	redland/rasqal/rasqal-0.9.16.ooo_build.patch \
-	redland/rasqal/rasqal-0.9.16.win32.patch \
-	redland/rasqal/rasqal-0.9.16.aix.patch \
-	$(if $(filter-out WNT,$(OS)),redland/rasqal/rasqal-0.9.16.bundled-soname.patch) \
-	$(if $(filter ANDROID,$(OS)),redland/rasqal/rasqal-0.9.16.no-soname.patch) \
-	$(if $(filter WNTGCC,$(OS)$(COM)),redland/rasqal/rasqal-0.9.16.mingw.patch) \
+	redland/rasqal/rasqal-pkgconfig.patch.1 \
+	redland/rasqal/rasqal-freebsd.patch.1 \
+	redland/rasqal/rasqal-msvc.patch.1 \
+	redland/rasqal/rasqal-aix.patch.1 \
+	$(if $(filter-out WNT,$(OS)),redland/rasqal/rasqal-bundled-soname.patch.1) \
+	$(if $(filter ANDROID,$(OS)),redland/rasqal/rasqal-android.patch.1) \
+	$(if $(filter WNTGCC,$(OS)$(COM)),redland/rasqal/rasqal-mingw.patch.1) \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/redland/UnpackedTarball_redland.mk b/redland/UnpackedTarball_redland.mk
index a7cfa66..2b38a48 100644
--- a/redland/UnpackedTarball_redland.mk
+++ b/redland/UnpackedTarball_redland.mk
@@ -11,15 +11,16 @@ $(eval $(call gb_UnpackedTarball_UnpackedTarball,redland))
 
 $(eval $(call gb_UnpackedTarball_set_tarball,redland,$(REDLAND_TARBALL)))
 
+# configure generated files for MSVC
+$(eval $(call gb_UnpackedTarball_add_file,redland,src/librdf.h,redland/redland/librdf.h))
+
 $(eval $(call gb_UnpackedTarball_add_patches,redland,\
-	redland/redland/redland-1.0.8.legal.patch \
-	redland/redland/redland-1.0.8.autotools.patch \
-	redland/redland/redland-1.0.8.ooo_build.patch \
-	redland/redland/redland-1.0.8.win32.patch \
-	redland/redland/redland-1.0.8.aix.patch \
-	$(if $(filter-out WNT,$(OS)),redland/redland/redland-1.0.8.bundled-soname.patch) \
-	$(if $(filter ANDROID,$(OS)),redland/redland/redland-1.0.8.no-soname.patch) \
-	$(if $(filter WNTGCC,$(OS)$(COM)),redland/redland/redland-1.0.8.mingw.patch) \
+	redland/redland/redland-pkgconfig.patch.1 \
+	redland/redland/redland-freebsd.patch.1 \
+	redland/redland/redland-msvc.patch.1 \
+	$(if $(filter-out WNT,$(OS)),redland/redland/redland-bundled-soname.patch.1) \
+	$(if $(filter ANDROID,$(OS)),redland/redland/redland-android.patch.1) \
+	$(if $(filter WNTGCC,$(OS)$(COM)),redland/redland/redland-mingw.patch.1) \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/redland/raptor/raptor-1.4.18.aix.patch b/redland/raptor/raptor-1.4.18.aix.patch
deleted file mode 100644
index df42640..0000000
--- a/redland/raptor/raptor-1.4.18.aix.patch
+++ /dev/null
@@ -1,21 +0,0 @@
---- misc/raptor-1.4.18/config.guess	2010-09-16 03:07:14.000000000 -0500
-+++ misc/raptor-1.4.18/config.guess	2010-09-16 03:08:00.000000000 -0500
-@@ -532,7 +532,7 @@
- 		echo rs6000-ibm-aix3.2
- 	fi
- 	exit ;;
--    *:AIX:*:[456])
-+    *:AIX:*:[4567])
- 	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
- 	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
- 		IBM_ARCH=rs6000
-@@ -544,6 +544,9 @@
- 	else
- 		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
- 	fi
-+	if [ "$IBM_REV" == "V7BETA" ]; then
-+		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
-+	fi
- 	echo ${IBM_ARCH}-ibm-aix${IBM_REV}
- 	exit ;;
-     *:AIX:*:*)
diff --git a/redland/raptor/raptor-1.4.18.autotools.patch b/redland/raptor/raptor-1.4.18.autotools.patch
deleted file mode 100644
index 8a29070..0000000
--- a/redland/raptor/raptor-1.4.18.autotools.patch
+++ /dev/null
@@ -1,66 +0,0 @@
---- misc/raptor-1.4.18/config.sub	2008-04-03 05:15:09.000000000 +0200
-+++ misc/raptor-1.4.18/config.sub	2011-09-27 10:01:06.000000000 +0200
-@@ -120,7 +120,7 @@
- # Here we must recognize all the valid KERNEL-OS combinations.
- maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
- case $maybe_os in
--  nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
-+  nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
-   uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
-   storm-chaos* | os2-emx* | rtmk-nova*)
-     os=-$maybe_os
-@@ -1250,7 +1250,7 @@
- 	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
- 	      | -chorusos* | -chorusrdb* \
- 	      | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
--	      | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
-+	      | -mingw32* | -linux-gnu* | -linux-androideabi* | -linux-newlib* | -linux-uclibc* \
- 	      | -uxpv* | -beos* | -mpeix* | -udk* \
- 	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
- 	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
---- misc/raptor-1.4.18/configure	Sun Jun 15 10:25:55 2008
-+++ misc/build/raptor-1.4.18/configure	Wed Feb 18 13:23:12 2009
-@@ -4321,7 +4321,7 @@
- 
- cygwin*)
-   # func_win32_libid is a shell function defined in ltmain.sh
--  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
-+  lt_cv_deplibs_check_method='file_magic ^x86 archive|^x86 DLL'
-   lt_cv_file_magic_cmd='func_win32_libid'
-   ;;
- 
-@@ -4330,7 +4330,7 @@
-   # func_win32_libid shell function, so use a weaker test based on 'objdump',
-   # unless we find 'file', for example because we are cross-compiling.
-   if ( file / ) >/dev/null 2>&1; then
--    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
-+    lt_cv_deplibs_check_method='file_magic ^x86 archive|^x86 DLL'
-     lt_cv_file_magic_cmd='func_win32_libid'
-   else
-     lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
---- misc/raptor-1.4.18/ltmain.sh	2008-02-02 22:28:24.000000000 +0900
-+++ misc/build/raptor-1.4.18/ltmain.sh	2008-07-08 11:58:42.000000000 +0900
-@@ -3262,9 +3262,9 @@
- 	    revision="$number_revision"
- 	    ;;
- 	  freebsd-aout|freebsd-elf|sunos)
--	    current="$number_major"
--	    revision="$number_minor"
--	    age="0"
-+	    current=`expr $number_major + $number_minor`
-+	    age="$number_minor"
-+	    revision="$number_revision"
- 	    ;;
- 	  irix|nonstopux)
- 	    current=`expr $number_major + $number_minor`
-@@ -3344,8 +3344,8 @@
- 	  ;;
- 
- 	freebsd-elf)
--	  major=".$current"
--	  versuffix=".$current";
-+	  major=.`expr $current - $age`
-+	  versuffix="$major.$age.$revision"
- 	  ;;
- 
- 	irix | nonstopux)
diff --git a/redland/raptor/raptor-1.4.18.bundled-soname.patch b/redland/raptor/raptor-1.4.18.bundled-soname.patch
deleted file mode 100644
index 407e060..0000000
--- a/redland/raptor/raptor-1.4.18.bundled-soname.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- misc/raptor-1.4.18/src/Makefile.in
-+++ misc/raptor-1.4.18/src/Makefile.in
-@@ -404,7 +404,7 @@
- 	$(am__append_20) $(am__append_21) $(am__append_22) \
- 	$(am__append_23) $(am__append_24) $(am__append_25) \
- 	$(am__append_26)
--libraptor_la_LDFLAGS = -version-info @RAPTOR_LIBTOOL_VERSION@
-+libraptor_la_LDFLAGS = -version-info @RAPTOR_LIBTOOL_VERSION@ -release lo
- libraptor_la_LIBADD = @LTLIBOBJS@
- EXTRA_DIST = \
- raptor-config.in \
diff --git a/redland/raptor/raptor-1.4.18.cross.patch b/redland/raptor/raptor-1.4.18.cross.patch
deleted file mode 100644
index 82df182..0000000
--- a/redland/raptor/raptor-1.4.18.cross.patch
+++ /dev/null
@@ -1,35 +0,0 @@
---- misc/raptor-1.4.18/configure
-+++ misc/raptor-1.4.18/configure
-@@ -22643,11 +22643,13 @@
-   { echo "$as_me:$LINENO: checking vsnprintf has C99 compatible return value" >&5
- echo $ECHO_N "checking vsnprintf has C99 compatible return value... $ECHO_C" >&6; }
-   if test "$cross_compiling" = yes; then
--  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
--See \`config.log' for more details." >&5
--echo "$as_me: error: cannot run test program while cross compiling
--See \`config.log' for more details." >&2;}
--   { (exit 1); exit 1; }; }
-+
-+cat >>confdefs.h <<\_ACEOF
-+#define HAVE_C99_VSNPRINTF 1
-+_ACEOF
-+
-+    { echo "$as_me:$LINENO: result: guessing yes" >&5
-+echo "${ECHO_T}guessing yes" >&6; }
- else
-   cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h.  */
-@@ -23367,11 +23369,8 @@
-     { echo "$as_me:$LINENO: checking for expat support of UTF-8 BOM" >&5
- echo $ECHO_N "checking for expat support of UTF-8 BOM... $ECHO_C" >&6; }
-     if test "$cross_compiling" = yes; then
--  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
--See \`config.log' for more details." >&5
--echo "$as_me: error: cannot run test program while cross compiling
--See \`config.log' for more details." >&2;}
--   { (exit 1); exit 1; }; }
-+  { echo "$as_me:$LINENO: result: guessing yes" >&5
-+echo "${ECHO_T}guessing yes" >&6; }
- else
-   cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h.  */
diff --git a/redland/raptor/raptor-1.4.18.entities.patch b/redland/raptor/raptor-1.4.18.entities.patch
deleted file mode 100644
index 84ffdb5..0000000
--- a/redland/raptor/raptor-1.4.18.entities.patch
+++ /dev/null
@@ -1,394 +0,0 @@
---- misc/raptor-1.4.18/src/raptor.h.old	2008-06-20 07:47:38.000000000 +0200
-+++ misc/raptor-1.4.18/src/raptor.h	2012-02-15 16:54:21.000000000 +0100
-@@ -376,6 +376,7 @@ typedef struct {
-  * @RAPTOR_FEATURE_JSON_EXTRA_DATA: JSON serializer extra top-level data
-  * @RAPTOR_FEATURE_RSS_TRIPLES: Atom/RSS serializer writes extra RDF triples it finds (none, rdf-xml, atom-triples)
-  * @RAPTOR_FEATURE_ATOM_ENTRY_URI: Atom entry URI.  If given, generate an Atom Entry Document with the item having the given URI, otherwise generate an Atom Feed Document with any items found.
-+ * @RAPTOR_FEATURE_LOAD_EXTERNAL_ENTITIES: When reading XML, load external entities.
-  * @RAPTOR_FEATURE_LAST: Internal
-  *
-  * Raptor parser, serializer or XML writer features.
-@@ -416,7 +417,8 @@ typedef enum {
-   RAPTOR_FEATURE_JSON_EXTRA_DATA,
-   RAPTOR_FEATURE_RSS_TRIPLES,
-   RAPTOR_FEATURE_ATOM_ENTRY_URI,
--  RAPTOR_FEATURE_LAST=RAPTOR_FEATURE_ATOM_ENTRY_URI
-+  RAPTOR_FEATURE_LOAD_EXTERNAL_ENTITIES,
-+  RAPTOR_FEATURE_LAST=RAPTOR_FEATURE_LOAD_EXTERNAL_ENTITIES
- } raptor_feature;
- 
- 
---- misc/raptor-1.4.18/src/raptor_feature.c.old	2008-06-05 08:54:16.000000000 +0200
-+++ misc/raptor-1.4.18/src/raptor_feature.c	2012-02-15 16:55:09.000000000 +0100
-@@ -89,7 +89,8 @@ static const struct
-   { RAPTOR_FEATURE_JSON_CALLBACK     , 6,  "jsonCallback", "JSON serializer callback" },
-   { RAPTOR_FEATURE_JSON_EXTRA_DATA   , 6,  "jsonExtraData", "JSON serializer extra data" },
-   { RAPTOR_FEATURE_RSS_TRIPLES       , 6,  "rssTriples", "Atom/RSS serializer writes extra RDF triples" },
--  { RAPTOR_FEATURE_ATOM_ENTRY_URI    , 6,  "atomEntryUri", "Atom serializer Entry URI" }
-+  { RAPTOR_FEATURE_ATOM_ENTRY_URI    , 6,  "atomEntryUri", "Atom serializer Entry URI" },
-+  { RAPTOR_FEATURE_LOAD_EXTERNAL_ENTITIES, 1, "loadExternalEntities", "Load external XML entities." }
- };
- 
- 
---- misc/raptor-1.4.18/src/raptor_internal.h.old	2008-06-03 07:04:09.000000000 +0200
-+++ misc/raptor-1.4.18/src/raptor_internal.h	2012-02-15 16:52:08.000000000 +0100
-@@ -983,6 +983,14 @@ struct raptor_sax2_s {
- 
-   /* base URI for resolving relative URIs or xml:base URIs */
-   raptor_uri* base_uri;
-+
-+  /* call SAX2 handlers if non-0 */
-+  int enabled;
-+
-+  /* FEATURE: 
-+   * non 0 if XML entities should be loaded
-+   */
-+  int feature_load_external_entities;
- };
- 
- int raptor_sax2_init(void);
---- misc/raptor-1.4.18/src/raptor_libxml.c.old	2008-06-14 05:35:27.000000000 +0200
-+++ misc/raptor-1.4.18/src/raptor_libxml.c	2012-02-15 16:52:08.000000000 +0100
-@@ -142,18 +142,126 @@ raptor_libxml_hasExternalSubset (void* u
- 
- static xmlParserInputPtr
- raptor_libxml_resolveEntity(void* user_data, 
--                            const xmlChar *publicId, const xmlChar *systemId) {
--  raptor_sax2* sax2=(raptor_sax2*)user_data;
--  return libxml2_resolveEntity(sax2->xc, publicId, systemId);
-+                            const xmlChar *publicId, const xmlChar *systemId)
-+{
-+  raptor_sax2* sax2 = (raptor_sax2*)user_data;
-+  xmlParserCtxtPtr ctxt = sax2->xc;
-+  const unsigned char *uri_string = NULL;
-+  xmlParserInputPtr entity_input;
-+  int load_entity = 0;
-+
-+  if(ctxt->input)
-+    uri_string = (const unsigned char *)ctxt->input->filename;
-+
-+  if(!uri_string)
-+    uri_string = (const unsigned char *)ctxt->directory;
-+
-+  load_entity = sax2->feature_load_external_entities;
-+
-+  if(load_entity) {
-+    entity_input = xmlLoadExternalEntity((const char*)uri_string,
-+                                         (const char*)publicId,
-+                                         ctxt);
-+  } else {
-+    RAPTOR_DEBUG4("Not loading entity URI %s by policy for publicId '%s' systemId '%s'\n", uri_string, publicId, systemId);
-+  }
-+  
-+  return entity_input;
- }
- 
- 
- static xmlEntityPtr
--raptor_libxml_getEntity(void* user_data, const xmlChar *name) {
--  raptor_sax2* sax2=(raptor_sax2*)user_data;
--  return libxml2_getEntity(sax2->xc, name);
--}
-+raptor_libxml_getEntity(void* user_data, const xmlChar *name)
-+{
-+  raptor_sax2* sax2 = (raptor_sax2*)user_data;
-+  xmlParserCtxtPtr xc = sax2->xc;
-+  xmlEntityPtr ret = NULL;
-+
-+  if(!xc)
-+    return NULL;
-+
-+  if(!xc->inSubset) {
-+    /* looks for hardcoded set of entity names - lt, gt etc. */
-+    ret = xmlGetPredefinedEntity(name);
-+    if(ret) {
-+      RAPTOR_DEBUG2("Entity '%s' found in predefined set\n", name);
-+      return ret;
-+    }
-+  }
- 
-+  /* This section uses xmlGetDocEntity which looks for entities in
-+   * memory only, never from a file or URI 
-+   */
-+  if(xc->myDoc && (xc->myDoc->standalone == 1)) {
-+    RAPTOR_DEBUG2("Entity '%s' document is standalone\n", name);
-+    /* Document is standalone: no entities are required to interpret doc */
-+    if(xc->inSubset == 2) {
-+      xc->myDoc->standalone = 0;
-+      ret = xmlGetDocEntity(xc->myDoc, name);
-+      xc->myDoc->standalone = 1;
-+    } else {
-+      ret = xmlGetDocEntity(xc->myDoc, name);
-+      if(!ret) {
-+        xc->myDoc->standalone = 0;
-+        ret = xmlGetDocEntity(xc->myDoc, name);
-+        xc->myDoc->standalone = 1;
-+      }
-+    }
-+  } else {
-+    ret = xmlGetDocEntity(xc->myDoc, name);
-+  }
-+
-+  if(ret && !ret->children &&
-+    (ret->etype == XML_EXTERNAL_GENERAL_PARSED_ENTITY)) {
-+    /* Entity is an external general parsed entity. It may be in a
-+     * catalog file, user file or user URI
-+     */
-+    int val = 0;
-+    xmlNodePtr children;
-+    int load_entity = 0;
-+
-+    load_entity = sax2->feature_load_external_entities;
-+
-+    if(!load_entity) {
-+      RAPTOR_DEBUG2("Not getting entity URI %s by policy\n", ret->URI);
-+      children = xmlNewText((const xmlChar*)"");
-+    } else {
-+      /* Disable SAX2 handlers so that the SAX2 events do not all get
-+       * sent to callbacks during dealing with the entity parsing.
-+       */
-+      sax2->enabled = 0;
-+      val = xmlParseCtxtExternalEntity(xc, ret->URI, ret->ExternalID, &children);
-+      sax2->enabled = 1;
-+    }
-+    
-+    if(!val) {
-+      xmlAddChildList((xmlNodePtr)ret, children);
-+    } else {
-+      xc->validate = 0;
-+      return NULL;
-+    }
-+    
-+    ret->owner = 1;
-+
-+/* ret->checked was added with commit a37a6ad91a61d168ecc4b29263def3363fff4da6
-+   in libxml2 before 2.6.27 it does not exist and ret->children != 0 will be
-+   tested instead, which is true due to xmlAddChildList above */
-+#if LIBXML_VERSION >= 20627 || !defined(__APPLE__)
-+    /* Mark this entity as having been checked - never do this again */
-+    if(!ret->checked)
-+      ret->checked = 1;
-+#else
-+    if (atoi(xmlParserVersion) >= 20627) {
-+        int *const pChecked = (&ret->owner) + 1;
-+        if (!*pChecked) /* owner precedes checked and is also of type int */
-+          *pChecked = 1;
-+    }
-+#endif
-+  }
-+
-+  return ret;
-+}
-+  
- 
- static xmlEntityPtr
- raptor_libxml_getParameterEntity(void* user_data, const xmlChar *name) {
---- misc/raptor-1.4.18/src/raptor_parse.c.old	2008-06-15 09:18:50.000000000 +0200
-+++ misc/raptor-1.4.18/src/raptor_parse.c	2012-02-15 16:52:08.000000000 +0100
-@@ -1294,6 +1294,7 @@ raptor_set_feature(raptor_parser *parser
-     case RAPTOR_FEATURE_MICROFORMATS:
-     case RAPTOR_FEATURE_HTML_LINK:
-     case RAPTOR_FEATURE_WWW_TIMEOUT:
-+    case RAPTOR_FEATURE_LOAD_EXTERNAL_ENTITIES:
-       parser->features[(int)feature]=value;
-       break;
- 
-@@ -1414,6 +1415,7 @@ raptor_get_feature(raptor_parser *parser
-     case RAPTOR_FEATURE_MICROFORMATS:
-     case RAPTOR_FEATURE_HTML_LINK:
-     case RAPTOR_FEATURE_WWW_TIMEOUT:
-+    case RAPTOR_FEATURE_LOAD_EXTERNAL_ENTITIES:
-       result=(parser->features[(int)feature] != 0);
-       break;
- 
---- misc/raptor-1.4.18/src/raptor_rdfxml.c.old	2008-06-15 10:12:06.000000000 +0200
-+++ misc/raptor-1.4.18/src/raptor_rdfxml.c	2012-02-15 16:52:08.000000000 +0100
-@@ -1124,6 +1124,9 @@ raptor_rdfxml_parse_start(raptor_parser*
-   raptor_sax2_set_feature(rdf_xml_parser->sax2, 
-                           RAPTOR_FEATURE_NO_NET,
-                           rdf_parser->features[RAPTOR_FEATURE_NO_NET]);
-+  raptor_sax2_set_feature(rdf_xml_parser->sax2, 
-+                          RAPTOR_FEATURE_LOAD_EXTERNAL_ENTITIES,
-+                          rdf_parser->features[RAPTOR_FEATURE_LOAD_EXTERNAL_ENTITIES]);
-   
-   raptor_sax2_parse_start(rdf_xml_parser->sax2, uri);
- 
---- misc/raptor-1.4.18/src/raptor_rss.c.old	2008-05-21 22:25:57.000000000 +0200
-+++ misc/raptor-1.4.18/src/raptor_rss.c	2012-02-15 16:52:08.000000000 +0100
-@@ -251,6 +251,9 @@ raptor_rss_parse_start(raptor_parser *rd
-   raptor_sax2_set_feature(rss_parser->sax2, 
-                           RAPTOR_FEATURE_NO_NET,
-                           rdf_parser->features[RAPTOR_FEATURE_NO_NET]);
-+  raptor_sax2_set_feature(rss_parser->sax2, 
-+                          RAPTOR_FEATURE_LOAD_EXTERNAL_ENTITIES,
-+                          rdf_parser->features[RAPTOR_FEATURE_LOAD_EXTERNAL_ENTITIES]);
-   
-   raptor_sax2_parse_start(rss_parser->sax2, uri);
- 
---- misc/raptor-1.4.18/src/raptor_sax2.c.old	2008-06-15 10:12:20.000000000 +0200
-+++ misc/raptor-1.4.18/src/raptor_sax2.c	2012-02-15 16:52:08.000000000 +0100
-@@ -96,6 +96,8 @@ raptor_new_sax2(void* user_data, raptor_
- 
-   sax2->user_data=user_data;
- 
-+  sax2->enabled = 1;
-+
-   sax2->locator=error_handlers->locator;
-   
-   sax2->error_handlers=error_handlers;
-@@ -687,6 +689,10 @@ raptor_sax2_set_feature(raptor_sax2 *sax
-       sax2->feature_no_net=value;
-       break;
- 
-+    case RAPTOR_FEATURE_LOAD_EXTERNAL_ENTITIES:
-+      sax2->feature_load_external_entities=value;
-+      break;
-+
-     case RAPTOR_FEATURE_SCANNING:
-     case RAPTOR_FEATURE_ASSUME_IS_RDF:
-     case RAPTOR_FEATURE_ALLOW_NON_NS_ATTRIBUTES:
-@@ -767,6 +773,9 @@ raptor_sax2_start_element(void* user_dat
-   unsigned char *xml_language=NULL;
-   raptor_uri *xml_base=NULL;
- 
-+  if(!sax2->enabled)
-+    return;
-+
- #ifdef RAPTOR_XML_EXPAT
- #ifdef EXPAT_UTF8_BOM_CRASH
-   sax2->tokens_count++;
-@@ -990,6 +999,9 @@ raptor_sax2_end_element(void* user_data,
-   raptor_sax2* sax2=(raptor_sax2*)user_data;
-   raptor_xml_element* xml_element;
- 
-+  if(!sax2->enabled)
-+    return;
-+
- #ifdef RAPTOR_XML_EXPAT
- #ifdef EXPAT_UTF8_BOM_CRASH
-   sax2->tokens_count++;
-@@ -1025,6 +1037,10 @@ void
- raptor_sax2_characters(void* user_data, const unsigned char *s, int len)
- {
-   raptor_sax2* sax2=(raptor_sax2*)user_data;
-+
-+  if(!sax2->enabled)
-+    return;
-+
-   if(sax2->characters_handler)
-     sax2->characters_handler(sax2->user_data, sax2->current_element, s, len);
- }
-@@ -1035,6 +1051,10 @@ void
- raptor_sax2_cdata(void* user_data, const unsigned char *s, int len)
- {
-   raptor_sax2* sax2=(raptor_sax2*)user_data;
-+
-+  if(!sax2->enabled)
-+    return;
-+
- #ifdef RAPTOR_XML_EXPAT
- #ifdef EXPAT_UTF8_BOM_CRASH
-   sax2->tokens_count++;
-@@ -1051,6 +1071,10 @@ void
- raptor_sax2_comment(void* user_data, const unsigned char *s)
- {
-   raptor_sax2* sax2=(raptor_sax2*)user_data;
-+
-+  if(!sax2->enabled)
-+    return;
-+
-   if(sax2->comment_handler)
-     sax2->comment_handler(sax2->user_data, sax2->current_element, s);
- }
-@@ -1066,6 +1090,10 @@ raptor_sax2_unparsed_entity_decl(void* u
-                                  const unsigned char* notationName)
- {
-   raptor_sax2* sax2=(raptor_sax2*)user_data;
-+
-+  if(!sax2->enabled)
-+    return;
-+
-   if(sax2->unparsed_entity_decl_handler)
-     sax2->unparsed_entity_decl_handler(sax2->user_data,
-                                        entityName, base, systemId, 
-@@ -1082,6 +1110,10 @@ raptor_sax2_external_entity_ref(void* us
-                                 const unsigned char* publicId)
- {
-   raptor_sax2* sax2=(raptor_sax2*)user_data;
-+
-+  if(!sax2->enabled)
-+    return 0;
-+
-   if(sax2->external_entity_ref_handler)
-     return sax2->external_entity_ref_handler(sax2->user_data,
-                                              context, base, systemId, publicId);
---- misc/raptor-1.4.18/src/raptor_serialize.c.old	2008-06-20 02:55:31.000000000 +0200
-+++ misc/raptor-1.4.18/src/raptor_serialize.c	2012-02-15 16:52:08.000000000 +0100
-@@ -859,6 +859,7 @@ raptor_serializer_set_feature(raptor_ser
- 
-     /* Shared */
-     case RAPTOR_FEATURE_NO_NET:
-+    case RAPTOR_FEATURE_LOAD_EXTERNAL_ENTITIES:
- 
-     /* XML writer features */
-     case RAPTOR_FEATURE_WRITER_AUTO_INDENT:
-@@ -965,6 +966,7 @@ raptor_serializer_set_feature_string(rap
- 
-     /* Shared */
-     case RAPTOR_FEATURE_NO_NET:
-+    case RAPTOR_FEATURE_LOAD_EXTERNAL_ENTITIES:
- 
-     /* XML writer features */
-     case RAPTOR_FEATURE_WRITER_AUTO_INDENT:
-@@ -1102,6 +1104,7 @@ raptor_serializer_get_feature(raptor_ser
- 
-     /* Shared */
-     case RAPTOR_FEATURE_NO_NET:
-+    case RAPTOR_FEATURE_LOAD_EXTERNAL_ENTITIES:
- 
-     /* XML writer features */
-     case RAPTOR_FEATURE_WRITER_AUTO_INDENT:
-@@ -1201,6 +1204,7 @@ raptor_serializer_get_feature_string(rap
- 
-     /* Shared */
-     case RAPTOR_FEATURE_NO_NET:
-+    case RAPTOR_FEATURE_LOAD_EXTERNAL_ENTITIES:
- 
-     /* XML writer features */
-     case RAPTOR_FEATURE_WRITER_AUTO_INDENT:
---- misc/raptor-1.4.18/src/raptor_turtle_writer.c.old	2008-06-20 07:47:48.000000000 +0200
-+++ misc/raptor-1.4.18/src/raptor_turtle_writer.c	2012-02-15 16:52:08.000000000 +0100
-@@ -723,6 +723,7 @@ raptor_turtle_writer_set_feature(raptor_
- 
-     /* Shared */
-     case RAPTOR_FEATURE_NO_NET:
-+    case RAPTOR_FEATURE_LOAD_EXTERNAL_ENTITIES:
- 
-     /* XML writer features */
-     case RAPTOR_FEATURE_RELATIVE_URIS:
-@@ -836,6 +837,7 @@ raptor_turtle_writer_get_feature(raptor_
- 
-     /* Shared */
-     case RAPTOR_FEATURE_NO_NET:
-+    case RAPTOR_FEATURE_LOAD_EXTERNAL_ENTITIES:
- 
-     /* XML writer features */
-     case RAPTOR_FEATURE_RELATIVE_URIS:
---- misc/raptor-1.4.18/src/raptor_xml_writer.c.old	2008-06-03 07:05:56.000000000 +0200
-+++ misc/raptor-1.4.18/src/raptor_xml_writer.c	2012-02-15 16:52:08.000000000 +0100
-@@ -906,6 +906,7 @@ raptor_xml_writer_set_feature(raptor_xml
- 
-     /* Shared */
-     case RAPTOR_FEATURE_NO_NET:
-+    case RAPTOR_FEATURE_LOAD_EXTERNAL_ENTITIES:
- 
-     /* XML writer features */
-     case RAPTOR_FEATURE_RELATIVE_URIS:
-@@ -1026,6 +1027,7 @@ raptor_xml_writer_get_feature(raptor_xml
- 
-     /* Shared */
-     case RAPTOR_FEATURE_NO_NET:
-+    case RAPTOR_FEATURE_LOAD_EXTERNAL_ENTITIES:
- 
-     /* XML writer features */
-     case RAPTOR_FEATURE_RELATIVE_URIS:
diff --git a/redland/raptor/raptor-1.4.18.fixes.patch b/redland/raptor/raptor-1.4.18.fixes.patch
deleted file mode 100644
index 67a8f5a..0000000
--- a/redland/raptor/raptor-1.4.18.fixes.patch
+++ /dev/null
@@ -1,42 +0,0 @@
---- misc/raptor-1.4.18/src/raptor_abbrev.c	2008-06-15 09:34:06.000000000 +0200
-+++ misc/raptor-1.4.18/src/raptor_abbrev.c	2011-05-18 18:58:35.440435467 +0200
-@@ -124,6 +124,7 @@
-         case RAPTOR_IDENTIFIER_TYPE_UNKNOWN: 
-         default:
-           RAPTOR_FREE(raptor_abbrev_node, node);
-+          node = NULL;
-     }
-     
-   }
---- misc/raptor-1.4.18/src/raptor_parse.c	2008-06-15 09:18:50.000000000 +0200
-+++ misc/build/raptor-1.4.18/src/raptor_parse.c	2011-05-18 18:58:32.143702301 +0200
-@@ -1870,7 +1870,7 @@
-         ((char*)buffer)[FIRSTN]=c;
-     }
- 
--    if(i > MAX_PARSERS) {
-+    if(i >= MAX_PARSERS) {
-       raptor_finish();
-       RAPTOR_FATAL2("Number of parsers greater than static buffer size %d\n",
-                     MAX_PARSERS);
---- misc/raptor-1.4.18/src/raptor_rdfxml.c	2008-06-15 10:12:06.000000000 +0200
-+++ misc/build/raptor-1.4.18/src/raptor_rdfxml.c	2011-05-18 18:58:30.031671100 +0200
-@@ -404,7 +404,7 @@
- static const char *
- raptor_rdfxml_element_content_type_as_string(raptor_rdfxml_element_content_type type) 
- {
--  if(type > RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_LAST)
-+  if(type >= RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_LAST)
-     return "INVALID";
-   return rdf_content_type_info[type].name;
- }
---- misc/raptor-1.4.18/src/raptor_serialize_dot.c	2008-06-15 09:34:29.000000000 +0200
-+++ misc/build/raptor-1.4.18/src/raptor_serialize_dot.c	2011-05-18 18:58:33.986920218 +0200
-@@ -266,6 +266,7 @@
-       case RAPTOR_IDENTIFIER_TYPE_UNKNOWN: 
-       default:
-         RAPTOR_FREE(raptor_dot_serializer_node, node);
-+        node = NULL;
-     }
-     
-   }
diff --git a/redland/raptor/raptor-1.4.18.legal.patch b/redland/raptor/raptor-1.4.18.legal.patch
deleted file mode 100644
index b3ad82c..0000000
--- a/redland/raptor/raptor-1.4.18.legal.patch
+++ /dev/null
@@ -1,18 +0,0 @@
---- misc/raptor-1.4.18/LICENSE.txt	Sun Mar 30 06:52:22 2008
-+++ misc/raptor-1.4.18/LICENSE.txt	Mon Jun 16 15:55:38 2008
-@@ -60,3 +60,15 @@
- 
-    Copyright (C) 2000-2008 David Beckett
-    Copyright (C) 2000-2005 University of Bristol
-+
-+
-+LGPL Disclaimer
-+
-+For the avoidance of doubt, except that if any license choice other 
-+than GPL or LGPL is available it will apply instead, Sun elects to 
-+use only the Lesser General Public License version 2.1 (LGPLv2) at 
-+this time for any software where a choice of LGPL license versions 
-+is made available with the language indicating that LGPLv2.1 or any 
-+later version may be used, or where a choice of which version of the 
-+LGPL is applied is otherwise unspecified.
-+
diff --git a/redland/raptor/raptor-1.4.18.libxml.patch b/redland/raptor/raptor-1.4.18.libxml.patch
deleted file mode 100644
index 04994fa..0000000
--- a/redland/raptor/raptor-1.4.18.libxml.patch
+++ /dev/null
@@ -1,117 +0,0 @@
---- misc/raptor-1.4.18/configure	2011-06-05 11:55:18.000000000 -0400
-+++ misc/raptor-1.4.18/configure	2011-06-05 11:55:46.000000000 -0400
-@@ -23470,73 +23470,6 @@
- LIBS="$oLIBS"
- 
- 
--# Check whether --with-xml2-config was given.
--if test "${with_xml2_config+set}" = set; then
--  withval=$with_xml2_config; xml2_config="$withval"
--else
--  xml2_config=""
--fi
--
--
--if test "X$xml2_config" != "X" ; then
--  { echo "$as_me:$LINENO: checking for $xml2_config" >&5
--echo $ECHO_N "checking for $xml2_config... $ECHO_C" >&6; }
--
--  if test -f $xml2_config ; then
--    XML_CONFIG=$xml2_config
--    { echo "$as_me:$LINENO: result: yes" >&5
--echo "${ECHO_T}yes" >&6; }
--  else
--    { echo "$as_me:$LINENO: result: no - searching PATH" >&5
--echo "${ECHO_T}no - searching PATH" >&6; }
--  fi
--fi
--if test "X$XML_CONFIG" = "X"; then
--  for ac_prog in xml2-config
--do
--  # Extract the first word of "$ac_prog", so it can be a program name with args.
--set dummy $ac_prog; ac_word=$2
--{ echo "$as_me:$LINENO: checking for $ac_word" >&5
--echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
--if test "${ac_cv_prog_XML_CONFIG+set}" = set; then
--  echo $ECHO_N "(cached) $ECHO_C" >&6
--else
--  if test -n "$XML_CONFIG"; then
--  ac_cv_prog_XML_CONFIG="$XML_CONFIG" # Let the user override the test.
--else
--as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
--for as_dir in $PATH
--do
--  IFS=$as_save_IFS
--  test -z "$as_dir" && as_dir=.
--  for ac_exec_ext in '' $ac_executable_extensions; do
--  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
--    ac_cv_prog_XML_CONFIG="$ac_prog"
--    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
--    break 2
--  fi
--done
--done
--IFS=$as_save_IFS
--
--fi
--fi
--XML_CONFIG=$ac_cv_prog_XML_CONFIG
--if test -n "$XML_CONFIG"; then
--  { echo "$as_me:$LINENO: result: $XML_CONFIG" >&5
--echo "${ECHO_T}$XML_CONFIG" >&6; }
--else
--  { echo "$as_me:$LINENO: result: no" >&5
--echo "${ECHO_T}no" >&6; }
--fi
--
--
--  test -n "$XML_CONFIG" && break
--done
--
--fi
--
--
- # Check whether --with-xslt-config was given.
- if test "${with_xslt_config+set}" = set; then
-   withval=$with_xslt_config; xslt_config="$withval"
-@@ -23719,8 +23652,8 @@
- 
- oCPPFLAGS="$CPPFLAGS"
- oLIBS="$LIBS"
--if test "X$XML_CONFIG" != X; then
--  LIBS="$LIBS `$XML_CONFIG --libs`"
-+if test 0; then
-+  LIBS="$LIBS $LIBXML_LIBS"
-   { echo "$as_me:$LINENO: checking for xmlCreatePushParserCtxt" >&5
- echo $ECHO_N "checking for xmlCreatePushParserCtxt... $ECHO_C" >&6; }
- if test "${ac_cv_func_xmlCreatePushParserCtxt+set}" = set; then
-@@ -23813,18 +23746,6 @@
-   if test $have_xmlCreatePushParserCtxt = yes; then
-     have_libxml_lib=1
-     have_libxml=1
--    CPPFLAGS="`$XML_CONFIG --cflags` $CPPFLAGS"
--    LIBXML_VERSION=`$XML_CONFIG --version`
--    libxml_version_dec=`echo $LIBXML_VERSION | awk -F. '{printf("%d\n", 10000*$1 + 100*$2 + $3)};'`
--    libxml_min_version_dec=`echo $libxml_min_version | awk -F. '{printf("%d\n", 10000*$1 + 100*$2 + $3)};'`
--    { echo "$as_me:$LINENO: result: yes - version $LIBXML_VERSION" >&5
--echo "${ECHO_T}yes - version $LIBXML_VERSION" >&6; }
--    if test $libxml_version_dec -lt $libxml_min_version_dec; then
--       { echo "$as_me:$LINENO: WARNING: Using libxml $LIBXML_VERSION is unsupported - $libxml_min_version or newer required." >&5
--echo "$as_me: WARNING: Using libxml $LIBXML_VERSION is unsupported - $libxml_min_version or newer required." >&2;}
--       have_libxml_lib=0
--       have_libxml=0
--    fi
-   else
-     { echo "$as_me:$LINENO: result: no" >&5
- echo "${ECHO_T}no" >&6; }
-@@ -26447,8 +26368,8 @@
-     CPPFLAGS="-I$srcdir/libxml $CPPFLAGS"
-     LIBS="$LIBS -Llibxml -llibxml"
-   else
--    LIBS="$LIBS `$XML_CONFIG --libs`"
--    CPPFLAGS="`$XML_CONFIG --cflags` $CPPFLAGS"
-+    LIBS="$LIBS $LIBXML_LIBS"
-+    CPPFLAGS="$LIBXML_CFLAGS $CPPFLAGS"
-   fi
-   RAPTOR_XML_PARSER=libxml
- fi
diff --git a/redland/raptor/raptor-1.4.18.libxslt.patch b/redland/raptor/raptor-1.4.18.libxslt.patch
deleted file mode 100644
index 49d2a26..0000000
--- a/redland/raptor/raptor-1.4.18.libxslt.patch
+++ /dev/null
@@ -1,116 +0,0 @@
---- misc/raptor-1.4.18/configure	2011-06-05 11:57:41.000000000 -0400
-+++ misc/raptor-1.4.18/configure	2011-06-05 11:58:11.000000000 -0400
-@@ -23470,73 +23470,6 @@
- LIBS="$oLIBS"
- 
- 
--# Check whether --with-xslt-config was given.
--if test "${with_xslt_config+set}" = set; then
--  withval=$with_xslt_config; xslt_config="$withval"
--else
--  xslt_config=""
--fi
--
--
--if test "X$xslt_config" != "X" ; then
--  { echo "$as_me:$LINENO: checking for $xslt_config" >&5
--echo $ECHO_N "checking for $xslt_config... $ECHO_C" >&6; }
--
--  if test -f $xslt_config ; then
--    XSLT_CONFIG=$xslt_config
--    { echo "$as_me:$LINENO: result: yes" >&5
--echo "${ECHO_T}yes" >&6; }
--  else
--    { echo "$as_me:$LINENO: result: no - searching PATH" >&5
--echo "${ECHO_T}no - searching PATH" >&6; }
--  fi
--fi
--if test "X$XSLT_CONFIG" = "X"; then
--  for ac_prog in xslt-config
--do
--  # Extract the first word of "$ac_prog", so it can be a program name with args.
--set dummy $ac_prog; ac_word=$2
--{ echo "$as_me:$LINENO: checking for $ac_word" >&5
--echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
--if test "${ac_cv_prog_XSLT_CONFIG+set}" = set; then
--  echo $ECHO_N "(cached) $ECHO_C" >&6
--else
--  if test -n "$XSLT_CONFIG"; then
--  ac_cv_prog_XSLT_CONFIG="$XSLT_CONFIG" # Let the user override the test.
--else
--as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
--for as_dir in $PATH
--do
--  IFS=$as_save_IFS
--  test -z "$as_dir" && as_dir=.
--  for ac_exec_ext in '' $ac_executable_extensions; do
--  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
--    ac_cv_prog_XSLT_CONFIG="$ac_prog"
--    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
--    break 2
--  fi
--done
--done
--IFS=$as_save_IFS
--
--fi
--fi
--XSLT_CONFIG=$ac_cv_prog_XSLT_CONFIG
--if test -n "$XSLT_CONFIG"; then
--  { echo "$as_me:$LINENO: result: $XSLT_CONFIG" >&5
--echo "${ECHO_T}$XSLT_CONFIG" >&6; }
--else
--  { echo "$as_me:$LINENO: result: no" >&5
--echo "${ECHO_T}no" >&6; }
--fi
--
--
--  test -n "$XSLT_CONFIG" && break
--done
--
--fi
--
--
- # Check whether --with-curl-config was given.
- if test "${with_curl_config+set}" = set; then
-   withval=$with_curl_config; curl_config="$withval"
-@@ -24702,8 +24635,8 @@
- 
- oCPPFLAGS="$CPPFLAGS"
- oLIBS="$LIBS"
--if test "X$XSLT_CONFIG" != X; then
--  LIBS="$LIBS `$XSLT_CONFIG --libs`"
-+if test 0; then
-+  LIBS="$LIBS $LIBXSLT_LIBS"
-   { echo "$as_me:$LINENO: checking for xsltSaveResultToString" >&5
- echo $ECHO_N "checking for xsltSaveResultToString... $ECHO_C" >&6; }
- if test "${ac_cv_func_xsltSaveResultToString+set}" = set; then
-@@ -24795,17 +24728,6 @@
- echo $ECHO_N "checking for system libxslt library... $ECHO_C" >&6; }
-   if test $have_xsltSaveResultToString = yes; then
-     have_libxslt=1
--    CPPFLAGS="`$XSLT_CONFIG --cflags` $CPPFLAGS"
--    LIBXSLT_VERSION=`$XSLT_CONFIG --version`
--    libxslt_version_dec=`echo $LIBXSLT_VERSION | awk -F. '{printf("%d\n", 10000*$1 + 100*$2 + $3)};'`
--    libxslt_min_version_dec=`echo $libxslt_min_version | awk -F. '{printf("%d\n", 10000*$1 + 100*$2 + $3)};'`
--    { echo "$as_me:$LINENO: result: yes - version $LIBXSLT_VERSION" >&5
--echo "${ECHO_T}yes - version $LIBXSLT_VERSION" >&6; }
--    if test $libxslt_version_dec -lt $libxslt_min_version_dec; then
--       { echo "$as_me:$LINENO: WARNING: Using libxslt $LIBXSLT_VERSION is unsupported - $libxslt_min_version or newer required." >&5
--echo "$as_me: WARNING: Using libxslt $LIBXSLT_VERSION is unsupported - $libxslt_min_version or newer required." >&2;}
--       have_libxslt=0
--    fi
-   else
-     { echo "$as_me:$LINENO: result: no" >&5
- echo "${ECHO_T}no" >&6; }
-@@ -26395,8 +26317,8 @@
- fi
- 
- if test $need_libxslt = 1; then
--  LIBS="$LIBS `$XSLT_CONFIG --libs`"
--  CPPFLAGS="`$XSLT_CONFIG --cflags` $CPPFLAGS"
-+  LIBS="$LIBS $LIBXSLT_LIBS"
-+  CPPFLAGS="$LIBXSLT_CFLAGS $CPPFLAGS"
- fi
- 
- RAPTOR_LIBTOOLLIBS=libraptor.la
diff --git a/redland/raptor/raptor-1.4.18.mingw.patch b/redland/raptor/raptor-1.4.18.mingw.patch
deleted file mode 100644
index 4027c30..0000000
--- a/redland/raptor/raptor-1.4.18.mingw.patch
+++ /dev/null
@@ -1,41 +0,0 @@
---- misc/raptor-1.4.18/configure	2008-06-15 17:25:55.000000000 +0900
-+++ misc/raptor-1.4.18/configure	2009-06-04 21:10:22.447125000 +0900
-@@ -25238,6 +25238,12 @@
- rdfa_parser=yes
- 
- rdf_parsers_available="rdfxml ntriples turtle trig guess rss-tag-soup rdfa"
-+case $host_os in
-+mingw*)
-+  rdfa_parser=no
-+  rdf_parsers_available="rdfxml ntriples turtle trig guess rss-tag-soup"
-+  ;;
-+esac
- if test "$USE_MAINTAINER_MODE" = yes; then
-   rdf_parsers_available="$rdf_parsers_available n3"
- fi
---- misc/raptor-1.4.18/configure.ac	2008-06-15 17:25:20.000000000 +0900
-+++ misc/build/raptor-1.4.18/configure.ac	2009-06-04 21:10:31.025250000 +0900
-@@ -758,6 +758,12 @@
- rdfa_parser=yes
- 
- rdf_parsers_available="rdfxml ntriples turtle trig guess rss-tag-soup rdfa"
-+case $host_os in
-+mingw*)
-+  rdfa_parser=no
-+  rdf_parsers_available="rdfxml ntriples turtle trig guess rss-tag-soup"
-+  ;;
-+esac
- if test "$USE_MAINTAINER_MODE" = yes; then
-   rdf_parsers_available="$rdf_parsers_available n3"
- fi
---- misc/raptor-1.4.18/src/Makefile.in
-+++ misc/build/raptor-1.4.18/src/Makefile.in
-@@ -404,7 +404,7 @@
- 	$(am__append_20) $(am__append_21) $(am__append_22) \
- 	$(am__append_23) $(am__append_24) $(am__append_25) \
- 	$(am__append_26)
--libraptor_la_LDFLAGS = -version-info @RAPTOR_LIBTOOL_VERSION@
-+libraptor_la_LDFLAGS = -version-info @RAPTOR_LIBTOOL_VERSION@ -no-undefined
- libraptor_la_LIBADD = @LTLIBOBJS@
- EXTRA_DIST = \
- raptor-config.in \
diff --git a/redland/raptor/raptor-1.4.18.no-soname.patch b/redland/raptor/raptor-1.4.18.no-soname.patch
deleted file mode 100644
index fddb5d4..0000000
--- a/redland/raptor/raptor-1.4.18.no-soname.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- misc/raptor-1.4.18/configure
-+++ misc/raptor-1.4.18/configure
-@@ -7848,7 +7848,7 @@
- 	*)
- 	  tmp_sharedflag='-shared' ;;
- 	esac
--	archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-+	archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags -o $lib'
- 
- 	if test $supports_anon_versioning = yes; then
- 	  archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~
diff --git a/redland/raptor/raptor-1.4.18.ooo_build.patch b/redland/raptor/raptor-1.4.18.ooo_build.patch
deleted file mode 100644
index 2f25232..0000000
--- a/redland/raptor/raptor-1.4.18.ooo_build.patch
+++ /dev/null
@@ -1,43 +0,0 @@
---- misc/raptor-1.4.18/src/raptor-config.in	Sat Jan  6 05:02:00 2007
-+++ misc/raptor-1.4.18/src/raptor-config.in	Mon Jun 16 15:55:38 2008
-@@ -21,14 +21,23 @@
- # 
- #
- 
--prefix=@prefix@
--exec_prefix=@exec_prefix@
-+prefix=${SOLARVERSION}/${INPATH}
-+exec_prefix=${SOLARVERSION}/${INPATH}
-+#includedir=${SOLARVERSION}/${INPATH}/inc${UPDMINOREXT}/external
-+#libdir=${SOLARVERSION}/${INPATH}/lib${UPDMINOREXT}
-+# HACK: map to build directory
-+includedir=../../../../inc
-+libdir=../../../../lib
-+includes=-I${includedir}
- 
--if test "@includedir@" != /usr/include ; then
--  includes="-I at includedir@"
--else
--  includes=
--fi
-+#prefix=@prefix@
-+#exec_prefix=@exec_prefix@
-+#
-+#if test "@includedir@" != /usr/include ; then
-+#  includes="-I at includedir@"
-+#else
-+#  includes=
-+#fi
- 
- 
- usage()
-@@ -130,7 +139,8 @@
-   done
- fi
- if test "$echo_libs" = "yes"; then
--  echo -L at libdir@ -lraptor
-+#  echo -L at libdir@ -lraptor
-+  echo -L${libdir} -lraptor
- fi
- if test "$echo_libtool_libs" = "yes"; then
-   echo @libdir@/@RAPTOR_LIBTOOLLIBS@
diff --git a/redland/raptor/raptor-1.4.18.rindex.patch b/redland/raptor/raptor-1.4.18.rindex.patch
deleted file mode 100644
index dc038d3..0000000
--- a/redland/raptor/raptor-1.4.18.rindex.patch
+++ /dev/null
@@ -1,62 +0,0 @@
---- misc/raptor-1.4.18/librdfa/curie.c	2008-06-14 07:33:37.000000000 +0200
-+++ misc/raptor-1.4.18/librdfa/curie.c	2011-09-27 14:48:34.000000000 +0200
-@@ -122,7 +122,7 @@
-       {
-          // if we have a relative URI, chop off the name of the file
-          // and replace it with the relative pathname
--         char* end_index = rindex(context->base, '/');
-+         char* end_index = strrchr(context->base, '/');
- 
-          if(end_index != NULL)
-          {
-@@ -130,7 +130,7 @@
-             char* end_index2;
- 
-             tmpstr = rdfa_replace_string(tmpstr, context->base);
--            end_index2= rindex(tmpstr, '/');
-+            end_index2= strrchr(tmpstr, '/');
-             end_index2++;
-             *end_index2 = '\0';
- 
---- misc/raptor-1.4.18/librdfa/rdfa.c	2008-06-16 04:02:58.000000000 +0200
-+++ misc/build/raptor-1.4.18/librdfa/rdfa.c	2011-09-27 15:03:12.000000000 +0200
-@@ -163,7 +163,7 @@
-       {
-          char* href_start = strstr(base_start, "href=");
-          char* uri_start = href_start + 6;
--         char* uri_end = index(uri_start, '"');
-+         char* uri_end = strchr(uri_start, '"');
- 
-          if((uri_start != NULL) && (uri_end != NULL))
-          {
-@@ -898,8 +898,8 @@
-       if(context->xml_literal != NULL)
-       {
-          // get the data between the first tag and the last tag
--         content_start = index(context->xml_literal, '>');
--         content_end = rindex(context->xml_literal, '<');
-+         content_start = strchr(context->xml_literal, '>');
-+         content_end = strrchr(context->xml_literal, '<');
-          
-          if((content_start != NULL) && (content_end != NULL))
-          {
---- misc/raptor-1.4.18/librdfa/triple.c	2008-06-14 07:33:37.000000000 +0200
-+++ misc/build/raptor-1.4.18/librdfa/triple.c	2011-09-27 15:02:59.000000000 +0200
-@@ -437,7 +437,7 @@
-       current_object_literal = context->content;
-       type = RDF_TYPE_PLAIN_LITERAL;
-    }
--   else if(index(context->xml_literal, '<') == NULL)
-+   else if(strchr(context->xml_literal, '<') == NULL)
-    {      
-       current_object_literal = context->plain_literal;
-       type = RDF_TYPE_PLAIN_LITERAL;
-@@ -467,7 +467,7 @@
-    // [current element], i.e., not including the element itself, and
-    // giving it a datatype of rdf:XMLLiteral.
-    if((current_object_literal == NULL) &&
--      (index(context->xml_literal, '<') != NULL) &&
-+      (strchr(context->xml_literal, '<') != NULL) &&
-       ((context->datatype == NULL) ||
-        (strcmp(context->datatype,
-                "http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral") == 0)))
diff --git a/redland/raptor/raptor-1.4.18.win32.patch b/redland/raptor/raptor-1.4.18.win32.patch
deleted file mode 100644
index f7f8bbe..0000000
--- a/redland/raptor/raptor-1.4.18.win32.patch
+++ /dev/null
@@ -1,78 +0,0 @@
---- misc/raptor-1.4.18/src/win32_raptor_config.h	Wed Apr  2 06:50:14 2008
-+++ misc/raptor-1.4.18/src/win32_raptor_config.h	Wed Feb 18 13:21:23 2009
-@@ -38,6 +38,8 @@
- 
- #define HAVE_STDLIB_H 1
- 
-+#define HAVE_ERRNO_H 1
-+
- #if 0
- /* For using expat on win32 */
- #define RAPTOR_XML_EXPAT 1
-@@ -47,8 +49,17 @@
- /* For using libxml2 on win32 */
- #define RAPTOR_XML_LIBXML
- #define HAVE_LIBXML_XMLREADER_H
-+#define HAVE_LIBXML_HASH_H 1
-+#define HAVE_LIBXML_HTMLPARSER_H 1
-+#define HAVE_LIBXML_NANOHTTP_H 1
-+#define HAVE_LIBXML_PARSER_H 1
-+#define HAVE_LIBXSLT_XSLT_H 1
-+
-+#define RAPTOR_LIBXML_HTML_PARSE_NONET 1
-+#define RAPTOR_LIBXML_XML_PARSE_NONET 1
-+
- /* does libxml struct xmlEntity have a field etype */
--/*#define RAPTOR_LIBXML_ENTITY_ETYPE*/
-+#define RAPTOR_LIBXML_ENTITY_ETYPE
- 
- /* does libxml struct xmlEntity have a field name_length */
- /*#define RAPTOR_LIBXML_ENTITY_NAME_LENGTH*/
-@@ -60,16 +71,17 @@
- #define HAVE_XMLSAX2INTERNALSUBSET 1
- 
- /* does libxml xmlSAXHandler have externalSubset field */
--/*#define RAPTOR_LIBXML_XMLSAXHANDLER_EXTERNALSUBSET*/
-+#define RAPTOR_LIBXML_XMLSAXHANDLER_EXTERNALSUBSET 1
- 
- /* does libxml xmlSAXHandler have initialized field */
--/*#define RAPTOR_LIBXML_XMLSAXHANDLER_INITIALIZED*/
-+#define RAPTOR_LIBXML_XMLSAXHANDLER_INITIALIZED 1
- #endif
- 
- #define HAVE_STRICMP 1
- 
- /* MS names for these functions */
--#define vsnprintf _vsnprintf
-+// next line breaks build on wntmsci12
-+//#define vsnprintf _vsnprintf
- #define snprintf _snprintf
- #define access _access
- #define stricmp _stricmp
-@@ -113,19 +125,23 @@
- #endif
- 
- #define RAPTOR_PARSER_GUESS 1
--#define RAPTOR_PARSER_GRDDL 1
-+/* #define RAPTOR_PARSER_GRDDL 1   disabled: (#i93768#) */
-+#ifndef __MINGW32__ /* conflicts with normal configure result */
- #define RAPTOR_PARSER_N3 1
-+#endif
- #define RAPTOR_PARSER_TURTLE 1
- #define RAPTOR_PARSER_NTRIPLES 1
- #define RAPTOR_PARSER_RDFXML 1
- 
-+/* does not build on wntmsci12 due to gettimeofday
- #define RAPTOR_SERIALIZER_ATOM 1
--#define RAPTOR_SERIALIZER_RSS_1_0 1
-+#define RAPTOR_SERIALIZER_RSS_1_0 1 */
- #define RAPTOR_SERIALIZER_RDFXML 1
- #define RAPTOR_SERIALIZER_RDFXML_ABBREV 1
- #define RAPTOR_SERIALIZER_NTRIPLES 1
- 
--#define RAPTOR_WWW_LIBCURL 1
-+//#define RAPTOR_WWW_LIBCURL 1
-+#define RAPTOR_WWW_LIBXML 1
- 
- 
- #include <windows.h>
diff --git a/redland/raptor/raptor-android.patch.1 b/redland/raptor/raptor-android.patch.1
new file mode 100644
index 0000000..cb84383
--- /dev/null
+++ b/redland/raptor/raptor-android.patch.1
@@ -0,0 +1,13 @@
+No sonames on Android
+
+--- a/configure	2013-03-29 19:46:34.922901756 +0100
++++ b/configure	2013-03-29 19:46:56.051901574 +0100
+@@ -9866,7 +9866,7 @@
+ 	*Sun\ F*)			# Sun Fortran 8.3
+ 	  tmp_sharedflag='-G' ;;
+ 	esac
+-	archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
++	archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags -o $lib'
+ 
+         if test "x$supports_anon_versioning" = xyes; then
+           archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
diff --git a/redland/raptor/raptor-bundled-soname.patch.1 b/redland/raptor/raptor-bundled-soname.patch.1
new file mode 100644
index 0000000..59d27b8
--- /dev/null
+++ b/redland/raptor/raptor-bundled-soname.patch.1
@@ -0,0 +1,13 @@
+rhbz#809466 change soname of bundled redland libs
+
+--- a/src/Makefile.in    2013-03-29 19:11:27.944919859 +0100
++++ b/src/Makefile.in	2013-03-29 19:17:42.173916644 +0100
+@@ -507,7 +507,7 @@
+ 	$(am__append_21) $(am__append_22) $(am__append_23) \
+ 	$(am__append_24) $(am__append_25) $(am__append_26) \
+ 	$(am__append_27) $(am__append_28)
+-libraptor2_la_LDFLAGS = -version-info @RAPTOR_LIBTOOL_VERSION@ \
++libraptor2_la_LDFLAGS = -version-info @RAPTOR_LIBTOOL_VERSION@ -release lo \
+ @RAPTOR_LDFLAGS@ $(MEM_LIBS)
+ 
+ libraptor2_la_LIBADD = @LTLIBOBJS@
diff --git a/redland/raptor/raptor-freebsd.patch.1 b/redland/raptor/raptor-freebsd.patch.1
new file mode 100644
index 0000000..679d853
--- /dev/null
+++ b/redland/raptor/raptor-freebsd.patch.1
@@ -0,0 +1,28 @@
+Usual patch to produce Linux-like .so files on FreeBSD
+
+--- a/build/ltmain.sh	2008-02-02 22:28:24.000000000 +0900
++++ b/build/ltmain.sh	2008-07-08 11:58:42.000000000 +0900
+@@ -7341,9 +7341,9 @@
+ 	    revision="$number_revision"
+ 	    ;;
+ 	  freebsd-aout|freebsd-elf|qnx|sunos)
+-	    current="$number_major"
+-	    revision="$number_minor"
+-	    age="0"
++	    current=`expr $number_major + $number_minor`
++	    age="$number_minor"
++	    revision="$number_revision"
+ 	    ;;
+ 	  irix|nonstopux)
+ 	    current=`expr $number_major + $number_minor`
+@@ -7420,8 +7420,8 @@
+ 	  ;;
+ 
+ 	freebsd-elf)
+-	  major=".$current"
+-	  versuffix=".$current"
++	  major=.`expr $current - $age`
++	  versuffix="$major.$age.$revision"
+ 	  ;;
+ 
+ 	irix | nonstopux)
diff --git a/redland/raptor/raptor-mingw.patch.1 b/redland/raptor/raptor-mingw.patch.1
new file mode 100644
index 0000000..b70e4f8
--- /dev/null
+++ b/redland/raptor/raptor-mingw.patch.1
@@ -0,0 +1,13 @@
+MinGW: libtool falls back to static lib unless -no-undefined given
+
+--- a/src/Makefile.in	2013-03-29 19:11:27.944919859 +0100
++++ b/src/Makefile.in	2013-03-29 20:05:02.140892243 +0100
+@@ -507,7 +507,7 @@
+ 	$(am__append_21) $(am__append_22) $(am__append_23) \
+ 	$(am__append_24) $(am__append_25) $(am__append_26) \
+ 	$(am__append_27) $(am__append_28)
+-libraptor2_la_LDFLAGS = -version-info @RAPTOR_LIBTOOL_VERSION@ \
++libraptor2_la_LDFLAGS = -version-info @RAPTOR_LIBTOOL_VERSION@ -no-undefined \
+ @RAPTOR_LDFLAGS@ $(MEM_LIBS)
+ 
+ libraptor2_la_LIBADD = @LTLIBOBJS@
diff --git a/redland/raptor/raptor2.h b/redland/raptor/raptor2.h
new file mode 100644
index 0000000..4d0291b
--- /dev/null
+++ b/redland/raptor/raptor2.h
@@ -0,0 +1,2100 @@
+/* -*- Mode: c; c-basic-offset: 2 -*-
+ *
+ * raptor.h - Redland Parser Toolkit for RDF (Raptor) - public API
+ *
+ * Copyright (C) 2000-2013, David Beckett http://www.dajobe.org/
+ * Copyright (C) 2000-2005, University of Bristol, UK http://www.bristol.ac.uk/
+ *
+ * This package is Free Software and part of Redland http://librdf.org/
+ *
+ * It is licensed under the following three licenses as alternatives:
+ *   1. GNU Lesser General Public License (LGPL) V2.1 or any newer version
+ *   2. GNU General Public License (GPL) V2 or any newer version
+ *   3. Apache License, V2.0 or any newer version
+ *
+ * You may not use this file except in compliance with at least one of
+ * the above three licenses.
+ *
+ * See LICENSE.html or LICENSE.txt at the top of this package for the
+ * complete terms and further detail along with the license texts for
+ * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively.
+ *
+ *
+ */
+
+
+
+#ifndef RAPTOR_H
+#define RAPTOR_H
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <stdio.h>
+
+/* Required for va_list in raptor_vsnprintf */
+#include <stdarg.h>
+
+
+/**
+ * RAPTOR_V2_AVAILABLE
+ *
+ * Flag for marking raptor2 API availability.
+ */
+#define RAPTOR_V2_AVAILABLE 1
+
+
+/**
+ * RAPTOR_VERSION:
+ *
+ * Raptor library version number
+ *
+ * Format: major * 10000 + minor * 100 + release
+ */
+#define RAPTOR_VERSION 20009
+
+/**
+ * RAPTOR_VERSION_STRING:
+ *
+ * Raptor library version string
+ */
+#define RAPTOR_VERSION_STRING "2.0.9"
+
+/**
+ * RAPTOR_VERSION_MAJOR:
+ *
+ * Raptor library major version
+ */
+#define RAPTOR_VERSION_MAJOR 2
+
+/**
+ * RAPTOR_VERSION_MINOR:
+ *
+ * Raptor library minor version
+ */
+#define RAPTOR_VERSION_MINOR 0
+
+/**
+ * RAPTOR_VERSION_RELEASE:
+ *
+ * Raptor library release
+ */
+#define RAPTOR_VERSION_RELEASE 9
+
+/**
+ * RAPTOR_API:
+ *
+ * Macro for wrapping API function call declarations.
+ *
+ */
+#ifndef RAPTOR_API
+#  ifdef WIN32
+#    ifdef __GNUC__
+#      undef _declspec
+#      define _declspec(x) __declspec(x)
+#    endif
+#    ifdef RAPTOR_STATIC
+#      define RAPTOR_API
+#    else
+#      ifdef RAPTOR_INTERNAL
+#        define RAPTOR_API _declspec(dllexport)
+#      else
+#        define RAPTOR_API _declspec(dllimport)
+#      endif
+#    endif
+#  else
+#    define RAPTOR_API
+#  endif
+#endif
+
+/* Use gcc 3.1+ feature to allow marking of deprecated API calls.
+ * This gives a warning during compiling.
+ */
+#if defined(__GNUC__) && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1))
+#define RAPTOR_DEPRECATED __attribute__((deprecated))
+#define RAPTOR_NORETURN __attribute__((__noreturn__))
+#else
+#define RAPTOR_DEPRECATED
+#define RAPTOR_NORETURN
+#endif
+
+/**
+ * RAPTOR_PRINTF_FORMAT:
+ * @string_index: ignore me
+ * @first_to_check_index: ignore me
+ *
+ * Internal macro
+ */
+#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 5))
+#define RAPTOR_PRINTF_FORMAT(string_index, first_to_check_index) \
+  __attribute__((__format__(__printf__, string_index, first_to_check_index)))
+#else
+#define RAPTOR_PRINTF_FORMAT(string_index, first_to_check_index)
+#endif
+
+/**
+ * raptor_uri:
+ *
+ * Raptor URI Class.
+ */
+typedef struct raptor_uri_s raptor_uri;
+
+
+/* Public statics */
+
+/**
+ * raptor_short_copyright_string:
+ *
+ * Short copyright string (one line).
+ */
+RAPTOR_API
+extern const char * const raptor_short_copyright_string;
+
+/**
+ * raptor_copyright_string:
+ *
+ * Copyright string (multiple lines).
+ */
+RAPTOR_API
+extern const char * const raptor_copyright_string;
+
+/**
+ * raptor_version_string:
+ *
+ * Raptor version as a string.
+ */
+RAPTOR_API
+extern const char * const raptor_version_string;
+
+/**
+ * raptor_version_major:
+ *
+ * Raptor major version number.
+ */
+RAPTOR_API
+extern const unsigned int raptor_version_major;
+
+/**
+ * raptor_version_minor:
+ *
+ * Raptor minor version number.
+ */
+RAPTOR_API
+extern const unsigned int raptor_version_minor;
+
+/**
+ * raptor_version_release:
+ *
+ * Raptor release version number.
+ */
+RAPTOR_API
+extern const unsigned int raptor_version_release;
+
+/**
+ * raptor_version_decimal:
+ *
+ * Raptor version as a decimal number.
+ *
+ * Format: major * 10000 + minor * 100 + release
+ */
+RAPTOR_API
+extern const unsigned int raptor_version_decimal;
+
+/**
+ * raptor_license_string:
+ *
+ * Raptor license string.
+ */
+RAPTOR_API
+extern const char * const raptor_license_string;
+
+/**
+ * raptor_home_url_string:
+ *
+ * Raptor home page URL.
+ */
+RAPTOR_API
+extern const char * const raptor_home_url_string;
+
+/**
+ * raptor_xml_namespace_uri:
+ *
+ * XML Namespace (xml:) URI string.
+ */
+RAPTOR_API
+extern const unsigned char * const raptor_xml_namespace_uri;
+
+
+/**
+ * raptor_rdf_namespace_uri:
+ *
+ * RDF Namespace (rdf:) URI string.
+ */
+RAPTOR_API
+extern const unsigned char * const raptor_rdf_namespace_uri;
+
+/**
+ * raptor_rdf_namespace_uri_len:
+ *
+ * Length of #raptor_rdf_namespace_uri string
+ */
+RAPTOR_API
+extern const unsigned int raptor_rdf_namespace_uri_len;
+
+/**
+ * raptor_rdf_schema_namespace_uri:
+ *
+ * RDF Schema (rdfs:) Namespace URI string.
+ */
+RAPTOR_API
+extern const unsigned char * const raptor_rdf_schema_namespace_uri;
+
+/**
+ * raptor_xmlschema_datatypes_namespace_uri:
+ *
+ * XML Schema datatypes (xsd:) namespace URI string.
+ */
+RAPTOR_API
+extern const unsigned char * const raptor_xmlschema_datatypes_namespace_uri;
+
+/**
+ * raptor_owl_namespace_uri:
+ *
+ * OWL (owl:) Namespace URI string.
+ */
+RAPTOR_API
+extern const unsigned char * const raptor_owl_namespace_uri;
+
+/**
+ * raptor_xml_literal_datatype_uri_string:
+ *
+ * XML Literal datatype (rdf:XMLLiteral) URI string.
+ */
+RAPTOR_API
+extern const unsigned char * const raptor_xml_literal_datatype_uri_string;
+
+/**
+ * raptor_xml_literal_datatype_uri_string_len:
+ *
+ * Length of #raptor_xml_literal_datatype_uri_string
+ */
+RAPTOR_API
+extern const unsigned int raptor_xml_literal_datatype_uri_string_len;
+
+
+/* Public structure */
+/**
+ * raptor_world:
+ *
+ * Raptor world class.
+ */
+typedef struct raptor_world_s raptor_world;
+/**
+ * raptor_parser:
+ *
+ * Raptor Parser class
+ */
+typedef struct raptor_parser_s raptor_parser;
+/**
+ * raptor_serializer:
+ *
+ * Raptor Serializer class
+ */
+typedef struct raptor_serializer_s raptor_serializer;
+
+/**
+ * raptor_www:
+ *
+ * Raptor WWW class
+ */
+typedef struct raptor_www_s raptor_www;
+/**
+ * raptor_iostream:
+ *
+ * Raptor I/O Stream class
+ */
+typedef struct raptor_iostream_s raptor_iostream;
+/**
+ * raptor_xml_element:
+ *
+ * Raptor XML Element class
+ */
+typedef struct raptor_xml_element_s raptor_xml_element;
+/**
+ * raptor_xml_writer:
+ *
+ * Raptor XML Writer class
+ */
+typedef struct raptor_xml_writer_s raptor_xml_writer;
+/**
+ * raptor_qname:
+ *
+ * Raptor XML qname class
+ */
+typedef struct raptor_qname_s raptor_qname;
+/**
+ * raptor_namespace:
+ *
+ * Raptor XML Namespace class
+ */
+typedef struct raptor_namespace_s raptor_namespace;
+/**
+ * raptor_namespace_stack:
+ *
+ * Raptor XML Namespace Stack class
+ */
+typedef struct raptor_namespace_stack_s raptor_namespace_stack;
+
+/**
+ * raptor_sax2:
+ *
+ * Raptor SAX2 class
+ */
+typedef struct raptor_sax2_s raptor_sax2;
+
+
+/**
+ * raptor_type_q:
+ * @mime_type: MIME type string
+ * @mime_type_len: length of @mime_type
+ * @q: Q value 0-10 standing for decimal 0.0-1.0
+ *
+ * (MIME Type, Q) pair
+ */
+typedef struct {
+  const char* mime_type;
+  size_t mime_type_len;
+  unsigned char q;
+} raptor_type_q;
+
+
+/**
+ * raptor_syntax_bitflags:
+ * @RAPTOR_SYNTAX_NEED_BASE_URI: the syntax requires a base URI
+ *
+ * Bit flags for #raptor_syntax_description flags field
+ */
+typedef enum {
+  RAPTOR_SYNTAX_NEED_BASE_URI = 1
+} raptor_syntax_bitflags;
+
+
+/**
+ * raptor_syntax_description:
+ * @names: array of syntax names - the first one (required) is the public name, the rest are aliases.  The array is NULL terminated.
+ * @names_count: size of @names array
+ * @label: long descriptive label for syntax
+ * @mime_types: Array of (MIME type, Q) values associated with the syntax (or NULL).  If present the array is NULL terminated.
+ * @mime_types_count: size of @mime_types array
+ * @uri_strings: array of URIs identifying the syntax (or NULL). The first one if present is the main URI, the rest are aliases.  The array is NULL terminated.
+ * @uri_strings_count: size of @uri_strings array
+ * @flags: See #raptor_syntax_bitflags for the bits
+ *
+ * Description of a syntax or file format.
+ *
+ */
+typedef struct {
+  const char* const* names;
+  unsigned int names_count;
+
+  const char* label;
+
+  const raptor_type_q* mime_types;
+  unsigned int mime_types_count;
+
+  const char* const* uri_strings;
+  unsigned int uri_strings_count;
+
+  unsigned int flags;
+} raptor_syntax_description;
+
+
+/**
+ * raptor_term_type:
+ * @RAPTOR_TERM_TYPE_URI: RDF URI
+ * @RAPTOR_TERM_TYPE_LITERAL: RDF literal
+ * @RAPTOR_TERM_TYPE_BLANK: RDF blank node
+ * @RAPTOR_TERM_TYPE_UNKNOWN: Internal
+ *
+ * Type of term in a #raptor_statement
+ *
+ * Node type 3 is unused but exists to preserve numeric compatibility
+ * with librdf_node_type values.
+ */
+typedef enum {
+  RAPTOR_TERM_TYPE_UNKNOWN = 0,
+  RAPTOR_TERM_TYPE_URI     = 1,
+  RAPTOR_TERM_TYPE_LITERAL = 2,
+  /* unused type 3 */
+  RAPTOR_TERM_TYPE_BLANK   = 4
+} raptor_term_type;
+
+
+/**
+ * raptor_locator:
+ * @uri: URI of location (or NULL)
+ * @file: Filename of location (or NULL)
+ * @line: Line number of location (or <0 for no line)
+ * @column: Column number of location (or <0 for no column)
+ * @byte: Byte number of location (or <0 for no byte)
+ *
+ * Location information for an error, warning or information message.
+ */
+typedef struct {
+  raptor_uri *uri;
+  const char *file;
+  int line;
+  int column;
+  int byte;
+} raptor_locator;
+
+/**
+ * raptor_option:
+ * @RAPTOR_OPTION_SCANNING: If true (default false), the RDF/XML
+ *   parser will look for embedded rdf:RDF elements inside the XML
+ *   content, and not require that the XML start with an rdf:RDF root
+ *   element.
+ * @RAPTOR_OPTION_ALLOW_NON_NS_ATTRIBUTES: If true (default true)
+ *   then the RDF/XML parser will allow non-XML namespaced attributes
+ *   to be accepted as well as rdf: namespaced ones.  For example,
+ *   'about' and 'ID' will be interpreted as if they were rdf:about
+ *   and rdf:ID respectively.
+ * @RAPTOR_OPTION_ALLOW_OTHER_PARSETYPES: If true (default true)
+ *   then the RDF/XML parser will allow unknown parsetypes to be
+ *   present and will pass them on to the user.  Unimplemented at
+ *   present.
+ * @RAPTOR_OPTION_ALLOW_BAGID: If true (default true) then the
+ *   RDF/XML parser will support the rdf:bagID attribute that was
+ *   removed from the RDF/XML language when it was revised.  This
+ *   support may be removed in future.
+ * @RAPTOR_OPTION_ALLOW_RDF_TYPE_RDF_LIST: If true (default false)
+ *   then the RDF/XML parser will generate the idList rdf:type
+ *   rdf:List triple in the handling of rdf:parseType="Collection".
+ *   This triple was removed during the revising of RDF/XML after
+ *   collections were initially added.
+ * @RAPTOR_OPTION_NORMALIZE_LANGUAGE: If true (default true) then
+ *   XML language values such as from xml:lang will be normalized to
+ *   lowercase.
+ * @RAPTOR_OPTION_NON_NFC_FATAL: If true (default false) then
+ *  illegal Unicode Normal Form C in literals will give a fatal
+ *  error, otherwise just a warning.
+ * @RAPTOR_OPTION_WARN_OTHER_PARSETYPES: If true (default true) then
+ *   the RDF/XML parser will warn about unknown rdf:parseType values.
+ * @RAPTOR_OPTION_CHECK_RDF_ID: If true (default true) then the
+ *   RDF/XML will check rdf:ID attribute values for duplicates and
+ *   cause an error if any are found.
+ * @RAPTOR_OPTION_RELATIVE_URIS: If true (default true) then
+ *   relative URIs will be used wherever possible when serializing.
+ * @RAPTOR_OPTION_WRITER_AUTO_INDENT: Automatically indent elements when
+ *   seriailizing.
+ * @RAPTOR_OPTION_WRITER_AUTO_EMPTY: Automatically detect and
+ *   abbreviate empty elements when serializing.
+ * @RAPTOR_OPTION_WRITER_INDENT_WIDTH: Integer number of spaces to use
+ *   for each indent level when serializing with auto indent.
+ * @RAPTOR_OPTION_WRITER_XML_VERSION: Integer XML version XML 1.0 (10) or XML 1.1 (11)
+ * @RAPTOR_OPTION_WRITER_XML_DECLARATION: Write XML 1.0 or 1.1 declaration.
+ * @RAPTOR_OPTION_NO_NET: Deny network requests inside other requests.
+ * @RAPTOR_OPTION_RESOURCE_BORDER: Border color of resource
+ *   nodes for GraphViz DOT serializer.
+ * @RAPTOR_OPTION_LITERAL_BORDER: Border color of literal nodes
+ *   for GraphViz DOT serializer.
+ * @RAPTOR_OPTION_BNODE_BORDER: Border color of blank nodes for
+ *   GraphViz DOT serializer.

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list