blob: b720bbe94ae9a64f7b5726afb909555882c73c4c (
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
|
# Created by: ijliao
# $FreeBSD$
PORTNAME= dbconnect
PORTVERSION= 0.3.5
PORTREVISION= 5
CATEGORIES= databases
MASTER_SITES= SF/${PORTNAME}/DBConnect%20API%200.3%20Source%20Code/DBConnect%20API%20${PORTVERSION}
MAINTAINER= ports@FreeBSD.org
COMMENT= Use C++ object API to allow applications to connect to databases
USES= autoreconf gmake dos2unix
GNU_CONFIGURE= yes
USE_LDCONFIG= yes
CXXFLAGS+= -fPIC -DFREEBSD
LDFLAG+= -lpthread
PLIST_SUB= PORTVERSION=${PORTVERSION}
OPTIONS_DEFINE= MYSQL PGSQL
OPTIONS_DEFAULT= MYSQL
OPTIONS_SUB= yes
MYSQL_USE= MYSQL=yes
MYSQL_CONFIGURE_ON= --enable-mysql=yes \
--with-mysql_include=${LOCALBASE}/include/mysql \
--with-mysql_lib=${LOCALBASE}/lib/mysql
PGSQL_USES= pgsql
PGSQL_CONFIGURE_ON= --enable-pgsql=yes \
--with-pgsql_include=${LOCALBASE}/include \
--with-pgsql_lib=${LOCALBASE}/lib
post-patch:
@${RM} -f ${WRKSRC}/include/dbconn/README
@${REINPLACE_CMD} 's|gcc|${CC}|' \
${WRKSRC}/src/dbconnect/Makefile.in \
${WRKSRC}/src/driver_*/Makefile.in
do-install:
@cd ${WRKSRC}; \
${CP} -r include/dbconn ${STAGEDIR}${PREFIX}/include/; \
for lib in `find lib -type l -name *.so`; do \
libpath=`${DIRNAME} $${lib}`; \
libname=`${BASENAME} $${lib}|${SED} -e 's/\.so$$//'`; \
${INSTALL_LIB} $${libpath}/$${libname}-${PORTVERSION}.so \
${STAGEDIR}${PREFIX}/lib; \
${LN} -fs $${libname}-${PORTVERSION}.so \
${STAGEDIR}${PREFIX}/lib/$${libname}.so; \
done
.include <bsd.port.mk>
|