Lines 2-98
Link Here
|
2 |
# $FreeBSD: head/databases/freetds-devel/Makefile 362645 2014-07-23 09:54:02Z tijl $ |
2 |
# $FreeBSD: head/databases/freetds-devel/Makefile 362645 2014-07-23 09:54:02Z tijl $ |
3 |
|
3 |
|
4 |
PORTNAME= freetds |
4 |
PORTNAME= freetds |
5 |
PORTVERSION= 0.92.79 |
5 |
PORTVERSION= 0.92.812 |
6 |
PORTREVISION= 2 |
|
|
7 |
PORTEPOCH= 1 |
6 |
PORTEPOCH= 1 |
8 |
CATEGORIES= databases |
7 |
CATEGORIES= databases |
9 |
MASTER_SITES= ftp://ftp.freetds.org/pub/freetds/stable/ |
8 |
MASTER_SITES= ftp://ftp.freetds.org/pub/freetds/current/ |
10 |
PKGNAMESUFFIX= -devel |
9 |
PKGNAMESUFFIX= -devel |
|
|
10 |
DISTNAME= ${PORTNAME}-dev.${PORTVERSION} |
11 |
|
11 |
|
12 |
MAINTAINER= pi@FreeBSD.org |
12 |
MAINTAINER= pi@FreeBSD.org |
13 |
COMMENT= Sybase/Microsoft TDS protocol library |
13 |
COMMENT= Sybase/Microsoft TDS protocol library |
14 |
|
14 |
|
15 |
LICENSE= LGPL20 |
15 |
LICENSE= LGPL20 |
16 |
|
16 |
|
17 |
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION} |
17 |
WRKSRC= ${WRKDIR}/${PORTNAME}-dev.${PORTVERSION} |
18 |
TDS_VER?= 5.0 |
18 |
TDS_VER?= 7.2 |
19 |
USES= gmake iconv libtool:keepla pkgconfig |
19 |
USES= gmake iconv libtool:keepla pkgconfig tar:bzip2 |
20 |
GNU_GONFIGURE= yes |
20 |
GNU_GONFIGURE= yes |
21 |
USE_AUTOTOOLS= autoconf:env |
21 |
USE_AUTOTOOLS= autoconf:env |
22 |
CPPFLAGS+= "-I${LOCALBASE}/include" |
22 |
CPPFLAGS+= "-I${LOCALBASE}/include" |
23 |
LDFLAGS+= -L${LOCALBASE}/lib |
23 |
LDFLAGS+= -L${LOCALBASE}/lib |
24 |
GNU_CONFIGURE= yes |
24 |
GNU_CONFIGURE= yes |
25 |
CONFIGURE_ARGS= --with-tdsver=${TDS_VER} |
25 |
CONFIGURE_ARGS= --with-tdsver=${TDS_VER} --sysconfdir=${ETCDIR} \ |
|
|
26 |
--enable-msdblib --enable-sybase-compat \ |
27 |
--docdir=${DOCSDIR} |
26 |
USE_LDCONFIG= yes |
28 |
USE_LDCONFIG= yes |
27 |
SUB_FILES= pkg-message |
29 |
SUB_FILES= pkg-message |
28 |
INSTALL_TARGET= install-strip |
30 |
INSTALL_TARGET= install-strip |
29 |
|
31 |
|
30 |
PORTDOCS= * |
32 |
OPTIONS_DEFINE= DOCS ODBCWIDE |
31 |
|
33 |
OPTIONS_SINGLE= SSL |
32 |
# OPTIONS_DEFINE= OPENSSL GNUTLS IODBC UNIXODBC MSDBLIB |
|
|
33 |
OPTIONS_DEFINE= MSDBLIB ODBCWIDE ODBC |
34 |
|
35 |
OPTIONS_SINGLE= SSL |
36 |
OPTIONS_SINGLE_SSL= OPENSSL GNUTLS |
34 |
OPTIONS_SINGLE_SSL= OPENSSL GNUTLS |
37 |
|
|
|
38 |
OPTIONS_DEFAULT= OPENSSL |
35 |
OPTIONS_DEFAULT= OPENSSL |
39 |
|
36 |
OPTIONS_RADIO= ODBC |
40 |
OPENSSL_DESC= Use OpenSSL |
37 |
OPTIONS_RADIO_ODBC= IODBC UNIXODBC |
41 |
GNUTLS_DESC= Use GnuTLS |
38 |
ODBCWIDE_DESC= Enable Wide ODBC Support |
42 |
MSDBLIB_DESC= MS SQL Server compatibility (breaks databases/sybtcl) |
39 |
OPENSSL_USE= OPENSSL=yes |
43 |
ODBCWIDE_DESC= Enable Wide ODBC Support |
40 |
OPENSSL_CONFIGURE_ON= --with-openssl=${OPENSSLBASE} |
44 |
ODBC_DESC= ODBC driver |
41 |
GNUTLS_LIB_DEPENDS= libgnutls.so:${PORTSDIR}/security/gnutls |
|
|
42 |
GNUTLS_CONFIGURE_ON= --with-gnutls |
43 |
IODBC_LIB_DEPENDS= libiodbc.so:${PORTSDIR}/databases/libiodbc |
44 |
IODBC_CONFIGURE_ON= --with-iodbc=${LOCALBASE} |
45 |
IODBC_CPPFLAGS= -I${LOCALBASE}/include/libiodbc |
46 |
UNIXODBC_LIB_DEPENDS= libodbc.so:${PORTSDIR}/databases/unixODBC |
47 |
UNIXODBC_CONFIGURE_ON= --with-unixodbc=${LOCALBASE} |
48 |
ODBCWIDE_CONFIGURE_ON= --enable-odbc-wide |
45 |
|
49 |
|
46 |
CONFLICTS= freetds-0.64.[0-9] |
50 |
CONFLICTS= freetds-0.64.[0-9] |
47 |
|
51 |
|
48 |
.include <bsd.port.options.mk> |
52 |
.include <bsd.port.options.mk> |
49 |
|
53 |
.if ${PORT_OPTIONS:MIODBC} || ${PORT_OPTIONS:MUNIXODBC} |
50 |
.if ${PORT_OPTIONS:MOPENSSL} |
54 |
PLIST_SUB+= ODBC="" |
51 |
USE_OPENSSL= yes |
55 |
.else |
52 |
CONFIGURE_ARGS+=--with-openssl=${OPENSSLBASE} |
56 |
PLIST_SUB+= ODBC="@comment " |
53 |
.endif |
|
|
54 |
|
55 |
.if ${PORT_OPTIONS:MODBCWIDE} |
56 |
CONFIGURE_ARGS+= --enable-odbc-wide |
57 |
.endif |
58 |
|
59 |
.if ${PORT_OPTIONS:MGNUTLS} |
60 |
LIB_DEPENDS+= libgnutls.so:${PORTSDIR}/security/gnutls |
61 |
CONFIGURE_ARGS+= --with-gnutls |
62 |
.endif |
63 |
|
64 |
LIB_DEPENDS+= libodbc.so:${PORTSDIR}/databases/unixODBC |
65 |
CONFIGURE_ARGS+= --with-unixodbc=${LOCALBASE} |
66 |
|
67 |
# We cannot use msdblib-style by default, because port databases/sybtcl |
68 |
# relies on sybase-style dblib |
69 |
.if ${PORT_OPTIONS:MMSDBLIB} |
70 |
CONFIGURE_ARGS+= --enable-msdblib |
71 |
TDS_VER= 7.2 |
72 |
.endif |
57 |
.endif |
73 |
|
58 |
|
74 |
post-extract: |
59 |
post-extract: |
75 |
@cd ${WRKSRC} && ${LN} -s freetds.conf freetds.conf.dist |
60 |
@cd ${WRKSRC} && ${LN} -s freetds.conf freetds.conf.sample |
76 |
@cd ${WRKSRC} && ${LN} -s locales.conf locales.conf.dist |
61 |
@cd ${WRKSRC} && ${LN} -s locales.conf locales.conf.sample |
77 |
@cd ${WRKSRC}/src/pool && ${LN} -s pool.conf pool.conf.dist |
62 |
@cd ${WRKSRC}/src/pool && ${LN} -s pool.conf pool.conf.sample |
78 |
|
63 |
|
79 |
post-patch: |
64 |
post-patch: |
80 |
@${REINPLACE_CMD} -e 's|libgnutls-config|pkg-config gnutls|g' \ |
65 |
@${REINPLACE_CMD} -e 's|libgnutls-config|pkg-config gnutls|g' \ |
81 |
${WRKSRC}/configure |
66 |
${WRKSRC}/configure |
82 |
@${FIND} ${WRKSRC} -name "Makefile.in" | ${XARGS} ${REINPLACE_CMD} -e \ |
67 |
@${FIND} ${WRKSRC} -name "Makefile.in" | ${XARGS} ${REINPLACE_CMD} -e \ |
83 |
's|<malloc.h>|<stdlib.h>| ; \ |
68 |
's|/pool.conf|/pool.conf.sample|g ; \ |
84 |
s|/freetds.conf|/freetds.conf.dist|g ; \ |
|
|
85 |
s|/locales.conf|/locales.conf.dist|g ; \ |
86 |
s|/pool.conf|/pool.conf.dist|g ; \ |
87 |
s| common.h||g ; \ |
69 |
s| common.h||g ; \ |
|
|
70 |
s|%%DOCSDIR%%|${STAGEDIR}${DOCSDIR}|g ; \ |
88 |
s|%%ICONV_LIB%%|${ICONV_LIB}|' |
71 |
s|%%ICONV_LIB%%|${ICONV_LIB}|' |
|
|
72 |
@${REINPLACE_CMD} -e 's|/freetds.conf|/freetds.conf.sample|g ; \ |
73 |
s|/locales.conf|/locales.conf.sample|g' ${WRKSRC}/Makefile.in |
74 |
@${REINPLACE_CMD} -e 's|$$ODBC_INC/isql.h|$$ODBC_INC/libiodbc/isql.h|g ; \ |
75 |
s|$$ODBC_INC/isqlext.h|$$ODBC_INC/libiodbc/isqlext.h|g' ${WRKSRC}/configure |
89 |
|
76 |
|
90 |
post-install: |
77 |
post-install: |
91 |
@${MKDIR} ${STAGEDIR}${DOCSDIR} |
78 |
@${INSTALL_DATA} ${WRKSRC}/interfaces ${STAGEDIR}${ETCDIR}/interfaces.sample |
92 |
@cd ${WRKSRC}/doc && ${COPYTREE_SHARE} images ${STAGEDIR}${DOCSDIR} |
79 |
.if ${PORT_OPTIONS:MDOCS} |
93 |
@cd ${WRKSRC}/doc && ${COPYTREE_SHARE} doc/${PORTNAME}-${PORTVERSION}/reference ${STAGEDIR}${DOCSDIR} |
80 |
@${MKDIR} ${STAGEDIR}${DOCSDIR}/userguide |
94 |
@cd ${WRKSRC}/doc && ${COPYTREE_SHARE} doc/${PORTNAME}-${PORTVERSION}/userguide ${STAGEDIR}${DOCSDIR} |
81 |
@${MKDIR} ${STAGEDIR}${DOCSDIR}/reference |
95 |
@${MKDIR} ${STAGEDIR}${PREFIX}/etc/freetds |
82 |
@${MKDIR} ${STAGEDIR}${DOCSDIR}/images |
96 |
@${INSTALL_DATA} ${WRKSRC}/interfaces ${STAGEDIR}${PREFIX}/etc/freetds/interfaces.dist |
83 |
@${FIND} ${WRKSRC}/doc/userguide \( -type f -o -type l \) \ |
|
|
84 |
-exec ${INSTALL_DATA} {} ${STAGEDIR}${DOCSDIR}/userguide ';' |
85 |
@${FIND} ${WRKSRC}/doc/reference \( -type f -o -type l \) \ |
86 |
-exec ${INSTALL_DATA} {} ${STAGEDIR}${DOCSDIR}/reference ';' |
87 |
@${FIND} ${WRKSRC}/doc/images -name \*.gif \ |
88 |
-exec ${INSTALL_DATA} {} ${STAGEDIR}${DOCSDIR}/images/ ';' |
89 |
|
90 |
.endif |
97 |
|
91 |
|
98 |
.include <bsd.port.mk> |
92 |
.include <bsd.port.mk> |