Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/3333

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/33/3333/1

postgresql: honor --disable-openssl flag

On --disable-openssl, let's avoid linking the
bundled postgresql to OpenSSL by not passing down
--with-openssl to its configure script.

Also, configure stage will fail if krb5 or gssapi
are enabled as they need OpenSSL and, in any
case, --with-krb5 and --with-gssapi will not be
passed down to postgresql configure script.

Change-Id: Iaf7e944d1d8f6a018e949ece56f6d3881f1e8c46
---
M RepositoryExternal.mk
M configure.ac
M connectivity/Library_postgresql-sdbc-impl.mk
M postgresql/ExternalProject_postgresql.mk
4 files changed, 20 insertions(+), 6 deletions(-)



diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index 927a123..078c354 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -2001,7 +2001,9 @@
 )
 
 ifeq ($(OS)$(COM),WNTMSC)
-$(call gb_LinkTarget_use_external,$(1),openssl)
+$(if $(filter-out YES,$(DISABLE_OPENSSL)), \
+       $(call gb_LinkTarget_use_external,$(1),openssl) \
+)
 
 $(call gb_LinkTarget_use_system_win32_libs,$(1),\
        secur32 \
diff --git a/configure.ac b/configure.ac
index 2c852f2..1f72396 100644
--- a/configure.ac
+++ b/configure.ac
@@ -7720,6 +7720,13 @@
 if test "x$enable_postgresql_sdbc" != "xno"; then
     SCPDEFS="$SCPDEFS -DWITH_POSTGRESQL_SDBC"
 
+    if test "$with_krb5" = "yes" -a "$enable_openssl" = "no"; then
+        AC_MSG_ERROR([krb5 needs OpenSSL, but --disable-openssl was given.])
+    fi
+    if test "$with_gssapi" = "yes" -a "$enable_openssl" = "no"; then
+        AC_MSG_ERROR([GSSAPI needs OpenSSL, but --disable-openssl was given.])
+    fi
+
     AC_MSG_CHECKING([PostgreSQL C interface])
     if test "$with_system_postgresql" = "yes"; then
         AC_MSG_RESULT([external PostgreSQL])
diff --git a/connectivity/Library_postgresql-sdbc-impl.mk 
b/connectivity/Library_postgresql-sdbc-impl.mk
index 0a0e893..49a2f22 100644
--- a/connectivity/Library_postgresql-sdbc-impl.mk
+++ b/connectivity/Library_postgresql-sdbc-impl.mk
@@ -61,7 +61,9 @@
        boost_headers \
        postgresql \
        $(if $(filter-out MSC,$(COM)), \
-               openssl \
+               $(if $(filter-out YES,$(DISABLE_OPENSSL)), \
+                       openssl \
+               ) \
                openldap \
                nss3 \
                plc4 \
diff --git a/postgresql/ExternalProject_postgresql.mk b/postgresql/ExternalProject_postgresql.mk
index 19c10e3..f1b838c 100644
--- a/postgresql/ExternalProject_postgresql.mk
+++ b/postgresql/ExternalProject_postgresql.mk
@@ -13,7 +13,9 @@
 
 $(eval $(call gb_ExternalProject_use_package,postgresql,openldap))
 
+ifneq ($(DISABLE_OPENSSL),YES)
 $(eval $(call gb_ExternalProject_use_external,postgresql,openssl))
+endif # DISABLE_OPENSSL
 
 $(eval $(call gb_ExternalProject_register_targets,postgresql,\
        build \
@@ -31,13 +33,14 @@
 $(call gb_ExternalProject_get_state_target,postgresql,build) :
        $(call gb_ExternalProject_run,build,\
                ./configure \
-                       --without-readline --disable-shared --with-openssl --with-ldap \
+                       --without-readline --disable-shared --with-ldap \
+                       $(if $(filter-out YES,$(DISABLE_OPENSSL)),--with-openssl) \
                        $(if $(filter YES,$(CROSS_COMPILING)),--build=$(BUILD_PLATFORM) 
--host=$(HOST_PLATFORM)) \
-                       $(if $(filter YES,$(WITH_KRB5)),--with-krb5) \
-                       $(if $(filter YES,$(WITH_GSSAPI)),--with-gssapi) \
+                       $(if $(and $(filter YES,$(WITH_KRB5)), $(filter-out 
YES,$(DISABLE_OPENSSL))),--with-krb5) \
+                       $(if $(and $(filter YES,$(WITH_GSSAPI)), $(filter-out 
YES,$(DISABLE_OPENSSL))),--with-gssapi) \
                        CPPFLAGS="$(if $(filter NO,$(SYSTEM_OPENLDAP)),\
                        -I$(call gb_UnpackedTarball_get_dir,openldap/include)) \
-                       $(if $(filter NO,$(SYSTEM_OPENSSL)),\
+                       $(if $(and $(filter NO,$(SYSTEM_OPENSSL)), $(filter-out 
YES,$(DISABLE_OPENSSL))),\
                        -I$(call gb_UnpackedTarball_get_dir,openssl/include))" \
                        $(if $(filter NO,$(SYSTEM_OPENLDAP)), \
                        LDFLAGS="-L$(OUTDIR)/lib" \

-- 
To view, visit https://gerrit.libreoffice.org/3333
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iaf7e944d1d8f6a018e949ece56f6d3881f1e8c46
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Andres Gomez <agomez@igalia.com>


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.