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