components/libevent/Makefile
author Rich Burridge <rich.burridge@oracle.com>
Tue, 02 May 2017 17:33:26 -0700
changeset 7964 d9801318ed3d
parent 7848 75d3cd4c779b
permissions -rw-r--r--
25981468 Build ilmbase and openexr with the GNU compilers

#
# 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, 2017, Oracle and/or its affiliates. All rights reserved.
#
BUILD_BITS= 64_and_32
include ../../make-rules/shared-macros.mk

COMPONENT_NAME=		libevent
COMPONENT_VERSION=	2.0.22
COMPONENT_PROJECT_URL=	http://monkey.org/~provos/libevent/
COMPONENT_SRC=		$(COMPONENT_NAME)-$(COMPONENT_VERSION)-stable
COMPONENT_ARCHIVE_HASH=	\
    sha256:71c2c49f0adadacfdbe6332a372c38cf9c8b7895bb73dabeaa53cdcc1d4e1fa3
COMPONENT_ARCHIVE_URL=	http://github.com/libevent/libevent/releases/download/release-$(COMPONENT_VERSION)-stable/$(COMPONENT_ARCHIVE)
COMPONENT_BUGDB=	library/libevent
COMPONENT_ANITYA_ID=	1606

TPNO=			27840	

TEST_TARGET= install $(TEST_32_and_64)
SYSTEM_TEST_TARGET= build $(SYSTEM_TEST_32_and_64)
include $(WS_MAKE_RULES)/common.mk

COMPONENT_PRE_CONFIGURE_ACTION =  \
	($(CLONEY) $(SOURCE_DIR) $(@D))

# The original manpage is in a format that the Solaris man command does not
# understand. Hence it has been manually converted.
#
# List of files from the original package that are not being delivered
#
# /usr/bin/event_rpcgen.py

CONFIGURE_OPTIONS	+= CFLAGS="$(CFLAGS)"
CONFIGURE_OPTIONS	+= --disable-static

# 32 and 64 bits event-config.h headers need to be merged to the final one.
EVENTH=include/event2/event-config.h
$(INSTALL_64): COMPONENT_POST_INSTALL_ACTION += \
	-diff -D __$(MACH64) $(BUILD_DIR_32)/$(EVENTH) \
	  $(BUILD_DIR_64)/$(EVENTH) > $(PROTO_DIR)$(CONFIGURE_PREFIX)/$(EVENTH);

# Get correct libevent-2.0.so.5 from the proto area.
TEST_LIBPATH.32 =	$(PROTOUSRLIBDIR)
TEST_LIBPATH.64 =	$(PROTOUSRLIBDIR64)
COMPONENT_TEST_ENV +=	LD_LIBRARY_PATH=$(TEST_LIBPATH.$(BITS))

COMPONENT_TEST_DIR =		$(@D)/test
COMPONENT_TEST_TARGETS =	verify

COMPONENT_SYSTEM_TEST_DIR =	$(@D)/test
COMPONENT_SYSTEM_TEST_TARGETS =	verify

# \x24 represents the character '$'
COMPONENT_TEST_TRANSFORMS += \
	'-e "s/^type: .* OKAY\x24/TYPE-COUNT-LINE OKAY/" ' \
	'-e "/cp test.sh test-script.sh/d" ' \
	'-e "/Entering directory/d"' \
	'-e "/Leaving directory/d"' \
	'-e "/^make/d"' \
	'-e "s|^.*$(CC).*$$|XXX_CC_XXX|g" ' \
	'-e "s|^.*source=.*libtool=no.*$$|XXX_CC_XXX|g" ' \
	'-e "s|^.*DEPDIR=.deps.*$$|XXX_CC_XXX|g" ' \
	'-e "/^XXX_CC_XXX$$/d" '

# Master test results are the same for 32-bit and 64-bit, so override
# here, rather than create multiple identical master files.
COMPONENT_TEST_MASTER = $(COMPONENT_TEST_RESULTS_DIR)/results-all.master

REQUIRED_PACKAGES += library/security/openssl
REQUIRED_PACKAGES += library/security/openssl/openssl-fips-140
REQUIRED_PACKAGES += runtime/python-27
REQUIRED_PACKAGES += system/library/gcc/gcc-c-runtime