# vim: ft=make ts=4 sw=4 noet
.DEFAULT_GOAL := all

NAME     = sqlite
VERSION  = 3530200
DISTNAME = sqlite-autoconf-$(VERSION)
GARTYPE  = v2

DESCRIPTION = SQLite3, the lightweight SQL library
define BLURB
    SQLite is a C-language library that implements a small, fast, self-contained, high-reliability, full-featured, SQL database engine.
    SQLite is the most used database engine in the world.
endef

MASTER_SITES = https://sqlite.org/2026/
DISTFILES   += $(DISTNAME).tar.gz

LICENSE = README.txt

PACKAGES                += OZSWsqlite
SPKG_DESC_OZSWsqlite     = SQLite3, the lightweight SQL library
CATALOGNAME_OZSWsqlite  = sqlite

EXTENSIONS = 1

# autosetup only understands --prefix; override GAR's autoconf DIRPATHS default
CONFIGURE_ARGS = --prefix=$(prefix)

post-configure:
	@echo "==> Patching libtool scripts for bash compatibility"
	@find $(WORKSRC) -name "libtool" -type f -exec \
	    gsed -i 's/ECHO="print -r --"/ECHO="printf %s\\n"/g' {} \;
	@$(MAKECOOKIE)

include gar/category.mk
