freebsd-ports/databases/p5-DBD-ODBC/Makefile
2012-02-06 12:25:50 +00:00

64 lines
1.5 KiB
Makefile

# New ports collection makefile for: p5-DBD-ODBC
# Date created: Nov 30 2001
# Whom: Clive Lin <clive@FreeBSD.org>
#
# $FreeBSD$
#
PORTNAME= DBD-ODBC
PORTVERSION= 1.33
PORTREVISION= 1
CATEGORIES= databases perl5
MASTER_SITES= CPAN
MASTER_SITE_SUBDIR= CPAN:MJEVANS
PKGNAMEPREFIX= p5-
MAINTAINER= perl@FreeBSD.org
COMMENT= DBD module interfacing the ODBC databases
LICENSE= ART10 GPLv1
LICENSE_COMB= dual
RUN_DEPENDS= ${SITE_PERL}/${PERL_ARCH}/DBI.pm:${PORTSDIR}/databases/p5-DBI
BUILD_DEPENDS= ${RUN_DEPENDS}
PERL_CONFIGURE= yes
CONFIGURE_ARGS= -o ${LOCALBASE}
MAN3= DBD::ODBC.3
.include <bsd.port.pre.mk>
.if defined(WITH_IODBC) && defined(WITH_UNIXODBC)
IGNORE= selected mutually exclusive options: WITH_IODBC and WITH_UNIXODBC
.endif
.if !defined(WITH_IODBC) && !defined(WITH_UNIXODBC)
WITH_IODBC?= yes
.endif
.if defined(WITH_IODBC)
LIB_DEPENDS+= iodbc.3:${PORTSDIR}/databases/libiodbc
MYODBC= iodbc
.elif defined(WITH_UNIXODBC)
LIB_DEPENDS+= odbc.2:${PORTSDIR}/databases/unixODBC
MYODBC= unixodbc
post-configure:
@${PERL} -pi -e 's/-lodbc/-lodbc ${PTHREAD_LIBS}/g;' \
-e 's/$$/ ${PTHREAD_CFLAGS}/ if (/^CCFLAGS/);' \
${WRKSRC}/Makefile
.endif
.if !defined(NOPORTDOCS)
PORTDOCS= Changes README README.adabas README.informix
post-install:
@${MKDIR} ${DOCSDIR}
@${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${DOCSDIR}
@${ECHO_MSG} "===> Documentation installed in ${DOCSDIR}."
.endif
post-patch:
${REINPLACE_CMD} -e '/my $$myodbc/s|q{}|"${MYODBC}"|' ${WRKSRC}/Makefile.PL
.include <bsd.port.post.mk>