blob: a6ce0bda156343f7627f4a42e3c2ef9292202e72 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
|
# Created by: Domas Mituzas <midom@dammit.lt>
PORTNAME= freetds
PORTVERSION= 1.3.7
PORTEPOCH= 1
CATEGORIES= databases
MASTER_SITES= https://www.freetds.org/files/current/ \
ftp://ftp.freetds.org/pub/freetds/current/
PKGNAMESUFFIX= -devel
DISTNAME= ${PORTNAME}-dev.${PORTVERSION}
MAINTAINER= bofh@FreeBSD.org
COMMENT= Sybase/Microsoft TDS protocol library - nightly snapshot
LICENSE= LGPL20
USES= autoreconf compiler:c11 cpe gettext-tools gmake iconv \
libtool:keepla pkgconfig tar:bzip2
WRKSRC= ${WRKDIR}/${PORTNAME}-dev.${PORTVERSION}
TDS_VER?= 7.4
CPPFLAGS+= "-I${LOCALBASE}/include"
LDFLAGS+= -L${LOCALBASE}/lib
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --with-tdsver=${TDS_VER} --sysconfdir=${ETCDIR} \
--enable-msdblib --enable-sybase-compat \
--docdir=${DOCSDIR}
USE_LDCONFIG= yes
SUB_FILES= pkg-message
INSTALL_TARGET= install-strip
OPTIONS_DEFINE= DOCS ODBCWIDE
OPTIONS_SINGLE= SSL
OPTIONS_SINGLE_SSL= OPENSSL GNUTLS
OPTIONS_DEFAULT= OPENSSL
OPTIONS_RADIO= ODBC
OPTIONS_RADIO_ODBC= IODBC UNIXODBC
ODBCWIDE_DESC= Enable Wide ODBC Support
GNUTLS_LIB_DEPENDS= libgnutls.so:security/gnutls
GNUTLS_CONFIGURE_ON= --with-gnutls
IODBC_LIB_DEPENDS= libiodbc.so:databases/libiodbc
IODBC_CONFIGURE_ON= --with-iodbc=${LOCALBASE}
IODBC_CPPFLAGS= -I${LOCALBASE}/include/libiodbc
ODBCWIDE_CONFIGURE_ON= --enable-odbc-wide
OPENSSL_CONFIGURE_ON= --with-openssl=${OPENSSLBASE}
OPENSSL_USES= ssl
UNIXODBC_CONFIGURE_ON= --with-unixodbc=${LOCALBASE}
UNIXODBC_LIB_DEPENDS= libodbc.so:databases/unixODBC
PORTDOCS= *
INSTALL= freetds
PORTSCOUT= limit:^\d+\.\d+\.\d{3}$
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MIODBC} || ${PORT_OPTIONS:MUNIXODBC}
PLIST_SUB+= ODBC=""
.else
PLIST_SUB+= ODBC="@comment "
.endif
post-extract:
@cd ${WRKSRC} && ${LN} -s freetds.conf freetds.conf.sample
@cd ${WRKSRC} && ${LN} -s locales.conf locales.conf.sample
@cd ${WRKSRC}/src/pool && ${LN} -s pool.conf pool.conf.sample
post-patch:
@${REINPLACE_CMD} -e 's|libgnutls-config|pkg-config gnutls|g' \
${WRKSRC}/configure
@${FIND} ${WRKSRC} -name "Makefile.am" | ${XARGS} ${REINPLACE_CMD} -e \
's|/pool.conf|/pool.conf.sample|g ; \
s| common.h||g ; \
s|%%DOCSDIR%%|${STAGEDIR}${DOCSDIR}|g ; \
s|%%ICONV_LIB%%|${ICONV_LIB}|'
@${REINPLACE_CMD} -e 's|/freetds.conf|/freetds.conf.sample|g ; \
s|/locales.conf|/locales.conf.sample|g' ${WRKSRC}/Makefile.am
@${REINPLACE_CMD} -e 's|$$ODBC_INC/isql.h|$$ODBC_INC/libiodbc/isql.h|g ; \
s|$$ODBC_INC/isqlext.h|$$ODBC_INC/libiodbc/isqlext.h|g' ${WRKSRC}/configure
post-install:
${INSTALL_DATA} ${WRKSRC}/interfaces ${STAGEDIR}${ETCDIR}/interfaces.sample
post-install-DOCS-on:
@${MKDIR} ${STAGEDIR}${DOCSDIR}/userguide
@${MKDIR} ${STAGEDIR}${DOCSDIR}/reference
@${FIND} ${WRKSRC}/doc/userguide \( -type f -o -type l \) \
-exec ${INSTALL_DATA} {} ${STAGEDIR}${DOCSDIR}/userguide ';'
@${FIND} ${WRKSRC}/doc/reference \( -type f -o -type l \) \
-exec ${INSTALL_DATA} {} ${STAGEDIR}${DOCSDIR}/reference ';'
@cd ${WRKSRC}/doc && \
${COPYTREE_SHARE} images ${STAGEDIR}${DOCSDIR}
.include <bsd.port.mk>
|