# vim: ft=make ts=4 sw=4 noet
.DEFAULT_GOAL := all

NAME    = curl
VERSION = 8.20.0
GARTYPE = v2

DESCRIPTION = Command line tool and library for transferring data with URLs
define BLURB
  curl is a tool and library for transferring data with URL syntax, supporting
  HTTP, HTTPS, FTP, and more. Links against OZSWopenssl and OZSWzlib.
endef

MASTER_SITES  = http://curl.se/download/
DISTFILES    += $(DISTNAME).tar.gz

LICENSE = COPYING

RUNTIME_DEP_PKGS_OZSWcurl += OZSWopenssl OZSWzlib
BUILD_DEP_PKGS += OZSWopenssl OZSWzlib

PACKAGES            += OZSWcurl
SPKG_DESC_OZSWcurl   = cURL data transfer tool and library
CATALOGNAME_OZSWcurl = curl

EXTENSIONS = 1

CONFIGURE_ARGS  = --prefix=$(prefix)
CONFIGURE_ARGS += --with-ssl=$(BUILD_PREFIX)
CONFIGURE_ARGS += --with-zlib=$(BUILD_PREFIX)
CONFIGURE_ARGS += --with-ca-bundle=$(sysconfdir)/ssl/certs/cacert.pem
CONFIGURE_ARGS += --without-libpsl
CONFIGURE_ARGS += --disable-ldap
CONFIGURE_ARGS += --disable-ldaps

post-configure:
	@find $(WORKSRC) -name "libtool" -type f -exec \
	    gsed -i 's/ECHO="print -r --"/ECHO="printf %s\\n"/g' {} \;
	@$(MAKECOOKIE)

include gar/category.mk
