-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
/
Portfile
105 lines (86 loc) · 4.34 KB
/
Portfile
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
95
96
97
98
99
100
101
102
103
104
105
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
PortSystem 1.0
PortGroup compiler_blacklist_versions 1.0
name freetds
epoch 1
version 1.4.22
revision 0
checksums rmd160 d84b505b05b8193b0015c4ac61ee7d8c59bb433f \
sha256 a9a7f24f0a7a871617e76e8cc6e6556ae788042f1c006195665505499b2334b1 \
size 2401909
categories databases
maintainers {ryandesign @ryandesign} openmaintainer
# libs are LGPL, tdspool executable is GPL
license {GPL-2+ LGPL}
description A set of libraries for Unix and Linux that allows your programs to natively \
talk to Microsoft SQL Server and Sybase databases
long_description FreeTDS is an open source implementation of the TDS (Tabular DataStream) \
protocol used by these databases for their own clients. It supports many \
different flavors of the protocol and supports several APIs to access it. \
Additionally FreeTDS works with other software such as Perl and PHP, \
providing access from those languages as well. There is also a native (type 4) \
JDBC driver available for platform-independent Java clients (including Java \
Server Pages applications), with support for most of the JDBC 1 API and \
portions of the JDBC 2 API.
homepage http://www.freetds.org/
master_sites ftp://ftp.freetds.org/pub/${name}/stable/
use_bzip2 yes
depends_build path:bin/pkg-config:pkgconfig
# Use gnutls to avoid openssl license conflict.
depends_lib path:lib/pkgconfig/gnutls.pc:gnutls \
port:kerberos5 \
port:libiconv \
port:ncurses \
port:readline
# error: use of unknown builtin '__builtin_bswap16' [-Wimplicit-function-declaration]
compiler.blacklist {clang < 500}
# Fix conflicting intptr_t definitions
# https://trac.macports.org/ticket/63394
compiler.c_standard 1999
configure.cflags-append -std=c99
# https://trac.macports.org/wiki/WimplicitFunctionDeclaration#strchr
configure.checks.implicit_function_declaration.whitelist-append strchr
configure.args --disable-odbc \
--disable-silent-rules \
--enable-krb5 \
--includedir=${prefix}/include/${name} \
--sysconfdir=${prefix}/etc/${name} \
--with-gnutls \
--with-libiconv-prefix=${prefix} \
ac_cv_prog_DOXYGEN=
use_parallel_build yes
# The test suite cannot be run without a configured database.
# https://github.com/FreeTDS/freetds/issues/542
# https://www.freetds.org/userguide/ConfirmInstall.html#Tests
test.run no
test.target check
post-destroot {
# rename the freetds conf files so we don't clobber any existing ones
foreach file [list "freetds.conf" "locales.conf" "pool.conf"] {
move ${destroot}${prefix}/etc/freetds/${file} ${destroot}${prefix}/etc/freetds/${file}.sample
}
}
post-activate {
# copy over freetds sample files if none exists
foreach file [list "freetds.conf" "locales.conf" "pool.conf"] {
if {![file exists ${prefix}/etc/freetds/${file}]} {
ui_msg "Configuration file ${file} does not exist and has been created using"
ui_msg " ${prefix}/etc/freetds/${file}.sample"
file copy ${prefix}/etc/freetds/${file}.sample ${prefix}/etc/freetds/${file}
} else {
ui_msg "Configuration file ${file} exists and has been retained."
ui_msg "(The distribution's version has been installed to ${prefix}/etc/freetds/${file}.sample)"
}
}
}
variant mssql description {Use MS style dblib} {
configure.args-append --enable-msdblib --with-tdsver=7.4
}
variant odbc conflicts iodbc description {Build ODBC driver against unixODBC} {
depends_lib-append port:unixODBC
configure.args-replace --disable-odbc --with-unixodbc=${prefix}
}
variant iodbc conflicts odbc description {Build ODBC driver against iODBC} {
depends_lib-append port:libiodbc
configure.args-replace --disable-odbc --with-iodbc=${prefix}
}