diff options
author | mi <mi@FreeBSD.org> | 2001-06-12 07:32:07 +0800 |
---|---|---|
committer | mi <mi@FreeBSD.org> | 2001-06-12 07:32:07 +0800 |
commit | c397c6d27cd2195fe1ff35d207468770f01d4774 (patch) | |
tree | 033fed479b6f6cfedd1d25e4539236648b51f806 /databases | |
parent | ac63843b728d9cc381ef6222b99b8db2bd10a54e (diff) | |
download | freebsd-ports-gnome-c397c6d27cd2195fe1ff35d207468770f01d4774.tar.gz freebsd-ports-gnome-c397c6d27cd2195fe1ff35d207468770f01d4774.tar.zst freebsd-ports-gnome-c397c6d27cd2195fe1ff35d207468770f01d4774.zip |
A number of things:
. changed maintainership to ports@;
. build with TCL support (``package require sqlite'');
. run the vendor's tests after build (sorry, Maxim) -- zero errors;
. generate from the TCL sources and install the HTML documentation;
(unless NOPORTDOCS is set);
. build and install two usefull tools, which come with the software:
gdbmdump and gdbmstat;
. build and install the shared version of -lsqlite -- usefull and
needed for dynamic loading into TCL interpreter;
. lastly: the new functionality (TCL, tools, docs) called for the
PORTREVISION bump.
Approved by: after the previous maintainer suggested the first point above,
the rest was easy :-)
Diffstat (limited to 'databases')
-rw-r--r-- | databases/sqlite/Makefile | 59 | ||||
-rw-r--r-- | databases/sqlite/files/Makefile.bsd | 36 | ||||
-rw-r--r-- | databases/sqlite/files/Makefile.docs | 25 | ||||
-rw-r--r-- | databases/sqlite/files/patch-docs | 30 | ||||
-rw-r--r-- | databases/sqlite/files/patch-test | 6 | ||||
-rw-r--r-- | databases/sqlite/files/pkgIndex.tcl | 1 | ||||
-rw-r--r-- | databases/sqlite/pkg-plist | 21 | ||||
-rw-r--r-- | databases/sqlite2/Makefile | 59 | ||||
-rw-r--r-- | databases/sqlite2/files/Makefile.bsd | 36 | ||||
-rw-r--r-- | databases/sqlite2/files/Makefile.docs | 25 | ||||
-rw-r--r-- | databases/sqlite2/files/patch-docs | 30 | ||||
-rw-r--r-- | databases/sqlite2/files/patch-test | 6 | ||||
-rw-r--r-- | databases/sqlite2/files/pkgIndex.tcl | 1 | ||||
-rw-r--r-- | databases/sqlite2/pkg-plist | 21 |
14 files changed, 332 insertions, 24 deletions
diff --git a/databases/sqlite/Makefile b/databases/sqlite/Makefile index 4878ced73db2..58fbbf04c943 100644 --- a/databases/sqlite/Makefile +++ b/databases/sqlite/Makefile @@ -8,26 +8,61 @@ PORTNAME= sqlite PORTVERSION= 1.0.30 +PORTREVISION= 1 CATEGORIES= databases MASTER_SITES= http://www.hwaci.com/sw/sqlite/ DISTNAME= ${PORTNAME} -MAINTAINER= ijliao@FreeBSD.org +MAINTAINER= ports@FreeBSD.org -LIB_DEPENDS= gdbm.2:${PORTSDIR}/databases/gdbm +LIB_DEPENDS= gdbm.2:${PORTSDIR}/databases/gdbm \ + tcl${TCL_VER:S/.//}:${PORTSDIR}/lang/tcl${TCL_VER:S/.//} +BUILD_DEPENDS= lemon:${PORTSDIR}/devel/lemon -GNU_CONFIGURE= yes -CONFIGURE_SCRIPT= ../sqlite/configure -CONFIGURE_ENV= LDFLAGS="-L${LOCALBASE}/lib" CFLAGS="-L${LOCALBASE}/lib" +MAKEFILE= ${FILESDIR}/Makefile.bsd +WRKSRC= ${WRKDIR}/sqlite +MAKE_ARGS+= -j2 +MAKE_ENV+= TCL_VER=${TCL_VER} +TCL_VER?= 8.3 -WRKSRC= ${WRKDIR}/bld +GDBM_TOOLS= gdbmdump gdbmstat -post-extract: - @${MKDIR} ${WRKSRC} +post-build: test +.for p in ${GDBM_TOOLS} + cd ${WRKSRC}/tool && ${MAKE} CFLAGS="${CFLAGS} -I${PREFIX}/include" \ + LDADD="-L${PREFIX}/lib -lgdbm" PROG=$p NOMAN=1 \ + -f bsd.prog.mk +.endfor + cd ${WRKSRC} && ${MAKE} VPATH=${WRKSRC}/src \ + CFLAGS="${CFLAGS} -I${WRKSRC} -I${WRKSRC}/src" \ + LDADD="-L${WRKSRC} -lsqlite" PROG=sqlite SRCS=shell.c NOMAN=1 \ + -f bsd.prog.mk +.ifndef NOPORTDOCS + cd ${WRKSRC}/www && ${SETENV} ${MAKE_ENV} \ + ${MAKE} ${MAKE_ARGS} -f ${FILESDIR}/Makefile.docs +.endif -do-install: - ${INSTALL_PROGRAM} ${WRKSRC}/sqlite ${PREFIX}/bin - ${INSTALL_DATA} ${WRKSRC}/libsqlite.a ${PREFIX}/lib - ${INSTALL_DATA} ${WRKSRC}/sqlite.h ${PREFIX}/include +post-install: +.for p in ${GDBM_TOOLS} + cd ${WRKSRC}/tool && ${MAKE} BINDIR="${PREFIX}/bin" \ + PROG=$p NOMAN=1 -f bsd.prog.mk install +.endfor + cd ${WRKSRC} && ${MAKE} PROG=sqlite NOMAN=1 BINDIR="${PREFIX}/bin" \ + -f bsd.prog.mk install + ${MKDIR} ${PREFIX}/lib/sqlite + ${INSTALL_DATA} ${FILESDIR}/pkgIndex.tcl ${PREFIX}/lib/sqlite/ +.ifndef NOPORTDOCS + ${MKDIR} ${PREFIX}/share/doc/sqlite + ${INSTALL_DATA} ${WRKSRC}/www/*.html ${WRKSRC}/www/*.png \ + ${PREFIX}/share/doc/sqlite +.endif + +test: + # ------------------------------------------------------- + # Running the vendor's tests -- there should be 0 errors. + # ------------------------------------------------------- + cd ${WRKSRC} && ${PREFIX}/bin/tclsh${TCL_VER} ${WRKSRC}/test/all.test \ + ${WRKSRC}/libsqlite.so + # ------------------------------------------------------- .include <bsd.port.mk> diff --git a/databases/sqlite/files/Makefile.bsd b/databases/sqlite/files/Makefile.bsd new file mode 100644 index 000000000000..a7b9955d3ca3 --- /dev/null +++ b/databases/sqlite/files/Makefile.bsd @@ -0,0 +1,36 @@ +TCL_VER ?= 8.3 +TCL_DVER = ${TCL_VER:S/.//} +PREFIX ?= /usr/local + +CFLAGS += -DHAVE_READLINE=1 -DOS_UNIX=1 -DOS_WIN=0 +CFLAGS += -I${PREFIX}/include/tcl${TCL_VER} -I${PREFIX}/include +CFLAGS += -I${.CURDIR}/src -I${.CURDIR} + +LDADD += -lreadline -L${PREFIX}/lib -ltcl${TCL_DVER} -lm -lgdbm + +.PATH: ${.CURDIR}/src + +SRCS = build.c dbbe.c dbbegdbm.c dbbemem.c delete.c expr.c insert.c \ + main.c parse.y printf.c random.c select.c table.c tokenize.c \ + update.c util.c vdbe.c where.c tclsqlite.c + +INCS = sqlite.h + +LIB = sqlite +SHLIB_MAJOR= 1 +SHLIB_MINOR= 0 + +sqlite.h: sqlite.h.in VERSION + sed -e s/--VERS--/`cat ${.CURDIR}/VERSION`/ \ + -e s/--ENCODING--/ISO8859/ \ + ${.CURDIR}/src/sqlite.h.in > sqlite.h + +parse.h parse.c: parse.y + lemon o=parse ${.ALLSRC} + +INCDIR = ${PREFIX}/include +LIBDIR = ${PREFIX}/lib + +.include <bsd.lib.mk> + +${OBJS} ${SOBJS}: parse.h sqlite.h diff --git a/databases/sqlite/files/Makefile.docs b/databases/sqlite/files/Makefile.docs new file mode 100644 index 000000000000..77d95a57d548 --- /dev/null +++ b/databases/sqlite/files/Makefile.docs @@ -0,0 +1,25 @@ +TCL_VER ?= 8.3 + +SRCS != echo ${.CURDIR}/*.tcl +DOCS = ${SRCS:Nopcode.tcl:.tcl=.html} +CODE != echo ${.CURDIR}/../src/*.[chy] + +all: ${DOCS} opcode.html + +opcode.html:: opcode.tcl vdbe.c + tclsh${TCL_VER} ${.ALLSRC} > opcode.html + +.SUFFIXES: .tcl .html + +.tcl.html: + tclsh${TCL_VER} $*.tcl > $*.html + +${DOCS}: last_change + +.PATH: ${.CURDIR}/../src + +last_change: ${CODE} + awk '/\$$Id:/ && NF > 4 { \ + if ($$2 == "\$$Id:") print $$5 "," $$6; \ + else print $$6 "," $$7 \ + }' ${.ALLSRC} | sort -t, | tail -1 > lc && mv lc last_change diff --git a/databases/sqlite/files/patch-docs b/databases/sqlite/files/patch-docs new file mode 100644 index 000000000000..ce5498da4d16 --- /dev/null +++ b/databases/sqlite/files/patch-docs @@ -0,0 +1,30 @@ +--- www/index.tcl Thu Apr 5 12:49:44 2001 ++++ www/index.tcl Fri Jun 8 17:46:08 2001 +@@ -117,12 +117,6 @@ + +-puts {<h2>Download</h2> ++puts "<!-- h2>Download</h2 --><h3>This installation of Sqlite $vers was made" ++puts {by the <A href="http://www.freebsd.org/cgi/ports.cgi?query=sqlite">FreeBSD ++Port</A>.</h3>} + +-<p>You can download a tarball containing all source +-code for SQLite +-} +-puts "version $vers" +-puts { +-(including the TCL scripts that generate the +-HTML files for this website) at <a href="sqlite.tar.gz">sqlite.tar.gz</a>.} +-puts "This is a [file size sqlite.tar.gz] byte download." + puts {</p> +--- www/dynload.tcl Sun Feb 11 11:58:22 2001 ++++ www/dynload.tcl Mon Jun 11 19:09:47 2001 +@@ -15,3 +15,3 @@ + <i>This note was contributed by +-<a href="bsaunder@tampabay.rr.com.nospam">Bill Saunders</a>. Thanks, Bill!</i> ++<a href="mailto:bsaunder@tampabay.rr.com.nospam">Bill Saunders</a>. Thanks, Bill!</i> + +@@ -67,3 +67,3 @@ + Have fun....</p></li> +-</ul> ++</ol> + diff --git a/databases/sqlite/files/patch-test b/databases/sqlite/files/patch-test new file mode 100644 index 000000000000..e2a38cc43568 --- /dev/null +++ b/databases/sqlite/files/patch-test @@ -0,0 +1,6 @@ +--- test/all.test Tue Feb 6 08:29:31 2001 ++++ test/all.test Fri Jun 8 16:28:34 2001 +@@ -27,2 +27,3 @@ + set testdir [file dirname $argv0] ++load [lindex $argv 0] + source $testdir/tester.tcl diff --git a/databases/sqlite/files/pkgIndex.tcl b/databases/sqlite/files/pkgIndex.tcl new file mode 100644 index 000000000000..df0b6bb0a82d --- /dev/null +++ b/databases/sqlite/files/pkgIndex.tcl @@ -0,0 +1 @@ +package ifneeded sqlite 1.0 [list load $dir/../libsqlite.so] diff --git a/databases/sqlite/pkg-plist b/databases/sqlite/pkg-plist index 79c89c5c0bb0..f3e500a0b32b 100644 --- a/databases/sqlite/pkg-plist +++ b/databases/sqlite/pkg-plist @@ -1,3 +1,24 @@ bin/sqlite +bin/gdbmdump +bin/gdbmstat lib/libsqlite.a +lib/libsqlite.so +lib/libsqlite.so.1.0 +lib/sqlite/pkgIndex.tcl +@dirrm lib/sqlite include/sqlite.h +%%PORTDOCS%%share/doc/sqlite/arch.html +%%PORTDOCS%%share/doc/sqlite/arch.png +%%PORTDOCS%%share/doc/sqlite/c_interface.html +%%PORTDOCS%%share/doc/sqlite/changes.html +%%PORTDOCS%%share/doc/sqlite/crosscompile.html +%%PORTDOCS%%share/doc/sqlite/dynload.html +%%PORTDOCS%%share/doc/sqlite/fileformat.html +%%PORTDOCS%%share/doc/sqlite/index.html +%%PORTDOCS%%share/doc/sqlite/lang.html +%%PORTDOCS%%share/doc/sqlite/mingw.html +%%PORTDOCS%%share/doc/sqlite/opcode.html +%%PORTDOCS%%share/doc/sqlite/sqlite.html +%%PORTDOCS%%share/doc/sqlite/tclsqlite.html +%%PORTDOCS%%share/doc/sqlite/vdbe.html +%%PORTDOCS%%@dirrm share/doc/sqlite diff --git a/databases/sqlite2/Makefile b/databases/sqlite2/Makefile index 4878ced73db2..58fbbf04c943 100644 --- a/databases/sqlite2/Makefile +++ b/databases/sqlite2/Makefile @@ -8,26 +8,61 @@ PORTNAME= sqlite PORTVERSION= 1.0.30 +PORTREVISION= 1 CATEGORIES= databases MASTER_SITES= http://www.hwaci.com/sw/sqlite/ DISTNAME= ${PORTNAME} -MAINTAINER= ijliao@FreeBSD.org +MAINTAINER= ports@FreeBSD.org -LIB_DEPENDS= gdbm.2:${PORTSDIR}/databases/gdbm +LIB_DEPENDS= gdbm.2:${PORTSDIR}/databases/gdbm \ + tcl${TCL_VER:S/.//}:${PORTSDIR}/lang/tcl${TCL_VER:S/.//} +BUILD_DEPENDS= lemon:${PORTSDIR}/devel/lemon -GNU_CONFIGURE= yes -CONFIGURE_SCRIPT= ../sqlite/configure -CONFIGURE_ENV= LDFLAGS="-L${LOCALBASE}/lib" CFLAGS="-L${LOCALBASE}/lib" +MAKEFILE= ${FILESDIR}/Makefile.bsd +WRKSRC= ${WRKDIR}/sqlite +MAKE_ARGS+= -j2 +MAKE_ENV+= TCL_VER=${TCL_VER} +TCL_VER?= 8.3 -WRKSRC= ${WRKDIR}/bld +GDBM_TOOLS= gdbmdump gdbmstat -post-extract: - @${MKDIR} ${WRKSRC} +post-build: test +.for p in ${GDBM_TOOLS} + cd ${WRKSRC}/tool && ${MAKE} CFLAGS="${CFLAGS} -I${PREFIX}/include" \ + LDADD="-L${PREFIX}/lib -lgdbm" PROG=$p NOMAN=1 \ + -f bsd.prog.mk +.endfor + cd ${WRKSRC} && ${MAKE} VPATH=${WRKSRC}/src \ + CFLAGS="${CFLAGS} -I${WRKSRC} -I${WRKSRC}/src" \ + LDADD="-L${WRKSRC} -lsqlite" PROG=sqlite SRCS=shell.c NOMAN=1 \ + -f bsd.prog.mk +.ifndef NOPORTDOCS + cd ${WRKSRC}/www && ${SETENV} ${MAKE_ENV} \ + ${MAKE} ${MAKE_ARGS} -f ${FILESDIR}/Makefile.docs +.endif -do-install: - ${INSTALL_PROGRAM} ${WRKSRC}/sqlite ${PREFIX}/bin - ${INSTALL_DATA} ${WRKSRC}/libsqlite.a ${PREFIX}/lib - ${INSTALL_DATA} ${WRKSRC}/sqlite.h ${PREFIX}/include +post-install: +.for p in ${GDBM_TOOLS} + cd ${WRKSRC}/tool && ${MAKE} BINDIR="${PREFIX}/bin" \ + PROG=$p NOMAN=1 -f bsd.prog.mk install +.endfor + cd ${WRKSRC} && ${MAKE} PROG=sqlite NOMAN=1 BINDIR="${PREFIX}/bin" \ + -f bsd.prog.mk install + ${MKDIR} ${PREFIX}/lib/sqlite + ${INSTALL_DATA} ${FILESDIR}/pkgIndex.tcl ${PREFIX}/lib/sqlite/ +.ifndef NOPORTDOCS + ${MKDIR} ${PREFIX}/share/doc/sqlite + ${INSTALL_DATA} ${WRKSRC}/www/*.html ${WRKSRC}/www/*.png \ + ${PREFIX}/share/doc/sqlite +.endif + +test: + # ------------------------------------------------------- + # Running the vendor's tests -- there should be 0 errors. + # ------------------------------------------------------- + cd ${WRKSRC} && ${PREFIX}/bin/tclsh${TCL_VER} ${WRKSRC}/test/all.test \ + ${WRKSRC}/libsqlite.so + # ------------------------------------------------------- .include <bsd.port.mk> diff --git a/databases/sqlite2/files/Makefile.bsd b/databases/sqlite2/files/Makefile.bsd new file mode 100644 index 000000000000..a7b9955d3ca3 --- /dev/null +++ b/databases/sqlite2/files/Makefile.bsd @@ -0,0 +1,36 @@ +TCL_VER ?= 8.3 +TCL_DVER = ${TCL_VER:S/.//} +PREFIX ?= /usr/local + +CFLAGS += -DHAVE_READLINE=1 -DOS_UNIX=1 -DOS_WIN=0 +CFLAGS += -I${PREFIX}/include/tcl${TCL_VER} -I${PREFIX}/include +CFLAGS += -I${.CURDIR}/src -I${.CURDIR} + +LDADD += -lreadline -L${PREFIX}/lib -ltcl${TCL_DVER} -lm -lgdbm + +.PATH: ${.CURDIR}/src + +SRCS = build.c dbbe.c dbbegdbm.c dbbemem.c delete.c expr.c insert.c \ + main.c parse.y printf.c random.c select.c table.c tokenize.c \ + update.c util.c vdbe.c where.c tclsqlite.c + +INCS = sqlite.h + +LIB = sqlite +SHLIB_MAJOR= 1 +SHLIB_MINOR= 0 + +sqlite.h: sqlite.h.in VERSION + sed -e s/--VERS--/`cat ${.CURDIR}/VERSION`/ \ + -e s/--ENCODING--/ISO8859/ \ + ${.CURDIR}/src/sqlite.h.in > sqlite.h + +parse.h parse.c: parse.y + lemon o=parse ${.ALLSRC} + +INCDIR = ${PREFIX}/include +LIBDIR = ${PREFIX}/lib + +.include <bsd.lib.mk> + +${OBJS} ${SOBJS}: parse.h sqlite.h diff --git a/databases/sqlite2/files/Makefile.docs b/databases/sqlite2/files/Makefile.docs new file mode 100644 index 000000000000..77d95a57d548 --- /dev/null +++ b/databases/sqlite2/files/Makefile.docs @@ -0,0 +1,25 @@ +TCL_VER ?= 8.3 + +SRCS != echo ${.CURDIR}/*.tcl +DOCS = ${SRCS:Nopcode.tcl:.tcl=.html} +CODE != echo ${.CURDIR}/../src/*.[chy] + +all: ${DOCS} opcode.html + +opcode.html:: opcode.tcl vdbe.c + tclsh${TCL_VER} ${.ALLSRC} > opcode.html + +.SUFFIXES: .tcl .html + +.tcl.html: + tclsh${TCL_VER} $*.tcl > $*.html + +${DOCS}: last_change + +.PATH: ${.CURDIR}/../src + +last_change: ${CODE} + awk '/\$$Id:/ && NF > 4 { \ + if ($$2 == "\$$Id:") print $$5 "," $$6; \ + else print $$6 "," $$7 \ + }' ${.ALLSRC} | sort -t, | tail -1 > lc && mv lc last_change diff --git a/databases/sqlite2/files/patch-docs b/databases/sqlite2/files/patch-docs new file mode 100644 index 000000000000..ce5498da4d16 --- /dev/null +++ b/databases/sqlite2/files/patch-docs @@ -0,0 +1,30 @@ +--- www/index.tcl Thu Apr 5 12:49:44 2001 ++++ www/index.tcl Fri Jun 8 17:46:08 2001 +@@ -117,12 +117,6 @@ + +-puts {<h2>Download</h2> ++puts "<!-- h2>Download</h2 --><h3>This installation of Sqlite $vers was made" ++puts {by the <A href="http://www.freebsd.org/cgi/ports.cgi?query=sqlite">FreeBSD ++Port</A>.</h3>} + +-<p>You can download a tarball containing all source +-code for SQLite +-} +-puts "version $vers" +-puts { +-(including the TCL scripts that generate the +-HTML files for this website) at <a href="sqlite.tar.gz">sqlite.tar.gz</a>.} +-puts "This is a [file size sqlite.tar.gz] byte download." + puts {</p> +--- www/dynload.tcl Sun Feb 11 11:58:22 2001 ++++ www/dynload.tcl Mon Jun 11 19:09:47 2001 +@@ -15,3 +15,3 @@ + <i>This note was contributed by +-<a href="bsaunder@tampabay.rr.com.nospam">Bill Saunders</a>. Thanks, Bill!</i> ++<a href="mailto:bsaunder@tampabay.rr.com.nospam">Bill Saunders</a>. Thanks, Bill!</i> + +@@ -67,3 +67,3 @@ + Have fun....</p></li> +-</ul> ++</ol> + diff --git a/databases/sqlite2/files/patch-test b/databases/sqlite2/files/patch-test new file mode 100644 index 000000000000..e2a38cc43568 --- /dev/null +++ b/databases/sqlite2/files/patch-test @@ -0,0 +1,6 @@ +--- test/all.test Tue Feb 6 08:29:31 2001 ++++ test/all.test Fri Jun 8 16:28:34 2001 +@@ -27,2 +27,3 @@ + set testdir [file dirname $argv0] ++load [lindex $argv 0] + source $testdir/tester.tcl diff --git a/databases/sqlite2/files/pkgIndex.tcl b/databases/sqlite2/files/pkgIndex.tcl new file mode 100644 index 000000000000..df0b6bb0a82d --- /dev/null +++ b/databases/sqlite2/files/pkgIndex.tcl @@ -0,0 +1 @@ +package ifneeded sqlite 1.0 [list load $dir/../libsqlite.so] diff --git a/databases/sqlite2/pkg-plist b/databases/sqlite2/pkg-plist index 79c89c5c0bb0..f3e500a0b32b 100644 --- a/databases/sqlite2/pkg-plist +++ b/databases/sqlite2/pkg-plist @@ -1,3 +1,24 @@ bin/sqlite +bin/gdbmdump +bin/gdbmstat lib/libsqlite.a +lib/libsqlite.so +lib/libsqlite.so.1.0 +lib/sqlite/pkgIndex.tcl +@dirrm lib/sqlite include/sqlite.h +%%PORTDOCS%%share/doc/sqlite/arch.html +%%PORTDOCS%%share/doc/sqlite/arch.png +%%PORTDOCS%%share/doc/sqlite/c_interface.html +%%PORTDOCS%%share/doc/sqlite/changes.html +%%PORTDOCS%%share/doc/sqlite/crosscompile.html +%%PORTDOCS%%share/doc/sqlite/dynload.html +%%PORTDOCS%%share/doc/sqlite/fileformat.html +%%PORTDOCS%%share/doc/sqlite/index.html +%%PORTDOCS%%share/doc/sqlite/lang.html +%%PORTDOCS%%share/doc/sqlite/mingw.html +%%PORTDOCS%%share/doc/sqlite/opcode.html +%%PORTDOCS%%share/doc/sqlite/sqlite.html +%%PORTDOCS%%share/doc/sqlite/tclsqlite.html +%%PORTDOCS%%share/doc/sqlite/vdbe.html +%%PORTDOCS%%@dirrm share/doc/sqlite |