summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--Makefile.fetch3
-rw-r--r--bin/odfvalidator.sh.in2
-rw-r--r--configure.ac37
-rw-r--r--download.lst1
5 files changed, 29 insertions, 15 deletions
diff --git a/.gitignore b/.gitignore
index cbdc3e98d45c..de258c9e43e1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -56,6 +56,7 @@
/configure
/lo.xcent
/bin/bffvalidator.sh
+/bin/odfvalidator.sh
/Makefile
/NEWS
/TODO
diff --git a/Makefile.fetch b/Makefile.fetch
index 6b4e05e29fdf..f69521952c6c 100644
--- a/Makefile.fetch
+++ b/Makefile.fetch
@@ -52,7 +52,7 @@ $(filter 32,$(words $(shell echo $(1) | sed -e 's/./& /g')))
endef
define fetch_Download__subst_var
-$(subst _DLL,_MD5SUM,$(subst _TARBALL,_MD5SUM,$(subst _PACK,_MD5SUM,$(1))))
+$(subst _DLL,_MD5SUM,$(subst _TARBALL,_MD5SUM,$(subst _PACK,_MD5SUM,$(subst _JAR,_MD5SUM,$(1)))))
endef
# fetch_Download_item url variable-name
@@ -215,6 +215,7 @@ $(WORKDIR)/download: $(BUILDDIR)/config_host.mk $(SRCDIR)/download.lst $(SRCDIR)
$(foreach item, \
$(call fetch_Optional,DBGHELP,DBGHELP_DLL) \
$(call fetch_Optional,ODK,UNOWINREG_DLL) \
+ $(call fetch_Optional,ODFVALIDATOR,ODFVALIDATOR_JAR) \
,$(call fetch_Download_item,http://dev-www.libreoffice.org/extern,$(item)))
$(foreach item, \
$(call fetch_Optional_pack,BARCODE_EXTENSION_PACK) \
diff --git a/bin/odfvalidator.sh.in b/bin/odfvalidator.sh.in
new file mode 100644
index 000000000000..56e2f2985f04
--- /dev/null
+++ b/bin/odfvalidator.sh.in
@@ -0,0 +1,2 @@
+#!/usr/bin/env bash
+java -Djavax.xml.validation.SchemaFactory:http://relaxng.org/ns/structure/1.0=org.iso_relax.verifier.jaxp.validation.RELAXNGSchemaFactoryImpl -Dorg.iso_relax.verifier.VerifierFactoryLoader=com.sun.msv.verifier.jarv.FactoryLoaderImpl -jar @TARFILE_LOCATION@/@ODFVALIDATOR_JAR@ -e "$@"
diff --git a/configure.ac b/configure.ac
index a91de785034a..d93de7908d86 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2732,22 +2732,29 @@ if test "$with_export_validation" = yes; then
AC_MSG_RESULT([yes])
AC_DEFINE(HAVE_EXPORT_VALIDATION)
- if test "$build_os" = "cygwin"; then
- # In case of CygWin it will be executed from Windows,
- # so we need to run bash and absolute path to validator
- # so instead of "odfvalidator" it will be
- # something like "bash.exe C:\cygwin\opt\lo\bin\odfvalidator"
- AC_PATH_PROGS(ODFVALIDATOR, odfvalidator)
- if test -z "$ODFVALIDATOR"; then
- AC_MSG_ERROR([odfvalidator not found, but required by --with-export-validation])
+ AC_PATH_PROGS(ODFVALIDATOR, odfvalidator)
+ if test -z "$ODFVALIDATOR"; then
+ # remember to download the ODF toolkit with validator later
+ AC_MSG_NOTICE([no odfvalidator found, will download it])
+ BUILD_TYPE="$BUILD_TYPE ODFVALIDATOR"
+ ODFVALIDATOR="bin/odfvalidator.sh"
+
+ # and fetch name of odfvalidator jar name from download.lst
+ ODFVALIDATOR_JAR=`sed -ne "s/export *ODFVALIDATOR_JAR *:= *\(.*\) */\1/p" download.lst`
+ AC_SUBST(ODFVALIDATOR_JAR)
+
+ if test -z "$ODFVALIDATOR_JAR"; then
+ AC_MSG_ERROR([odfvalidator jar location is not determined (--with-export-validation)])
fi
- ODFVALIDATOR="bash.exe `cygpath -m "$ODFVALIDATOR"`"
- else
- AC_CHECK_PROGS(ODFVALIDATOR, odfvalidator)
- if test -z "$ODFVALIDATOR"; then
- AC_MSG_ERROR([odfvalidator not found, but required by --with-export-validation])
+
+ if test "$build_os" = "cygwin"; then
+ # In case of CygWin it will be executed from Windows,
+ # so we need to run bash and absolute path to validator
+ # so instead of "odfvalidator" it will be
+ # something like "bash.exe C:\cygwin\opt\lo\bin\odfvalidator"
+ ODFVALIDATOR="bash.exe `cygpath -m "$ODFVALIDATOR"`"
fi
- fi
+ fi
AC_SUBST(ODFVALIDATOR)
if test "$build_os" = "cygwin"; then
@@ -4663,6 +4670,7 @@ if test "$cross_compiling" = "yes"; then
Makefile.in \
lo.xcent.in \
bin/bffvalidator.sh.in \
+ bin/odfvalidator.sh.in \
instsetoo_native/util/openoffice.lst.in \
config_host/*.in \
sysui/desktop/macosx/Info.plist.in \
@@ -12998,6 +13006,7 @@ AC_CONFIG_FILES([config_host.mk
Makefile
lo.xcent
bin/bffvalidator.sh
+ bin/odfvalidator.sh
instsetoo_native/util/openoffice.lst
sysui/desktop/macosx/Info.plist
ios/lo.xcconfig])
diff --git a/download.lst b/download.lst
index e810b3792e39..6e60de822a41 100644
--- a/download.lst
+++ b/download.lst
@@ -114,6 +114,7 @@ export NSS_TARBALL := 6b254cf2f8cb4b27a3f0b8b7b9966ea7-nss-3.22.2-with-nspr-4.12
export ODFGEN_MD5SUM := 32572ea48d9021bbd6fa317ddb697abc
export ODFGEN_VERSION_MICRO := 6
export ODFGEN_TARBALL := libodfgen-0.1.$(ODFGEN_VERSION_MICRO).tar.bz2
+export ODFVALIDATOR_JAR := e7f181c1d969dbd553644b191cb0a6d3-odfvalidator-1.1.8-incubating-SNAPSHOT-jar-with-dependencies.jar
export OPENCOLLADA_MD5SUM := 4ca8a6ef0afeefc864e9ef21b9f14bd6
export OPENCOLLADA_TARBALL := OpenCOLLADA-master-6509aa13af.tar.bz2
export OPENLDAP_TARBALL := 804c6cb5698db30b75ad0ff1c25baefd-openldap-2.4.31.tgz