1 |
< |
# ex:ts=8 |
2 |
< |
# New ports collection makefile for: sqlite |
3 |
< |
# Date created: Feb 21, 2001 |
4 |
< |
# Whom: Ying-Chieh Liao <ijliao@FreeBSD.org> |
5 |
< |
# |
6 |
< |
# $FreeBSD: ports/databases/sqlite3/Makefile,v 1.21 2006/11/21 12:25:46 mnag Exp $ |
7 |
< |
# $MidnightBSD$ |
8 |
< |
# |
1 |
> |
# $MidnightBSD: mports/databases/sqlite3/Makefile,v 1.6 2008/06/13 14:03:52 laffer1 Exp $ |
2 |
|
|
3 |
|
PORTNAME= sqlite |
4 |
< |
PORTVERSION= 3.3.8 |
5 |
< |
CATEGORIES= databases |
4 |
> |
PORTVERSION= 3.6.10 |
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} |
11 |
|
|
12 |
< |
MAINTAINER= mnag@FreeBSD.org |
12 |
> |
MAINTAINER= ports@MidnightBSD.org |
13 |
|
COMMENT= An SQL database engine in a C library w/ Tcl wrapper |
14 |
+ |
LICENSE= publicdom |
15 |
|
|
16 |
+ |
SLAVEDIRS= databases/sqlite3-threads |
17 |
+ |
|
18 |
|
USE_GMAKE= YES |
19 |
|
USE_GNOME= pkgconfig |
20 |
|
USE_AUTOTOOLS= libtool:15 |
21 |
– |
USE_DOS2UNIX= *.pc.in |
21 |
|
USE_LDCONFIG= YES |
22 |
|
GNU_CONFIGURE= YES |
23 |
|
CONFIGURE_ARGS= --prefix=${PREFIX} --with-hints=freebsd.hints |
24 |
< |
CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd6.0 |
24 |
> |
CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd6.1 |
25 |
|
|
27 |
– |
DOCSDIR= ${PREFIX}/share/doc/sqlite3 |
28 |
– |
EXAMPLESDIR= ${PREFIX}/share/examples/sqlite3 |
29 |
– |
|
26 |
|
OPTIONS= DEBUG "Enable debugging & verbose explain" off \ |
27 |
< |
DOCS "Building docs (depends on TCL)" on \ |
27 |
> |
FTS3 "Enable FTS3 (Full Text Search) module" off \ |
28 |
> |
RAMTABLE "Store temporary tables in RAM" off \ |
29 |
|
TCLWRAPPER "TCL wrapper for SQLITE" off \ |
30 |
< |
THREADS "Enable threads support" off |
30 |
> |
METADATA "Enable column metadata" on |
31 |
|
|
32 |
< |
# Defaults, for building the docs: |
33 |
< |
TCL_V?= 8.4 |
34 |
< |
MAKE_ARGS+= TCLSH=tclsh${TCL_V} |
35 |
< |
MAKE_ENV+= TCL_VER=${TCL_V} |
32 |
> |
.if !defined(USE_THOL) |
33 |
> |
OPTIONS+= THREADS "Enable threads support" off |
34 |
> |
PLIST_SUB+= THOL="@comment " |
35 |
> |
CONFLICTS= sqlite-threads-3* |
36 |
> |
CONFIGURE_ARGS+= --disable-threadsafe |
37 |
> |
.else |
38 |
> |
CONFIGURE_ARGS+= --enable-threadsafe --enable-threads-override-locks \ |
39 |
> |
--enable-cross-thread-connections |
40 |
> |
PLIST_SUB+= THOL="" |
41 |
> |
CONFLICTS= sqlite-3* |
42 |
> |
.endif |
43 |
|
|
44 |
|
.include <bsd.port.pre.mk> |
45 |
|
|
47 |
|
CONFIGURE_ARGS+= --enable-debug |
48 |
|
.endif |
49 |
|
|
50 |
< |
.if !defined(NOPORTDOCS) && !defined(WITHOUT_DOCS) |
51 |
< |
BUILD_DEPENDS+= tclsh${TCL_V}:${PORTSDIR}/lang/tcl${TCL_V:S/.//} |
52 |
< |
ALL_TARGET+= all doc |
49 |
< |
PORTDOCS= * |
50 |
> |
.if defined(WITH_FTS3) |
51 |
> |
CFLAGS+= -DSQLITE_CORE=1 -DSQLITE_ENABLE_FTS3=1 |
52 |
> |
EXTRA_PATCHES+= ${FILESDIR}/fts3_patch-Makefile.in |
53 |
|
.endif |
54 |
|
|
55 |
+ |
.if defined(WITH_RAMTABLE) |
56 |
+ |
CONFIGURE_ARGS+= --enable-tempstore=yes |
57 |
+ |
.endif |
58 |
+ |
|
59 |
|
.if defined(WITH_TCLWRAPPER) |
60 |
< |
CATEGORIES+= lang tcl${TCL_V:S/.//} |
60 |
> |
TCL_V?= 8.4 |
61 |
> |
MAKE_ARGS+= TCLSH=tclsh${TCL_V} |
62 |
> |
MAKE_ENV+= TCL_VER=${TCL_V} |
63 |
|
LIB_DEPENDS+= tcl${TCL_V:S/.//}:${PORTSDIR}/lang/tcl${TCL_V:S/.//} |
64 |
|
CONFIGURE_ARGS+= --with-tcl=${LOCALBASE}/lib/tcl${TCL_V} |
65 |
|
PLIST_SUB+= WITH_TCLWRAPPER="" |
68 |
|
PLIST_SUB+= WITH_TCLWRAPPER="@comment " |
69 |
|
.endif |
70 |
|
|
71 |
< |
.if defined(WITH_THREADS) |
72 |
< |
CONFIGURE_ARGS+= --enable-threadsafe |
71 |
> |
.if !defined(WITHOUT_METADATA) |
72 |
> |
CFLAGS+= -DSQLITE_ENABLE_COLUMN_METADATA=1 |
73 |
|
.endif |
74 |
|
|
75 |
+ |
post-extract: |
76 |
+ |
@${FIND} ${WRKSRC} -type d -name 'CVS' | ${XARGS} rm -r |
77 |
+ |
|
78 |
|
post-patch: |
79 |
< |
.if defined(WITH_THREADS) |
80 |
< |
@${REINPLACE_CMD} -e "s|-lpthread|${PTHREAD_LIBS}|g" \ |
69 |
< |
${WRKSRC}/configure |
70 |
< |
@${REINPLACE_CMD} -E -e "s|(Libs:.*)|\1 ${PTHREAD_LIBS}|" \ |
71 |
< |
-e "s|(Cflags:.*)|\1 ${PTHREAD_CFLAGS}|" \ |
72 |
< |
${WRKSRC}/sqlite.pc.in ${WRKSRC}/sqlite3.pc.in |
73 |
< |
.endif |
79 |
> |
@${REINPLACE_CMD} -E -e "s|^(TLIBS.*)|\1 -lm|g" \ |
80 |
> |
${WRKSRC}/Makefile.in |
81 |
|
@${REINPLACE_CMD} -e "s|tclsh \$$(TOP)|\$$(TCLSH) \$$(TOP)|g" \ |
82 |
|
-e "s|./libtool|${LIBTOOL}|g" \ |
83 |
+ |
-e "s|--mode=link|--mode=link --tag=CC|g" \ |
84 |
|
-e "s|\$${HAVE_TCL:1=tcl_install}||" \ |
85 |
|
${WRKSRC}/Makefile.in |
86 |
|
@${ECHO} "config_TARGET_TCL_INC=\"-I${PREFIX}/include/tcl${TCL_V}\"" \ |
87 |
|
> ${WRKSRC}/freebsd.hints |
88 |
|
@${ECHO} "config_TARGET_TCL_LIBS=\"-L${PREFIX}/lib -ltcl${TCL_V:S/.//}\"" \ |
89 |
|
>> ${WRKSRC}/freebsd.hints |
90 |
+ |
${REINPLACE_CMD} -e "slfts3.cllg" \ |
91 |
+ |
-e "slfts3_expr.cllg" ${WRKSRC}/tool/mksqlite3c.tcl |
92 |
|
|
93 |
+ |
pre-configure: |
94 |
+ |
.if defined(WITH_THREADS) || defined(USE_THOL) |
95 |
+ |
@${REINPLACE_CMD} -e "s|-lpthread|${PTHREAD_LIBS}|g" \ |
96 |
+ |
${WRKSRC}/configure |
97 |
+ |
@${REINPLACE_CMD} -E -e "s|(Libs:.*)|\1 ${PTHREAD_LIBS}|" \ |
98 |
+ |
-e "s|(Cflags:.*)|\1 ${PTHREAD_CFLAGS}|" \ |
99 |
+ |
${WRKSRC}/sqlite.pc.in ${WRKSRC}/sqlite3.pc.in |
100 |
+ |
.endif |
101 |
+ |
|
102 |
|
post-install: |
103 |
|
.if defined(WITH_TCLWRAPPER) |
104 |
|
@${MKDIR} ${PREFIX}/lib/sqlite |
106 |
|
libtclsqlite3.la ${PREFIX}/lib/sqlite/) |
107 |
|
@${INSTALL_DATA} ${FILESDIR}/pkgIndex.tcl ${PREFIX}/lib/sqlite/ |
108 |
|
@${INSTALL_PROGRAM} ${WRKSRC}/.libs/tclsqlite3 ${PREFIX}/bin |
90 |
– |
.endif |
91 |
– |
.if !defined(NOPORTDOCS) && !defined(WITHOUT_DOCS) |
92 |
– |
@${MKDIR} ${DOCSDIR} |
93 |
– |
@${INSTALL_DATA} ${WRKSRC}/doc/* ${DOCSDIR} |
94 |
– |
.endif |
109 |
|
@${MKDIR} ${EXAMPLESDIR} |
110 |
|
@${INSTALL_DATA} ${FILESDIR}/example.tcl ${EXAMPLESDIR} |
111 |
+ |
.endif |
112 |
+ |
.if defined(USE_THOL) |
113 |
+ |
@${MKDIR} ${DATADIR} |
114 |
+ |
@${TOUCH} ${DATADIR}/sqlite3_with_threads-override-locks |
115 |
+ |
.endif |
116 |
|
|
117 |
|
.include <bsd.port.post.mk> |