1 |
< |
# $MidnightBSD: mports/databases/sqlite3/Makefile,v 1.13 2011/05/27 01:51:09 laffer1 Exp $ |
1 |
> |
# $MidnightBSD$ |
2 |
|
|
3 |
< |
PORTNAME= sqlite |
4 |
< |
PORTVERSION= 3.6.19 |
5 |
< |
CATEGORIES= databases lang tcl |
6 |
< |
MASTER_SITES= http://www.sqlite.org/ |
7 |
< |
DISTNAME= sqlite-${PORTVERSION} |
3 |
> |
PORTNAME= sqlite3 |
4 |
> |
PORTVERSION= 3.8.7 |
5 |
> |
CATEGORIES= databases |
6 |
> |
MASTER_SITES= http://www.sqlite.org/2014/ http://www2.sqlite.org/2014/ http://www3.sqlite.org/2014/ |
7 |
> |
DISTNAME= sqlite-autoconf-3080700 |
8 |
|
|
9 |
|
MAINTAINER= ports@MidnightBSD.org |
10 |
< |
COMMENT= An SQL database engine in a C library w/ Tcl wrapper |
10 |
> |
COMMENT= SQL database engine in a C library |
11 |
> |
|
12 |
|
LICENSE= publicdom |
13 |
|
|
14 |
< |
USE_GMAKE= YES |
15 |
< |
USE_AUTOTOOLS= libtool |
14 |
> |
CONFLICTS= sqlite34-[0-9]* sqlcipher-[0-9]* |
15 |
> |
|
16 |
> |
USES= pathfix pkgconfig |
17 |
|
USE_LDCONFIG= YES |
18 |
|
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 |
19 |
|
|
20 |
< |
OPTIONS= DEBUG "Enable debugging & verbose explain" off \ |
26 |
< |
FTS3 "Enable FTS3 (Full Text Search) module" off \ |
27 |
< |
RTREE "Enable R*Tree module" off \ |
28 |
< |
RAMTABLE "Store temporary tables in RAM" off \ |
29 |
< |
TCLWRAPPER "Enable TCL wrapper" off \ |
30 |
< |
METADATA "Enable column metadata" on \ |
31 |
< |
THREADSAFE "Build thread-safe library" on \ |
32 |
< |
EXTENSION "Allow loadable extensions" off |
20 |
> |
MAKE_JOBS_UNSAFE= yes |
21 |
|
|
22 |
< |
.include <bsd.port.pre.mk> |
22 |
> |
# Compilation Options For SQLite http://www.sqlite.org/compile.html |
23 |
> |
OPTIONS_DEFINE= FTS3 ICU RTREE RAMTABLE UPD_DEL_LIMIT URI URI_AUTHORITY SOUNDEX METADATA \ |
24 |
> |
STAT3 DIRECT_READ MEMMAN SECURE_DELETE UNLOCK_NOTIFY THREADSAFE \ |
25 |
> |
EXTENSION |
26 |
> |
OPTIONS_DEFAULT= FTS3 URI METADATA SECURE_DELETE UNLOCK_NOTIFY THREADSAFE EXTENSION |
27 |
> |
FTS3_DESC= Enable FTS3/4 (Full Text Search) module |
28 |
> |
ICU_DESC= Enable built with ICU |
29 |
> |
RTREE_DESC= Enable R*Tree module (${RTREE_INT}) |
30 |
> |
RAMTABLE_DESC= Store temporary tables in RAM = ${TEMP_STORE} |
31 |
> |
UPD_DEL_LIMIT_DESC= ORDER BY and LIMIT on UPDATE and DELETE |
32 |
> |
URI_DESC= Enable use the URI filename |
33 |
> |
URI_AUTHORITY_DESC= Allow convert URL into a UNC |
34 |
> |
SOUNDEX_DESC= Enables the soundex() SQL function |
35 |
> |
METADATA_DESC= Enable column metadata |
36 |
> |
STAT3_DESC= Help SQLite to chose a better query plan |
37 |
> |
DIRECT_READ_DESC= File is read directly from disk |
38 |
> |
MEMMAN_DESC= Allows it to release unused memory |
39 |
> |
SECURE_DELETE_DESC= Overwrite deleted information with zeros |
40 |
> |
UNLOCK_NOTIFY_DESC= Enable notification on unlocking |
41 |
> |
THREADSAFE_DESC= Build thread-safe library |
42 |
> |
EXTENSION_DESC= Allow loadable extensions |
43 |
|
|
44 |
< |
.if defined(WITH_DEBUG) |
45 |
< |
CONFIGURE_ARGS+= --enable-debug |
44 |
> |
.include <bsd.mport.options.mk> |
45 |
> |
|
46 |
> |
# NAME83 "Enable use 8.3 filename for temp files" off \ |
47 |
> |
# Some devices are compelled to use an older file system with 8+3 filename |
48 |
> |
# restrictions for backwards compatibility, or due to other non-technical factors. |
49 |
> |
# http://www.sqlite.org/shortnames.html |
50 |
> |
.if ${PORT_OPTIONS:MNAME83} |
51 |
> |
CPPFLAGS+= -DSQLITE_ENABLE_8_3_NAMES=1 |
52 |
|
.endif |
53 |
|
|
54 |
< |
.if defined(WITH_FTS3) |
55 |
< |
CFLAGS+= -DSQLITE_ENABLE_FTS3=1 |
54 |
> |
# The default numeric file permissions for newly created database files under unix. |
55 |
> |
# If not specified, the default is 0644 which means that the files is globally |
56 |
> |
# readable but only writable by the creator. |
57 |
> |
.ifdef DEFAULT_FILE_PERMISSIONS |
58 |
> |
CPPFLAGS+= -DSQLITE_DEFAULT_FILE_PERMISSIONS=${DEFAULT_FILE_PERMISSIONS} |
59 |
|
.endif |
60 |
|
|
61 |
< |
.if defined(WITH_RTREE) |
62 |
< |
CFLAGS+= -DSQLITE_ENABLE_RTREE=1 |
61 |
> |
# This macro sets the default size of the page-cache for temporary files |
62 |
> |
# created by SQLite to store intermediate results, in pages. |
63 |
> |
.ifdef TEMP_CACHE_SIZE |
64 |
> |
CPPFLAGS+= -DSQLITE_DEFAULT_TEMP_CACHE_SIZE=${TEMP_CACHE_SIZE} |
65 |
|
.endif |
66 |
|
|
67 |
< |
.if defined(WITH_RAMTABLE) |
68 |
< |
CONFIGURE_ARGS+= --enable-tempstore=yes |
67 |
> |
.if ${PORT_OPTIONS:MMEMMAN} |
68 |
> |
CPPFLAGS+= -DSQLITE_ENABLE_MEMORY_MANAGEMENT=1 |
69 |
|
.endif |
70 |
|
|
71 |
< |
.if defined(WITH_TCLWRAPPER) |
72 |
< |
CATEGORIES+= lang tcl |
73 |
< |
COMMENT+= with TCL Wrapper |
74 |
< |
USE_TCL_RUN= 84+ |
75 |
< |
CONFIGURE_ARGS+= --with-tcl=${TCL_LIBDIR} |
76 |
< |
PLIST_SUB+= WITH_TCLWRAPPER="" |
77 |
< |
ALL_TARGET= all tclsqlite3 |
78 |
< |
INSTALL_TARGET= install tcl_install |
71 |
> |
.if ${PORT_OPTIONS:MUPD_DEL_LIMIT} |
72 |
> |
CPPFLAGS+= -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT=1 |
73 |
> |
.endif |
74 |
> |
|
75 |
> |
.if ${PORT_OPTIONS:MURI} |
76 |
> |
CPPFLAGS+= -DSQLITE_USE_URI=1 |
77 |
> |
.endif |
78 |
> |
|
79 |
> |
.if ${PORT_OPTIONS:MURI_AUTHORITY} |
80 |
> |
CPPFLAGS+= -DSQLITE_ALLOW_URI_AUTHORITY=1 |
81 |
> |
.endif |
82 |
> |
|
83 |
> |
.if ${PORT_OPTIONS:MSOUNDEX} |
84 |
> |
CPPFLAGS+= -DSQLITE_SOUNDEX=1 |
85 |
> |
.endif |
86 |
> |
|
87 |
> |
.if ${PORT_OPTIONS:MSTAT3} |
88 |
> |
CPPFLAGS+= -DSQLITE_ENABLE_STAT3=1 |
89 |
> |
.endif |
90 |
> |
|
91 |
> |
.if ${PORT_OPTIONS:MDIRECT_READ} |
92 |
> |
CPPFLAGS+= -DSQLITE_DIRECT_OVERFLOW_READ=1 |
93 |
> |
.endif |
94 |
> |
|
95 |
> |
.if ${PORT_OPTIONS:MFTS3} |
96 |
> |
CPPFLAGS+= -DSQLITE_ENABLE_FTS3=1 -DSQLITE_ENABLE_FTS3_PARENTHESIS=1 -DSQLITE_ENABLE_FTS4=1 |
97 |
> |
.endif |
98 |
> |
|
99 |
> |
.if ${PORT_OPTIONS:MRTREE} |
100 |
> |
CPPFLAGS+= -DSQLITE_ENABLE_RTREE=1 |
101 |
> |
.ifdef RTREE_INT |
102 |
> |
CPPFLAGS+= -DSQLITE_RTREE_INT_ONLY=1 |
103 |
> |
RTREE_INT= "int" |
104 |
|
.else |
105 |
< |
CONFIGURE_ARGS+= --disable-tcl |
62 |
< |
PLIST_SUB+= WITH_TCLWRAPPER="@comment " |
105 |
> |
RTREE_INT= "float" |
106 |
|
.endif |
107 |
+ |
.endif |
108 |
|
|
109 |
< |
.if !defined(WITHOUT_METADATA) |
110 |
< |
CFLAGS+= -DSQLITE_ENABLE_COLUMN_METADATA=1 |
109 |
> |
.if ${PORT_OPTIONS:MICU} |
110 |
> |
BUILD_DEPENDS+= ${LOCALBASE}/bin/icu-config:${PORTSDIR}/devel/icu |
111 |
> |
LIB_DEPENDS+= icudata:${PORTSDIR}/devel/icu |
112 |
> |
CPPFLAGS+= -DSQLITE_ENABLE_ICU=1 |
113 |
> |
CPPFLAGS+= `${LOCALBASE}/bin/icu-config --cppflags` |
114 |
> |
LDFLAGS+= `${LOCALBASE}/bin/icu-config --ldflags` |
115 |
|
.endif |
116 |
|
|
117 |
< |
.if !defined(WITHOUT_THREADSAFE) |
118 |
< |
CONFIGURE_ARGS+= --enable-threadsafe \ |
119 |
< |
--enable-threads-override-locks |
117 |
> |
# Use an in-ram database for temporary tables (never,no,yes,always), |
118 |
> |
# which is equivalent of TEMP_STORE=[0,1,2,3], default = 1. |
119 |
> |
.if ${PORT_OPTIONS:MRAMTABLE} |
120 |
> |
TEMP_STORE?= 2 |
121 |
> |
CPPFLAGS+= -DSQLITE_TEMP_STORE=${TEMP_STORE} |
122 |
> |
.endif |
123 |
> |
|
124 |
> |
.if ${PORT_OPTIONS:MSECURE_DELETE} |
125 |
> |
CPPFLAGS+= -DSQLITE_SECURE_DELETE=1 |
126 |
> |
.endif |
127 |
> |
|
128 |
> |
.if ${PORT_OPTIONS:MUNLOCK_NOTIFY} |
129 |
> |
CPPFLAGS+= -DSQLITE_ENABLE_UNLOCK_NOTIFY=1 |
130 |
> |
.endif |
131 |
> |
|
132 |
> |
.if ${PORT_OPTIONS:MMETADATA} |
133 |
> |
CPPFLAGS+= -DSQLITE_ENABLE_COLUMN_METADATA=1 |
134 |
> |
.endif |
135 |
> |
|
136 |
> |
.if ${PORT_OPTIONS:MTHREADSAFE} |
137 |
> |
CONFIGURE_ARGS+= --enable-threadsafe |
138 |
> |
LDFLAGS+= ${PTHREAD_LIBS} |
139 |
|
.else |
140 |
|
CONFIGURE_ARGS+= --disable-threadsafe |
141 |
|
.endif |
142 |
|
|
143 |
< |
.if !defined(WITHOUT_EXTENSION) |
144 |
< |
CONFIGURE_ARGS+= --enable-load-extension |
143 |
> |
.if ${PORT_OPTIONS:MEXTENSION} |
144 |
> |
CONFIGURE_ARGS+= --enable-dynamic-extensions |
145 |
|
.else |
146 |
< |
CONFIGURE_ARGS+= --disable-load-extension |
146 |
> |
CONFIGURE_ARGS+= --disable-dynamic-extensions |
147 |
|
.endif |
148 |
|
|
149 |
< |
.if defined(WITH_TCLWRAPPER) |
150 |
< |
post-install: |
151 |
< |
@${INSTALL_PROGRAM} ${WRKSRC}/.libs/tclsqlite3 ${PREFIX}/bin |
85 |
< |
@${MKDIR} ${EXAMPLESDIR} |
86 |
< |
@${INSTALL_DATA} ${FILESDIR}/example.tcl ${EXAMPLESDIR} |
149 |
> |
post-build: |
150 |
> |
.if ${ARCH}=="i386" |
151 |
> |
@${ECHO_MSG} "===> WARNING: on ${ARCH} don't pass atof1-* tests" |
152 |
|
.endif |
153 |
|
|
154 |
< |
.include <bsd.port.post.mk> |
154 |
> |
post-install: |
155 |
> |
@${INSTALL_MAN} ${WRKSRC}/sqlite3.1 ${MANPREFIX}/man/man1 |
156 |
> |
|
157 |
> |
.include <bsd.port.mk> |