1 |
# $MidnightBSD$ |
2 |
|
3 |
PORTNAME= sqlite3 |
4 |
PORTVERSION= 3.8.5 |
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-3080500 |
8 |
|
9 |
MAINTAINER= ports@MidnightBSD.org |
10 |
COMMENT= SQL database engine in a C library |
11 |
|
12 |
LICENSE= publicdom |
13 |
|
14 |
CONFLICTS= sqlite34-[0-9]* sqlcipher-[0-9]* |
15 |
|
16 |
USES= pathfix pkgconfig |
17 |
USE_LDCONFIG= YES |
18 |
GNU_CONFIGURE= YES |
19 |
|
20 |
MAKE_JOBS_UNSAFE= yes |
21 |
|
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 |
.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 |
# 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 |
# 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 ${PORT_OPTIONS:MMEMMAN} |
68 |
CPPFLAGS+= -DSQLITE_ENABLE_MEMORY_MANAGEMENT=1 |
69 |
.endif |
70 |
|
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 |
RTREE_INT= "float" |
106 |
.endif |
107 |
.endif |
108 |
|
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 |
# 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 ${PORT_OPTIONS:MEXTENSION} |
144 |
CONFIGURE_ARGS+= --enable-dynamic-extensions |
145 |
.else |
146 |
CONFIGURE_ARGS+= --disable-dynamic-extensions |
147 |
.endif |
148 |
|
149 |
post-build: |
150 |
.if ${ARCH}=="i386" |
151 |
@${ECHO_MSG} "===> WARNING: on ${ARCH} don't pass atof1-* tests" |
152 |
.endif |
153 |
|
154 |
post-install: |
155 |
@${INSTALL_MAN} ${WRKSRC}/sqlite3.1 ${MANPREFIX}/man/man1 |
156 |
|
157 |
.include <bsd.port.mk> |