configure.ac | 16 ++++++++- openssl/ExternalProject_openssl.mk | 65 +++++++++++++++++++++++++------------ 2 files changed, 60 insertions(+), 21 deletions(-)
New commits: commit 76d098a07bb2f901948d39522954dff6b50adae8 Author: Tor Lillqvist <t...@iki.fi> Date: Fri May 10 14:41:53 2013 +0300 Enable building OpenSSL for OS X Note that this doesn't imply it *will* be built; that depends on configury options and changes to configure.ac. Change-Id: I5ed531bc8999f49b9e696523226454f99f253882 diff --git a/openssl/ExternalProject_openssl.mk b/openssl/ExternalProject_openssl.mk index 66373ba..87397fe 100644 --- a/openssl/ExternalProject_openssl.mk +++ b/openssl/ExternalProject_openssl.mk @@ -49,6 +49,10 @@ OPENSSL_PLATFORM := \ ,\ $(if $(filter I,$(CPU)),VC-WIN32,VC-WIN64A)\ )\ + ,\ + $(if $(filter MACOSX,$(OS)),\ + $(if $(filter I,$(CPU)),darwin-i386-cc,darwin64-x86_64-cc)\ + )\ )\ )\ )\ @@ -70,7 +74,7 @@ else $(call gb_ExternalProject_get_state_target,openssl,build): $(call gb_ExternalProject_run,build,\ unset MAKEFLAGS \ - && $(if $(filter LINUX FREEBSD ANDROID SOLARIS IOS,$(OS)),./Configure,\ + && $(if $(filter LINUX MACOSX FREEBSD ANDROID SOLARIS IOS,$(OS)),./Configure,\ $(if $(filter WNT,$(OS)),$(PERL) Configure,./config)) \ $(OPENSSL_PLATFORM) \ $(if $(filter ANDROID,$(OS)),\ commit 88143d96a06b4d83cdad4f6b66195c10640761b7 Author: Tor Lillqvist <t...@iki.fi> Date: Fri May 10 14:00:06 2013 +0300 Attempt to clarify nested conditional mess Change-Id: I2c174e23b3f995d819ff8ab72281b386b26c1cfe diff --git a/openssl/ExternalProject_openssl.mk b/openssl/ExternalProject_openssl.mk index 433d494..66373ba 100644 --- a/openssl/ExternalProject_openssl.mk +++ b/openssl/ExternalProject_openssl.mk @@ -13,25 +13,46 @@ $(eval $(call gb_ExternalProject_register_targets,openssl,\ build \ )) -OPENSSL_PLATFORM := $(if $(filter LINUX FREEBSD ANDROID,$(OS)),\ - $(if $(filter I,$(CPU)),\ - $(if $(filter GNU/kFreeBSD,$(shell uname)),debian-kfreebsd-i386,linux-elf),\ - $(if $(filter X,$(CPU)),\ - $(if $(filter GNU/kFreeBSD,$(shell uname)),debian-kfreebsd-amd64,\ - $(if $(filter TRUE, $(ENABLE_DBGUTIL)), debug-linux-generic64, linux-generic64)),\ - $(if $(filter TRUE, $(ENABLE_DBGUTIL)), debug-linux-generic32, linux-generic32))),\ - $(if $(filter SOLARIS,$(OS)),\ - $(if $(filter INTEL,$(CPUNAME)),\ - $(if $(filter X,$(CPU)),\ - solaris64-x86_64-cc,solaris-x86-cc),\ - solaris-sparcv9-cc),\ - $(if $(filter IOS,$(OS)),\ - ios-armv7,\ - $(if $(filter WNT,$(OS)),\ - $(if $(filter GCC,$(COM)),\ - mingw,\ - $(if $(filter I,$(CPU)),\ - VC-WIN32,VC-WIN64A)))))) +# For multi-line conditionals, align the $(if and the corresponding ), +# putting the latter on a line of its own. Also put the "else" comma +# on a line of its own. Hopefully should make the logic more clear. + +OPENSSL_PLATFORM := \ + $(if $(filter LINUX FREEBSD ANDROID,$(OS)),\ + $(if $(filter I,$(CPU)),\ + $(if $(filter GNU/kFreeBSD,$(shell uname)),debian-kfreebsd-i386,linux-elf)\ + ,\ + $(if $(filter X,$(CPU)),\ + $(if $(filter GNU/kFreeBSD,$(shell uname)),\ + debian-kfreebsd-amd64\ + ,\ + $(if $(filter TRUE, $(ENABLE_DBGUTIL)), debug-linux-generic64, linux-generic64)\ + )\ + ,\ + $(if $(filter TRUE, $(ENABLE_DBGUTIL)), debug-linux-generic32, linux-generic32)\ + )\ + )\ + ,\ + $(if $(filter SOLARIS,$(OS)),\ + $(if $(filter INTEL,$(CPUNAME)),\ + $(if $(filter X,$(CPU)),solaris64-x86_64-cc,solaris-x86-cc)\ + ,\ + solaris-sparcv9-cc\ + )\ + ,\ + $(if $(filter IOS,$(OS)),\ + ios-armv7\ + ,\ + $(if $(filter WNT,$(OS)),\ + $(if $(filter GCC,$(COM)),\ + mingw\ + ,\ + $(if $(filter I,$(CPU)),VC-WIN32,VC-WIN64A)\ + )\ + )\ + )\ + )\ + ) ifeq ($(COM),MSC) $(call gb_ExternalProject_get_state_target,openssl,build): commit 1feb672b5e8614cd6d01c1f167f8523a37c62bf5 Author: Tor Lillqvist <t...@iki.fi> Date: Fri May 10 10:13:51 2013 +0300 Use bundled OpenSSL when building for OS X 10.7 or later http://stackoverflow.com/questions/7406946/why-is-apple-deprecating-openssl-in-macos-10-7-lion http://stackoverflow.com/questions/7475914/libcrypto-deprecated-on-mac-os-x-10-7-lion Apple apparently got fed up with the unstable ABI of OpenSSL, or something, and recommend you either move to their "Common Crypto Architecture", or, if you have to stay with OpenSSL, just build it yourself statically and bundle with your application. So let's do that. Change-Id: I5f19fcce9b4e00ff2ce3089a2398b3f08f76a9a0 diff --git a/configure.ac b/configure.ac index df85765..9871f4c 100644 --- a/configure.ac +++ b/configure.ac @@ -8654,7 +8654,21 @@ DISABLE_OPENSSL="NO" AC_MSG_CHECKING([whether to disable OpenSSL usage]) if test "$enable_openssl" = "yes"; then AC_MSG_RESULT([no]) - if test "$_os" = "Darwin" -o "$_os" = "NetBSD" -o "$_os" = "OpenBSD" -o \ + if test $_os = Darwin -a $MAC_OS_X_VERSION_MIN_REQUIRED -ge 1070; then + # OpenSSL is deprecated when building for 10.7 or later. + # + # http://stackoverflow.com/questions/7406946/why-is-apple-deprecating-openssl-in-macos-10-7-lion + # http://stackoverflow.com/questions/7475914/libcrypto-deprecated-on-mac-os-x-10-7-lion + # + # They apparently got fed up with the unstable ABI of + # OpenSSL, or something, and recommend you either move to + # their "Common Crypto Architecture", or, if you have to stay + # with OpenSSL, just build it yourself statically and bundle + # with your application. + + with_system_openssl=no + libo_CHECK_SYSTEM_MODULE([openssl],[OPENSSL],[openssl]) + elif test "$_os" = "Darwin" -o "$_os" = "NetBSD" -o "$_os" = "OpenBSD" -o \ "$_os" = "DragonFly" && test "$with_system_openssl" != "no"; then # Mac OS builds should get out without extra stuff is the Mac porters' # wish. And pkg-config is although Xcode ships a .pc for openssl _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits