From 013ddc4f5307df512767ca23b3922540b2b36d52 Mon Sep 17 00:00:00 2001 From: Jan-Marek Glogowski Date: Fri, 23 Apr 2021 10:04:29 +0200 Subject: Switch OPENSSL config var from negative to positive - align with most of the rest of config_host - rename DISABLE_OPENSSL to ENABLE_OPENSSL - make this configurable Change-Id: Ic3b41fcdda38db66134939f12265e0da24833d60 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114564 Tested-by: Jenkins Reviewed-by: Thorsten Behrens --- external/neon/Library_neon.mk | 4 ++-- external/postgresql/ExternalProject_postgresql.mk | 4 ++-- external/python3/ExternalPackage_python3.mk | 4 ++-- external/python3/ExternalProject_python3.mk | 4 ++-- external/xmlsec/ExternalProject_xmlsec.mk | 25 ++++++++++++++++------- 5 files changed, 26 insertions(+), 15 deletions(-) (limited to 'external') diff --git a/external/neon/Library_neon.mk b/external/neon/Library_neon.mk index 4c034a3178fb..4a0e069b39fa 100644 --- a/external/neon/Library_neon.mk +++ b/external/neon/Library_neon.mk @@ -49,7 +49,7 @@ $(eval $(call gb_Library_add_generated_cobjects,neon,\ )) -ifneq ($(DISABLE_OPENSSL),TRUE) +ifeq ($(ENABLE_OPENSSL),TRUE) $(eval $(call gb_Library_add_generated_cobjects,neon,\ UnpackedTarball/neon/src/ne_openssl \ )) @@ -77,7 +77,7 @@ $(eval $(call gb_Library_add_generated_cobjects,neon,\ )) else -ifneq ($(DISABLE_OPENSSL),TRUE) +ifeq ($(ENABLE_OPENSSL),TRUE) $(eval $(call gb_Library_add_generated_cobjects,neon,\ UnpackedTarball/neon/src/ne_ntlm \ )) diff --git a/external/postgresql/ExternalProject_postgresql.mk b/external/postgresql/ExternalProject_postgresql.mk index c0713161878f..ea822ebe3208 100644 --- a/external/postgresql/ExternalProject_postgresql.mk +++ b/external/postgresql/ExternalProject_postgresql.mk @@ -41,7 +41,7 @@ ifeq ($(SYSTEM_ZLIB),) postgresql_LDFLAGS += $(ZLIB_LIBS) endif -ifeq ($(DISABLE_OPENSSL),) +ifeq ($(ENABLE_OPENSSL),TRUE) ifeq ($(SYSTEM_OPENSSL),) postgresql_CPPFLAGS += -I$(call gb_UnpackedTarball_get_dir,openssl)/include postgresql_LDFLAGS += -L$(call gb_UnpackedTarball_get_dir,openssl)/ $(if $(filter $(OS),LINUX),-pthread) @@ -70,7 +70,7 @@ $(call gb_ExternalProject_get_state_target,postgresql,build) : --without-zlib \ --with-ldap \ $(if $(CROSS_COMPILING),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \ - $(if $(DISABLE_OPENSSL),,--with-openssl \ + $(if $(ENABLE_OPENSSL),--with-openssl \ $(if $(WITH_GSSAPI),--with-gssapi)) \ $(if $(ENABLE_LDAP),,--with-ldap=no) \ CFLAGS="-fPIC" \ diff --git a/external/python3/ExternalPackage_python3.mk b/external/python3/ExternalPackage_python3.mk index a06d919e01ce..faddf06fc36a 100644 --- a/external/python3/ExternalPackage_python3.mk +++ b/external/python3/ExternalPackage_python3.mk @@ -79,7 +79,7 @@ $(eval $(call gb_ExternalPackage_add_files,python3,$(LIBO_BIN_FOLDER)/python-cor LO_lib/_elementtree.$(python3_EXTENSION_MODULE_SUFFIX).so \ LO_lib/fcntl.$(python3_EXTENSION_MODULE_SUFFIX).so \ LO_lib/grp.$(python3_EXTENSION_MODULE_SUFFIX).so \ - $(if $(DISABLE_OPENSSL),, \ + $(if $(ENABLE_OPENSSL), \ LO_lib/_hashlib.$(python3_EXTENSION_MODULE_SUFFIX).so \ ) \ LO_lib/_heapq.$(python3_EXTENSION_MODULE_SUFFIX).so \ @@ -107,7 +107,7 @@ $(eval $(call gb_ExternalPackage_add_files,python3,$(LIBO_BIN_FOLDER)/python-cor LO_lib/_sha512.$(python3_EXTENSION_MODULE_SUFFIX).so \ LO_lib/_socket.$(python3_EXTENSION_MODULE_SUFFIX).so \ LO_lib/spwd.$(python3_EXTENSION_MODULE_SUFFIX).so \ - $(if $(DISABLE_OPENSSL),, \ + $(if $(ENABLE_OPENSSL), \ LO_lib/_ssl.$(python3_EXTENSION_MODULE_SUFFIX).so \ ) \ LO_lib/_statistics.$(python3_EXTENSION_MODULE_SUFFIX).so \ diff --git a/external/python3/ExternalProject_python3.mk b/external/python3/ExternalProject_python3.mk index 680da9352638..7ff7040e03bd 100644 --- a/external/python3/ExternalProject_python3.mk +++ b/external/python3/ExternalProject_python3.mk @@ -100,9 +100,9 @@ $(call gb_ExternalProject_get_state_target,python3,build) : --enable-shared \ $(if $(filter 1090 101000 101100 101200,$(MAC_OS_X_VERSION_MIN_REQUIRED)),ac_cv_func_utimensat=no) \ ) \ - $(if $(SYSTEM_OPENSSL)$(DISABLE_OPENSSL),,\ + $(if $(ENABLE_OPENSSL),$(if $(SYSTEM_OPENSSL),,\ --with-openssl=$(call gb_UnpackedTarball_get_dir,openssl) \ - ) \ + ) ) \ $(if $(filter LINUX,$(OS)), \ PKG_CONFIG_LIBDIR="$(call gb_UnpackedTarball_get_dir,libffi)/$(HOST_PLATFORM)$${PKG_CONFIG_LIBDIR:+:$$PKG_CONFIG_LIBDIR}" \ ) \ diff --git a/external/xmlsec/ExternalProject_xmlsec.mk b/external/xmlsec/ExternalProject_xmlsec.mk index 8fb0ef56fa09..3db17c769c8c 100644 --- a/external/xmlsec/ExternalProject_xmlsec.mk +++ b/external/xmlsec/ExternalProject_xmlsec.mk @@ -9,9 +9,10 @@ $(eval $(call gb_ExternalProject_ExternalProject,xmlsec)) -$(eval $(call gb_ExternalProject_use_external,xmlsec,libxml2)) - -$(eval $(call gb_ExternalProject_use_external,xmlsec,nss3)) +$(eval $(call gb_ExternalProject_use_externals,xmlsec,\ + libxml2 \ + $(if $(ENABLE_NSS),nss3,$(if $(ENABLE_OPENSSL),openssl)) \ +)) $(eval $(call gb_ExternalProject_register_targets,xmlsec,\ build \ @@ -44,11 +45,21 @@ $(call gb_ExternalProject_get_state_target,xmlsec,build) : --with-pic --disable-shared --disable-crypto-dl --without-libxslt --without-gnutls --without-gcrypt --disable-apps --disable-docs \ $(if $(verbose),--disable-silent-rules,--enable-silent-rules) \ CFLAGS="$(CFLAGS) $(if $(ENABLE_OPTIMIZED),$(gb_COMPILEROPTFLAGS),$(gb_COMPILERNOOPTFLAGS)) $(if $(debug),$(gb_DEBUGINFO_FLAGS)) $(gb_VISIBILITY_FLAGS)" \ - --without-openssl \ $(if $(filter MACOSX,$(OS)),--prefix=/@.__________________________________________________OOO) \ - $(if $(SYSTEM_NSS),,$(if $(filter MACOSX,$(OS_FOR_BUILD)),--disable-pkgconfig)) \ - $(if $(SYSTEM_NSS),,NSPR_CFLAGS="-I$(call gb_UnpackedTarball_get_dir,nss)/dist/out/include" NSPR_LIBS="-L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib -lnspr4") \ - $(if $(SYSTEM_NSS),,NSS_CFLAGS="-I$(call gb_UnpackedTarball_get_dir,nss)/dist/public/nss" NSS_LIBS="-L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib -lsmime3 -lnss3 -lnssutil3") \ + $(if $(ENABLE_NSS), \ + --without-openssl \ + $(if $(SYSTEM_NSS),, \ + $(if $(filter MACOSX,$(OS_FOR_BUILD)),--disable-pkgconfig) \ + NSPR_CFLAGS="-I$(call gb_UnpackedTarball_get_dir,nss)/dist/out/include" NSPR_LIBS="-L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib -lnspr4" \ + NSS_CFLAGS="-I$(call gb_UnpackedTarball_get_dir,nss)/dist/public/nss" NSS_LIBS="-L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib -lsmime3 -lnss3 -lnssutil3" \ + ), \ + $(if $(ENABLE_OPENSSL), \ + $(if $(SYSTEM_OPENSSL),, \ + OPENSSL_CFLAGS="-I$(call gb_UnpackedTarball_get_dir,openssl)/include" \ + OPENSSL_LIBS="-L$(call gb_UnpackedTarball_get_dir,openssl) -lcrypto -lssl" \ + ), \ + --without-openssl) \ + ) \ $(if $(CROSS_COMPILING),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \ $(if $(SYSBASE),CFLAGS="-I$(SYSBASE)/usr/include" \ LDFLAGS="-L$(SYSBASE)/usr/lib $(if $(filter-out LINUX FREEBSD,$(OS)),",-Wl$(COMMA)-z$(COMMA)origin -Wl$(COMMA)-rpath$(COMMA)\\"\$$\$$ORIGIN)) \ -- cgit