2012-10-13 09:27:45 +02:00
# Created by: Ying-Chieh Liao <ijliao@FreeBSD.org>
2004-08-31 21:06:39 +02:00
# $FreeBSD$
2007-03-25 22:02:04 +02:00
PORTNAME = sqlite3
2017-04-01 12:53:29 +02:00
PORTVERSION = 3.18.0
2004-08-31 21:06:39 +02:00
CATEGORIES = databases
2017-01-16 13:57:51 +01:00
MASTER_SITES = https://www.sqlite.org/2017/ http://www2.sqlite.org/2017/ http://www3.sqlite.org/2017/
2015-10-20 16:47:12 +02:00
DISTNAME = sqlite-autoconf-${ PORTVERSION : C / \. ([[ : digit : ]])[[ : > : ]]/0 \1 /g : S /.//g } 00
2004-08-31 21:06:39 +02:00
2012-10-13 09:27:45 +02:00
MAINTAINER = pavelivolkov@gmail.com
2013-05-31 16:03:15 +02:00
COMMENT = SQL database engine in a C library
2004-08-31 21:06:39 +02:00
2016-01-12 15:33:21 +01:00
LICENSE = PD
2010-09-01 19:49:49 +02:00
2015-08-23 17:18:55 +02:00
USES = libtool ncurses pathfix
2013-08-31 19:47:39 +02:00
USE_LDCONFIG = yes
GNU_CONFIGURE = yes
2014-06-27 19:17:31 +02:00
INSTALL_TARGET = install-strip
2016-08-23 22:26:24 +02:00
2012-05-16 21:36:02 +02:00
MAKE_JOBS_UNSAFE = yes
2016-01-11 14:27:05 +01:00
# Compilation Options For SQLite https://www.sqlite.org/compile.html
2014-01-05 16:27:50 +01:00
OPTIONS_DEFINE = FTS4 UPD_DEL_LIMIT URI URI_AUTHORITY SOUNDEX METADATA \
2014-11-01 11:37:06 +01:00
DIRECT_READ MEMMAN SECURE_DELETE UNLOCK_NOTIFY THREADS \
2017-02-21 15:33:28 +01:00
EXTENSION ARMOR STMT DBSTAT FTS5 JSON1 RBU NULL_TRIM \
2016-08-23 22:26:24 +02:00
LIKENOTBLOB STSHELL FTS3_TOKEN SESSION UNKNOWN_SQL
2014-01-05 16:27:50 +01:00
OPTIONS_SINGLE = RAMT
2016-02-11 21:00:35 +01:00
OPTIONS_RADIO = STAT
OPTIONS_GROUP = UNICODE RTREEG RL
2013-12-26 00:33:14 +01:00
2013-03-21 18:43:46 +01:00
UPD_DEL_LIMIT_DESC = ORDER BY and LIMIT on UPDATE and DELETE
URI_DESC = Enable use the URI filename
2013-08-31 19:47:39 +02:00
URI_AUTHORITY_DESC = Allow convert URL into a UNC
2013-03-21 18:43:46 +01:00
SOUNDEX_DESC = Enables the soundex( ) SQL function
METADATA_DESC = Enable column metadata
DIRECT_READ_DESC = File is read directly from disk
MEMMAN_DESC = Allows it to release unused memory
SECURE_DELETE_DESC = Overwrite deleted information with zeros
UNLOCK_NOTIFY_DESC = Enable notification on unlocking
EXTENSION_DESC = Allow loadable extensions
2016-01-11 14:27:05 +01:00
STSHELL_DESC = Statically link libsqlite3 into shell
2010-09-01 19:49:49 +02:00
2017-02-21 15:33:28 +01:00
# https://sqlite.org/compile.html#enable_null_trim
NULL_TRIM_DESC = Omits NULL columns at the ends of rows
2016-05-29 16:14:22 +02:00
# https://www.sqlite.org/sessionintro.html
SESSION_DESC = Enable the Session Extension
2016-01-11 14:27:05 +01:00
# https://sqlite.org/compile.html#like_doesnt_match_blobs
LIKENOTBLOB_DESC = LIKE does not match blobs
# https://www.sqlite.org/compile.html#enable_api_armor
2015-01-21 00:17:11 +01:00
ARMOR_DESC = Detect misuse of the API
2016-08-23 22:26:24 +02:00
# http://sqlite.org/compile.html#enable_unknown_sql_function
UNKNOWN_SQL_DESC = suppress unknown function errors
2016-01-11 14:27:05 +01:00
# https://www.sqlite.org/fts3.html
# https://www.sqlite.org/compile.html#enable_fts3_parenthesis
2015-10-20 16:47:12 +02:00
FTS4_DESC = Enable FTS3/4 ( Full Text Search) module
2016-01-11 14:27:05 +01:00
# https://www.sqlite.org/fts5.html
2015-10-20 16:47:12 +02:00
FTS5_DESC = Enable version 5 full-text search engine
2016-03-14 22:31:37 +01:00
# https://www.sqlite.org/compile.html#enable_fts3_tokenizer
# https://www.sqlite.org/fts3.html#f3tknzr
FTS3_TOKEN_DESC = Enable two-args version fts3_tokenizer
2016-01-11 14:27:05 +01:00
# https://www.sqlite.org/json1.html
2015-10-20 16:47:12 +02:00
JSON1_DESC = Enable the JSON1 extension
2016-01-11 14:27:05 +01:00
# https://www.sqlite.org/rbu.html
2015-10-20 16:47:12 +02:00
RBU_DESC = Enable the Resumable Bulk Update
2016-01-11 14:27:05 +01:00
# https://www.sqlite.org/c3ref/stmt_scanstatus.html
2015-01-21 00:17:11 +01:00
STMT_DESC = Prepared Statement Scan Status
2016-01-11 14:27:05 +01:00
# https://www.sqlite.org/tempfiles.html#tempstore
2013-12-26 00:33:14 +01:00
OPTIONS_SINGLE_RAMT = TS0 TS1 TS2 TS3
2014-05-20 14:38:09 +02:00
RAMT_DESC = Where to store temporary file
TS0_DESC = Always use temporary file
TS1_DESC = File by default, change allowed PRAGMA
TS2_DESC = Memory by default, change allowed PRAGMA
2013-12-26 00:33:14 +01:00
TS3_DESC = Always use memory
2007-03-25 22:02:04 +02:00
2016-01-11 14:27:05 +01:00
# https://www.sqlite.org/queryplanner-ng.html#qpstab
2013-12-26 00:33:14 +01:00
OPTIONS_RADIO_STAT = STAT3 STAT4
2016-01-11 14:27:05 +01:00
STAT_DESC = Which query planner to use, Stability or ...
2013-12-26 00:33:14 +01:00
STAT3_DESC = collect histogram data from leftmost column
STAT4_DESC = collect histogram data from all columns
2005-05-22 02:06:40 +02:00
2016-01-11 14:27:05 +01:00
# https://www.sqlite.org/dbstat.html
2015-05-12 19:22:26 +02:00
DBSTAT_DESC = Enable DBSTAT Virtual Table
2016-01-11 14:27:05 +01:00
# https://www.sqlite.org/fts3.html#tokenizer
2014-01-05 16:27:50 +01:00
OPTIONS_GROUP_UNICODE = ICU UNICODE61
UNICODE_DESC = Unicode support
UNICODE61_DESC = Unicode Version 6.1 tokenizer
2016-01-11 14:27:05 +01:00
# https://www.sqlite.org/rtree.html
2013-12-26 00:33:14 +01:00
OPTIONS_GROUP_RTREEG = RTREE RTREE_INT
RTREEG_DESC = Index type for range queries
RTREE_DESC = Enable R*Tree module
RTREE_INT_DESC = Store 32-bit sig int ( no float) coordinates
2010-08-19 00:02:12 +02:00
2016-02-11 21:00:35 +01:00
OPTIONS_GROUP_RL = READLINES READLINEP EDITLINE
2016-01-11 14:27:05 +01:00
RL_DESC = Which command line editing library to use:
READLINES_DESC = the libreadline from system
READLINEP_DESC = the GNU libreadline from ports
EDITLINE_DESC = the BSD libedit from ports
2016-02-11 21:00:35 +01:00
READLINES_PREVENTS = READLINEP EDITLINE
READLINEP_PREVENTS = READLINES EDITLINE
EDITLINE_PREVENTS = READLINES READLINEP
2016-01-11 14:27:05 +01:00
2014-11-01 11:37:06 +01:00
OPTIONS_DEFAULT = FTS4 URI METADATA SECURE_DELETE UNLOCK_NOTIFY THREADS \
2016-05-06 13:40:28 +02:00
EXTENSION TS1 UNICODE61 RTREE DBSTAT STSHELL READLINES \
FTS3_TOKEN
2015-09-27 23:58:43 +02:00
# SECURE_DELETE, UNLOCK_NOTIFY, DBSTAT (since 41.0) used by www/firefox et al.
2014-01-31 14:57:45 +01:00
# RTREE used by graphics/mapnik, databases/spatialite
2016-05-06 13:40:28 +02:00
# FTS3_TOKEN used by audio/clementine-player
2013-12-26 00:33:14 +01:00
PLIST_FILES = bin/sqlite3 include/sqlite3.h include/sqlite3ext.h \
2014-06-27 19:17:31 +02:00
lib/libsqlite3.a lib/libsqlite3.so lib/libsqlite3.so.0 \
lib/libsqlite3.so.0.8.6 libdata/pkgconfig/sqlite3.pc \
man/man1/sqlite3.1.gz
2011-06-29 21:51:38 +02:00
# The default numeric file permissions for newly created database files under unix.
# If not specified, the default is 0644 which means that the files is globally
# readable but only writable by the creator.
. i f d e f D E F A U L T _ F I L E _ P E R M I S S I O N S
2012-05-15 14:52:45 +02:00
CPPFLAGS += -DSQLITE_DEFAULT_FILE_PERMISSIONS= ${ DEFAULT_FILE_PERMISSIONS }
2011-06-29 21:51:38 +02:00
. e n d i f
2012-05-15 14:52:45 +02:00
# Use an in-ram database for temporary tables (never,no,yes,always),
2013-12-26 00:33:14 +01:00
TS0_CPPFLAGS = -DSQLITE_TEMP_STORE= 0
TS1_CPPFLAGS = -DSQLITE_TEMP_STORE= 1
TS2_CPPFLAGS = -DSQLITE_TEMP_STORE= 2
TS3_CPPFLAGS = -DSQLITE_TEMP_STORE= 3
RTREE_CPPFLAGS = -DSQLITE_ENABLE_RTREE= 1
RTREE_INT_CPPFLAGS = -DSQLITE_RTREE_INT_ONLY= 1
2016-01-11 14:27:05 +01:00
FTS4_CPPFLAGS = -DSQLITE_ENABLE_FTS3_PARENTHESIS= 1 -DSQLITE_ENABLE_FTS4= 1
2016-03-14 22:31:37 +01:00
FTS5_CONFIGURE_ENABLE = fts5
FTS3_TOKEN_CPPFLAGS = -DSQLITE_ENABLE_FTS3_TOKENIZER= 1
2013-12-26 00:33:14 +01:00
SOUNDEX_CPPFLAGS = -DSQLITE_SOUNDEX= 1
MEMMAN_CPPFLAGS = -DSQLITE_ENABLE_MEMORY_MANAGEMENT= 1
UPD_DEL_LIMIT_CPPFLAGS = -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT= 1
2016-03-14 22:31:37 +01:00
UPD_DEL_LIMIT_PREVENTS = UPD_DEL_LIMIT
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.
2013-12-26 00:33:14 +01:00
SECURE_DELETE_CPPFLAGS = -DSQLITE_SECURE_DELETE= 1
UNLOCK_NOTIFY_CPPFLAGS = -DSQLITE_ENABLE_UNLOCK_NOTIFY= 1
METADATA_CPPFLAGS = -DSQLITE_ENABLE_COLUMN_METADATA= 1
STAT3_CPPFLAGS = -DSQLITE_ENABLE_STAT3= 1
STAT4_CPPFLAGS = -DSQLITE_ENABLE_STAT4= 1
2015-05-12 19:22:26 +02:00
DBSTAT_CPPFLAGS = -DSQLITE_ENABLE_DBSTAT_VTAB= 1
2013-12-26 00:33:14 +01:00
URI_CPPFLAGS = -DSQLITE_USE_URI= 1
URI_AUTHORITY_CPPFLAGS = -DSQLITE_ALLOW_URI_AUTHORITY= 1
DIRECT_READ_CPPFLAGS = -DSQLITE_DIRECT_OVERFLOW_READ= 1
2015-01-21 00:17:11 +01:00
ARMOR_CPPFLAGS = -DSQLITE_ENABLE_API_ARMOR= 1
STMT_CPPFLAGS = -DSQLITE_ENABLE_STMT_SCANSTATUS= 1
2013-12-26 00:33:14 +01:00
EXTENSION_CONFIGURE_ENABLE = dynamic-extensions
THREADS_CONFIGURE_ENABLE = threadsafe
2016-11-16 19:10:34 +01:00
THREADS_LIBS = -lpthread
2013-12-26 00:33:14 +01:00
2016-04-01 16:00:51 +02:00
ICU_BUILD_DEPENDS = ${ LOCALBASE } /bin/icu-config:devel/icu
ICU_LIB_DEPENDS = libicudata.so:devel/icu
2013-12-26 00:33:14 +01:00
ICU_CPPFLAGS = ` ${ LOCALBASE } /bin/icu-config --cppflags` -DSQLITE_ENABLE_ICU= 1
2016-11-16 19:10:34 +01:00
ICU_LIBS = ` ${ LOCALBASE } /bin/icu-config --ldflags`
2006-12-13 04:16:47 +01:00
2016-12-25 18:17:36 +01:00
UNICODE61_CPPFLAGS = ""
2014-10-31 09:20:30 +01:00
UNICODE61_CPPFLAGS_OFF = -DSQLITE_DISABLE_FTS3_UNICODE= 1
2014-01-05 16:27:50 +01:00
2016-01-11 14:27:05 +01:00
READLINES_CONFIGURE_ON = --enable-readline
READLINES_USES = readline
READLINEP_CONFIGURE_ON = --enable-readline
READLINEP_USES = readline:port
EDITLINE_CONFIGURE_ENABLE = editline
EDITLINE_USES = libedit
2014-11-01 11:37:06 +01:00
2015-10-20 16:47:12 +02:00
JSON1_CONFIGURE_ENABLE = json1
RBU_CPPFLAGS = -DSQLITE_ENABLE_RBU= 1
2016-01-11 14:27:05 +01:00
LIKENOTBLOB_CPPFLAGS = -DSQLITE_LIKE_DOESNT_MATCH_BLOBS= 1
STSHELL_CONFIGURE_ENABLE = static-shell
2016-05-29 16:14:22 +02:00
SESSION_CONFIGURE_ENABLE = session
2016-08-23 22:26:24 +02:00
UNKNOWN_SQL_CPPFLAGS = -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION= 1
2017-02-21 15:33:28 +01:00
NULL_TRIM_CPPFLAGS = -DSQLITE_ENABLE_NULL_TRIM= 1
2013-12-26 00:33:14 +01:00
. i n c l u d e < b s d . p o r t . o p t i o n s . m k >
2006-02-13 17:53:11 +01:00
2016-12-25 18:17:36 +01:00
# Platform Configuration
. i f ! d e f i n e d ( W I T H _ D E B U G )
CFLAGS += -Os
. e n d i f
2017-01-09 14:16:49 +01:00
CPPFLAGS += -DHAVE_ISNAN= 1 -DHAVE_MALLOC_USABLE_SIZE= 1 -DHAVE_GMTIME_R= 1 -DHAVE_LOCALTIME_R= 1 -DHAVE_USLEEP= 1 -DHAVE_STRCHRNUL= 1
2016-12-25 18:17:36 +01:00
2013-12-26 00:33:14 +01:00
post-configure :
@${ ECHO_MSG } " ===> CONFIGURE_ARGS= ${ CONFIGURE_ARGS } "
@${ ECHO_MSG } " ===> CPPFLAGS= ${ CPPFLAGS } "
2015-08-23 17:18:55 +02:00
@${ ECHO_MSG } " ===> CFLAGS= ${ CFLAGS } "
2013-12-26 00:33:14 +01:00
@${ ECHO_MSG } " ===> LDFLAGS= ${ LDFLAGS } "
2016-11-16 19:10:34 +01:00
@${ ECHO_MSG } " ===> LIBS= ${ LIBS } "
2010-03-05 20:31:38 +01:00
2013-04-17 11:19:54 +02:00
post-build :
. i f ${ARCH} = = "i386"
@${ ECHO_MSG } " ===> WARNING: on ${ ARCH } don't pass atof1-* tests "
. e n d i f
2016-11-15 16:28:57 +01:00
# for compares with checksum from of the site
sha1 :
@sha1 ${ DISTDIR } /${ ALLFILES }
2013-03-21 18:43:46 +01:00
. i n c l u d e < b s d . p o r t . m k >