summaryrefslogtreecommitdiff
path: root/databases/tcl-sqlite3/Makefile
blob: 07ea4d01847e9bfe0cfce704d717a00751b71afd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49

PORTNAME=	sqlite3
PORTVERSION=	3.34.1
CATEGORIES=	databases tcl
MASTER_SITES=	https://www.sqlite.org/2021/ \
		https://www2.sqlite.org/2021/ \
		https://www3.sqlite.org/2021/
PKGNAMEPREFIX=	tcl-
DISTNAME=	sqlite-autoconf-${PORTVERSION:C/\.([[:digit:]])[[:>:]]/0\1/g:S/.//g}00

MAINTAINER=	pavelivolkov@gmail.com
COMMENT=	SQLite extension for Tcl using the Tcl Extension Architecture (TEA)

LICENSE=	PD

LIB_DEPENDS=	libsqlite3.so:databases/sqlite3

USES=		pkgconfig tcl:tea
USE_LDCONFIG=	yes

CONFIGURE_ARGS=	--with-system-sqlite

CFLAGS+=	`pkg-config --cflags sqlite3`
LDFLAGS+=	`pkg-config --libs sqlite3`

SUB_FILES=	example.tcl
SUB_LIST=	"TCLSH=${TCLSH}"

WRKSRC=		${WRKDIR}/${DISTNAME}/tea

PLIST_FILES=	lib/${PORTNAME}/libsqlite${PORTVERSION}.so \
		lib/${PORTNAME}/pkgIndex.tcl \
		man/mann/sqlite3.n.gz
PORTEXAMPLES=	*

OPTIONS_DEFINE=		EXAMPLES THREADS
OPTIONS_DEFAULT=	THREADS

THREADS_CONFIGURE_ENABLE=	threads

post-patch:
	@${REINPLACE_CMD} -E 's/^(.*\$$\(PACKAGE_NAME\))\$$\(PACKAGE_VERSION\).*$$/\1${PORTVERSION:C/[^[:digit:]]*([[:digit:]]+).*/\1/}/' ${WRKSRC}/Makefile.in

post-install:
	@${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/${PORTNAME}/libsqlite${PORTVERSION}.so
	@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
	${INSTALL_SCRIPT} ${WRKDIR}/${SUB_FILES} ${STAGEDIR}${EXAMPLESDIR}

.include <bsd.port.mk>