* changed pyproject-metadata build priority (400.000 -> 109.007)
[t2sde.git] / package / lua / luasql / luasql.conf
blob321aeb23b3dc35410bad408e30df15cd68ca5ed0
1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # T2 SDE: package/*/luasql/luasql.conf
3 # Copyright (C) 2007 - 2022 The T2 SDE Project
4
5 # This Copyright note is generated by scripts/Create-CopyPatch,
6 # more information can be found in the files COPYING and README.
7
8 # This program is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License version 2.
10 # --- T2-COPYRIGHT-NOTE-END ---
12 # inherit some stuff like myCFLAGS, myLIBS
13 . $base/package/*/*/lua-conf.in
15 var_append makeinstopt ' ' "LUA_LIBDIR=$root$pkglibdir"
17 pkginstalled mysql && var_append dblist ' ' 'mysql'
18 pkginstalled postgresql && var_append dblist ' ' 'postgres'
19 pkginstalled unixodbc && var_append dblist ' ' 'odbc'
20 pkginstalled sqlite && var_append dblist ' ' 'sqlite3'
22 luasql_build_db() {
23         local db=$1
24         case "$db" in
25         mysql)
26           di="-I$root/$(pkgprefix includedir mysql)/mysql"
27           dl="-L$root/$(pkgprefix libdir mysql)/mysql -lmysqlclient -lz"
28           ;;
29         postgres)
30           di="-I$root/$(pkgprefix includedir postgresql)"
31           dl="-L$root/$(pkgprefix libdir postgresql) -lpq"
32           ;;
33         odbc)
34           di="-I$root/$(pkgprefix includedir unixodbc)"
35           dl="-L$root/$(pkgprefix libdir unixodbc) -lodbc"
36           ;;
37         sqlite3)
38           di="-I$root/$(pkgprefix includedir sqlite)"
39           dl="-L$root/$(pkgprefix libdir sqlite) -lsqlite3"
40           ;;
41         esac
43         eval $MAKE $makeopt T=$db DRIVER_LIBS="'$dl'" DRIVER_INCS="'$di'"
44         eval $MAKE $makeinstopt T=$db
47 luasql_build() {
48         for db in $dblist; do
49                 luasql_build_db $db
50         done
52         makeopt=
53         makeinstopt=
55 hook_add premake 3 luasql_build