Lines 2-88
Link Here
|
2 |
# $FreeBSD: head/databases/freetds/Makefile 365246 2014-08-17 20:46:37Z marino $ |
2 |
# $FreeBSD: head/databases/freetds/Makefile 365246 2014-08-17 20:46:37Z marino $ |
3 |
|
3 |
|
4 |
PORTNAME= freetds |
4 |
PORTNAME= freetds |
5 |
PORTVERSION= 0.64 |
5 |
PORTVERSION= 0.91.103 |
6 |
PORTREVISION= 11 |
|
|
7 |
PORTEPOCH= 1 |
6 |
PORTEPOCH= 1 |
8 |
CATEGORIES= databases |
7 |
CATEGORIES= databases |
9 |
MASTER_SITES= http://pkgs.fedoraproject.org/repo/pkgs/${FEDORALOC}/ |
8 |
MASTER_SITES= ftp://ftp.freetds.org/pub/freetds/stable/ |
10 |
|
9 |
|
11 |
MAINTAINER?= ports@FreeBSD.org |
10 |
MAINTAINER= 5u623l20@gmail.com |
12 |
COMMENT= Sybase/Microsoft TDS protocol library |
11 |
COMMENT= Sybase/Microsoft TDS protocol library |
13 |
|
12 |
|
|
|
13 |
LICENSE= GPLv2 |
14 |
|
15 |
LIB_DEPENDS= libgcrypt.so:${PORTSDIR}/security/libgcrypt |
16 |
|
14 |
TDS_VER?= 5.0 |
17 |
TDS_VER?= 5.0 |
15 |
|
18 |
|
16 |
USES= iconv gmake libtool:keepla |
19 |
USES= iconv gmake pkgconfig libtool:keepla |
17 |
GNU_CONFIGURE= yes |
20 |
GNU_CONFIGURE= yes |
18 |
USE_AUTOTOOLS= autoconf:env |
21 |
USE_AUTOTOOLS= autoconf:env |
19 |
CPPFLAGS+= -I${LOCALBASE}/include |
22 |
CPPFLAGS+= -I${LOCALBASE}/include |
20 |
LDFLAGS+= -L${LOCALBASE}/lib |
23 |
LDFLAGS+= -L${LOCALBASE}/lib |
21 |
CONFIGURE_ARGS= --with-tdsver=${TDS_VER} |
24 |
LIBS+= -lgcrypt |
|
|
25 |
CONFIGURE_ARGS= --with-tdsver=${TDS_VER} --sysconfdir=${ETCDIR} |
22 |
USE_LDCONFIG= yes |
26 |
USE_LDCONFIG= yes |
23 |
INSTALL_TARGET= install-strip |
27 |
INSTALL_TARGET= install-strip |
24 |
FEDORALOC= freetds/freetds-0.64.tar.gz/ecfee5d6c96932172a1f29fb215c9d23 |
|
|
25 |
|
28 |
|
26 |
PORTDOCS= * |
29 |
PORTDOCS= * |
27 |
|
30 |
|
28 |
OPTIONS_DEFINE= OPENSSL GNUTLS MSDBLIB DOCS |
31 |
OPTIONS_DEFINE= OPENSSL GNUTLS MSDBLIB DOCS |
29 |
OPTIONS_RADIO= ODBC |
32 |
OPTIONS_RADIO= ODBC |
30 |
OPTIONS_RADIO_ODBC= IODBC UNIXODBC |
33 |
OPTIONS_RADIO_ODBC= IODBC UNIXODBC |
31 |
MSDBLIB_DESC= MS SQL Server support (breaks databases/sybtcl) |
34 |
MSDBLIB_DESC= MS SQL Server support (breaks databases/sybtcl) |
|
|
35 |
OPENSSL_USE= OPENSSL=yes |
36 |
OPENSSL_CONFIGURE_ON= --with-openssl=${OPENSSLBASE} |
37 |
GNUTLS_LIB_DEPENDS= libgnutls.so:${PORTSDIR}/security/gnutls |
38 |
GNUTLS_CONFIGURE_ON= --with-gnutls |
39 |
IODBC_LIB_DEPENDS= libiodbc.so:${PORTSDIR}/databases/libiodbc |
40 |
IODBC_CONFIGURE_ON= --with-iodbc=${LOCALBASE} |
41 |
IODBC_CPPFLAGS= -I${LOCALBASE}/include/libiodbc |
42 |
UNIXODBC_LIB_DEPENDS= libodbc.so:${PORTSDIR}/databases/unixODBC |
43 |
UNIXODBC_CONFIGURE_ON= --with-unixodbc=${LOCALBASE} |
44 |
# We cannot use msdblib-style by default, because port databases/sybtcl |
45 |
# relies on sybase-style dblib |
46 |
MSDBLIB_CONFIGURE_ON= --enable-msdblib |
32 |
|
47 |
|
33 |
.include <bsd.port.options.mk> |
48 |
.include <bsd.port.options.mk> |
34 |
|
49 |
|
35 |
.if ${PORT_OPTIONS:MOPENSSL} |
|
|
36 |
USE_OPENSSL= yes |
37 |
CONFIGURE_ARGS+=--with-openssl=${OPENSSLBASE} |
38 |
.endif |
39 |
|
40 |
.if ${PORT_OPTIONS:MGNUTLS} |
41 |
LIB_DEPENDS+= libgnutls.so:${PORTSDIR}/security/gnutls |
42 |
CONFIGURE_ARGS+=--with-gnutls |
43 |
.endif |
44 |
|
45 |
.if ${PORT_OPTIONS:MIODBC} |
46 |
LIB_DEPENDS+= libiodbc.so:${PORTSDIR}/databases/libiodbc |
47 |
CONFIGURE_ARGS+= --with-iodbc=${LOCALBASE} |
48 |
.endif |
49 |
|
50 |
.if ${PORT_OPTIONS:MUNIXODBC} |
51 |
LIB_DEPENDS+= libodbc.so:${PORTSDIR}/databases/unixODBC |
52 |
CONFIGURE_ARGS+= --with-unixodbc=${LOCALBASE} |
53 |
.endif |
54 |
|
55 |
.if ${PORT_OPTIONS:MIODBC} || ${PORT_OPTIONS:MUNIXODBC} |
50 |
.if ${PORT_OPTIONS:MIODBC} || ${PORT_OPTIONS:MUNIXODBC} |
56 |
PLIST_SUB+= ODBC="" |
51 |
PLIST_SUB+= ODBC="" |
57 |
.else |
52 |
.else |
58 |
PLIST_SUB+= ODBC="@comment " |
53 |
PLIST_SUB+= ODBC="@comment " |
59 |
.endif |
54 |
.endif |
60 |
|
55 |
|
61 |
# We cannot use msdblib-style by default, because port databases/sybtcl |
|
|
62 |
# relies on sybase-style dblib |
63 |
.if ${PORT_OPTIONS:MMSDBLIB} |
64 |
CONFIGURE_ARGS+= --enable-msdblib |
65 |
.endif |
66 |
|
67 |
post-extract: |
56 |
post-extract: |
68 |
@cd ${WRKSRC} && ${LN} -s freetds.conf freetds.conf.dist |
57 |
@cd ${WRKSRC} && ${LN} -s freetds.conf freetds.conf.sample |
69 |
@cd ${WRKSRC} && ${LN} -s locales.conf locales.conf.dist |
58 |
@cd ${WRKSRC} && ${LN} -s locales.conf locales.conf.sample |
70 |
@cd ${WRKSRC}/src/pool && ${LN} -s pool.conf pool.conf.dist |
59 |
@cd ${WRKSRC}/src/pool && ${LN} -s pool.conf pool.conf.sample |
71 |
|
60 |
|
72 |
post-patch: |
61 |
post-patch: |
73 |
@${FIND} ${WRKSRC} -name "Makefile.in" | ${XARGS} ${REINPLACE_CMD} -e \ |
62 |
@${FIND} ${WRKSRC} -name "Makefile.in" | ${XARGS} ${REINPLACE_CMD} -e \ |
74 |
's|<malloc.h>|<stdlib.h>| ; \ |
63 |
's|<malloc.h>|<stdlib.h>| ; \ |
75 |
s|/freetds.conf|/freetds.conf.dist|g ; \ |
64 |
s|/freetds.conf|/freetds.conf.sample|g ; \ |
76 |
s|/locales.conf|/locales.conf.dist|g ; \ |
65 |
s|/locales.conf|/locales.conf.sample|g ; \ |
77 |
s|/pool.conf|/pool.conf.dist|g ; \ |
66 |
s|/pool.conf|/pool.conf.sample|g ; \ |
78 |
s| common.h||g' |
67 |
s| common.h||g' |
|
|
68 |
@${REINPLACE_CMD} -e 's|$$ODBC_INC/isql.h|$$ODBC_INC/libiodbc/isql.h|g ; \ |
69 |
s|$$ODBC_INC/isqlext.h|$$ODBC_INC/libiodbc/isqlext.h|g' ${WRKSRC}/configure |
79 |
|
70 |
|
80 |
post-install: |
71 |
post-install: |
81 |
@cd ${WRKSRC}/doc && ${COPYTREE_SHARE} images ${STAGEDIR}${DOCSDIR} |
72 |
@${INSTALL_DATA} ${WRKSRC}/interfaces ${STAGEDIR}${ETCDIR}/interfaces.sample |
82 |
@cd ${WRKSRC}/doc && ${COPYTREE_SHARE} doc ${STAGEDIR}${DOCSDIR} |
73 |
.if ${PORT_OPTIONS:MDOCS} |
83 |
@${MKDIR} ${STAGEDIR}${PREFIX}/etc/freetds |
74 |
@${MKDIR} ${STAGEDIR}${DOCSDIR} |
84 |
@${INSTALL_DATA} ${WRKSRC}/interfaces ${STAGEDIR}${PREFIX}/etc/freetds/interfaces.dist |
75 |
@(cd ${WRKSRC}/doc/doc/${PORTNAME}-${PORTVERSION} && \ |
85 |
@${ECHO_CMD} "Sample configuration files have been installed in ${PREFIX}/etc" |
76 |
${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR}) |
86 |
@${ECHO_CMD} "You should edit them and remove the .dist-suffix from their names" |
77 |
.endif |
87 |
|
78 |
|
88 |
.include <bsd.port.mk> |
79 |
.include <bsd.port.mk> |