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]
23 # Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
28 include ..
/..
/..
/make-rules
/shared-macros.mk
31 COMPONENT_VERSION
= 1.3.10
32 COMPONENT_SUMMARY
= high performance C-based HTTP client library
33 COMPONENT_DESCRIPTION
= The serf library is a high performance C-based HTTP client library. \
34 It is built upon the Apache Portable Runtime
(APR
) library. Features
include multiplexed
, \
35 asynchronous connections
; SSL
/TLS support
; full HTTP pipelining
; multiple authentication \
36 modes
(Basic
, Digest
, Kerberos
/NTLM
); zero-copy support for increased throughput.
37 COMPONENT_SRC
= $(COMPONENT_NAME
)-$(COMPONENT_VERSION
)
38 COMPONENT_PROJECT_URL
= http
://serf.apache.org
/
39 COMPONENT_ARCHIVE
= $(COMPONENT_SRC
).
tar.bz2
40 COMPONENT_ARCHIVE_HASH
= sha256
:be81ef08baa2516ecda76a77adf7def7bc3227eeb578b9a33b45f7b41dc064e6
41 COMPONENT_ARCHIVE_URL
= https
://www.apache.org
/dist/$(COMPONENT_NAME
)/$(COMPONENT_ARCHIVE
)
42 COMPONENT_FMRI
= library
/libserf
43 COMPONENT_CLASSIFICATION
=Web Services
/Application and Web Servers
44 COMPONENT_LICENSE
= Apache v2.0
46 include $(WS_MAKE_RULES
)/prep.mk
47 # Needed by the test: target. We override build and install.
48 include $(WS_MAKE_RULES
)/justmake.mk
49 include $(WS_MAKE_RULES
)/ips.mk
52 USED_APU
= /usr
/apr-util
54 APR_64
= $(USED_APR
)/bin
/apr-1-config
55 APU_64
= $(USED_APU
)/bin
/apu-1-config
56 SERFLIBPATH_64
= -R
$(USED_APR
)/lib
/64 -R
$(USED_APU
)/lib
/64
57 SERFLIBDIR_64
= /usr
/lib
/64
59 # We have to roll our own as serf is built with scons.
60 SCONS
= /usr
/bin
/scons
62 COMPONENT_BUILD_ARGS
+= CC
="$(CC)"
63 COMPONENT_BUILD_ARGS
+= CPPFLAGS
="-D__EXTENSIONS__ -I$(OPENSSL_INCDIR)"
64 COMPONENT_BUILD_ARGS
+= CFLAGS
="$(CC_BITS) $(COMPILER_PIC)"
65 COMPONENT_BUILD_ARGS
+= LINKFLAGS
="$(CC_BITS) $(SERFLIBPATH_$(BITS)) -L$(OPENSSL_LIBDIR)"
66 COMPONENT_BUILD_ARGS
+= APR
=$(APR_
$(BITS
))
67 COMPONENT_BUILD_ARGS
+= APU
=$(APU_
$(BITS
))
68 COMPONENT_BUILD_ARGS
+= PREFIX
=/usr
69 COMPONENT_BUILD_ARGS
+= LIBDIR
=$(SERFLIBDIR_
$(BITS
))
70 COMPONENT_BUILD_ARGS
+= PKG_CONFIG_PATH
=$(OPENSSL_PKG_CONFIG_PATH
)
72 COMPONENT_TEST_CMD
= $(SCONS
)
74 COMPONENT_TEST_TRANSFORMS
+= '-ne "/error/s/^[0-9]\+//p"'
75 COMPONENT_TEST_TRANSFORMS
+= '-ne "/failure/p" '
76 COMPONENT_TEST_TRANSFORMS
+= '-ne "/^[0-9]\+)/p" '
77 COMPONENT_TEST_TRANSFORMS
+= '-ne "/^Runs:/p" '
78 COMPONENT_TEST_TRANSFORMS
+= '-ne "/^ERRROR:/p" '
79 COMPONENT_TEST_TRANSFORMS
+= '-ne "/^OK/p" '
80 COMPONENT_TEST_TRANSFORMS
+= '-ne "/^==/p" '
82 $(BUILD_DIR
)/%/.built
: $(SOURCE_DIR
)/.prep
83 $(RM
) -r
$(@D
) ; $(MKDIR
) $(@D
)
84 $(CLONEY
) $(SOURCE_DIR
) $(@D
)
85 (cd
$(@D
) ; $(SCONS
) $(COMPONENT_BUILD_ARGS
))
88 configure
: $(CONFIGURE_64
)
92 # As there aren't many files, just get them out of the build directory.
98 REQUIRED_PACKAGES
+= developer
/build
/scons
100 # Auto-generated dependencies
101 REQUIRED_PACKAGES
+= library
/apr
102 REQUIRED_PACKAGES
+= library
/apr-util
103 REQUIRED_PACKAGES
+= library
/expat
104 REQUIRED_PACKAGES
+= library
/openldap
105 REQUIRED_PACKAGES
+= library
/security
/openssl-31
106 REQUIRED_PACKAGES
+= library
/zlib
107 REQUIRED_PACKAGES
+= system
/library
108 REQUIRED_PACKAGES
+= system
/library
/math