summaryrefslogtreecommitdiff
path: root/www/curl/Makefile
blob: e22468cb095ea61fee127b632b24282c8aca0422 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# $NetBSD: Makefile,v 1.78 2008/01/18 05:09:48 tnn Exp $

DISTNAME=	curl-7.17.1
PKGREVISION=	1
CATEGORIES=	www
MASTER_SITES=	http://curl.haxx.se/download/ \
		ftp://ftp.sunet.se/pub/www/utilities/curl/
EXTRACT_SUFX=	.tar.bz2

MAINTAINER=	recht@NetBSD.org
HOMEPAGE=	http://curl.haxx.se/
COMMENT=	Client that groks URLs

PKG_INSTALLATION_TYPES=	overwrite pkgviews
PKG_DESTDIR_SUPPORT=	user-destdir

# list it into IPv6-ready packages
BUILD_DEFS+=	IPV6_READY

USE_LIBTOOL=		yes
GNU_CONFIGURE=		yes
CONFIGURE_ARGS+=	--with-ssl=${BUILDLINK_PREFIX.openssl}
CONFIGURE_ARGS+=	--with-zlib=${BUILDLINK_PREFIX.zlib}
# Work around an ICE on sparc64 with gcc2
CONFIGURE_ENV+=		F77=${FALSE:Q}

.include "../../mk/bsd.prefs.mk"

.if !empty(PKGSRC_RUN_TEST:M[Yy][Ee][Ss])
TEST_TARGET=		check
USE_TOOLS+=		perl
.endif

.include "options.mk"

post-configure:
	if ${GREP} '#define HAVE_SYS_SELECT_H 1' ${WRKSRC}/src/config.h \
		>/dev/null; \
	then \
	    line='#include <sys/select.h>'; \
	else \
	    line='/* sys/select.h not included because it does not exist */'; \
	fi; \
	${SED} -e "s|__INCLUDE_SYS_SELECT_H__|$${line}|" \
	       <${WRKSRC}/include/curl/multi.h \
	       >${WRKSRC}/include/curl/multi.h.new; \
	${MV} ${WRKSRC}/include/curl/multi.h.new \
	      ${WRKSRC}/include/curl/multi.h

post-install:
	${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/share/doc/curl
	for _f in MANUAL TheArtOfHttpScripting FAQ			\
		curl-config.pdf curl.pdf; do				\
		${INSTALL_DATA} ${WRKSRC}/docs/$${_f}			\
			 ${DESTDIR}${PREFIX}/share/doc/curl/${_f};	\
	done
	${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/share/examples/curl
	for _f in ${WRKSRC}/docs/examples/*.c				\
		${WRKSRC}/docs/examples/README; do			\
		${INSTALL_DATA} $${_f} 					\
			${DESTDIR}${PREFIX}/share/examples/curl;	\
	done

.include "../../devel/libidn/buildlink3.mk"
.include "../../devel/zlib/buildlink3.mk"
.include "../../security/openssl/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"