| 1 | NAME = curl |
|---|
| 2 | VERSION = 7.25.0 |
|---|
| 3 | CATEGORIES = net |
|---|
| 4 | GARTYPE = v2 |
|---|
| 5 | |
|---|
| 6 | DESCRIPTION = Command line tool and library for client-side URL transfers |
|---|
| 7 | define BLURB |
|---|
| 8 | curl and libcurl is a tool for transferring files using URL syntax. It |
|---|
| 9 | supports HTTP, HTTPS, FTP, FTPS, DICT, TELNET, LDAP, FILE, and GOPHER, as |
|---|
| 10 | well as HTTP-post, HTTP-put, cookies, FTP upload, resumed transfers, |
|---|
| 11 | passwords, portnumbers, SSL certificates, Kerberos, and proxies. It is |
|---|
| 12 | powered by libcurl, the client-side URL transfer library. There are |
|---|
| 13 | bindings/interfaces to libcurl for more than a dozen languages and |
|---|
| 14 | environments. |
|---|
| 15 | endef |
|---|
| 16 | |
|---|
| 17 | MASTER_SITES = http://curl.haxx.se/download/ |
|---|
| 18 | DISTFILES = $(NAME)-$(VERSION).tar.bz2 |
|---|
| 19 | |
|---|
| 20 | FOREIGN_PACKAGES += CSWlibcurl2 |
|---|
| 21 | OBSOLETED_BY_CSWlibcurl2 += CSWcurlrt |
|---|
| 22 | CATALOGNAME_CSWcurlrt = curl_rt_stub |
|---|
| 23 | |
|---|
| 24 | FOREIGN_PACKAGES += CSWlibcurl3 |
|---|
| 25 | OBSOLETED_BY_CSWlibcurl3 += CSWcurlrt |
|---|
| 26 | |
|---|
| 27 | PACKAGES += CSWlibcurl4 |
|---|
| 28 | CATALOGNAME_CSWlibcurl4 = libcurl4 |
|---|
| 29 | SPKG_DESC_CSWlibcurl4 = Library for client-side URL transfers, libcurl.so.4 |
|---|
| 30 | PKGFILES_CSWlibcurl4 = $(call pkgfiles_lib,libcurl.so.4) |
|---|
| 31 | OBSOLETED_BY_CSWlibcurl4 = CSWcurlrt |
|---|
| 32 | RUNTIME_DEP_PKGS_CSWlibcurl4 += CSWlibssl0-9-8 |
|---|
| 33 | RUNTIME_DEP_PKGS_CSWlibcurl4 += CSWlibz1 |
|---|
| 34 | RUNTIME_DEP_PKGS_CSWlibcurl4 += CSWlibidn11 |
|---|
| 35 | |
|---|
| 36 | PACKAGES += CSWlibcurl4-feature |
|---|
| 37 | CATALOGNAME_CSWlibcurl4-feature = libcurl4_feature |
|---|
| 38 | SPKG_DESC_CSWlibcurl4-feature = Full-features library for client-side URL transfers superseding libcurl.so.4 |
|---|
| 39 | PKGFILES_CSWlibcurl4-feature = $(call pkgfiles_lib,libcurl-feature.so.4) |
|---|
| 40 | RUNTIME_DEP_PKGS_CSWlibcurl4-feature += CSWlibz1 |
|---|
| 41 | RUNTIME_DEP_PKGS_CSWlibcurl4-feature += CSWlibfbopenssl0 |
|---|
| 42 | RUNTIME_DEP_PKGS_CSWlibcurl4-feature += CSWlibidn11 |
|---|
| 43 | RUNTIME_DEP_PKGS_CSWlibcurl4-feature += CSWlibssl0-9-8 |
|---|
| 44 | RUNTIME_DEP_PKGS_CSWlibcurl4-feature += CSWliblber2-4-2 |
|---|
| 45 | RUNTIME_DEP_PKGS_CSWlibcurl4-feature += CSWlibldap2-4-2 |
|---|
| 46 | RUNTIME_DEP_PKGS_CSWlibcurl4-feature += CSWlibssh2-1 |
|---|
| 47 | RUNTIME_DEP_PKGS_CSWlibcurl4-feature += CSWlibcares2 |
|---|
| 48 | RUNTIME_DEP_PKGS_CSWlibcurl4-feature += CSWlibrtmp0 |
|---|
| 49 | # Without the base lib the feature lib is not pulled in |
|---|
| 50 | RUNTIME_DEP_PKGS_CSWlibcurl4-feature += CSWlibcurl4 |
|---|
| 51 | # There is no dependency from feature to base as feature is an optional dependency |
|---|
| 52 | CHECKPKG_OVERRIDES_CSWlibcurl4-feature += surplus-dependency|CSWlibcurl4 |
|---|
| 53 | |
|---|
| 54 | # These are artifacts of the feature lib being a regular one. |
|---|
| 55 | # As it is never linked against the soname doesn't matter here and the package name |
|---|
| 56 | # is obviously different from the soname in this case. |
|---|
| 57 | CHECKPKG_OVERRIDES_CSWlibcurl4-feature += shared-lib-pkgname-mismatch |
|---|
| 58 | CHECKPKG_OVERRIDES_CSWlibcurl4-feature += soname-not-part-of-filename |
|---|
| 59 | |
|---|
| 60 | PACKAGES += CSWlibcurl-dev |
|---|
| 61 | CATALOGNAME_CSWlibcurl-dev = libcurl_dev |
|---|
| 62 | SPKG_DESC_CSWlibcurl-dev = Development files for libcurl.so.4 |
|---|
| 63 | PKGFILES_CSWlibcurl-dev = $(PKGFILES_DEVEL) |
|---|
| 64 | RUNTIME_DEP_PKGS_CSWlibcurl-dev = CSWlibcurl4 |
|---|
| 65 | OBSOLETED_BY_CSWlibcurl-dev = CSWcurldevel |
|---|
| 66 | CATALOGNAME_CSWcurldevel = curl_devel_stub |
|---|
| 67 | |
|---|
| 68 | PACKAGES += CSWcurl |
|---|
| 69 | CATALOGNAME_CSWcurl = curl |
|---|
| 70 | SPKG_DESC_CSWcurl = A command line tool and library for client-side URL transfers |
|---|
| 71 | # PKGFILES is catchall |
|---|
| 72 | RUNTIME_DEP_PKGS_CSWcurl += CSWlibz1 |
|---|
| 73 | RUNTIME_DEP_PKGS_CSWcurl += CSWlibidn11 |
|---|
| 74 | RUNTIME_DEP_PKGS_CSWcurl += CSWlibcurl4 |
|---|
| 75 | RUNTIME_DEP_PKGS_CSWcurl += CSWlibssl0-9-8 |
|---|
| 76 | # Double-legacy packages may not even depend on CSWcurlrt, so we must |
|---|
| 77 | # also directly depend on CSWlibcurl2 and CSWlibcurl3 |
|---|
| 78 | RUNTIME_DEP_PKGS_CSWcurl += CSWlibcurl2 |
|---|
| 79 | RUNTIME_DEP_PKGS_CSWcurl += CSWlibcurl3 |
|---|
| 80 | CHECKPKG_OVERRIDES_CSWcurl += surplus-dependency|CSWlibcurl2 |
|---|
| 81 | CHECKPKG_OVERRIDES_CSWcurl += surplus-dependency|CSWlibcurl3 |
|---|
| 82 | |
|---|
| 83 | BUILD_DEP_PKGS += CSWopenldap-dev |
|---|
| 84 | BUILD_DEP_PKGS += CSWlibssl-dev |
|---|
| 85 | BUILD_DEP_PKGS += CSWlibcares-dev |
|---|
| 86 | BUILD_DEP_PKGS += CSWlibssh2-dev |
|---|
| 87 | BUILD_DEP_PKGS += CSWlibfbopenssl-dev |
|---|
| 88 | BUILD_DEP_PKGS += CSWlibrtmp-dev |
|---|
| 89 | |
|---|
| 90 | VENDOR_URL = http://curl.haxx.se |
|---|
| 91 | |
|---|
| 92 | EXTRA_MODULATORS = FEATURES |
|---|
| 93 | MODULATIONS_FEATURES = minimal full |
|---|
| 94 | |
|---|
| 95 | EXTRA_CONFIGURE_ARGS_features-minimal += --disable-ldap |
|---|
| 96 | EXTRA_CONFIGURE_ARGS_features-minimal += --without-libssh2 |
|---|
| 97 | EXTRA_CONFIGURE_ARGS_features-minimal += --disable-ares |
|---|
| 98 | EXTRA_CONFIGURE_ARGS_features-minimal += --without-librtmp |
|---|
| 99 | |
|---|
| 100 | EXTRA_CONFIGURE_ARGS_features-full += --enable-ares |
|---|
| 101 | EXTRA_CONFIGURE_ARGS_features-full += --with-spnego=$(libdir) |
|---|
| 102 | EXTRA_CONFIGURE_ARGS_features-full += --enable-ldap |
|---|
| 103 | EXTRA_CONFIGURE_ARGS_features-full += --enable-ldaps |
|---|
| 104 | |
|---|
| 105 | # Make sure to link to the new libnet. See for details http://wiki.opencsw.org/project-libnet |
|---|
| 106 | EXTRA_LDFLAGS = -L$(libdir)/libnet-new |
|---|
| 107 | |
|---|
| 108 | CONFIGURE_ARGS = $(DIRPATHS) |
|---|
| 109 | CONFIGURE_ARGS += --disable-static |
|---|
| 110 | CONFIGURE_ARGS += --with-ssl=/opt/csw/ssl |
|---|
| 111 | CONFIGURE_ARGS += --with-ca-path=/opt/csw/ssl/certs |
|---|
| 112 | CONFIGURE_ARGS += $(EXTRA_CONFIGURE_ARGS_features-$(FEATURES)) |
|---|
| 113 | |
|---|
| 114 | BUILD64 = 1 |
|---|
| 115 | |
|---|
| 116 | # There are some failing tests, ignore for now |
|---|
| 117 | SKIPTEST ?= 1 |
|---|
| 118 | |
|---|
| 119 | # We do special 32/64 merging for this one, see post-merge |
|---|
| 120 | EXTRA_MERGE_EXCLUDE_FILES += $(includedir)/curl/curlbuild.h |
|---|
| 121 | |
|---|
| 122 | EXTRA_PAX_ARGS_isa-default-features-full += -s ",.*/libcurl\.so(\.\d+)?$$,," -s ",\(\.$(libdir)/libcurl\)\(\.so\.\d+\..*\),\1-feature\2,p" |
|---|
| 123 | EXTRA_PAX_ARGS_isa-extra-features-full += -s ",.*/libcurl\.so(\.\d+)?$$,," -s ",\.$(libdir)/libcurl\(\.so\.\d+\..*\),.$(libdir_install)/$(ISA)/libcurl-feature\1,p" |
|---|
| 124 | |
|---|
| 125 | # We select pkgconfig for minimal library bindings. As libneon is self-contained (links |
|---|
| 126 | # to all necessary libs directly) the full version can simly be linked in. |
|---|
| 127 | EXTRA_PAX_ARGS_features-full = -s ",.*/pkgconfig.*,," |
|---|
| 128 | EXTRA_PAX_ARGS += $(EXTRA_PAX_ARGS_features-$(FEATURES)) |
|---|
| 129 | |
|---|
| 130 | MERGE_SCRIPTS_isa-default-features-minimal = copy-all |
|---|
| 131 | MERGE_SCRIPTS_isa-default64-features-minimal = copy-relocated-only copy-config-only |
|---|
| 132 | MERGE_DIRS_isa-default64-features-minimal = $(libdir) |
|---|
| 133 | MERGE_SCRIPTS_isa-default-features-full = copy-only |
|---|
| 134 | MERGE_DIRS_isa-default-features-full = $(libdir) |
|---|
| 135 | MERGE_SCRIPTS_isa-default64-features-full = copy-relocated-only |
|---|
| 136 | MERGE_DIRS_isa-default64-features-full = $(libdir) |
|---|
| 137 | |
|---|
| 138 | # TBD: Use alternatives on curl-config between minimal and feature as it is possible to |
|---|
| 139 | # use options to find out about installed features and protocols by calling it. |
|---|
| 140 | |
|---|
| 141 | include gar/category.mk |
|---|
| 142 | |
|---|
| 143 | # These are not really necessary and they confuse the linker as described in #4550 |
|---|
| 144 | $(GARCOMPILER)_LD_FLAGS := |
|---|
| 145 | |
|---|
| 146 | # Rebuild the minimal library with AUX linkage to feature library |
|---|
| 147 | post-build-isa-sparcv8-features-minimal post-build-isa-sparcv9-features-minimal post-build-isa-i386-features-minimal post-build-isa-amd64-features-minimal: EXTRA_LD_OPTIONS = -f libcurl-feature.so.4 |
|---|
| 148 | post-build-isa-sparcv8-features-minimal post-build-isa-sparcv9-features-minimal post-build-isa-i386-features-minimal post-build-isa-amd64-features-minimal: |
|---|
| 149 | rm -f $(WORKSRC)/lib/libcurl.la |
|---|
| 150 | $(BUILD_ENV) $(MAKE) $(PARALLELMFLAGS) $(foreach TTT,$(BUILD_OVERRIDE_VARS),$(TTT)="$(BUILD_OVERRIDE_VAR_$(TTT))") $(foreach TTT,$(BUILD_OVERRIDE_DIRS),$(TTT)="$($(TTT))") -C $(WORKSRC)/lib $(BUILD_ARGS) |
|---|
| 151 | @$(MAKECOOKIE) |
|---|
| 152 | |
|---|
| 153 | post-merge: |
|---|
| 154 | @# This is needed because the substitutions from pax args do not change the |
|---|
| 155 | @# contents of the symlink |
|---|
| 156 | rm -f $(PKGROOT)$(libdir)/libcurl-feature.so.4 |
|---|
| 157 | ln -s libcurl-feature.so.4.2.0 $(PKGROOT)$(libdir)/libcurl-feature.so.4 |
|---|
| 158 | rm -f $(PKGROOT)$(libdir)/$(ISA_DEFAULT64)/libcurl-feature.so.4 |
|---|
| 159 | ln -s libcurl-feature.so.4.2.0 $(PKGROOT)$(libdir)/$(ISA_DEFAULT64)/libcurl-feature.so.4 |
|---|
| 160 | pwd |
|---|
| 161 | gdiff -D 64bit \ |
|---|
| 162 | $(WORKROOTDIR)/install-isa-$(ISA_DEFAULT64)-features-minimal$(includedir)/curl/curlbuild.h \ |
|---|
| 163 | $(WORKROOTDIR)/install-isa-$(ISA_DEFAULT)-features-minimal$(includedir)/curl/curlbuild.h \ |
|---|
| 164 | | sed -e 's/ifndef 64bit/if defined __amd64 || defined __x86_64 || defined __sparcv9/' \ |
|---|
| 165 | > $(PKGROOT)$(includedir)/curl/curlbuild.h |
|---|
| 166 | @$(MAKECOOKIE) |
|---|