aboutsummaryrefslogtreecommitdiff
path: root/net/xmlrpc-c/Makefile
blob: 3adb1ea2a4b8657a37f2421ca4a0046713c8b04f (plain) (blame)
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
# Created by: Ying-Chieh Liao <ijliao@FreeBSD.org>
# $FreeBSD$

PORTNAME=	xmlrpc-c
PORTVERSION=	1.39.10
CATEGORIES=	net
MASTER_SITES=	SF/${PORTNAME}/Xmlrpc-c%20Super%20Stable/${PORTVERSION}

MAINTAINER=	garga@FreeBSD.org
COMMENT=	XML-RPC library for C and C++

LICENSE=	BSD3CLAUSE

OPTIONS_DEFINE=	DEBUG CURL LIBWWW CPLUSPLUS
OPTIONS_DEFAULT=CURL LIBWWW CPLUSPLUS

LIBWWW_DESC=	Compile with libwww support
CPLUSPLUS_DESC=	Build xmlrpc-c c++ libs and tools

CONFLICTS=	xmlrpc-epi-0.*

USES=		gmake tar:tgz
OPTIONS_SUB=	yes
GNU_CONFIGURE=	yes
MAKEFILE=	GNUmakefile
MAKE_JOBS_UNSAFE=	yes
MAKE_ENV+=	INSTALL_SHLIB="${INSTALL_LIB}" \
		INSTALL_SCRIPT="${INSTALL_SCRIPT}"
USE_LDCONFIG=	yes

CURL_LIB_DEPENDS=	libcurl.so:ftp/curl
CURL_CONFIGURE_ENABLE=	curl-client
LIBWWW_LIB_DEPENDS=	libwwwcore.so:www/libwww
LIBWWW_CONFIGURE_ENABLE=libwww-client
LIBWWW_CONFIGURE_WITH=	libwww-ssl
CPLUSPLUS_CONFIGURE_ENABLE=	cplusplus

LDFLAGS+=	-lm

.include <bsd.port.pre.mk>

.if empty(PORT_OPTIONS:MDEBUG)
CFLAGS+=	-DNDEBUG
.endif

.if empty(PORT_OPTIONS:MLIBWWW) && empty(PORT_OPTIONS:MCURL)
PLIST_SUB+=	CLIENT="@comment "
.else
PLIST_SUB+=	CLIENT=""
.endif

post-extract:
	@${FIND} ${WRKSRC} -type l -name blddir -delete
	@${FIND} ${WRKSRC} -type l -name srcdir -delete

post-patch:
	@${REINPLACE_CMD} -e '/#include.*features.h/ s/features.h/sys\/cdefs.h/' \
		${WRKSRC}/tools/xmlrpc_pstream/xmlrpc_pstream.cpp
	@${REINPLACE_CMD} -e '/define _XOPEN_SOURCE 600/ s,^,//,' \
		${WRKSRC}/src/xmlrpc_server_abyss.c
	@${REINPLACE_CMD} -e 's,sys/unistd.h,unistd.h,' \
		${WRKSRC}/test/cpp/server_abyss.cpp
	@${REINPLACE_CMD} -e '/^INSTALL_/s/=/\?=/' \
		${WRKSRC}/config.mk.in

.include <bsd.port.post.mk>