#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
#
# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
#
BUILD_BITS= 64_and_32
include ../../make-rules/shared-macros.mk
COMPONENT_NAME= libconfuse
COMPONENT_VERSION= 3.0
COMPONENT_SRC_NAME= confuse
COMPONENT_PROJECT_URL= http://www.nongnu.org/confuse/
COMPONENT_ARCHIVE_HASH= \
sha256:f1f326d9443103036d19c32d3f3efec3a85c3b081d99534463668d29992c4648
COMPONENT_ARCHIVE_URL= https://github.com/martinh/$(COMPONENT_NAME)/releases/download/v$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE)
COMPONENT_BUGDB= library/libconfuse
TPNO= 28034
TEST_TARGET= install $(TEST_32_and_64)
SYSTEM_TEST_TARGET= configure $(SYSTEM_TEST_32_and_64)
include $(WS_MAKE_RULES)/common.mk
CONFIGURE_OPTIONS += --disable-static
CONFIGURE_OPTIONS += --enable-shared
# This is really only needed to get the test target to pass.
COMPONENT_PRE_CONFIGURE_ACTION = ($(CLONEY) $(SOURCE_DIR) $(@D))
# Needed for "gmake test" to work successfully.
# If SHELLOPTS is exported (as it is by the userland makefiles),
# then all shell options get exported to child invocations of bash,
# which results in test failures due to nounset and xtrace being
# set unexpectedly, and errors such as "$1: unbound variable" and
# diffs failing due to script tracing in output files.
unexport SHELLOPTS
COMPONENT_TEST_DIR = $(@D)/tests
COMPONENT_SYSTEM_TEST_DIR = $(@D)/tests
COMPONENT_TEST_MASTER = $(COMPONENT_TEST_RESULTS_DIR)/results-all.master
COMPONENT_TEST_TRANSFORMS += \
'-n ' \
'-e "/TOTAL/p" ' \
'-e "/SKIP/p" ' \
'-e "/PASS/p" ' \
'-e "/FAIL/p" ' \
'-e "/ERROR/p" '
# Needed to build the test programs.
COMPONENT_PRE_SYSTEM_TEST_ACTION += \
(cd $(@D)/src ; $(GMAKE) libconfuse.la )
# Get correct libconfuse.so.0 from the proto area.
TEST_LIBPATH.32 = $(PROTOUSRLIBDIR)
TEST_LIBPATH.64 = $(PROTOUSRLIBDIR64)
COMPONENT_TEST_ENV += LD_LIBRARY_PATH=$(TEST_LIBPATH.$(BITS))