|
1 # |
|
2 # CDDL HEADER START |
|
3 # |
|
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. |
|
7 # |
|
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. |
|
12 # |
|
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] |
|
18 # |
|
19 # CDDL HEADER END |
|
20 # |
|
21 # Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. |
|
22 # |
|
23 include ../../make-rules/shared-macros.mk |
|
24 |
|
25 COMPONENT_NAME = curl |
|
26 COMPONENT_VERSION= 7.21.2 |
|
27 COMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION) |
|
28 COMPONENT_PROJECT_URL= http://curl.haxx.se/ |
|
29 COMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz |
|
30 COMPONENT_ARCHIVE_HASH= sha1:af8182165d7a0d16b97e2c2936ed92f3ba5c868c |
|
31 COMPONENT_ARCHIVE_URL= http://curl.haxx.se/download/$(COMPONENT_ARCHIVE) |
|
32 |
|
33 include ../../make-rules/prep.mk |
|
34 include ../../make-rules/configure.mk |
|
35 include ../../make-rules/ips.mk |
|
36 |
|
37 PKG_CONFIG_PATH_32 = /usr/lib/pkgconfig |
|
38 PKG_CONFIG_PATH_64 = /usr/lib/$(MACH64)/pkgconfig |
|
39 |
|
40 PATCH_LEVEL = 0 |
|
41 |
|
42 LIBNAME = $(COMPONENT_NAME) |
|
43 LINTOUT = lint.out |
|
44 |
|
45 GSSAPI_LIBDIR_32 = /usr/lib |
|
46 GSSAPI_LIBDIR_64 = /usr/lib/$(MACH64) |
|
47 |
|
48 # Enable C99 mode |
|
49 studio_C99MODE = $(studio_C99_ENABLE) |
|
50 |
|
51 # And we want -Xc too |
|
52 CFLAGS += $(CC_BITS) -Xc -xnorunpath $(XPG6MODE) |
|
53 CFLAGS += $(CPP_POSIX) $(CPP_LARGEFILES) |
|
54 CPPFLAGS += $(CPP_POSIX) $(CPP_LARGEFILES) -D__EXTENSIONS__=1 -DNDEBUG |
|
55 LDFLAGS += -lpthread -lc -lm -lgss -lsocket -lresolv -lnsl -lgen |
|
56 |
|
57 CONFIGURE_ENV += CPP="$(CC) $(CPPFLAGS) $(CFLAGS) -E" |
|
58 CONFIGURE_ENV += CFLAGS="$(CFLAGS)" |
|
59 CONFIGURE_ENV += CPPFLAGS="$(CPPFLAGS)" |
|
60 CONFIGURE_ENV += CCLD="$(CC) $(CFLAGS) $(LDFLAGS)" |
|
61 CONFIGURE_ENV += LDFLAGS="$(LDFLAGS)" |
|
62 CONFIGURE_ENV += PKG_CONFIG_PATH="$(PKG_CONFIG_PATH_$(BITS))" |
|
63 |
|
64 CONFIGURE_OPTIONS += --localstatedir=/var --enable-shared --disable-static |
|
65 CONFIGURE_OPTIONS += --enable-http --enable-ftp |
|
66 CONFIGURE_OPTIONS += --enable-file --enable-dict |
|
67 CONFIGURE_OPTIONS += --enable-manual --disable-libgcc |
|
68 CONFIGURE_OPTIONS += --enable-rtsp --enable-proxy |
|
69 CONFIGURE_OPTIONS += --enable-telnet --enable-tftp --enable-pop3 |
|
70 CONFIGURE_OPTIONS += --enable-imap --enable-smtp |
|
71 CONFIGURE_OPTIONS += --enable-ipv6 --enable-nonblocking |
|
72 CONFIGURE_OPTIONS += --enable-thread --enable-verbose |
|
73 CONFIGURE_OPTIONS += --disable-sspi --enable-crypto-auth |
|
74 CONFIGURE_OPTIONS += --enable-cookies --disable-hidden-symbols |
|
75 CONFIGURE_OPTIONS += --disable-soname-bump |
|
76 CONFIGURE_OPTIONS += --enable-ldap --with-random=/dev/urandom |
|
77 CONFIGURE_OPTIONS += --with-ssl --with-ldap-lib=ldap |
|
78 CONFIGURE_OPTIONS += --with-lber-lib=sldap |
|
79 CONFIGURE_OPTIONS += --with-gssapi-includes=/usr/include/gssapi |
|
80 CONFIGURE_OPTIONS += --with-gssapi-libs=$(GSSAPI_LIBDIR_$(BITS)) |
|
81 CONFIGURE_OPTIONS += --with-gssapi=/usr --without-ca-bundle |
|
82 CONFIGURE_OPTIONS += --with-ca-path=/etc/openssl/certs |
|
83 CONFIGURE_OPTIONS += --with-zlib=/usr --with-libidn=/usr |
|
84 CONFIGURE_OPTIONS += --with-pic |
|
85 CONFIGURE_OPTIONS += "curl_disallow_getifaddrs=yes" |
|
86 |
|
87 PKG_PROTO_DIRS += $(COMPONENT_SRC) |
|
88 |
|
89 COMPONENT_POST_BUILD_ACTION = \ |
|
90 ( cd $(@D) ; \ |
|
91 $(LINT) -nsvx $(CC_BITS) -o $(LIBNAME) -I$(@D) \ |
|
92 -I$(COMPONENT_DIR)/$(COMPONENT_SRC)/include \ |
|
93 -I$(COMPONENT_DIR)/$(COMPONENT_SRC) \ |
|
94 $(COMPONENT_DIR)/llib-l$(LIBNAME) > $(LINTOUT) 2>&1) |
|
95 |
|
96 COMPONENT_POST_INSTALL_ACTION = \ |
|
97 ( $(CP) $(COMPONENT_DIR)/llib-l$(LIBNAME) $(PROTOUSRLIBDIR)/ ; \ |
|
98 cd $(@D); $(INSTALL) llib-l$(LIBNAME).ln \ |
|
99 $(PROTO_DIR)/$(CONFIGURE_LIBDIR.$(BITS)) ) |
|
100 |
|
101 PROTOUSRBINDIR64 = $(PROTOUSRBINDIR)/$(MACH64) |
|
102 PROTOUSRSHAREDOCDIR1 = $(PROTOUSRSHAREDIR)/doc/curl/html |
|
103 PROTOUSRSHAREDOCDIR2 = $(PROTOUSRSHAREDIR)/doc/libcurl/html |
|
104 |
|
105 build: $(BUILD_32_and_64) |
|
106 |
|
107 HTMLDOCLIST1 = curl.html curl-config.html index.html |
|
108 HTMLDOCLIST2 = curl_easy_cleanup.html curl_easy_duphandle.html \ |
|
109 curl_easy_escape.html curl_easy_getinfo.html \ |
|
110 curl_easy_init.html curl_easy_pause.html \ |
|
111 curl_easy_perform.html curl_easy_recv.html \ |
|
112 curl_easy_reset.html curl_easy_send.html \ |
|
113 curl_easy_setopt.html curl_easy_strerror.html \ |
|
114 curl_easy_unescape.html curl_escape.html \ |
|
115 curl_formadd.html curl_formfree.html \ |
|
116 curl_formget.html curl_free.html \ |
|
117 curl_getdate.html curl_getenv.html \ |
|
118 curl_global_cleanup.html curl_global_init.html \ |
|
119 curl_global_init_mem.html curl_mprintf.html \ |
|
120 curl_multi_add_handle.html curl_multi_assign.html \ |
|
121 curl_multi_cleanup.html curl_multi_fdset.html \ |
|
122 curl_multi_info_read.html curl_multi_init.html \ |
|
123 curl_multi_perform.html curl_multi_remove_handle.html \ |
|
124 curl_multi_setopt.html curl_multi_socket.html \ |
|
125 curl_multi_socket_action.html curl_multi_strerror.html \ |
|
126 curl_multi_timeout.html curl_share_cleanup.html \ |
|
127 curl_share_init.html curl_share_setopt.html \ |
|
128 curl_share_strerror.html curl_slist_append.html \ |
|
129 curl_slist_free_all.html curl_strequal.html \ |
|
130 curl_unescape.html curl_version.html \ |
|
131 curl_version_info.html index.html \ |
|
132 libcurl-easy.html libcurl-errors.html \ |
|
133 libcurl-multi.html libcurl-share.html \ |
|
134 libcurl-tutorial.html libcurl.html |
|
135 |
|
136 MAN1LIST = curl-config.1 curl.1 |
|
137 MAN3LIST = curl_easy_cleanup.3 curl_easy_duphandle.3 \ |
|
138 curl_easy_escape.3 curl_easy_getinfo.3 \ |
|
139 curl_easy_init.3 curl_easy_pause.3 \ |
|
140 curl_easy_perform.3 curl_easy_recv.3 \ |
|
141 curl_easy_reset.3 curl_easy_send.3 \ |
|
142 curl_easy_setopt.3 curl_easy_strerror.3 \ |
|
143 curl_easy_unescape.3 curl_escape.3 \ |
|
144 curl_formadd.3 curl_formfree.3 \ |
|
145 curl_formget.3 curl_free.3 \ |
|
146 curl_getdate.3 curl_getenv.3 \ |
|
147 curl_global_cleanup.3 curl_global_init.3 \ |
|
148 curl_global_init_mem.3 curl_mprintf.3 \ |
|
149 curl_multi_add_handle.3 curl_multi_assign.3 \ |
|
150 curl_multi_cleanup.3 curl_multi_fdset.3 \ |
|
151 curl_multi_info_read.3 curl_multi_init.3 \ |
|
152 curl_multi_perform.3 curl_multi_remove_handle.3 \ |
|
153 curl_multi_setopt.3 curl_multi_socket.3 \ |
|
154 curl_multi_socket_action.3 curl_multi_strerror.3 \ |
|
155 curl_multi_timeout.3 curl_share_cleanup.3 \ |
|
156 curl_share_init.3 curl_share_setopt.3 \ |
|
157 curl_share_strerror.3 curl_slist_append.3 \ |
|
158 curl_slist_free_all.3 curl_strequal.3 \ |
|
159 curl_unescape.3 curl_version.3 \ |
|
160 curl_version_info.3 libcurl-easy.3 \ |
|
161 libcurl-errors.3 libcurl-multi.3 \ |
|
162 libcurl-share.3 libcurl-tutorial.3 libcurl.3 |
|
163 |
|
164 GSED = /usr/gnu/bin/sed |
|
165 |
|
166 include ../../make-rules/shared-targets.mk |
|
167 |
|
168 install: $(INSTALL_32_and_64) |
|
169 $(MKDIR) $(PROTOUSRSHAREDOCDIR1) ; \ |
|
170 list1='$(HTMLDOCLIST1)' ; for f in $$list1; do \ |
|
171 $(INSTALL) -m 0644 $(COMPONENT_DIR)/$(COMPONENT_SRC)/docs/$$f \ |
|
172 $(PROTOUSRSHAREDOCDIR1)/ ; \ |
|
173 done |
|
174 $(MKDIR) $(PROTOUSRSHAREDOCDIR2) ; \ |
|
175 list2='$(HTMLDOCLIST2)' ; for f in $$list2; do \ |
|
176 $(INSTALL) -m 0644 \ |
|
177 $(COMPONENT_DIR)/$(COMPONENT_SRC)/docs/libcurl/$$f \ |
|
178 $(PROTOUSRSHAREDOCDIR2)/ ; \ |
|
179 done |
|
180 $(MKDIR) $(PROTOUSRSHAREMAN1DIR) ; \ |
|
181 list3='$(MAN1LIST)'; for f in $$list3; do \ |
|
182 $(GSED) -f oracleman-stability \ |
|
183 $(PROTOUSRSHAREMAN1DIR)/$$f > \ |
|
184 $(PROTOUSRSHAREMAN1DIR)/$$f.sed 2>&1 ; \ |
|
185 $(CP) -fp $(PROTOUSRSHAREMAN1DIR)/$$f.sed \ |
|
186 $(PROTOUSRSHAREMAN1DIR)/$$f ; \ |
|
187 $(RM) -f $(PROTOUSRSHAREMAN1DIR)/$$f.sed ; \ |
|
188 done |
|
189 $(MKDIR) $(PROTOUSRSHAREMAN3DIR) ; \ |
|
190 list4='$(MAN3LIST)'; for f in $$list4; do \ |
|
191 $(GSED) -f oracleman-stability \ |
|
192 $(PROTOUSRSHAREMAN3DIR)/$$f > \ |
|
193 $(PROTOUSRSHAREMAN3DIR)/$$f.sed 2>&1 ; \ |
|
194 $(CP) -fp $(PROTOUSRSHAREMAN3DIR)/$$f.sed \ |
|
195 $(PROTOUSRSHAREMAN3DIR)/$$f ; \ |
|
196 $(RM) -f $(PROTOUSRSHAREMAN3DIR)/$$f.sed ; \ |
|
197 done |
|
198 $(RM) $(PROTOUSRBINDIR)/curl-config ; \ |
|
199 $(INSTALL) -m 0755 $(COMPONENT_DIR)/Solaris/curl-config \ |
|
200 $(PROTOUSRBINDIR)/ |
|
201 $(RM) $(PROTOUSRBINDIR64)/curl-config |
|
202 $(GSED) -e "s#MACH64#$(MACH64)#g" \ |
|
203 $(COMPONENT_DIR)/Solaris/curl-config-64 > \ |
|
204 $(COMPONENT_DIR)/curl-config |
|
205 $(INSTALL) -m 0755 \ |
|
206 $(COMPONENT_DIR)/curl-config $(PROTOUSRBINDIR64)/ |
|
207 $(RM) $(COMPONENT_DIR)/curl-config |
|
208 |
|
209 test: $(BUILD_32_and_64) |
|
210 @cd $(BUILD_DIR_32); $(GMAKE) check |
|
211 @cd $(BUILD_DIR_64); $(GMAKE) check |
|
212 |
|
213 BUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS) |
|
214 |
|
215 include ../../make-rules/depend.mk |
|
216 |