--- Portfile.orig	2010-03-30 09:01:25.000000000 +0100
+++ Portfile	2010-05-05 18:25:38.000000000 +0100
@@ -1,54 +1,75 @@
-# $Id: Portfile 65684 2010-03-30 08:01:25Z mww@macports.org $
+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4
+# $Id$
 
-PortSystem 1.0
+PortSystem          1.0
 
-name			sqlite3
-version			3.6.23.1
-categories		databases
-platforms		darwin
-maintainers		mww openmaintainer
-description		an embedded SQL database engine
-long_description	SQLite3 is an SQL database engine in a C library. \
-				Programs that link the SQLite3 library can have SQL \
-				database access without running a separate RDBMS \
-				process. The distribution comes with a standalone \
-				command-line access program (sqlite3) that can be used \
-				to administer an SQLite3 database and which serves as \
-				an example of how to use the SQLite3 library.
-
-homepage		http://www.sqlite.org/
-master_sites	${homepage}
-distname		sqlite-${version}
+name                sqlite3
+version             3.6.23.1
+categories          databases
+platforms           darwin
+maintainers         mww ouarz.net:franck.cassedanne openmaintainer
+license             public domain
+description         an embedded SQL database engine
+
+long_description    SQLite3 is an SQL database engine in a C library. \
+                    Programs that link the SQLite3 library can have SQL \
+                    database access without running a separate RDBMS \
+                    process. The distribution comes with a standalone \
+                    command-line access program (sqlite3) that can be used \
+                    to administer an SQLite3 database and which serves as \
+                    an example of how to use the SQLite3 library.
+
+homepage            http://www.sqlite.org/
+master_sites        ${homepage}
+distname            sqlite-${version}
 checksums           md5     d99f1b31da0eb33271464bee15cec701 \
                     sha1    718615fc37a5ef57fb4e7d06fc56ee7bda391d6f \
                     rmd160  03847176d21391cc44d2275fc685d556c56ab9d8
 
-depends_lib		port:readline \
-				port:ncurses
+depends_lib         port:readline \
+                    port:ncurses
 
 # '-lm' makes freebsd happy & darwin not angry (and makes variants unnecessary)
 # '-lncurses' is needed to build universal on Tiger; see #15661
-configure.args	--enable-threadsafe --disable-tcl \
-			--enable-load-extension \
-			--with-readline-inc="-I${prefix}/include" \
-			--with-readline-lib="-L${prefix}/lib -lreadline -lm -lncurses"
+configure.args      --enable-threadsafe --disable-tcl \
+                    --enable-load-extension \
+                    --with-readline-inc="-I${prefix}/include" \
+                    --with-readline-lib="-L${prefix}/lib -lreadline -lm -lncurses"
 # search in worksrcpath for sqlite3.h first -- dont pick up an installed one!
-configure.cppflags	"-DSQLITE_ENABLE_COLUMN_METADATA=1 -I${worksrcpath} -I${prefix}/include"
+configure.cppflags  "-DSQLITE_ENABLE_COLUMN_METADATA=1 -I${worksrcpath} -I${prefix}/include"
 
-use_parallel_build	no
-build.type		gnu
+use_parallel_build  no
+build.type          gnu
 
-test.run		yes
-test.target		test
+test.run            yes
+test.target         test
 
-livecheck.type	regex
-livecheck.url	http://www.sqlite.org/download.html
-livecheck.regex	sqlite-(\[0-9\\.\]+\[0-9\])\\.
+livecheck.type      regex
+livecheck.url       http://www.sqlite.org/download.html
+livecheck.regex     sqlite-(\[0-9\\.\]+\[0-9\])\\.
 
 post-destroot {
-	xinstall -m 644 ${worksrcpath}/${name}.1 ${destroot}${prefix}/share/man/man1
+    xinstall -m 644 ${worksrcpath}/${name}.1 ${destroot}${prefix}/share/man/man1
 }
 
 platform darwin 8 {
-    configure.cppflags-append -DSQLITE_ENABLE_LOCKING_STYLE=0
+    configure.cppflags-append   -DSQLITE_ENABLE_LOCKING_STYLE=0
 }
+
+variant fts3 description {Add the FTS3 extension for full text search} {
+    configure.cppflags-append   -DSQLITE_ENABLE_FTS3 -SQLITE_ENABLE_FTS3_PARENTHESIS
+}
+
+variant rtree description {Add the R*Tree extension for spatial data structure} {
+    configure.cppflags-append   -DSQLITE_ENABLE_RTREE=1
+}
+
+variant soundex description {Enables the soundex() function} {
+    configure.cppflags-append   -DSQLITE_SOUNDEX=1
+}
+
+variant icu description {Add the International Components for Unicode (ICU) extension} {
+    depends_lib-append          port:icu
+    configure.ldflags-append    [exec ${prefix}/bin/icu-config --ldflags]
+    configure.cppflags-append   -DSQLITE_ENABLE_ICU
+}
\ No newline at end of file
