blob: 35e62247936704861a09feabbd9edbff8edd6e55 (
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
|
# Created by: ijliao
# $FreeBSD$
PORTNAME= dbconnect
PORTVERSION= 0.3.5
PORTREVISION= 4
CATEGORIES= databases
MASTER_SITES= SF/${PORTNAME}/DBConnect%20API%200.3%20Source%20Code/DBConnect%20API%20${PORTVERSION}
MAINTAINER= sem@FreeBSD.org
COMMENT= Use C++ object API to allow applications to connect to databases
GNU_CONFIGURE= yes
USE_GMAKE= yes
USE_AUTOTOOLS= autoconf
USE_LDCONFIG= yes
CXXFLAGS+= ${PTHREAD_CFLAGS} -fPIC -DFREEBSD
LDFLAG+= ${PTHREAD_LIBS}
OPTIONS_DEFINE= MYSQL PGSQL
OPTIONS_DEFAULT= MYSQL
NO_STAGE= yes
.include <bsd.port.options.mk>
PLIST_SUB+= PORTVERSION=${PORTVERSION}
.if ${PORT_OPTIONS:MMYSQL}
USE_MYSQL= YES
CONFIGURE_ARGS+= --enable-mysql=yes \
--with-mysql_include=${LOCALBASE}/include/mysql \
--with-mysql_lib=${LOCALBASE}/lib/mysql
PLIST_SUB+= MYSQL=""
.else
PLIST_SUB+= MYSQL="@comment "
.endif
.if ${PORT_OPTIONS:MPGSQL}
USE_PGSQL= yes
CONFIGURE_ARGS+= --enable-pgsql=yes \
--with-pgsql_include=${LOCALBASE}/include \
--with-pgsql_lib=${LOCALBASE}/lib
PLIST_SUB+= PGSQL=""
.else
PLIST_SUB+= PGSQL="@comment "
.endif
post-patch:
@${RM} -f ${WRKSRC}/include/dbconn/README
@${REINPLACE_CMD} 's/gcc/${CC}/' ${WRKSRC}/src/driver_*/Makefile.in
do-install:
@cd ${WRKSRC}; \
${CP} -r include/dbconn ${PREFIX}/include/; \
for lib in `find lib -type l -name *.so`; do \
libpath=`${DIRNAME} $${lib}`; \
libname=`${BASENAME} $${lib}|${SED} -e 's/\.so$$//'`; \
${INSTALL_DATA} $${libpath}/$${libname}-${PORTVERSION}.so \
${PREFIX}/lib; \
(cd ${PREFIX}/lib; ${LN} -fs $${libname}-${PORTVERSION}.so \
$${libname}.so); \
done
.include <bsd.port.mk>
|