[Libreoffice-commits] core.git: config_host.mk.in configure.ac download.lst external/apache-commons RepositoryExternal.mk swext/Extension_wiki-publisher.mk
Douglas Mencken
dougmencken at gmail.com
Wed May 21 05:58:15 PDT 2014
RepositoryExternal.mk | 14 +++--
config_host.mk.in | 1
configure.ac | 28 ++++++++--
download.lst | 10 ++-
external/apache-commons/ExternalProject_apache_commons_httpclient.mk | 5 +
swext/Extension_wiki-publisher.mk | 10 ++-
6 files changed, 55 insertions(+), 13 deletions(-)
New commits:
commit 7e4708739dd7a4d9db3a093a9f36d95f0192e639
Author: Douglas Mencken <dougmencken at gmail.com>
Date: Tue May 20 12:55:56 2014 -0400
care for Java 1.5 support in external packages
apache commons-lang 3.3.1 and commons-codec 1.9 are for use
only with JDK 1.6 and higher
see commits:
1731f6e692bb0a07a2bca4b1b190163f209d2b9e "bump apache-commons-lang to 3.3.1"
3dad9b1019bebcc6db63a424afa146e007f768d2 "bump apache-commons-codec to 1.9"
Change-Id: I3e71f6474becafe6c91836bbac5c6a8b7ca3442c
Reviewed-on: https://gerrit.libreoffice.org/9312
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index e1a3a9e..2db4c38 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -3252,14 +3252,17 @@ $(eval $(call gb_Helper_register_jars_for_install,OOO,reportbuilder,\
))
endif
$(eval $(call gb_Helper_register_jars,OXT,\
- commons-codec-1.9 \
+ $(if $(filter TRUE,$(HAVE_JAVA6)),commons-codec-1.9,commons-codec-1.6) \
commons-httpclient-3.1 \
- commons-lang3-3.3.1.jar \
+ $(if $(filter TRUE,$(HAVE_JAVA6)),commons-lang3-3.3.1.jar,commons-lang-2.4) \
))
define gb_Jar__use_commons-codec
$(call gb_Jar_use_external_project,$(1),apache_commons_codec)
-$(call gb_Jar_use_external_jar,$(1),$(call gb_UnpackedTarball_get_dir,apache_commons_codec)/dist/commons-codec-1.9.jar,commons-codec-1.9.jar)
+$(call gb_Jar_use_external_jar,$(1),$(call gb_UnpackedTarball_get_dir,apache_commons_codec)\
+$(if $(filter TRUE,$(HAVE_JAVA6)),/dist/commons-codec-1.9.jar,/dist/commons-codec-1.6.jar),\
+$(if $(filter TRUE,$(HAVE_JAVA6)),commons-codec-1.9.jar,commons-codec-1.6.jar)\
+)
endef
define gb_ExternalProject__use_commons-codec
$(call gb_ExternalProject_use_external_project,$(1),apache_commons_codec)
@@ -3275,7 +3278,10 @@ endef
define gb_Jar__use_commons-lang
$(call gb_Jar_use_external_project,$(1),apache_commons_lang)
-$(call gb_Jar_use_external_jar,$(1),$(call gb_UnpackedTarball_get_dir,apache_commons_lang)/target/commons-lang3-3.3.1.jar,commons-lang3-3.3.1.jar)
+$(call gb_Jar_use_external_jar,$(1),$(call gb_UnpackedTarball_get_dir,apache_commons_lang)\
+$(if $(filter TRUE,$(HAVE_JAVA6)),/target/commons-lang3-3.3.1.jar,/dist/commons-lang-2.4.jar),\
+$(if $(filter TRUE,$(HAVE_JAVA6)),commons-lang3-3.3.1.jar,commons-lang-2.4.jar)\
+)
endef
define gb_ExternalProject__use_commons-lang
$(call gb_ExternalProject_use_external_project,$(1),apache_commons_lang)
diff --git a/config_host.mk.in b/config_host.mk.in
index ca57978..b287539 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -247,6 +247,7 @@ export HAVE_GCC_PRAGMA_OPERATOR=@HAVE_GCC_PRAGMA_OPERATOR@
export HAVE_GCC_VISIBILITY_BROKEN=@HAVE_GCC_VISIBILITY_BROKEN@
export HAVE_GCC_VISIBILITY_FEATURE=@HAVE_GCC_VISIBILITY_FEATURE@
export HAVE_GNUMAKE_FILE_FUNC=@HAVE_GNUMAKE_FILE_FUNC@
+export HAVE_JAVA6=@HAVE_JAVA6@
export HAVE_LD_BSYMBOLIC_FUNCTIONS=@HAVE_LD_BSYMBOLIC_FUNCTIONS@
export HAVE_LD_HASH_STYLE=@HAVE_LD_HASH_STYLE@
export HAVE_NON_CONST_NPP_GETMIMEDESCRIPTION=@HAVE_NON_CONST_NPP_GETMIMEDESCRIPTION@
diff --git a/configure.ac b/configure.ac
index 96259be..ad9be02 100644
--- a/configure.ac
+++ b/configure.ac
@@ -6874,6 +6874,7 @@ if test "$ENABLE_JAVA" != ""; then
fi
fi
+HAVE_JAVA6=
dnl ===================================================================
dnl Checks for JDK.
dnl ===================================================================
@@ -6907,6 +6908,9 @@ if test "$ENABLE_JAVA" != ""; then
if test "$_jdk_ver" -lt 10500; then
AC_MSG_ERROR([IBM JDK is too old, you need at least 1.5])
fi
+ if test "$_jdk_ver" -ge 10600; then
+ HAVE_JAVA6=TRUE
+ fi
AC_MSG_RESULT([checked (IBM JDK $_jdk)])
@@ -6930,6 +6934,9 @@ you must use the "--with-jdk-home" configure option explicitly])
if test "$_jdk_ver" -gt 10600; then
JAVA_CLASSPATH_NOT_SET="1"
fi
+ if test "$_jdk_ver" -ge 10600; then
+ HAVE_JAVA6=TRUE
+ fi
AC_MSG_RESULT([checked (JDK $_jdk)])
JAVA_HOME=`echo $JAVAINTERPRETER | $SED -n "s,//*bin//*java,,p"`
@@ -6944,6 +6951,7 @@ else
dnl Java disabled
JAVA_HOME=NO_JAVA_HOME ; export JAVA_HOME
fi
+AC_SUBST([HAVE_JAVA6])
dnl ===================================================================
dnl Set target Java bytecode version
@@ -10744,8 +10752,14 @@ if test "$ENABLE_MEDIAWIKI" = "TRUE" -o "$ENABLE_REPORTBUILDER" = "TRUE"; then
AC_MSG_RESULT([external])
if test "$ENABLE_MEDIAWIKI" = "TRUE"; then
if test -z $COMMONS_CODEC_JAR; then
- AC_CHECK_FILE(/usr/share/java/commons-codec-1.9.jar,
- [ COMMONS_CODEC_JAR=/usr/share/java/commons-codec-1.9.jar ],
+ _commons_codec_path=""
+ if test "$HAVE_JAVA6" = "TRUE"; then
+ _commons_codec_path="/usr/share/java/commons-codec-1.9.jar"
+ else
+ _commons_codec_path="/usr/share/java/commons-codec-1.6.jar"
+ fi
+ AC_CHECK_FILE($_commons_codec_path,
+ [ COMMONS_CODEC_JAR=$_commons_codec_path ],
[
AC_CHECK_FILE(/usr/share/java/commons-codec.jar,
[ COMMONS_CODEC_JAR=/usr/share/java/commons-codec.jar ],
@@ -10759,8 +10773,14 @@ if test "$ENABLE_MEDIAWIKI" = "TRUE" -o "$ENABLE_REPORTBUILDER" = "TRUE"; then
fi
if test -z $COMMONS_LANG_JAR; then
- AC_CHECK_FILE(/usr/share/java/commons-lang3-3.3.1-src.tar.gz,
- [ COMMONS_LANG_JAR=/usr/share/java/commons-lang3-3.3.1-src.tar.gz ],
+ _commons_lang_path=""
+ if test "$HAVE_JAVA6" = "TRUE"; then
+ _commons_lang_path="/usr/share/java/commons-lang3-3.3.1-src.tar.gz"
+ else
+ _commons_lang_path="/usr/share/java/commons-lang-2.4.jar"
+ fi
+ AC_CHECK_FILE($_commons_lang_path,
+ [ COMMONS_LANG_JAR=$commons_lang_path ],
[
AC_CHECK_FILE(/usr/share/java/commons-lang.jar,
[ COMMONS_LANG_JAR=/usr/share/java/commons-lang.jar ],
diff --git a/download.lst b/download.lst
index 8a3b889..59cc4a9 100644
--- a/download.lst
+++ b/download.lst
@@ -1,8 +1,14 @@
export ABW_MD5SUM := 40fa48e03b1e28ae0325cc34b35bc46d
export ABW_TARBALL := libabw-0.0.2.tar.bz2
-export APACHE_COMMONS_CODEC_TARBALL := 048751f3271906db5126ab76870444c4-commons-codec-1.9-src.zip
+export APACHE_COMMONS_CODEC_TARBALL := $(if $(filter TRUE,$(HAVE_JAVA6))\
+ ,048751f3271906db5126ab76870444c4-commons-codec-1.9-src.zip\
+ ,2e482c7567908d334785ce7d69ddfff7-commons-codec-1.6-src.tar.gz\
+)
export APACHE_COMMONS_HTTPCLIENT_TARBALL := 2c9b0f83ed5890af02c0df1c1776f39b-commons-httpclient-3.1-src.tar.gz
-export APACHE_COMMONS_LANG_TARBALL := 8ab049135b2d15313da5d9f0656894a1-commons-lang3-3.3.1-src.tar.gz
+export APACHE_COMMONS_LANG_TARBALL := $(if $(filter TRUE,$(HAVE_JAVA6))\
+ ,8ab049135b2d15313da5d9f0656894a1-commons-lang3-3.3.1-src.tar.gz\
+ ,625ff5f2f968dd908bca43c9469d6e6b-commons-lang-2.4-src.tar.gz\
+)
export APACHE_COMMONS_LOGGING_TARBALL := e8e197d628436490886d17cffa108fe3-commons-logging-1.1.3-src.tar.gz
export APR_MD5SUM := eff9d741b0999a9bbab96862dd2a2a3d
export APR_TARBALL := apr-1.4.8.tar.gz
diff --git a/external/apache-commons/ExternalProject_apache_commons_httpclient.mk b/external/apache-commons/ExternalProject_apache_commons_httpclient.mk
index 92e60de..f8cec74 100644
--- a/external/apache-commons/ExternalProject_apache_commons_httpclient.mk
+++ b/external/apache-commons/ExternalProject_apache_commons_httpclient.mk
@@ -24,7 +24,10 @@ $(call gb_ExternalProject_get_state_target,apache_commons_httpclient,build) :
-f build.xml \
-Dbuild.label="build-$(LIBO_VERSION_MAJOR).$(LIBO_VERSION_MINOR).$(LIBO_VERSION_MICRO).$(LIBO_VERSION_PATCH)" \
-Dcommons-logging.jar="$(call gb_UnpackedTarball_get_dir,apache_commons_logging)/target/commons-logging-1.1.3.jar" \
- -Dcommons-codec.jar="$(call gb_UnpackedTarball_get_dir,apache_commons_codec)/dist/commons-codec-1.9.jar" \
+ $(if $(filter TRUE,$(HAVE_JAVA6))\
+ ,-Dcommons-codec.jar="$(call gb_UnpackedTarball_get_dir,apache_commons_codec)/dist/commons-codec-1.9.jar" \
+ ,-Dcommons-codec.jar="$(call gb_UnpackedTarball_get_dir,apache_commons_codec)/dist/commons-codec-1.6-SNAPSHOT.jar" \
+ ) \
$(if $(filter yes,$(JAVACISGCJ))\
,-Dbuild.compiler=gcj \
,-Dant.build.javac.source=$(JAVA_SOURCE_VER) \
diff --git a/swext/Extension_wiki-publisher.mk b/swext/Extension_wiki-publisher.mk
index efc0113..a3d5b2b 100644
--- a/swext/Extension_wiki-publisher.mk
+++ b/swext/Extension_wiki-publisher.mk
@@ -22,9 +22,15 @@ $(eval $(call gb_Extension_use_external_project,wiki-publisher,apache_commons_co
$(eval $(call gb_Extension_use_external_project,wiki-publisher,apache_commons_httpclient))
$(eval $(call gb_Extension_use_external_project,wiki-publisher,apache_commons_lang))
-$(eval $(call gb_Extension_add_file,wiki-publisher,commons-codec-1.9.jar,$(call gb_UnpackedTarball_get_dir,apache_commons_codec)/dist/commons-codec-1.9.jar))
+$(eval $(call gb_Extension_add_file,wiki-publisher,\
+$(if $(filter TRUE,$(HAVE_JAVA6)),commons-codec-1.9.jar,commons-codec-1.6.jar),\
+$(call gb_UnpackedTarball_get_dir,apache_commons_codec)$(if $(filter TRUE,$(HAVE_JAVA6)),/dist/commons-codec-1.9.jar,/dist/commons-codec-1.6-SNAPSHOT.jar)\
+))
$(eval $(call gb_Extension_add_file,wiki-publisher,commons-httpclient-3.1.jar,$(call gb_UnpackedTarball_get_dir,apache_commons_httpclient)/dist/commons-httpclient.jar))
-$(eval $(call gb_Extension_add_file,wiki-publisher,commons-lang3-3.3.1.jar,$(call gb_UnpackedTarball_get_dir,apache_commons_lang)/target/commons-lang3-3.3.1.jar))
+$(eval $(call gb_Extension_add_file,wiki-publisher,\
+$(if $(filter TRUE,$(HAVE_JAVA6)),commons-lang3-3.3.1.jar,commons-lang-2.4.jar),\
+$(call gb_UnpackedTarball_get_dir,apache_commons_lang)$(if $(filter TRUE,$(HAVE_JAVA6)),/target/commons-lang3-3.3.1.jar,/dist/commons-lang-2.4.jar)\
+))
$(eval $(call gb_Extension_add_file,wiki-publisher,commons-logging-1.1.3.jar,$(call gb_UnpackedTarball_get_dir,apache_commons_logging)/target/commons-logging-1.1.3.jar))
endif
$(eval $(call gb_Extension_add_file,wiki-publisher,Addons.xcu,$(call gb_XcuFile_for_extension,swext/mediawiki/src/registry/data/org/openoffice/Office/Addons.xcu)))
More information about the Libreoffice-commits
mailing list