components/libmemcached/Makefile
author John Beck <John.Beck@Oracle.COM>
Wed, 09 Nov 2016 10:03:53 -0800
changeset 7280 bf2e7fde74d5
parent 7253 8b61bf5be99d
child 7687 1093e2a9adbd
permissions -rw-r--r--
25071362 tweaks needed to get libmemcached to build on S11.3
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
358
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
     1
#
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
     2
# CDDL HEADER START
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
     3
#
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
     4
# The contents of this file are subject to the terms of the
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
     5
# Common Development and Distribution License (the "License").
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
     6
# You may not use this file except in compliance with the License.
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
     7
#
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
     8
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
     9
# or http://www.opensolaris.org/os/licensing.
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    10
# See the License for the specific language governing permissions
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    11
# and limitations under the License.
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    12
#
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    13
# When distributing Covered Code, include this CDDL HEADER in each
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    14
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    15
# If applicable, add the following below this CDDL HEADER, with the
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    16
# fields enclosed by brackets "[]" replaced with your own identifying
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    17
# information: Portions Copyright [yyyy] [name of copyright owner]
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    18
#
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    19
# CDDL HEADER END
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    20
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    21
#
5682
94c0ca64c022 15558602 TCL_LD_SEARCH_FLAGS is wrongly defined in tclConfig.sh
Shawn Walker-Salas <shawn.walker@oracle.com>
parents: 5054
diff changeset
    22
# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
358
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    23
#
5682
94c0ca64c022 15558602 TCL_LD_SEARCH_FLAGS is wrongly defined in tclConfig.sh
Shawn Walker-Salas <shawn.walker@oracle.com>
parents: 5054
diff changeset
    24
BUILD_BITS= 64_and_32
7253
8b61bf5be99d PSARC 2016/584 libmemcached: Upgrade from 0.16 to 1.0.18
Esha Wang <esha.wang@oracle.com>
parents: 5682
diff changeset
    25
COMPILER=gcc
358
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    26
include ../../make-rules/shared-macros.mk
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    27
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    28
COMPONENT_NAME=		libmemcached
7253
8b61bf5be99d PSARC 2016/584 libmemcached: Upgrade from 0.16 to 1.0.18
Esha Wang <esha.wang@oracle.com>
parents: 5682
diff changeset
    29
COMPONENT_VERSION=	1.0.18
800
2ad056ed89ec 7163771 sha1 should not be used in userland-fetch and userland component/*/Makefile
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 358
diff changeset
    30
COMPONENT_ARCHIVE_HASH=	\
7253
8b61bf5be99d PSARC 2016/584 libmemcached: Upgrade from 0.16 to 1.0.18
Esha Wang <esha.wang@oracle.com>
parents: 5682
diff changeset
    31
    sha256:e22c0bb032fde08f53de9ffbc5a128233041d9f33b5de022c0978a2149885f82 
8b61bf5be99d PSARC 2016/584 libmemcached: Upgrade from 0.16 to 1.0.18
Esha Wang <esha.wang@oracle.com>
parents: 5682
diff changeset
    32
COMPONENT_ARCHIVE_URL= https://launchpad.net/libmemcached/1.0/${COMPONENT_VERSION}/+download/libmemcached-${COMPONENT_VERSION}.tar.gz 
358
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    33
COMPONENT_PROJECT_URL=  http://libmemcached.org/libMemcached.html
1058
34d7aaa03423 15886624 Auto-generation of Userland gate list - Phase 3
Rich Burridge <rich.burridge@oracle.com>
parents: 800
diff changeset
    34
COMPONENT_BUGDB=	database/memcached
358
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    35
7253
8b61bf5be99d PSARC 2016/584 libmemcached: Upgrade from 0.16 to 1.0.18
Esha Wang <esha.wang@oracle.com>
parents: 5682
diff changeset
    36
TPNO=			31699
1948
2d1537e7942d 18978320 Userland components should specify TPNOs in Makefiles instead of pkg manifests
John Beck <John.Beck@Oracle.COM>
parents: 1282
diff changeset
    37
5682
94c0ca64c022 15558602 TCL_LD_SEARCH_FLAGS is wrongly defined in tclConfig.sh
Shawn Walker-Salas <shawn.walker@oracle.com>
parents: 5054
diff changeset
    38
include $(WS_MAKE_RULES)/common.mk
358
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    39
5682
94c0ca64c022 15558602 TCL_LD_SEARCH_FLAGS is wrongly defined in tclConfig.sh
Shawn Walker-Salas <shawn.walker@oracle.com>
parents: 5054
diff changeset
    40
ifeq ($(OS_VERSION),5.11)
358
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    41
LDFLAGS += -lsocket -lnsl
7280
bf2e7fde74d5 25071362 tweaks needed to get libmemcached to build on S11.3
John Beck <John.Beck@Oracle.COM>
parents: 7253
diff changeset
    42
CONFIGURE_OPTIONS += ax_cv_check_cflags__Werror__fPIE=no
bf2e7fde74d5 25071362 tweaks needed to get libmemcached to build on S11.3
John Beck <John.Beck@Oracle.COM>
parents: 7253
diff changeset
    43
CONFIGURE_OPTIONS += ax_cv_check_cflags__Werror__pie=no
bf2e7fde74d5 25071362 tweaks needed to get libmemcached to build on S11.3
John Beck <John.Beck@Oracle.COM>
parents: 7253
diff changeset
    44
CONFIGURE_OPTIONS += ax_cv_check_cxxflags__Werror__fPIE=no
bf2e7fde74d5 25071362 tweaks needed to get libmemcached to build on S11.3
John Beck <John.Beck@Oracle.COM>
parents: 7253
diff changeset
    45
CONFIGURE_OPTIONS += ax_cv_check_cxxflags__Werror__pie=no
5682
94c0ca64c022 15558602 TCL_LD_SEARCH_FLAGS is wrongly defined in tclConfig.sh
Shawn Walker-Salas <shawn.walker@oracle.com>
parents: 5054
diff changeset
    46
endif
358
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    47
7253
8b61bf5be99d PSARC 2016/584 libmemcached: Upgrade from 0.16 to 1.0.18
Esha Wang <esha.wang@oracle.com>
parents: 5682
diff changeset
    48
# Include _SOLARIS_ flag for byteorder.h.patch's ifdef to work
8b61bf5be99d PSARC 2016/584 libmemcached: Upgrade from 0.16 to 1.0.18
Esha Wang <esha.wang@oracle.com>
parents: 5682
diff changeset
    49
CFLAGS+= -D_SOLARIS_
8b61bf5be99d PSARC 2016/584 libmemcached: Upgrade from 0.16 to 1.0.18
Esha Wang <esha.wang@oracle.com>
parents: 5682
diff changeset
    50
CXXFLAGS+= -D_SOLARIS_
8b61bf5be99d PSARC 2016/584 libmemcached: Upgrade from 0.16 to 1.0.18
Esha Wang <esha.wang@oracle.com>
parents: 5682
diff changeset
    51
358
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    52
CONFIGURE_ENV +=	MAKE=$(GMAKE)
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    53
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    54
CONFIGURE_OPTIONS +=	--includedir=$(CONFIGURE_INCLUDEDIR)
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    55
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    56
# need some files in $(SOURCE_DIR)/docs during build
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    57
COMPONENT_PRE_CONFIGURE_ACTION = \
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    58
    ($(CLONEY) $(SOURCE_DIR) $(@D))
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    59
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    60
# need /usr/perl5/bin on path to access pod2man perl script, used by 
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    61
# the build to create docs
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    62
COMPONENT_BUILD_ENV +=	PATH=/usr/perl5/bin:$(PATH)
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    63
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    64
COMPONENT_BUILD_ENV +=	MAKE="$(GMAKE)"	
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    65
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    66
# Libmemcached's configure script sets an incorrect CFLAGS in the Makefiles
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    67
# it generates.  Make sure we use the correct one by passing CFLAGS in 
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    68
# as a build argument (CFLAGS in the environment won't take precedence
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    69
# over the Makefile one).
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    70
COMPONENT_BUILD_ARGS +=	CFLAGS="$(CFLAGS)"
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    71
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    72
# Similarly, set pkglibdir in the arguments to gmake; otherwise
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    73
# the Makefile sets runpath to a non-existent /usr/lib/libmemcached directory.
5682
94c0ca64c022 15558602 TCL_LD_SEARCH_FLAGS is wrongly defined in tclConfig.sh
Shawn Walker-Salas <shawn.walker@oracle.com>
parents: 5054
diff changeset
    74
COMPONENT_BUILD_ARGS +=	pkglibdir=$(USRLIBDIR)
1282
16201bef295c 16659836 enable ASLR for cmake, libmemcached, pconsole, pcre, php-5_2, php-5_3, ruby 1.8
April Chin <april.chin@oracle.com>
parents: 1058
diff changeset
    75
358
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    76
COMPONENT_INSTALL_ENV +=	DESTDIR=$(PROTO_DIR)
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    77
5054
91b97df27c58 22136498 GNU which really doesn't have any tests
Rich Burridge <rich.burridge@oracle.com>
parents: 4339
diff changeset
    78
COMPONENT_TEST_ARGS +=		-k -i
358
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    79
COMPONENT_TEST_TARGETS =	test
5054
91b97df27c58 22136498 GNU which really doesn't have any tests
Rich Burridge <rich.burridge@oracle.com>
parents: 4339
diff changeset
    80
COMPONENT_TEST_TRANSFORMS += \
7253
8b61bf5be99d PSARC 2016/584 libmemcached: Upgrade from 0.16 to 1.0.18
Esha Wang <esha.wang@oracle.com>
parents: 5682
diff changeset
    81
        '-n ' \
8b61bf5be99d PSARC 2016/584 libmemcached: Upgrade from 0.16 to 1.0.18
Esha Wang <esha.wang@oracle.com>
parents: 5682
diff changeset
    82
        '-e "/SKIP/p" ' \
8b61bf5be99d PSARC 2016/584 libmemcached: Upgrade from 0.16 to 1.0.18
Esha Wang <esha.wang@oracle.com>
parents: 5682
diff changeset
    83
        '-e "/PASS/p" ' \
8b61bf5be99d PSARC 2016/584 libmemcached: Upgrade from 0.16 to 1.0.18
Esha Wang <esha.wang@oracle.com>
parents: 5682
diff changeset
    84
	'-e "/FAIL/p" ' \
8b61bf5be99d PSARC 2016/584 libmemcached: Upgrade from 0.16 to 1.0.18
Esha Wang <esha.wang@oracle.com>
parents: 5682
diff changeset
    85
	'-e "/ERROR/p" ' \
8b61bf5be99d PSARC 2016/584 libmemcached: Upgrade from 0.16 to 1.0.18
Esha Wang <esha.wang@oracle.com>
parents: 5682
diff changeset
    86
	'-e "/TOTAL/p" '
8b61bf5be99d PSARC 2016/584 libmemcached: Upgrade from 0.16 to 1.0.18
Esha Wang <esha.wang@oracle.com>
parents: 5682
diff changeset
    87
8b61bf5be99d PSARC 2016/584 libmemcached: Upgrade from 0.16 to 1.0.18
Esha Wang <esha.wang@oracle.com>
parents: 5682
diff changeset
    88
# Master test results are the same for both 32-bit and 64-bit, so override
8b61bf5be99d PSARC 2016/584 libmemcached: Upgrade from 0.16 to 1.0.18
Esha Wang <esha.wang@oracle.com>
parents: 5682
diff changeset
    89
# here, rather than create multiple identical master files.
8b61bf5be99d PSARC 2016/584 libmemcached: Upgrade from 0.16 to 1.0.18
Esha Wang <esha.wang@oracle.com>
parents: 5682
diff changeset
    90
COMPONENT_TEST_MASTER = $(COMPONENT_TEST_RESULTS_DIR)/results-all.master
8b61bf5be99d PSARC 2016/584 libmemcached: Upgrade from 0.16 to 1.0.18
Esha Wang <esha.wang@oracle.com>
parents: 5682
diff changeset
    91
8b61bf5be99d PSARC 2016/584 libmemcached: Upgrade from 0.16 to 1.0.18
Esha Wang <esha.wang@oracle.com>
parents: 5682
diff changeset
    92
# To prevent "libtool_install_magic: unbound variable"
8b61bf5be99d PSARC 2016/584 libmemcached: Upgrade from 0.16 to 1.0.18
Esha Wang <esha.wang@oracle.com>
parents: 5682
diff changeset
    93
unexport SHELLOPTS
358
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    94
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    95
# Tests fail, probably because memcached is not running.
7253
8b61bf5be99d PSARC 2016/584 libmemcached: Upgrade from 0.16 to 1.0.18
Esha Wang <esha.wang@oracle.com>
parents: 5682
diff changeset
    96
# XFAILS are due to servers or arguments not being provided. 
8b61bf5be99d PSARC 2016/584 libmemcached: Upgrade from 0.16 to 1.0.18
Esha Wang <esha.wang@oracle.com>
parents: 5682
diff changeset
    97
8b61bf5be99d PSARC 2016/584 libmemcached: Upgrade from 0.16 to 1.0.18
Esha Wang <esha.wang@oracle.com>
parents: 5682
diff changeset
    98
REQUIRED_PACKAGES += developer/gcc
8b61bf5be99d PSARC 2016/584 libmemcached: Upgrade from 0.16 to 1.0.18
Esha Wang <esha.wang@oracle.com>
parents: 5682
diff changeset
    99
REQUIRED_PACKAGES += system/library
8b61bf5be99d PSARC 2016/584 libmemcached: Upgrade from 0.16 to 1.0.18
Esha Wang <esha.wang@oracle.com>
parents: 5682
diff changeset
   100
REQUIRED_PACKAGES += system/library/gcc/gcc-c++-runtime
8b61bf5be99d PSARC 2016/584 libmemcached: Upgrade from 0.16 to 1.0.18
Esha Wang <esha.wang@oracle.com>
parents: 5682
diff changeset
   101
REQUIRED_PACKAGES += system/library/gcc/gcc-c-runtime
8b61bf5be99d PSARC 2016/584 libmemcached: Upgrade from 0.16 to 1.0.18
Esha Wang <esha.wang@oracle.com>
parents: 5682
diff changeset
   102
REQUIRED_PACKAGES += system/library/math
8b61bf5be99d PSARC 2016/584 libmemcached: Upgrade from 0.16 to 1.0.18
Esha Wang <esha.wang@oracle.com>
parents: 5682
diff changeset
   103
REQUIRED_PACKAGES += system/library/security/libsasl2