1732N/A#
1732N/A# CDDL HEADER START
1732N/A#
1732N/A# The contents of this file are subject to the terms of the
1732N/A# Common Development and Distribution License (the "License").
1732N/A# You may not use this file except in compliance with the License.
1732N/A#
1732N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1732N/A# or http://www.opensolaris.org/os/licensing.
1732N/A# See the License for the specific language governing permissions
1732N/A# and limitations under the License.
1732N/A#
1732N/A# When distributing Covered Code, include this CDDL HEADER in each
1732N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1732N/A# If applicable, add the following below this CDDL HEADER, with the
1732N/A# fields enclosed by brackets "[]" replaced with your own identifying
1732N/A# information: Portions Copyright [yyyy] [name of copyright owner]
1732N/A#
1732N/A# CDDL HEADER END
1732N/A#
5680N/A
1732N/A#
5680N/A# Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
5680N/A#
5680N/ABUILD_BITS= 64_and_32
1732N/Ainclude ../../make-rules/shared-macros.mk
1732N/A
1732N/ACOMPONENT_NAME= libssh2
5806N/ACOMPONENT_VERSION= 1.7.0
1732N/ACOMPONENT_PROJECT_URL= http://www.libssh2.org/
1732N/ACOMPONENT_ARCHIVE_HASH= \
5806N/A sha256:e4561fd43a50539a8c2ceb37841691baf03ecb7daf043766da1b112e4280d584
1732N/ACOMPONENT_ARCHIVE_URL= $(COMPONENT_PROJECT_URL)download/$(COMPONENT_ARCHIVE)
1732N/ACOMPONENT_BUGDB= library/libssh2
1732N/A
5806N/ATPNO= 27245
2899N/A
5680N/ASYSTEM_TEST_TARGET= configure $(SYSTEM_TEST_32_and_64)
5680N/Ainclude $(WS_MAKE_RULES)/common.mk
1732N/A
1732N/ACONFIGURE_OPTIONS += --enable-shared
1732N/ACONFIGURE_OPTIONS += --disable-static
1732N/A
2095N/A# Adjust the .so line in the libssh2_sftp_fstatvfs man page to correctly find
2095N/A# the file it references (as we place it in the man3ssh2 section on Solaris).
2095N/A#
2095N/ACOMPONENT_POST_INSTALL_ACTION += \
2095N/A $(GSED) -i -e 's|3|3ssh2|g' \
2095N/A $(PROTOUSRSHAREMAN3DIR)/libssh2_sftp_fstatvfs.3;
2095N/A
5806N/A# Needed for "gmake test" to work successfully.
5806N/A# If SHELLOPTS is exported (as it is by the userland makefiles),
5806N/A# then all shell options get exported to child invocations of bash,
5806N/A# which results in test failures due to nounset and xtrace being
5806N/A# set unexpectedly, and errors such as "$1: unbound variable" and
5806N/A# diffs failing due to script tracing in output files.
5806N/Aunexport SHELLOPTS
5806N/A
3643N/A# Master test results are the same for both 32-bit and 64-bit, so override
3643N/A# here, rather than create multiple identical master files.
3643N/ACOMPONENT_TEST_MASTER = $(COMPONENT_TEST_RESULTS_DIR)/results-all.master
3643N/A
3643N/A# The additional libssh2 specific set of transforms to be applied to the
3643N/A# test results to try to normalize them.
3643N/ACOMPONENT_TEST_TRANSFORMS += \
3854N/A '-e "s|^.*$(CC).*$$|XXX_CC_XXX|g" ' \
3854N/A '-e "s|^.*source=.*libtool=no.*$$|XXX_CC_XXX|g" ' \
3854N/A '-e "s|^.*DEPDIR=.deps.*$$|XXX_CC_XXX|g" ' \
4578N/A '-e "s|^.*make.*$$|XXX_CC_XXX|g" ' \
4578N/A '-e "s|^make.*: Leaving directory.*$$|XXX_CC_XXX|g" ' \
4578N/A '-e "s|^make.*: Entering directory.*$$|XXX_CC_XXX|g" ' \
3854N/A '-e "/^XXX_CC_XXX$$/d" '
3643N/A
4578N/A# Just run "gmake check" from the tests directory.
4578N/ACOMPONENT_TEST_DIR = $(BUILD_DIR_$(BITS))/tests
4578N/ACOMPONENT_SYSTEM_TEST_DIR = $(BUILD_DIR_$(BITS))/tests
4578N/A
4578N/A# Adjust how the simple test program is built.
4578N/ACOMPONENT_PRE_SYSTEM_TEST_ACTION += \
4578N/A $(GSED) -e "s|^simple_DEPENDENCIES.*$$|simple_DEPENDENCIES =|" \
4578N/A -e "s|^LDADD.*$$|LDADD = -lssh2|" \
4578N/A $(BUILD_DIR_$(BITS))/tests/Makefile \
4578N/A > $(BUILD_DIR_$(BITS))/tests/Makefile-system-test
4578N/A
4578N/ACOMPONENT_SYSTEM_TEST_ENV = \
4578N/A AM_MAKEFLAGS="-f $(BUILD_DIR_$(BITS))/tests/Makefile-system-test"
4578N/ACOMPONENT_SYSTEM_TEST_ARGS = -f $(BUILD_DIR_$(BITS))/tests/Makefile-system-test
4578N/A
3817N/AREQUIRED_PACKAGES += library/security/openssl
3817N/AREQUIRED_PACKAGES += library/zlib