4 # The contents of this file are subject to the terms of the
5 # Common Development and Distribution License (the "License").
6 # You may not use this file except in compliance with the License.
8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 # or http://www.opensolaris.org/os/licensing.
10 # See the License for the specific language governing permissions
11 # and limitations under the License.
13 # When distributing Covered Code, include this CDDL HEADER in each
14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 # If applicable, add the following below this CDDL HEADER, with the
16 # fields enclosed by brackets "[]" replaced with your own identifying
17 # information: Portions Copyright [yyyy] [name of copyright owner]
22 # Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
23 # Copyright (c) 2013 Erol Zavidic. All rights reserved.
26 include ..
/..
/make-rules
/shared-macros.mk
28 COMPONENT_NAME
= libmemcached
29 COMPONENT_VERSION
= 1.0.17
30 COMPONENT_SRC
= $(COMPONENT_NAME
)-$(COMPONENT_VERSION
)
31 COMPONENT_ARCHIVE
= $(COMPONENT_SRC
).
tar.gz
32 COMPONENT_ARCHIVE_HASH
= \
33 sha256
:7bb27b2589400f918df1cf5002cb01ef7ccac6e23f818604e2386de62c80bba5
34 COMPONENT_ARCHIVE_URL
= https
://launchpad.net
/libmemcached
/1.0/1.0.17/+download
/${COMPONENT_ARCHIVE}
35 COMPONENT_PROJECT_URL
= http
://libmemcached.org
/libMemcached.html
36 COMPONENT_BUGDB
= database
/memcached
38 include $(WS_TOP
)/make-rules
/prep.mk
39 include $(WS_TOP
)/make-rules
/configure.mk
40 include $(WS_TOP
)/make-rules
/ips.mk
42 CXXFLAGS
+= -D__EXTENSIONS__
-D_XPG5
43 LDFLAGS
+= -D__EXTENSIONS__
-D_XPG5
-lsocket
-lnsl
45 CONFIGURE_ENV
+= MAKE
=$(GMAKE
)
47 CONFIGURE_OPTIONS
+= --includedir=$(CONFIGURE_INCLUDEDIR
)
49 CONFIGURE_OPTIONS
+= --disable-static
50 CONFIGURE_OPTIONS
+= --without-mysql
51 CONFIGURE_OPTIONS
+= --without-gearmand
52 CONFIGURE_OPTIONS
+= --without-memcached
54 COMPONENT_PREP_ACTION
= ( cd
$(@D
) && \
57 libtoolize
--automake
--copy
--force && \
61 # need some files in $(SOURCE_DIR)/docs during build
62 COMPONENT_PRE_CONFIGURE_ACTION
= \
63 ($(CLONEY
) $(SOURCE_DIR
) $(@D
))
65 # need /usr/perl5/bin on path to access pod2man perl script, used by
66 # the build to create docs
67 COMPONENT_BUILD_ENV
+= PATH
=/usr
/perl5
/bin
:$(PATH
)
69 COMPONENT_BUILD_ENV
+= MAKE
="$(GMAKE)"
71 # Libmemcached's configure script sets an incorrect CFLAGS in the Makefiles
72 # it generates. Make sure we use the correct one by passing CFLAGS in
73 # as a build argument (CFLAGS in the environment won't take precedence
74 # over the Makefile one).
75 COMPONENT_BUILD_ARGS
+= CFLAGS
="$(CFLAGS)"
76 COMPONENT_BUILD_ARGS
+= CXXFLAGS
="$(CXXFLAGS)"
77 COMPONENT_BUILD_ARGS
+= LDFLAGS
="$(LDFLAGS)"
79 # Similarly, set pkglibdir in the arguments to gmake; otherwise
80 # the Makefile sets runpath to a non-existent /usr/lib/libmemcached directory.
81 COMPONENT_BUILD_ARGS
+= pkglibdir
=/usr
/lib
83 ASLR_MODE
= $(ASLR_ENABLE
)
85 COMPONENT_INSTALL_ENV
+= DESTDIR
=$(PROTO_DIR
)
87 COMPONENT_TEST_TARGETS
= test
91 build
: $(BUILD_32_and_64
)
93 install: $(INSTALL_32_and_64
)
95 # Some tests fail because memcached is not running.
96 test: $(TEST_32_and_64
)
98 BUILD_PKG_DEPENDENCIES
= $(BUILD_TOOLS
)
100 include $(WS_TOP
)/make-rules
/depend.mk