diff options
author | Mathieu Arnold <mat@FreeBSD.org> | 2004-08-23 15:07:03 +0000 |
---|---|---|
committer | Mathieu Arnold <mat@FreeBSD.org> | 2004-08-23 15:07:03 +0000 |
commit | 8f6c7a1dbf475a59fd12435ead44d6f1ab2c54de (patch) | |
tree | 29333b108b5cc23287090cea9bf927845b4bd51c /databases/p5-DBD-ODBC | |
parent | a56570d2e205c12e2faeb297a1cbeba176af6eb7 (diff) | |
download | ports-8f6c7a1dbf475a59fd12435ead44d6f1ab2c54de.tar.gz ports-8f6c7a1dbf475a59fd12435ead44d6f1ab2c54de.zip |
Notes
Diffstat (limited to 'databases/p5-DBD-ODBC')
-rw-r--r-- | databases/p5-DBD-ODBC/Makefile | 32 |
1 files changed, 28 insertions, 4 deletions
diff --git a/databases/p5-DBD-ODBC/Makefile b/databases/p5-DBD-ODBC/Makefile index 0e3ccbc2c5d4..1e7d5a1a4b0e 100644 --- a/databases/p5-DBD-ODBC/Makefile +++ b/databases/p5-DBD-ODBC/Makefile @@ -7,6 +7,7 @@ PORTNAME= DBD-ODBC PORTVERSION= 1.09 +PORTREVISION= 1 CATEGORIES= databases perl5 MASTER_SITES= ${MASTER_SITE_PERL_CPAN} MASTER_SITE_SUBDIR= DBD @@ -15,19 +16,42 @@ PKGNAMEPREFIX= p5- MAINTAINER= mat@FreeBSD.org COMMENT= DBD module interfacing the ODBC databases -LIB_DEPENDS= iodbc.3:${PORTSDIR}/databases/libiodbc - PERL_CONFIGURE= yes CONFIGURE_ARGS+= -o ${LOCALBASE} USE_REINPLACE= yes MAN3= DBD::ODBC.3 +OPTIONS= IODBC "Link with libiodbc" on \ + ODBC "Link with unixODBC (Only with 5.x+)" off + +.include <bsd.port.pre.mk> + +.if defined(WITH_IODBC) && defined(WITH_ODBC) +BROKEN= "Should only select one of ODBC and IODBC" +.endif +.if defined(WITH_ODBC) && ${OSVERSION} < 500016 +IGNORE= "Due to some obscure -pthread things, you can't have this work" +.endif + +.if !defined(WITHOUT_IODBC) +LIB_DEPENDS+= iodbc.3:${PORTSDIR}/databases/libiodbc +MYODBC= iodbc +.endif +.if defined(WITH_ODBC) +LIB_DEPENDS+= odbc.1:${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 + post-patch: @${REINPLACE_CMD} -e 's/[[:<:]]our[[:>:]]/my/g' \ -e 's/^ @$$(NOOP)/ @$$(NOOP)/g' ${WRKSRC}/Makefile.PL - -.include <bsd.port.pre.mk> + @${PERL} -pi -e '$$_ .= "\$$myodbc = \"${MYODBC}\";" if ($$. == 204);' \ + ${WRKSRC}/Makefile.PL .if ${PERL_LEVEL} < 500600 BUILD_DEPENDS+= ${SITE_PERL}/${PERL_ARCH}/DBI.pm:${PORTSDIR}/databases/p5-DBI-137 |