You've already forked macports-ports
mirror of
https://github.com/macports/macports-ports.git
synced 2026-07-12 18:20:25 -07:00
89 lines
3.4 KiB
Tcl
89 lines
3.4 KiB
Tcl
# -*- 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
|
|
|
|
name libdbi-drivers
|
|
version 0.9.0
|
|
revision 0
|
|
categories databases devel
|
|
license LGPL-2.1+
|
|
maintainers {umich.edu:mta @mtalexander} openmaintainer
|
|
description Drivers for libdbi
|
|
long_description {*}${description}
|
|
homepage https://libdbi-drivers.sourceforge.net
|
|
master_sites sourceforge
|
|
|
|
checksums rmd160 9252bf6885fc365f41f7d7321be0fd3ed90030d1 \
|
|
sha256 43d2eacd573a4faff296fa925dd97fbf2aedbf1ae35c6263478210c61004c854 \
|
|
size 1829864
|
|
|
|
depends_lib-append port:libdbi
|
|
|
|
configure.args-append \
|
|
--with-dbi-incdir=${prefix}/include \
|
|
--with-dbi-libdir=${prefix}/lib \
|
|
--disable-docs
|
|
|
|
patch.pre_args -p1
|
|
# via https://sources.debian.org/data/main/libd/libdbi-drivers/0.9.0-13/debian/patches/compile_w_gcc14.patch
|
|
patchfiles compile_w_gcc14.patch
|
|
|
|
platform darwin arm {
|
|
depends_build-append \
|
|
port:automake
|
|
|
|
post-patch {
|
|
# Use newer config.guess and config.sub to support Apple Silicon.
|
|
set automake_dirs [glob -directory ${prefix}/share automake-*]
|
|
set automake_dir [lindex [lsort -command vercmp $automake_dirs] end]
|
|
copy -force ${automake_dir}/config.guess ${automake_dir}/config.sub \
|
|
${worksrcpath}
|
|
}
|
|
}
|
|
|
|
if {![variant_isset mysql57] && ![variant_isset mysql8] && ![variant_isset postgresql15] && ![variant_isset freetds] && ![variant_isset sqlite3]} {
|
|
default_variants +sqlite3
|
|
}
|
|
|
|
variant mysql57 conflicts mysql8 description "Include drivers for MySQL5.7" {
|
|
configure.args-append --with-mysql --with-mysql-incdir=${prefix}/include/mysql57/mysql \
|
|
--with-mysql-libdir=${prefix}/lib/mysql57/mysql
|
|
depends_lib-append path:bin/mysql_config57:mysql57
|
|
}
|
|
|
|
variant mysql8 conflicts mysql57 description "Include drivers for MySQL8" {
|
|
configure.args-append --with-mysql --with-mysql-incdir=${prefix}/include/mysql8/mysql \
|
|
--with-mysql-libdir=${prefix}/lib/mysql8/mysql
|
|
depends_lib-append path:bin/mysql_config8:mysql8
|
|
}
|
|
|
|
variant postgresql15 description "Include drivers for PostgreSQL" {
|
|
configure.args-append --with-pgsql --with-pgsql-incdir=${prefix}/include/postgresql15 \
|
|
--with-pgsql-libdir=${prefix}/lib/postgresql15
|
|
depends_lib-append port:postgresql15
|
|
}
|
|
|
|
variant freetds description "Include drivers for Freetds" {
|
|
post-patch {
|
|
# This bug has never been fixed: https://marc.info/?l=freetds&m=150029469720272
|
|
# The followin borrowed from: https://gitea.nek0.eu/nek0/nixpkgs/commit/75666aad62b1b66909b9656a9619e08cb6919543.diff
|
|
reinplace "s|CS_TDS_80|CS_TDS_73|" ${worksrcpath}/drivers/freetds/dbd_freetds.c
|
|
}
|
|
configure.args-append --with-freetds --with-freetds-incdir=${prefix}/include/freetds
|
|
depends_lib-append port:freetds
|
|
}
|
|
|
|
variant sqlite3 description "Include drivers for SQLite3" {
|
|
configure.args-append --with-sqlite3 --with-sqlite3-dir=${prefix}
|
|
depends_lib-append port:sqlite3
|
|
}
|
|
|
|
variant docs description "Build the documentation" {
|
|
configure.args-delete --disable-docs
|
|
depends_build-append port:openjade
|
|
}
|
|
|
|
variant debug description "Build debug version" {
|
|
build.target debug
|
|
}
|