1 |
# $MidnightBSD: mports/databases/sqlite3/Makefile,v 1.15 2011/05/27 01:55:46 laffer1 Exp $ |
2 |
|
3 |
PORTNAME= sqlite |
4 |
PORTVERSION= 3.6.23.1 |
5 |
CATEGORIES= databases lang tcl |
6 |
MASTER_SITES= http://www.sqlite.org/ |
7 |
DISTNAME= sqlite-${PORTVERSION} |
8 |
|
9 |
MAINTAINER= ports@MidnightBSD.org |
10 |
COMMENT= An SQL database engine in a C library w/ Tcl wrapper |
11 |
LICENSE= publicdom |
12 |
|
13 |
USE_GMAKE= YES |
14 |
USE_AUTOTOOLS= libtool |
15 |
USE_LDCONFIG= YES |
16 |
GNU_CONFIGURE= YES |
17 |
USE_GNOME= gnomehack pkgconfig |
18 |
USE_TCL_BUILD= 84+ |
19 |
CONFIGURE_ARGS= --prefix=${PREFIX} |
20 |
CONFIGURE_ENV+= TCLSH_CMD="${TCLSH}" \ |
21 |
TCLLIBDIR=${PREFIX}/lib/${PORTNAME} \ |
22 |
ac_cv_search_pthread_create="" |
23 |
CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd7.0 |
24 |
|
25 |
MAN1= sqlite3.1 |
26 |
|
27 |
OPTIONS= DEBUG "Enable debugging & verbose explain" off \ |
28 |
FTS3 "Enable FTS3 (Full Text Search) module" off \ |
29 |
RTREE "Enable R*Tree module" off \ |
30 |
RAMTABLE "Store temporary tables in RAM" off \ |
31 |
TCLWRAPPER "Enable TCL wrapper" off \ |
32 |
METADATA "Enable column metadata" on \ |
33 |
THREADSAFE "Build thread-safe library" on \ |
34 |
EXTENSION "Allow loadable extensions" on |
35 |
|
36 |
.include <bsd.port.pre.mk> |
37 |
|
38 |
.if defined(WITH_DEBUG) |
39 |
CONFIGURE_ARGS+= --enable-debug |
40 |
.endif |
41 |
|
42 |
.if defined(WITH_FTS3) |
43 |
CFLAGS+= -DSQLITE_ENABLE_FTS3=1 |
44 |
.endif |
45 |
|
46 |
.if defined(WITH_RTREE) |
47 |
CFLAGS+= -DSQLITE_ENABLE_RTREE=1 |
48 |
.endif |
49 |
|
50 |
.if defined(WITH_RAMTABLE) |
51 |
CONFIGURE_ARGS+= --enable-tempstore=yes |
52 |
.endif |
53 |
|
54 |
.if defined(WITH_TCLWRAPPER) |
55 |
CATEGORIES+= lang tcl |
56 |
COMMENT+= with TCL Wrapper |
57 |
USE_TCL_RUN= 84+ |
58 |
CONFIGURE_ARGS+= --with-tcl=${TCL_LIBDIR} |
59 |
PLIST_SUB+= WITH_TCLWRAPPER="" |
60 |
ALL_TARGET= all tclsqlite3 |
61 |
INSTALL_TARGET= install tcl_install |
62 |
.else |
63 |
CONFIGURE_ARGS+= --disable-tcl |
64 |
PLIST_SUB+= WITH_TCLWRAPPER="@comment " |
65 |
.endif |
66 |
|
67 |
.if !defined(WITHOUT_METADATA) |
68 |
CFLAGS+= -DSQLITE_ENABLE_COLUMN_METADATA=1 |
69 |
.endif |
70 |
|
71 |
.if !defined(WITHOUT_THREADSAFE) |
72 |
CONFIGURE_ARGS+= --enable-threadsafe \ |
73 |
--enable-threads-override-locks |
74 |
.else |
75 |
CONFIGURE_ARGS+= --disable-threadsafe |
76 |
.endif |
77 |
|
78 |
.if !defined(WITHOUT_EXTENSION) |
79 |
CONFIGURE_ARGS+= --enable-load-extension |
80 |
.else |
81 |
CONFIGURE_ARGS+= --disable-load-extension |
82 |
.endif |
83 |
|
84 |
post-install: |
85 |
.if defined(WITH_TCLWRAPPER) |
86 |
@${INSTALL_PROGRAM} ${WRKSRC}/.libs/tclsqlite3 ${PREFIX}/bin |
87 |
@${MKDIR} ${EXAMPLESDIR} |
88 |
@${INSTALL_DATA} ${FILESDIR}/example.tcl ${EXAMPLESDIR} |
89 |
.endif |
90 |
.if !defined(NO_INSTALL_MANPAGES) |
91 |
@${INSTALL_MAN} ${WRKSRC}/sqlite3.1 ${MANPREFIX}/man/man1 |
92 |
.endif |
93 |
|
94 |
.include <bsd.port.post.mk> |