[pkg-opensc-commit] [opensc] 04/23: build OpenSSL on OS X if needed

Eric Dorland eric at moszumanska.debian.org
Tue Jul 5 06:01:10 UTC 2016


This is an automated email from the git hooks/post-receive script.

eric pushed a commit to branch master
in repository opensc.

commit 8dcdf204af22430ad01ecd6df7148d38471648ef
Author: Frank Morgner <frankmorgner at gmail.com>
Date:   Wed May 18 16:10:00 2016 +0200

    build OpenSSL on OS X if needed
---
 MacOSX/build-package.in | 23 ++++++++++++++++++-----
 1 file changed, 18 insertions(+), 5 deletions(-)

diff --git a/MacOSX/build-package.in b/MacOSX/build-package.in
index 3c9dcc6..55b15fe 100755
--- a/MacOSX/build-package.in
+++ b/MacOSX/build-package.in
@@ -17,15 +17,28 @@ SDK_PATH="${SDK_PATH:-$SDKS_PATH/$(ls -1 ${SDKS_PATH} | sort -n -k2 -t. -r | hea
 # Set SDK path
 export CFLAGS="$CFLAGS -isysroot $SDK_PATH -arch x86_64 -mmacosx-version-min=10.10"
 
-# OpenSSL is deprecated on OSX since 10.7 and that generates lots of
-# "false positive" warnings and there is no alternative option.
-# Just ignore these warning for now by silencing them.
-CFLAGS="$CFLAGS -Wno-deprecated-declarations"
-
 export SED=/usr/bin/sed
 PREFIX=/Library/OpenSC
 export PKG_CONFIG_PATH=/usr/lib/pkgconfig
 
+if ! pkg-config libcrypto --atleast-version=1.0.1; then
+	# OpenSSL is not installed
+	if ! test -e $BUILDPATH/openssl_bin/lib/pkgconfig; then
+		# Build OpenSSL manually, because Apple's binaries are deprecated
+		if ! test -e openssl; then
+			git clone --depth=1 https://github.com/openssl/openssl.git -b OpenSSL_1_0_2-stable
+		fi
+		cd openssl
+		KERNEL_BITS=64 ./config --prefix=$PREFIX -mmacosx-version-min=10.10
+		make clean update depend
+		make
+		make INSTALL_PREFIX=$BUILDPATH/openssl_bin install_sw
+		cd ..
+	fi
+	export OPENSSL_CFLAGS="`env PKG_CONFIG_PATH=$BUILDPATH/openssl_bin/$PREFIX/lib/pkgconfig PKG_CONFIG_SYSROOT_DIR=$BUILDPATH/openssl_bin pkg-config --static --cflags libcrypto`"
+	export OPENSSL_LIBS="`  env PKG_CONFIG_PATH=$BUILDPATH/openssl_bin/$PREFIX/lib/pkgconfig PKG_CONFIG_SYSROOT_DIR=$BUILDPATH/openssl_bin pkg-config --static --libs   libcrypto`"
+fi
+
 ./configure --prefix=$PREFIX \
 --sysconfdir=$PREFIX/etc \
 --disable-dependency-tracking \

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-opensc/opensc.git



More information about the pkg-opensc-commit mailing list