diff options
author | Norikatsu Shigemura <nork@FreeBSD.org> | 2004-12-23 08:25:47 +0000 |
---|---|---|
committer | Norikatsu Shigemura <nork@FreeBSD.org> | 2004-12-23 08:25:47 +0000 |
commit | 617938836df905824ac0214a5f379bd18495a18d (patch) | |
tree | 5942cea4112b665ee12f56e68f624378791cef22 /databases/sqlite2 | |
parent | ac8dacab33e1a208353d4fd86b8e764dde1df4d0 (diff) | |
download | ports-617938836df905824ac0214a5f379bd18495a18d.tar.gz ports-617938836df905824ac0214a5f379bd18495a18d.zip |
Notes
Diffstat (limited to 'databases/sqlite2')
-rw-r--r-- | databases/sqlite2/Makefile | 105 | ||||
-rw-r--r-- | databases/sqlite2/distinfo | 2 | ||||
-rw-r--r-- | databases/sqlite2/files/example.tcl | 14 | ||||
-rw-r--r-- | databases/sqlite2/files/patch-Makefile.in | 41 | ||||
-rw-r--r-- | databases/sqlite2/files/pkgIndex.tcl | 1 | ||||
-rw-r--r-- | databases/sqlite2/pkg-descr | 7 | ||||
-rw-r--r-- | databases/sqlite2/pkg-plist | 35 |
7 files changed, 205 insertions, 0 deletions
diff --git a/databases/sqlite2/Makefile b/databases/sqlite2/Makefile new file mode 100644 index 000000000000..9e67e4b7b354 --- /dev/null +++ b/databases/sqlite2/Makefile @@ -0,0 +1,105 @@ +# ex:ts=8 +# New ports collection makefile for: sqlite +# Date created: Feb 21, 2001 +# Whom: Ying-Chieh Liao <ijliao@FreeBSD.org> +# +# $FreeBSD$ +# + +# By default, this port depends on TCL for building docs. If you want to build +# without TCL (and thus get no docs), define NOPORTDOCS. +# If you want to build the TCL wrapper, you have to choose between +# SQLITE_WITH_TCL83 and SQLITE_WITH_TCL84. + +PORTNAME= sqlite +PORTVERSION= 2.8.15 +CATEGORIES= databases +MASTER_SITES= http://www.sqlite.org/ +DISTNAME= ${PORTNAME}-${PORTVERSION} + +MAINTAINER= gh@ghaering.de +COMMENT= An SQL database engine in a C library w/ Tcl wrapper + +DOCSDIR= ${PREFIX}/share/doc/sqlite2 +EXAMPLESDIR= ${PREFIX}/share/examples/sqlite2 +LATEST_LINK= ${PKGNAMEPREFIX}${PORTNAME}2 + +# Defaults, for building the docs: +TCL_V= 8.4 +TCL_SHORT_V= 84 + +.if defined(SQLITE_WITH_TCL83) +CATEGORIES+= tcl83 +TCL_V= 8.3 +TCL_SHORT_V= 83 +WITH_TCL= YES +.endif + +.if defined(SQLITE_WITH_TCL84) +CATEGORIES+= tcl84 +TCL_V= 8.4 +TCL_SHORT_V= 84 +WITH_TCL= YES +.endif + +.if defined(WITH_TCL) +LIB_DEPENDS+= tcl${TCL_SHORT_V}:${PORTSDIR}/lang/tcl${TCL_SHORT_V} +PLIST_SUB+= WITH_TCL="" +.else +PLIST_SUB+= WITH_TCL="@comment " +.endif + +.if !defined(NOPORTDOCS) +BUILD_DEPENDS+= tclsh${TCL_V}:${PORTSDIR}/lang/tcl${TCL_SHORT_V} +MAKE_ARGS+= TCLSH=tclsh${TCL_V} +MAKE_ENV+= TCL_VER=${TCL_V} +.endif + +USE_GMAKE= YES +USE_LIBTOOL_VER= 13 +GNU_CONFIGURE= YES +USE_REINPLACE= YES +CONFIGURE_ARGS= --prefix=${PREFIX} --with-hints=freebsd.hints +CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL} +ALL_TARGET= all +#.if defined(WITH_TCL) +#ALL_TARGET+= libtclsqlite.la +#.endif + +INSTALLS_SHLIB= YES + +WRKSRC= ${WRKDIR}/${PORTNAME} + +.include <bsd.port.pre.mk> + +DOCFILES!= ${AWK} 'BEGIN {FS="/"}; /^%%PORTDOCS%%%%DOCSDIR%%/{print $$2}' pkg-plist + +post-patch: + @${REINPLACE_CMD} -e "s/tclsh \$$(TOP)/\$$(TCLSH) \$$(TOP)/g" \ + -e "s|\./libtool|${LIBTOOL}|g" \ + ${WRKSRC}/Makefile.in + @${ECHO} "config_TARGET_TCL_INC=\"-I${PREFIX}/include/tcl${TCL_V}\"" >${WRKSRC}/freebsd.hints + @${ECHO} "config_TARGET_TCL_LIBS=\"-L${PREFIX}/lib -ltcl${TCL_SHORT_V}\"" >>${WRKSRC}/freebsd.hints + #@${ECHO} "config_TARGET_CFLAGS=\"-DTHREADSAFE=1 -pthread\"" >>${WRKSRC}/freebsd.hints + +post-build: + # Build the docs +.if !defined(NOPORTDOCS) + cd ${WRKSRC} && ${GMAKE} ${MAKE_ARGS} doc +.endif + +post-install: +.if defined(WITH_TCL) + cd ${WRKSRC} && ${GMAKE} install-tcl + ${INSTALL_DATA} ${FILESDIR}/pkgIndex.tcl ${PREFIX}/lib/sqlite/ +.endif +.if !defined(NOPORTDOCS) + @${MKDIR} ${DOCSDIR} +.for file in ${DOCFILES} + ${INSTALL_DATA} ${WRKSRC}/doc/${file} ${DOCSDIR} +.endfor + @${MKDIR} ${EXAMPLESDIR} + ${INSTALL_DATA} ${FILESDIR}/example.tcl ${EXAMPLESDIR} +.endif + +.include <bsd.port.post.mk> diff --git a/databases/sqlite2/distinfo b/databases/sqlite2/distinfo new file mode 100644 index 000000000000..2aaf0ac35d2f --- /dev/null +++ b/databases/sqlite2/distinfo @@ -0,0 +1,2 @@ +MD5 (sqlite-2.8.15.tar.gz) = 0afa73e107bd106031d046c8ca6a94ab +SIZE (sqlite-2.8.15.tar.gz) = 963232 diff --git a/databases/sqlite2/files/example.tcl b/databases/sqlite2/files/example.tcl new file mode 100644 index 000000000000..765c3f9ba715 --- /dev/null +++ b/databases/sqlite2/files/example.tcl @@ -0,0 +1,14 @@ +package require sqlite + +if {$argc!=2} { + puts stderr "Usage: %s DATABASE SQL-STATEMENT" + exit 1 +} +sqlite db [lindex $argv 0] +db eval [lindex $argv 1] x { + foreach v $x(*) { + puts "$v = $x($v)" + } + puts "" +} +db close diff --git a/databases/sqlite2/files/patch-Makefile.in b/databases/sqlite2/files/patch-Makefile.in new file mode 100644 index 000000000000..ef0acb3153d6 --- /dev/null +++ b/databases/sqlite2/files/patch-Makefile.in @@ -0,0 +1,41 @@ +--- Makefile.in.orig Sat Mar 27 08:16:32 2004 ++++ Makefile.in Sun Nov 21 04:32:00 2004 +@@ -188,12 +188,12 @@ + + libsqlite.la: $(LIBOBJ) + $(LTLINK) -o libsqlite.la $(LIBOBJ) ${RELEASE} -rpath @exec_prefix@/lib \ +- -version-info "8:6:8" ++ -version-info "2:0:0" + + libtclsqlite.la: tclsqlite.lo libsqlite.la + $(LTLINK) -o libtclsqlite.la tclsqlite.lo \ + libsqlite.la $(LIBTCL) -rpath @exec_prefix@/lib/sqlite \ +- -version-info "8:6:8" ++ -version-info "2:0:0" + + sqlite@TARGET_EXEEXT@: $(TOP)/src/shell.c libsqlite.la sqlite.h + $(LTLINK) $(READLINE_FLAGS) -o sqlite $(TOP)/src/shell.c \ +@@ -466,13 +466,19 @@ + + install: sqlite libsqlite.la sqlite.h + $(INSTALL) -d $(DESTDIR)$(exec_prefix)/lib +- $(LTINSTALL) libsqlite.la $(DESTDIR)$(exec_prefix)/lib ++ $(INSTALL) .libs/libsqlite.a $(exec_prefix)/lib ++ $(INSTALL) .libs/libsqlite.so $(exec_prefix)/lib ++ $(INSTALL) .libs/libsqlite.so.2 $(exec_prefix)/lib + $(INSTALL) -d $(DESTDIR)$(exec_prefix)/bin +- $(LTINSTALL) sqlite $(DESTDIR)$(exec_prefix)/bin ++ $(INSTALL) .libs/sqlite $(exec_prefix)/bin + $(INSTALL) -d $(DESTDIR)$(prefix)/include + $(INSTALL) -m 0644 sqlite.h $(DESTDIR)$(prefix)/include +- $(INSTALL) -d $(DESTDIR)$(exec_prefix)/lib/pkgconfig; +- $(INSTALL) -m 0644 sqlite.pc $(DESTDIR)$(exec_prefix)/lib/pkgconfig; ++ $(INSTALL) -d $(DESTDIR)/$(exec_prefix)/libdata/pkgconfig ++ $(INSTALL) -m 0644 sqlite.pc $(DESTDIR)/$(exec_prefix)/libdata/pkgconfig ++ ++install-tcl: libtclsqlite.la ++ $(INSTALL) -d $(prefix)/lib/sqlite ++ $(INSTALL) .libs/libtclsqlite.so $(prefix)/lib/sqlite + + clean: + rm -f *.lo *.la *.o sqlite@TARGET_EXEEXT@ libsqlite.la sqlite.h opcodes.* diff --git a/databases/sqlite2/files/pkgIndex.tcl b/databases/sqlite2/files/pkgIndex.tcl new file mode 100644 index 000000000000..d96e27a1bc55 --- /dev/null +++ b/databases/sqlite2/files/pkgIndex.tcl @@ -0,0 +1 @@ +package ifneeded sqlite 0.0 [list load [file join $dir libtclsqlite.so] sqlite] diff --git a/databases/sqlite2/pkg-descr b/databases/sqlite2/pkg-descr new file mode 100644 index 000000000000..3cdcbd6b2daf --- /dev/null +++ b/databases/sqlite2/pkg-descr @@ -0,0 +1,7 @@ +SQLite is an SQL database engine in a C library. Programs that link the SQLite +library can have SQL database access without running a separate RDBMS process. +The distribution comes with a standalone command-line access program (sqlite) +that can be used to administer an SQLite database and which serves as an +example of how to use the SQLite library. + +WWW: http://www.sqlite.org/ diff --git a/databases/sqlite2/pkg-plist b/databases/sqlite2/pkg-plist new file mode 100644 index 000000000000..aa4afe667438 --- /dev/null +++ b/databases/sqlite2/pkg-plist @@ -0,0 +1,35 @@ +bin/sqlite +include/sqlite.h +lib/libsqlite.a +lib/libsqlite.so +lib/libsqlite.so.2 +libdata/pkgconfig/sqlite.pc +%%WITH_TCL%%lib/sqlite/libtclsqlite.so +%%WITH_TCL%%lib/sqlite/pkgIndex.tcl +%%WITH_TCL%%@dirrm lib/sqlite +%%PORTDOCS%%%%DOCSDIR%%/arch.html +%%PORTDOCS%%%%DOCSDIR%%/arch.png +%%PORTDOCS%%%%DOCSDIR%%/c_interface.html +%%PORTDOCS%%%%DOCSDIR%%/changes.html +%%PORTDOCS%%%%DOCSDIR%%/conflict.html +%%PORTDOCS%%%%DOCSDIR%%/datatypes.html +%%PORTDOCS%%%%DOCSDIR%%/download.html +%%PORTDOCS%%%%DOCSDIR%%/faq.html +%%PORTDOCS%%%%DOCSDIR%%/fileformat.html +%%PORTDOCS%%%%DOCSDIR%%/formatchng.html +%%PORTDOCS%%%%DOCSDIR%%/index.html +%%PORTDOCS%%%%DOCSDIR%%/lang.html +%%PORTDOCS%%%%DOCSDIR%%/lemon.html +%%PORTDOCS%%%%DOCSDIR%%/mingw.html +%%PORTDOCS%%%%DOCSDIR%%/nulls.html +%%PORTDOCS%%%%DOCSDIR%%/omitted.html +%%PORTDOCS%%%%DOCSDIR%%/opcode.html +%%PORTDOCS%%%%DOCSDIR%%/quickstart.html +%%PORTDOCS%%%%DOCSDIR%%/report1.txt +%%PORTDOCS%%%%DOCSDIR%%/speed.html +%%PORTDOCS%%%%DOCSDIR%%/sqlite.html +%%PORTDOCS%%%%DOCSDIR%%/tclsqlite.html +%%PORTDOCS%%%%DOCSDIR%%/vdbe.html +%%PORTDOCS%%@dirrm %%DOCSDIR%% +%%PORTDOCS%%%%EXAMPLESDIR%%/example.tcl +%%PORTDOCS%%@dirrm %%EXAMPLESDIR%% |