Prune www/mod_log_config-st
[dports.git] / databases / sqlite3 / Makefile
1 # Created by: Ying-Chieh Liao <ijliao@FreeBSD.org>
2 # $FreeBSD$
3
4 PORTNAME=       sqlite3
5 PORTVERSION=    3.18.0
6 CATEGORIES=     databases
7 MASTER_SITES=   https://www.sqlite.org/2017/ http://www2.sqlite.org/2017/ http://www3.sqlite.org/2017/
8 DISTNAME=       sqlite-autoconf-${PORTVERSION:C/\.([[:digit:]])[[:>:]]/0\1/g:S/.//g}00
9
10 MAINTAINER=     pavelivolkov@gmail.com
11 COMMENT=        SQL database engine in a C library
12
13 LICENSE=        PD
14
15 USES=           libtool ncurses pathfix
16 USE_LDCONFIG=   yes
17 GNU_CONFIGURE=  yes
18 INSTALL_TARGET= install-strip
19
20 MAKE_JOBS_UNSAFE=       yes
21
22 # Compilation Options For SQLite https://www.sqlite.org/compile.html
23 OPTIONS_DEFINE= FTS4 UPD_DEL_LIMIT URI URI_AUTHORITY SOUNDEX METADATA \
24                 DIRECT_READ MEMMAN SECURE_DELETE UNLOCK_NOTIFY THREADS \
25                 EXTENSION ARMOR STMT DBSTAT FTS5 JSON1 RBU NULL_TRIM \
26                 LIKENOTBLOB STSHELL FTS3_TOKEN SESSION UNKNOWN_SQL
27 OPTIONS_SINGLE= RAMT
28 OPTIONS_RADIO=  STAT
29 OPTIONS_GROUP=  UNICODE RTREEG RL
30
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 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 EXTENSION_DESC=         Allow loadable extensions
41 STSHELL_DESC=           Statically link libsqlite3 into shell
42
43 # https://sqlite.org/compile.html#enable_null_trim
44 NULL_TRIM_DESC=         Omits NULL columns at the ends of rows
45
46 # https://www.sqlite.org/sessionintro.html
47 SESSION_DESC=           Enable the Session Extension
48
49 # https://sqlite.org/compile.html#like_doesnt_match_blobs
50 LIKENOTBLOB_DESC=       LIKE does not match blobs
51
52 # https://www.sqlite.org/compile.html#enable_api_armor
53 ARMOR_DESC=             Detect misuse of the API
54
55 # http://sqlite.org/compile.html#enable_unknown_sql_function
56 UNKNOWN_SQL_DESC=       suppress unknown function errors
57
58 # https://www.sqlite.org/fts3.html
59 # https://www.sqlite.org/compile.html#enable_fts3_parenthesis
60 FTS4_DESC=              Enable FTS3/4 (Full Text Search) module
61
62 # https://www.sqlite.org/fts5.html
63 FTS5_DESC=              Enable version 5 full-text search engine
64
65 # https://www.sqlite.org/compile.html#enable_fts3_tokenizer
66 # https://www.sqlite.org/fts3.html#f3tknzr
67 FTS3_TOKEN_DESC=        Enable two-args version fts3_tokenizer
68
69 # https://www.sqlite.org/json1.html
70 JSON1_DESC=             Enable the JSON1 extension
71
72 # https://www.sqlite.org/rbu.html
73 RBU_DESC=               Enable the Resumable Bulk Update
74
75 # https://www.sqlite.org/c3ref/stmt_scanstatus.html
76 STMT_DESC=              Prepared Statement Scan Status
77
78 # https://www.sqlite.org/tempfiles.html#tempstore
79 OPTIONS_SINGLE_RAMT=    TS0 TS1 TS2 TS3
80 RAMT_DESC=              Where to store temporary file
81 TS0_DESC=               Always use temporary file
82 TS1_DESC=               File by default, change allowed PRAGMA
83 TS2_DESC=               Memory by default, change allowed PRAGMA
84 TS3_DESC=               Always use memory
85
86 # https://www.sqlite.org/queryplanner-ng.html#qpstab
87 OPTIONS_RADIO_STAT=     STAT3 STAT4
88 STAT_DESC=              Which query planner to use, Stability or ...
89 STAT3_DESC=             collect histogram data from leftmost column
90 STAT4_DESC=             collect histogram data from all columns
91
92 # https://www.sqlite.org/dbstat.html
93 DBSTAT_DESC=            Enable DBSTAT Virtual Table
94
95 # https://www.sqlite.org/fts3.html#tokenizer
96 OPTIONS_GROUP_UNICODE=  ICU UNICODE61
97 UNICODE_DESC=           Unicode support
98 UNICODE61_DESC=         Unicode Version 6.1 tokenizer
99
100 # https://www.sqlite.org/rtree.html
101 OPTIONS_GROUP_RTREEG=   RTREE RTREE_INT
102 RTREEG_DESC=            Index type for range queries
103 RTREE_DESC=             Enable R*Tree module
104 RTREE_INT_DESC=         Store 32-bit sig int (no float) coordinates
105
106 OPTIONS_GROUP_RL=       READLINES READLINEP EDITLINE
107 RL_DESC=                Which command line editing library to use:
108 READLINES_DESC=         the libreadline from system
109 READLINEP_DESC=         the GNU libreadline from ports
110 EDITLINE_DESC=          the BSD libedit from ports
111 READLINES_PREVENTS=     READLINEP EDITLINE
112 READLINEP_PREVENTS=     READLINES EDITLINE
113 EDITLINE_PREVENTS=      READLINES READLINEP
114
115 OPTIONS_DEFAULT=        FTS4 URI METADATA SECURE_DELETE UNLOCK_NOTIFY THREADS \
116                         EXTENSION TS1 UNICODE61 RTREE DBSTAT STSHELL READLINES \
117                         FTS3_TOKEN
118 # SECURE_DELETE, UNLOCK_NOTIFY, DBSTAT (since 41.0) used by www/firefox et al.
119 # RTREE used by graphics/mapnik, databases/spatialite
120 # FTS3_TOKEN used by audio/clementine-player
121
122 PLIST_FILES=    bin/sqlite3 include/sqlite3.h include/sqlite3ext.h \
123                 lib/libsqlite3.a lib/libsqlite3.so lib/libsqlite3.so.0 \
124                 lib/libsqlite3.so.0.8.6 libdata/pkgconfig/sqlite3.pc \
125                 man/man1/sqlite3.1.gz
126
127 # The default numeric file permissions for newly created database files under unix.
128 # If not specified, the default is 0644 which means that the files is globally
129 # readable but only writable by the creator.
130 .ifdef DEFAULT_FILE_PERMISSIONS
131 CPPFLAGS+=              -DSQLITE_DEFAULT_FILE_PERMISSIONS=${DEFAULT_FILE_PERMISSIONS}
132 .endif
133
134 # Use an in-ram database for temporary tables (never,no,yes,always),
135 TS0_CPPFLAGS=   -DSQLITE_TEMP_STORE=0
136 TS1_CPPFLAGS=   -DSQLITE_TEMP_STORE=1
137 TS2_CPPFLAGS=   -DSQLITE_TEMP_STORE=2
138 TS3_CPPFLAGS=   -DSQLITE_TEMP_STORE=3
139
140 RTREE_CPPFLAGS= -DSQLITE_ENABLE_RTREE=1
141 RTREE_INT_CPPFLAGS=     -DSQLITE_RTREE_INT_ONLY=1
142
143 FTS4_CPPFLAGS=  -DSQLITE_ENABLE_FTS3_PARENTHESIS=1 -DSQLITE_ENABLE_FTS4=1
144 FTS5_CONFIGURE_ENABLE=  fts5
145 FTS3_TOKEN_CPPFLAGS=    -DSQLITE_ENABLE_FTS3_TOKENIZER=1
146
147 SOUNDEX_CPPFLAGS=       -DSQLITE_SOUNDEX=1
148 MEMMAN_CPPFLAGS=        -DSQLITE_ENABLE_MEMORY_MANAGEMENT=1
149 UPD_DEL_LIMIT_CPPFLAGS= -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT=1
150 UPD_DEL_LIMIT_PREVENTS= UPD_DEL_LIMIT
151 UPD_DEL_LIMIT_PREVENTS_MSG=     this option may only be used when the library is built from source, not from the amalgamation. Please, do not select it with this port.
152 SECURE_DELETE_CPPFLAGS= -DSQLITE_SECURE_DELETE=1
153 UNLOCK_NOTIFY_CPPFLAGS= -DSQLITE_ENABLE_UNLOCK_NOTIFY=1
154 METADATA_CPPFLAGS=      -DSQLITE_ENABLE_COLUMN_METADATA=1
155 STAT3_CPPFLAGS= -DSQLITE_ENABLE_STAT3=1
156 STAT4_CPPFLAGS= -DSQLITE_ENABLE_STAT4=1
157 DBSTAT_CPPFLAGS=        -DSQLITE_ENABLE_DBSTAT_VTAB=1
158 URI_CPPFLAGS=   -DSQLITE_USE_URI=1
159 URI_AUTHORITY_CPPFLAGS= -DSQLITE_ALLOW_URI_AUTHORITY=1
160 DIRECT_READ_CPPFLAGS=   -DSQLITE_DIRECT_OVERFLOW_READ=1
161 ARMOR_CPPFLAGS= -DSQLITE_ENABLE_API_ARMOR=1
162 STMT_CPPFLAGS=  -DSQLITE_ENABLE_STMT_SCANSTATUS=1
163
164 EXTENSION_CONFIGURE_ENABLE=     dynamic-extensions
165
166 THREADS_CONFIGURE_ENABLE=       threadsafe
167 THREADS_LIBS=           -lpthread
168
169 ICU_BUILD_DEPENDS=      ${LOCALBASE}/bin/icu-config:devel/icu
170 ICU_LIB_DEPENDS=        libicudata.so:devel/icu
171 ICU_CPPFLAGS=   `${LOCALBASE}/bin/icu-config --cppflags` -DSQLITE_ENABLE_ICU=1
172 ICU_LIBS=       `${LOCALBASE}/bin/icu-config --ldflags`
173
174 UNICODE61_CPPFLAGS=     ""
175 UNICODE61_CPPFLAGS_OFF= -DSQLITE_DISABLE_FTS3_UNICODE=1
176
177 READLINES_CONFIGURE_ON= --enable-readline
178 READLINES_USES= readline
179 READLINEP_CONFIGURE_ON= --enable-readline
180 READLINEP_USES= readline:port
181 EDITLINE_CONFIGURE_ENABLE=      editline
182 EDITLINE_USES=  libedit
183
184 JSON1_CONFIGURE_ENABLE= json1
185
186 RBU_CPPFLAGS=   -DSQLITE_ENABLE_RBU=1
187
188 LIKENOTBLOB_CPPFLAGS=   -DSQLITE_LIKE_DOESNT_MATCH_BLOBS=1
189
190 STSHELL_CONFIGURE_ENABLE=       static-shell
191
192 SESSION_CONFIGURE_ENABLE=       session
193
194 UNKNOWN_SQL_CPPFLAGS=   -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION=1
195
196 NULL_TRIM_CPPFLAGS=     -DSQLITE_ENABLE_NULL_TRIM=1
197
198 .include <bsd.port.options.mk>
199
200 # Platform Configuration
201 .if !defined(WITH_DEBUG)
202 CFLAGS+=        -Os
203 .endif
204 CPPFLAGS+=      -DHAVE_ISNAN=1 -DHAVE_MALLOC_USABLE_SIZE=1 -DHAVE_GMTIME_R=1 -DHAVE_LOCALTIME_R=1 -DHAVE_USLEEP=1 -DHAVE_STRCHRNUL=1
205
206 post-configure:
207         @${ECHO_MSG} "===> CONFIGURE_ARGS=${CONFIGURE_ARGS}"
208         @${ECHO_MSG} "===> CPPFLAGS=${CPPFLAGS}"
209         @${ECHO_MSG} "===> CFLAGS=${CFLAGS}"
210         @${ECHO_MSG} "===> LDFLAGS=${LDFLAGS}"
211         @${ECHO_MSG} "===> LIBS=${LIBS}"
212
213 post-build:
214 .if ${ARCH}=="i386"
215         @${ECHO_MSG} "===> WARNING: on ${ARCH} don't pass atof1-* tests"
216 .endif
217
218 # for compares with checksum from of the site
219 sha1:
220         @sha1 ${DISTDIR}/${ALLFILES}
221
222 .include <bsd.port.mk>