diff options
author | Vasily Melenchuk <vasily.melenchuk@cib.de> | 2016-06-23 14:20:58 +0300 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2016-07-21 01:47:02 +0000 |
commit | a59b6be0850a68a1bb5d7099a004a86c0fcb6e40 (patch) | |
tree | 8e3bb841728bb678540488bd6f633e01790c8fb1 | |
parent | 0ccb3ccc4c7bafeb2fbbd689c90f710bc65d37e0 (diff) |
odfvalidator support in export tests without external repositories
Fetching external tarball for Apache ODF Toolkit, configuration of
wrapper script for odf validator execution
Change-Id: I8b3824a91ebc6ddc196416e197b6c688964a13a9
Reviewed-on: https://gerrit.libreoffice.org/26596
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | Makefile.fetch | 3 | ||||
-rw-r--r-- | bin/odfvalidator.sh.in | 2 | ||||
-rw-r--r-- | configure.ac | 37 | ||||
-rw-r--r-- | download.lst | 1 |
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 |