1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-20 04:02:27 +00:00
freebsd-ports/databases/dbconnect/Makefile
Baptiste Daroussin 5369a2f90d Fix build
Convert to USES=gmake pgsql
Convert to unix file format
2014-05-07 23:45:37 +00:00

67 lines
1.7 KiB
Makefile

# 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= gmake dos2unix
GNU_CONFIGURE= yes
USE_AUTOTOOLS= autoconf
USE_LDCONFIG= yes
CXXFLAGS+= ${PTHREAD_CFLAGS} -fPIC -DFREEBSD
LDFLAG+= ${PTHREAD_LIBS}
OPTIONS_DEFINE= MYSQL PGSQL
OPTIONS_DEFAULT= MYSQL
.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}
USES+= pgsql
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/dbconnect/Makefile.in
@${REINPLACE_CMD} 's/gcc/${CC}/' ${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>