summaryrefslogtreecommitdiff
path: root/devel/poco-devel/Makefile
blob: c33f20b04050f94db35571300fc69fc8714c56bd (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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# Created by: Joseph Benden <joe@thrallingpenguin.com>
# $FreeBSD$

PORTNAME=	poco
PORTVERSION=	1.6.0
DISTVERSIONPREFIX=	${PORTNAME}-
DISTVERSIONSUFFIX=	-release
CATEGORIES=	devel net
PKGNAMESUFFIX=	-devel

MAINTAINER=	joe@thrallingpenguin.com
COMMENT=	C++ Portable Components library

LICENSE=	BSL

BUILD_DEPENDS=	bash:shells/bash
LIB_DEPENDS=	libpcre.so:devel/pcre \
		libexpat.so:textproc/expat2

CONFLICTS=	poco-ssl-[0-9]* poco-[0-9]*

USE_GITHUB=	yes
GH_ACCOUNT=	pocoproject

OPTIONS_DEFAULT=	MYSQL IODBC SQLITE

OPTIONS_DEFINE=	MYSQL SQLITE
SAMPLES_DESC=	Build sample programs
UODBC_DESC=	Build with ODBC driver
IODBC_DESC=	Build with iODBC driver

OPTIONS_RADIO=	ODBC
OPTIONS_RADIO_ODBC=	UODBC IODBC
ODBC_DESC=	ODBC Driver

GNU_CONFIGURE=	yes
CONFIGURE_ARGS=	--config=FreeBSD --unbundled --no-tests --no-samples
USES=		gmake
USE_LDCONFIG=	yes
USE_OPENSSL=	yes
MAKE_JOBS_UNSAFE=true

MAKE_ARGS=	CXX=c++ CC=cc POCO_ODBC_LIB=${LOCALBASE}/lib

.include <bsd.port.options.mk>

.if ! ${PORT_OPTIONS:MUODBC} && ! ${PORT_OPTIONS:MIODBC}
CONFIGURE_ARGS+=	--omit=Data/ODBC
.endif

.if ${PORT_OPTIONS:MUODBC} && ! ${PORT_OPTIONS:MIODBC}
LIB_DEPENDS+=	libodbcinst.so:databases/unixODBC
.endif

.if ${PORT_OPTIONS:MIODBC} && ! ${PORT_OPTIONS:MUODBC}
LIB_DEPENDS+=	libiodbc.so:databases/libiodbc
CFLAGS+=	-I${LOCALBASE}/include/libiodbc
LDFLAGS+=	-L${LOCALBASE}/lib/libiodbc
.endif

.if ${PORT_OPTIONS:MMYSQL}
USE_MYSQL=	yes
.else
CONFIGURE_ARGS+=	--omit=Data/MySQL
.endif

.if ${PORT_OPTIONS:MSQLITE}
USE_SQLITE=	yes
.else
CONFIGURE_ARGS+=	--omit=Data/SQLite
.endif

post-patch:
	@${REINPLACE_CMD} -e "s/ =/ ?=/g" ${WRKSRC}/build/config/FreeBSD

post-install:
	${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/cpspcd
	${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/f2cpspd
	${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/f2cpspd
	${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/*d.so.*

.include <bsd.port.mk>