freebsd-ports/databases/freetds-devel/Makefile
Sheldon Hearn 1d83daa20b Use in-place editing to replace <malloc.h> with <stdlib.h>.
Bump PORTREVISION accordingly, since the affected files were installed
even in -CURRENT, where they couldn't be used to build stuff.
2002-10-08 09:10:00 +00:00

61 lines
1.4 KiB
Makefile

# New ports collection makefile for: freetds
# Date created: 02 Nov 1999
# Whom: Domas Mituzas <midom@dammit.lt>
#
# $FreeBSD$
PORTNAME= freetds
PORTVERSION= 0.60
PORTREVISION= 1
CATEGORIES= databases
MASTER_SITES= ${MASTER_SITE_SUNSITE}
MASTER_SITE_SUBDIR= ALPHA/freetds
EXTRACT_SUFX= .tgz
MAINTAINER= ports@FreeBSD.org
LIB_DEPENDS= iconv.3:${PORTSDIR}/converters/libiconv
USE_REINPLACE= yes
USE_GMAKE= yes
USE_LIBTOOL= yes
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
LDFLAGS="-L${LOCALBASE}/lib"
CONFIGURE_ARGS= --with-tdsver=4.2
INSTALLS_SHLIB= yes
MAN1= freebcp.1 tsql.1
.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)
PLIST_SUB+= ODBC=""
.else
PLIST_SUB+= ODBC="@comment "
.endif
post-extract:
@cd ${WRKSRC} && ${LN} -s freetds.conf freetds.conf.dist
post-patch:
@${FIND} ${WRKSRC} -name "Makefile.in" | ${XARGS} ${REINPLACE_CMD} -e \
's|<malloc.h>|<stdlib.h>| ; \
s|/freetds.conf|/freetds.conf.dist|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>