Files
2026-06-22 22:47:32 +03:00

79 lines
2.8 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
PortGroup github 1.0
PortGroup lua 1.0
PortGroup makefile 1.0
name lua-luasql-sqlite3
github.setup lunarmodules luasql 2.7.0
github.tarball_from archive
revision 0
categories lua devel
license MIT
maintainers nomaintainer
description LuaSQL is a simple interface from Lua to a DBMS.
long_description {*}${description} It enables a Lua program to connect to\
databases, execute arbitrary SQL statements and retrieve results in a\
row-by-row cursor fashion.
homepage http://lunarmodules.github.io/luasql/
checksums rmd160 dfb8d454ac8021621b4fd229969fa4c6365032ee \
sha256 15de59f0ea1a2ab205a11e0115d760f8e0c3fee0d3fcc37f52e326a53236e0c7 \
size 111312
makefile.override-append PREFIX \
CFLAGS
makefile.has_destdir no
build.args-append LIB_OPTION="-bundle -undefined dynamic_lookup \$LDFLAGS"
build.target-append sqlite3
foreach branch ${lua.branches} {
set subname luasql-sqlite3
set branch_no_dot [join [split ${branch} .] ""]
set subport_name lua${branch_no_dot}-${subname}
subport ${subport_name} {}
if {${subport} eq ${subport_name}} {
lua.version ${branch}
destroot.args-append LUA_SYS_VER=${lua.version}
pre-destroot {
xinstall -d -m 0755 ${destroot}${prefix}/lib/lua/${lua.version}
}
post-destroot {
# see https://luarocks.org/manifests/tomasguisasola/luasql-sqlite3-${version}-3.rockspec
set luarocks_dir ${prefix}/lib/luarocks/rocks-${lua.version}/luasql-sqlite3/${version}-3
xinstall -d -m 0755 ${destroot}${luarocks_dir}
file copy ${worksrcpath}/doc \
${destroot}${luarocks_dir}
file copy ${worksrcpath}/tests \
${destroot}${luarocks_dir}
}
}
}
subport ${name} {
distfiles
patchfiles
extract.rename no
platforms any
supported_archs noarch
foreach deptype {depends_extract depends_patch depends_lib depends_build depends_run depends_test} {
${deptype}
}
proc lua::callback {} {}
build {}
destroot {
set docdir ${destroot}${prefix}/share/doc/${subport}
xinstall -d -m 0755 ${docdir}
set f [open "${docdir}/README" w 0644]
puts ${f} "[option subport] is a stub port"
close ${f}
}
}