Files

53 lines
2.3 KiB
Plaintext

PortSystem 1.0
name mssql-tools
version 17.10.1.1
revision 1
categories databases
platforms {darwin any}
supported_archs arm64 x86_64
maintainers {jann @roederja} openmaintainer
license Restrictive
description Sqlcmd and Bcp for Microsoft(R) SQL Server(R)
long_description Sqlcmd and Bcp for Microsoft(R) SQL Server(R)
homepage https://learn.microsoft.com/sql/tools/sqlcmd-utility
master_sites https://download.microsoft.com/download/F/D/1/FD16AA69-F27D-440E-A15A-6C521A1972E6/
if {${os.arch} eq "i386"} {
distname ${name}-${version}-amd64
checksums rmd160 e8dfbfb40d3a1d7ba6a6eecc4f3056928e83ffcd \
sha256 5c11a2659e5a6cff2ad74fbf0a2fe011cf57896694ed9b0c7dc072a93e6dd80c \
size 304634
} else {
distname ${name}-${version}-arm64
checksums rmd160 b08a7f2de807e155cbe0b21b7eb8eb4a1821bd25 \
sha256 ed93a2e233a70e8bea2cc566efce8554614944df9ffd42bc4c1b46bddc81ec64 \
size 274546
}
worksrcdir ${name}-${version}
depends_run port:msodbcsql17
use_configure no
build {
if {${os.arch} eq "i386"} {
system "install_name_tool -change /usr/local/lib/libodbc.2.dylib ${prefix}/lib/libodbc.2.dylib ${worksrcpath}/bin/bcp"
system "install_name_tool -change /usr/local/lib/libodbc.2.dylib ${prefix}/lib/libodbc.2.dylib ${worksrcpath}/bin/sqlcmd"
} else {
system "install_name_tool -change /opt/homebrew/lib/libodbc.2.dylib ${prefix}/lib/libodbc.2.dylib ${worksrcpath}/bin/bcp"
system "install_name_tool -change /opt/homebrew/lib/libodbc.2.dylib ${prefix}/lib/libodbc.2.dylib ${worksrcpath}/bin/sqlcmd"
}
}
destroot {
xinstall -m 555 -W ${worksrcpath}/bin sqlcmd bcp ${destroot}${prefix}/bin
xinstall -d ${destroot}${prefix}/share/resources/en_US
xinstall -m 444 -W ${worksrcpath}/share/resources/en_US BatchParserGrammar.dfa BatchParserGrammar.llr bcp.rll SQLCMD.rll \
${destroot}${prefix}/share/resources/en_US
xinstall -d ${destroot}${prefix}/share/doc/mssql-tools
xinstall -m 644 -W ${worksrcpath}/usr/share/doc/mssql-tools/ LICENSE.txt THIRDPARTYNOTICES.txt ${destroot}${prefix}/share/doc/mssql-tools/
}