aboutsummaryrefslogtreecommitdiff
path: root/databases/freetds-devel/Makefile
diff options
context:
space:
mode:
authorDavid W. Chapman Jr. <dwcjr@FreeBSD.org>2001-12-24 04:40:36 +0000
committerDavid W. Chapman Jr. <dwcjr@FreeBSD.org>2001-12-24 04:40:36 +0000
commit6b85cc871746520c5ff79a1f42f813b50bc80c88 (patch)
tree813053b6d63d52625d43c51656f6729900f737cf /databases/freetds-devel/Makefile
parent478425f9d07181a936c8d97f8a68aeaf4404b7aa (diff)
downloadports-6b85cc871746520c5ff79a1f42f813b50bc80c88.tar.gz
ports-6b85cc871746520c5ff79a1f42f813b50bc80c88.zip
Notes
Diffstat (limited to 'databases/freetds-devel/Makefile')
-rw-r--r--databases/freetds-devel/Makefile44
1 files changed, 35 insertions, 9 deletions
diff --git a/databases/freetds-devel/Makefile b/databases/freetds-devel/Makefile
index 618cae7c0029..d783c712a58c 100644
--- a/databases/freetds-devel/Makefile
+++ b/databases/freetds-devel/Makefile
@@ -5,7 +5,7 @@
# $FreeBSD$
PORTNAME= freetds
-PORTVERSION= 0.52
+PORTVERSION= 0.53
CATEGORIES= databases
MASTER_SITES= ${MASTER_SITE_SUNSITE}
MASTER_SITE_SUBDIR= ALPHA/freetds
@@ -13,22 +13,48 @@ EXTRACT_SUFX= .tgz
MAINTAINER= ports@FreeBSD.org
+LIB_DEPENDS= giconv.2:${PORTSDIR}/converters/libiconv
+
USE_GMAKE= yes
-USE_LIBTOOL= yes
-CONFIGURE_ARGS= --with-tdsver=4.2 \
- --enable-dbmfix
+GNU_CONFIGURE= yes
+CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
+ LDFLAGS="-L${LOCALBASE}/lib"
+CONFIGURE_ARGS= --with-tdsver=4.2
INSTALLS_SHLIB= yes
+.if defined(WITH_IODBC)
+LIB_DEPENDS+= iodbc:${PORTSDIR}/databases/libiodbc
+CONFIGURE_ARGS+= --with-iodbc=${LOCALBASE}
+.endif
+
+.if defined(WITH_UNIXODBC)
+LIB_DEPENDS+= odbc:${PORTSDIR}/databases/unixODBC
+CONFIGURE_ARGS+= --with-unixodbc=${LOCALBASE}
+.endif
+
+.if defined(WITH_IODBC) || defined(WITH_UNIXODBC)
+USE_GLIB= yes
+PLIST_SUB+= ODBC=""
+.else
+PLIST_SUB+= ODBC="@comment "
+.endif
+
post-patch:
- @find ${WRKSRC}/src -name Makefile.in | xargs ${PERL} -pi -e \
- 's| install-includeHEADERS||g'
- @${PERL} -pi -e 's!/freetds.conf!/freetds.conf.dist!g' \
- ${WRKSRC}/Makefile.in
- @${PERL} -pi -e 's!malloc.h!stdlib.h!' ${WRKSRC}/include/tds.h.in
+.for file in configure include/tds.h.in src/tds/iconv.c
+ @${PERL} -pi -e 's|<iconv.h>|<giconv.h>|g ; \
+ s|-liconv|-lgiconv|g' ${WRKSRC}/${file}
+.endfor
+ @find ${WRKSRC} -name "Makefile.in" | xargs ${PERL} -pi -e \
+ 's|/freetds.conf|/freetds.conf.dist|g ; \
+ s|glib-config|\$$\(GLIB_CONFIG\)|g ; \
+ s|-lglib|`\$$\(GLIB_CONFIG\) --libs glib`|g ; \
+ s| common.h||g'
post-install:
.if !exists(${PREFIX}/etc/freetds.conf)
@${CP} ${PREFIX}/etc/freetds.conf.dist ${PREFIX}/etc/freetds.conf
.endif
+ @${MKDIR} ${PREFIX}/etc/freetds
+ ${INSTALL_DATA} ${WRKSRC}/interfaces ${PREFIX}/etc/freetds
.include <bsd.port.mk>