1 |
< |
# $MidnightBSD: mports/databases/sqlite3/Makefile,v 1.10 2010/03/10 04:54:26 laffer1 Exp $ |
1 |
> |
# $MidnightBSD$ |
2 |
|
|
3 |
< |
PORTNAME= sqlite |
4 |
< |
PORTVERSION= 3.6.15 |
5 |
< |
CATEGORIES= databases lang tcl |
6 |
< |
MASTER_SITES= http://www.sqlite.org/ |
7 |
< |
.if defined(USE_THOL) |
8 |
< |
PKGNAMESUFFIX= -threads |
9 |
< |
.endif |
10 |
< |
DISTNAME= sqlite-${PORTVERSION} |
3 |
> |
PORTNAME= sqlite3 |
4 |
> |
PORTVERSION= 3.8.3.1 |
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-3080301 |
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 |
< |
SLAVEDIRS= databases/sqlite3-threads |
14 |
> |
CONFLICTS= sqlite34-[0-9]* sqlcipher-[0-9]* |
15 |
|
|
16 |
< |
USE_GMAKE= YES |
19 |
< |
USE_GNOME= pkgconfig |
20 |
< |
USE_AUTOTOOLS= libtool:22 |
16 |
> |
USES= pathfix pkgconfig |
17 |
|
USE_LDCONFIG= YES |
18 |
|
GNU_CONFIGURE= YES |
23 |
– |
CONFIGURE_ARGS= --prefix=${PREFIX} --with-hints=freebsd.hints |
24 |
– |
CONFIGURE_ENV+= TCLLIBDIR=${PREFIX}/lib/${PORTNAME} |
25 |
– |
CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd6.1 |
19 |
|
|
20 |
< |
OPTIONS= DEBUG "Enable debugging & verbose explain" off \ |
28 |
< |
FTS3 "Enable FTS3 (Full Text Search) module" off \ |
29 |
< |
RAMTABLE "Store temporary tables in RAM" off \ |
30 |
< |
TCLWRAPPER "TCL wrapper for SQLITE" off \ |
31 |
< |
METADATA "Enable column metadata" on |
20 |
> |
MAKE_JOBS_UNSAFE= yes |
21 |
|
|
22 |
< |
.if !defined(USE_THOL) |
23 |
< |
OPTIONS+= THREADS "Enable threads support" off |
24 |
< |
PLIST_SUB+= THOL="@comment " |
25 |
< |
CONFLICTS= sqlite-threads-3* |
26 |
< |
CONFIGURE_ARGS+= --disable-threadsafe |
27 |
< |
.else |
28 |
< |
CONFIGURE_ARGS+= --enable-threadsafe --enable-threads-override-locks \ |
29 |
< |
--enable-cross-thread-connections |
30 |
< |
PLIST_SUB+= THOL="" |
31 |
< |
CONFLICTS= sqlite-3* |
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 |
> |
.if !defined(NO_INSTALL_MANPAGES) |
47 |
> |
MAN1= sqlite3.1 |
48 |
|
.endif |
49 |
|
|
50 |
< |
.include <bsd.port.pre.mk> |
50 |
> |
# NAME83 "Enable use 8.3 filename for temp files" off \ |
51 |
> |
# Some devices are compelled to use an older file system with 8+3 filename |
52 |
> |
# restrictions for backwards compatibility, or due to other non-technical factors. |
53 |
> |
# http://www.sqlite.org/shortnames.html |
54 |
> |
.if ${PORT_OPTIONS:MNAME83} |
55 |
> |
CPPFLAGS+= -DSQLITE_ENABLE_8_3_NAMES=1 |
56 |
> |
.endif |
57 |
|
|
58 |
< |
.if defined(WITH_DEBUG) |
59 |
< |
CONFIGURE_ARGS+= --enable-debug |
58 |
> |
# The default numeric file permissions for newly created database files under unix. |
59 |
> |
# If not specified, the default is 0644 which means that the files is globally |
60 |
> |
# readable but only writable by the creator. |
61 |
> |
.ifdef DEFAULT_FILE_PERMISSIONS |
62 |
> |
CPPFLAGS+= -DSQLITE_DEFAULT_FILE_PERMISSIONS=${DEFAULT_FILE_PERMISSIONS} |
63 |
|
.endif |
64 |
|
|
65 |
< |
.if defined(WITH_FTS3) |
66 |
< |
CFLAGS+= -DSQLITE_CORE=1 -DSQLITE_ENABLE_FTS3=1 |
67 |
< |
EXTRA_PATCHES+= ${FILESDIR}/fts3_patch-Makefile.in |
65 |
> |
# This macro sets the default size of the page-cache for temporary files |
66 |
> |
# created by SQLite to store intermediate results, in pages. |
67 |
> |
.ifdef TEMP_CACHE_SIZE |
68 |
> |
CPPFLAGS+= -DSQLITE_DEFAULT_TEMP_CACHE_SIZE=${TEMP_CACHE_SIZE} |
69 |
|
.endif |
70 |
|
|
71 |
< |
.if defined(WITH_RAMTABLE) |
72 |
< |
CONFIGURE_ARGS+= --enable-tempstore=yes |
71 |
> |
.if ${PORT_OPTIONS:MMEMMAN} |
72 |
> |
CPPFLAGS+= -DSQLITE_ENABLE_MEMORY_MANAGEMENT=1 |
73 |
|
.endif |
74 |
|
|
75 |
< |
.if defined(WITH_TCLWRAPPER) |
76 |
< |
TCL_V?= 8.4 |
77 |
< |
MAKE_ARGS+= TCLSH=tclsh${TCL_V} |
78 |
< |
MAKE_ENV+= TCL_VER=${TCL_V} |
79 |
< |
LIB_DEPENDS+= tcl${TCL_V:S/.//}:${PORTSDIR}/lang/tcl${TCL_V:S/.//} |
80 |
< |
CONFIGURE_ARGS+= --with-tcl=${LOCALBASE}/lib/tcl${TCL_V} |
81 |
< |
PLIST_SUB+= WITH_TCLWRAPPER="" |
75 |
> |
.if ${PORT_OPTIONS:MUPD_DEL_LIMIT} |
76 |
> |
CPPFLAGS+= -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT=1 |
77 |
> |
.endif |
78 |
> |
|
79 |
> |
.if ${PORT_OPTIONS:MURI} |
80 |
> |
CPPFLAGS+= -DSQLITE_USE_URI=1 |
81 |
> |
.endif |
82 |
> |
|
83 |
> |
.if ${PORT_OPTIONS:MURI_AUTHORITY} |
84 |
> |
CPPFLAGS+= -DSQLITE_ALLOW_URI_AUTHORITY=1 |
85 |
> |
.endif |
86 |
> |
|
87 |
> |
.if ${PORT_OPTIONS:MSOUNDEX} |
88 |
> |
CPPFLAGS+= -DSQLITE_SOUNDEX=1 |
89 |
> |
.endif |
90 |
> |
|
91 |
> |
.if ${PORT_OPTIONS:MSTAT3} |
92 |
> |
CPPFLAGS+= -DSQLITE_ENABLE_STAT3=1 |
93 |
> |
.endif |
94 |
> |
|
95 |
> |
.if ${PORT_OPTIONS:MDIRECT_READ} |
96 |
> |
CPPFLAGS+= -DSQLITE_DIRECT_OVERFLOW_READ=1 |
97 |
> |
.endif |
98 |
> |
|
99 |
> |
.if ${PORT_OPTIONS:MFTS3} |
100 |
> |
CPPFLAGS+= -DSQLITE_ENABLE_FTS3=1 -DSQLITE_ENABLE_FTS3_PARENTHESIS=1 -DSQLITE_ENABLE_FTS4=1 |
101 |
> |
.endif |
102 |
> |
|
103 |
> |
.if ${PORT_OPTIONS:MRTREE} |
104 |
> |
CPPFLAGS+= -DSQLITE_ENABLE_RTREE=1 |
105 |
> |
.ifdef RTREE_INT |
106 |
> |
CPPFLAGS+= -DSQLITE_RTREE_INT_ONLY=1 |
107 |
> |
RTREE_INT= "int" |
108 |
|
.else |
109 |
< |
CONFIGURE_ARGS+= --disable-tcl |
69 |
< |
PLIST_SUB+= WITH_TCLWRAPPER="@comment " |
109 |
> |
RTREE_INT= "float" |
110 |
|
.endif |
111 |
+ |
.endif |
112 |
|
|
113 |
< |
.if !defined(WITHOUT_METADATA) |
114 |
< |
CFLAGS+= -DSQLITE_ENABLE_COLUMN_METADATA=1 |
113 |
> |
.if ${PORT_OPTIONS:MICU} |
114 |
> |
BUILD_DEPENDS+= ${LOCALBASE}/bin/icu-config:${PORTSDIR}/devel/icu |
115 |
> |
LIB_DEPENDS+= icudata:${PORTSDIR}/devel/icu |
116 |
> |
CPPFLAGS+= -DSQLITE_ENABLE_ICU=1 |
117 |
> |
CPPFLAGS+= `${LOCALBASE}/bin/icu-config --cppflags` |
118 |
> |
LDFLAGS+= `${LOCALBASE}/bin/icu-config --ldflags` |
119 |
|
.endif |
120 |
|
|
121 |
< |
post-extract: |
122 |
< |
@${FIND} ${WRKSRC} -type d -name 'CVS' | ${XARGS} rm -r |
121 |
> |
# Use an in-ram database for temporary tables (never,no,yes,always), |
122 |
> |
# which is equivalent of TEMP_STORE=[0,1,2,3], default = 1. |
123 |
> |
.if ${PORT_OPTIONS:MRAMTABLE} |
124 |
> |
TEMP_STORE?= 2 |
125 |
> |
CPPFLAGS+= -DSQLITE_TEMP_STORE=${TEMP_STORE} |
126 |
> |
.endif |
127 |
|
|
128 |
< |
post-patch: |
129 |
< |
@${REINPLACE_CMD} -E -e "s|^(TLIBS.*)|\1 -lm|g" \ |
130 |
< |
${WRKSRC}/Makefile.in |
82 |
< |
@${REINPLACE_CMD} -e "s|tclsh \$$(TOP)|\$$(TCLSH) \$$(TOP)|g" \ |
83 |
< |
-e "s|./libtool|${LIBTOOL}|g" \ |
84 |
< |
-e "s|--mode=link|--mode=link --tag=CC|g" \ |
85 |
< |
-e "s|\$${HAVE_TCL:1=tcl_install}||" \ |
86 |
< |
${WRKSRC}/Makefile.in |
87 |
< |
@${ECHO} "config_TARGET_TCL_INC=\"-I${PREFIX}/include/tcl${TCL_V}\"" \ |
88 |
< |
> ${WRKSRC}/freebsd.hints |
89 |
< |
@${ECHO} "config_TARGET_TCL_LIBS=\"-L${PREFIX}/lib -ltcl${TCL_V:S/.//}\"" \ |
90 |
< |
>> ${WRKSRC}/freebsd.hints |
91 |
< |
${REINPLACE_CMD} -e "slfts3.cllg" \ |
92 |
< |
-e "slfts3_expr.cllg" ${WRKSRC}/tool/mksqlite3c.tcl |
128 |
> |
.if ${PORT_OPTIONS:MSECURE_DELETE} |
129 |
> |
CPPFLAGS+= -DSQLITE_SECURE_DELETE=1 |
130 |
> |
.endif |
131 |
|
|
132 |
< |
pre-configure: |
133 |
< |
.if defined(WITH_THREADS) || defined(USE_THOL) |
96 |
< |
@${REINPLACE_CMD} -e "s|-lpthread|${PTHREAD_LIBS}|g" \ |
97 |
< |
${WRKSRC}/configure |
98 |
< |
@${REINPLACE_CMD} -E -e "s|(Libs:.*)|\1 ${PTHREAD_LIBS}|" \ |
99 |
< |
-e "s|(Cflags:.*)|\1 ${PTHREAD_CFLAGS}|" \ |
100 |
< |
${WRKSRC}/sqlite.pc.in ${WRKSRC}/sqlite3.pc.in |
132 |
> |
.if ${PORT_OPTIONS:MUNLOCK_NOTIFY} |
133 |
> |
CPPFLAGS+= -DSQLITE_ENABLE_UNLOCK_NOTIFY=1 |
134 |
|
.endif |
135 |
|
|
136 |
< |
post-install: |
137 |
< |
.if defined(WITH_TCLWRAPPER) |
105 |
< |
@${MKDIR} ${PREFIX}/lib/sqlite |
106 |
< |
@(cd ${WRKSRC} && ${LIBTOOL} --mode=install ${INSTALL_DATA} \ |
107 |
< |
libtclsqlite3.la ${PREFIX}/lib/sqlite/) |
108 |
< |
@${INSTALL_DATA} ${FILESDIR}/pkgIndex.tcl ${PREFIX}/lib/sqlite/ |
109 |
< |
@${INSTALL_PROGRAM} ${WRKSRC}/.libs/tclsqlite3 ${PREFIX}/bin |
110 |
< |
@${MKDIR} ${EXAMPLESDIR} |
111 |
< |
@${INSTALL_DATA} ${FILESDIR}/example.tcl ${EXAMPLESDIR} |
136 |
> |
.if ${PORT_OPTIONS:MMETADATA} |
137 |
> |
CPPFLAGS+= -DSQLITE_ENABLE_COLUMN_METADATA=1 |
138 |
|
.endif |
139 |
< |
.if defined(USE_THOL) |
140 |
< |
@${MKDIR} ${DATADIR} |
141 |
< |
@${TOUCH} ${DATADIR}/sqlite3_with_threads-override-locks |
139 |
> |
|
140 |
> |
.if ${PORT_OPTIONS:MTHREADSAFE} |
141 |
> |
CONFIGURE_ARGS+= --enable-threadsafe |
142 |
> |
LDFLAGS+= ${PTHREAD_LIBS} |
143 |
> |
.else |
144 |
> |
CONFIGURE_ARGS+= --disable-threadsafe |
145 |
|
.endif |
146 |
|
|
147 |
< |
.include <bsd.port.post.mk> |
147 |
> |
.if ${PORT_OPTIONS:MEXTENSION} |
148 |
> |
CONFIGURE_ARGS+= --enable-dynamic-extensions |
149 |
> |
.else |
150 |
> |
CONFIGURE_ARGS+= --disable-dynamic-extensions |
151 |
> |
.endif |
152 |
> |
|
153 |
> |
post-build: |
154 |
> |
.if ${ARCH}=="i386" |
155 |
> |
@${ECHO_MSG} "===> WARNING: on ${ARCH} don't pass atof1-* tests" |
156 |
> |
.endif |
157 |
> |
|
158 |
> |
post-install: |
159 |
> |
.if !defined(NO_INSTALL_MANPAGES) |
160 |
> |
@${INSTALL_MAN} ${WRKSRC}/sqlite3.1 ${MANPREFIX}/man/man1 |
161 |
> |
.endif |
162 |
> |
|
163 |
> |
.include <bsd.port.mk> |