[25783] branches/dp2mp-move/base

source_changes at macosforge.org source_changes at macosforge.org
Fri Jun 1 11:48:15 PDT 2007


Revision: 25783
          http://trac.macosforge.org/projects/macports/changeset/25783
Author:   sfiera at macports.org
Date:     2007-06-01 11:48:14 -0700 (Fri, 01 Jun 2007)

Log Message:
-----------
Merging in r25770

Modified Paths:
--------------
    branches/dp2mp-move/base/Mk/macports.autoconf.mk.in
    branches/dp2mp-move/base/Mk/macports.tea.mk
    branches/dp2mp-move/base/aclocal.m4
    branches/dp2mp-move/base/configure
    branches/dp2mp-move/base/configure.ac
    branches/dp2mp-move/base/src/Makefile.in

Added Paths:
-----------
    branches/dp2mp-move/base/src/sqlite-3.1.3.diff
    branches/dp2mp-move/base/src/sqlite-3.1.3.tar.gz

Modified: branches/dp2mp-move/base/Mk/macports.autoconf.mk.in
===================================================================
--- branches/dp2mp-move/base/Mk/macports.autoconf.mk.in	2007-06-01 18:02:49 UTC (rev 25782)
+++ branches/dp2mp-move/base/Mk/macports.autoconf.mk.in	2007-06-01 18:48:14 UTC (rev 25783)
@@ -24,6 +24,7 @@
 
 LIBS			= @LIBS@
 MD5_LIBS		= @MD5_LIBS@
+SQLITE3_LIBS		= @SQLITE3_LIBS@
 INSTALL			= @INSTALL@
 MTREE			= @MTREE@
 LN_S			= @LN_S@

Modified: branches/dp2mp-move/base/Mk/macports.tea.mk
===================================================================
--- branches/dp2mp-move/base/Mk/macports.tea.mk	2007-06-01 18:02:49 UTC (rev 25782)
+++ branches/dp2mp-move/base/Mk/macports.tea.mk	2007-06-01 18:48:14 UTC (rev 25783)
@@ -2,7 +2,7 @@
 	${CC} -c -DUSE_TCL_STUBS ${CFLAGS} ${TCL_DEFS} ${SHLIB_CFLAGS} $< -o $@
 
 $(SHLIB_NAME):: ${OBJS}
-	${SHLIB_LD} ${OBJS} -o ${SHLIB_NAME} ${TCL_STUB_LIB_SPEC} ${SHLIB_LDFLAGS} ${LIBS} ${MD5_LIBS}
+	${SHLIB_LD} ${OBJS} -o ${SHLIB_NAME} ${TCL_STUB_LIB_SPEC} ${SHLIB_LDFLAGS} ${LIBS} ${MD5_LIBS} ${SQLITE3_LIBS}
 
 all:: ${SHLIB_NAME}
 

Modified: branches/dp2mp-move/base/aclocal.m4
===================================================================
--- branches/dp2mp-move/base/aclocal.m4	2007-06-01 18:02:49 UTC (rev 25782)
+++ branches/dp2mp-move/base/aclocal.m4	2007-06-01 18:48:14 UTC (rev 25783)
@@ -727,34 +727,6 @@
 ])
 
 
-# MP_PATH_SQLITE3
-#	Specify sqlite3 location
-#
-# Arguments:
-#	None.
-#
-# Requires:
-#   System or user-specified --with-sqlite=dir to specify
-#
-# Results:
-#   Sets SQLITE3_DIR to the directory where sqlite3 tcl pkgIndex.tcl is
-#---------------------------------------
-AC_DEFUN([MP_PATH_SQLITE3],[
-
-	AC_ARG_WITH([sqlite],
-		AS_HELP_STRING([--with-sqlite3=DIR],
-			[directory for sqlite3 (default /usr/lib/sqlite3)]),		
-		[mp_sqlite3_dir=$withval], [mp_sqlite3_dir=/usr/lib/sqlite3])
-		
-	AC_CACHE_CHECK([for sqlite3 location], [mp_cv_sqlite3_dir],
-		[mp_cv_sqlite3_dir=
-		test -r "${mp_sqlite3_dir}/pkgIndex.tcl" && mp_cv_sqlite3_dir=$mp_sqlite3_dir
-		])
-		
-	SQLITE3_DIR=$mp_cv_sqlite3_dir
-	AC_SUBST(SQLITE3_DIR)
-])
-
 dnl This macro tests if the compiler supports GCC's
 dnl __attribute__ syntax for unused variables/parameters
 AC_DEFUN([MP_COMPILER_ATTRIBUTE_UNUSED], [

Modified: branches/dp2mp-move/base/configure
===================================================================
--- branches/dp2mp-move/base/configure	2007-06-01 18:02:49 UTC (rev 25782)
+++ branches/dp2mp-move/base/configure	2007-06-01 18:48:14 UTC (rev 25783)
@@ -699,7 +699,6 @@
 EXTRA_PROGS
 PORTSDIR
 MPCONFIGDIR
-SQLITE3_DIR
 DSTUSR
 DSTGRP
 DSTMODE
@@ -729,6 +728,8 @@
 CFLAGS_LIBCURL
 LDFLAGS_LIBCURL
 subdirs
+SQLITE3_LIBS
+SQLITE3_DIR
 OUR_INCLUDED_PACKAGES
 INCLUDES
 CFLAGS_DEBUG
@@ -765,7 +766,8 @@
 OPEN
 CPP
 XMKMF'
-ac_subdirs_all='src/thread2.6'
+ac_subdirs_all='src/thread2.6
+src/sqlite-3.1.3'
 
 # Initialize some variables set by options.
 ac_init_help=
@@ -1350,7 +1352,6 @@
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
   --with-ports-dir=DIR    Specify alternate ports directory
-  --with-sqlite3=DIR      directory for sqlite3 (default /usr/lib/sqlite3)
   --with-install-user=USER
                           Specify user ownership of installed files
   --with-install-group=GROUP
@@ -1362,7 +1363,10 @@
   --with-tclinclude       directory containing the public Tcl header files.
   --with-tclpackage       Tcl package installation directory.
   --with-curlprefix       base directory for the cURL install '/usr', '/usr/local',...
-  --with-included-tclthread install included Thread package.
+  --with-included-tclthread
+                          install included Thread package.
+  --with-included-sqlite3 build using bundled sqlite3 package
+  --with-tcl-sqlite3=DIR  directory for Tcl sqlite3 (default /usr/lib/sqlite3)
 
 Some influential environment variables:
   CC          C compiler command
@@ -4052,32 +4056,6 @@
 
 
 
-
-
-# Check whether --with-sqlite was given.
-if test "${with_sqlite+set}" = set; then
-  withval=$with_sqlite; mp_sqlite3_dir=$withval
-else
-  mp_sqlite3_dir=/usr/lib/sqlite3
-fi
-
-
-	{ echo "$as_me:$LINENO: checking for sqlite3 location" >&5
-echo $ECHO_N "checking for sqlite3 location... $ECHO_C" >&6; }
-if test "${mp_cv_sqlite3_dir+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  mp_cv_sqlite3_dir=
-		test -r "${mp_sqlite3_dir}/pkgIndex.tcl" && mp_cv_sqlite3_dir=$mp_sqlite3_dir
-
-fi
-{ echo "$as_me:$LINENO: result: $mp_cv_sqlite3_dir" >&5
-echo "${ECHO_T}$mp_cv_sqlite3_dir" >&6; }
-
-	SQLITE3_DIR=$mp_cv_sqlite3_dir
-
-
-
 # Check for install ownership
 
 
@@ -9492,8 +9470,136 @@
 	patch -p0 < src/thread2.6.diff
 fi
 
+## sqlite3 package.
 
+# Check whether --with-included-sqlite3 was given.
+if test "${with_included_sqlite3+set}" = set; then
+  withval=$with_included_sqlite3; with_included_sqlite3=$withval
+else
+  with_included_sqlite3="unspecified"
+fi
 
+
+# Check if sqlite3 package is already installed.
+if test "x$with_included_sqlite3" = "xunspecified" ; then
+	{ echo "$as_me:$LINENO: checking for sqlite3_open in -lsqlite3" >&5
+echo $ECHO_N "checking for sqlite3_open in -lsqlite3... $ECHO_C" >&6; }
+if test "${ac_cv_lib_sqlite3_sqlite3_open+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsqlite3  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char sqlite3_open ();
+int
+main ()
+{
+return sqlite3_open ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_lib_sqlite3_sqlite3_open=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_lib_sqlite3_sqlite3_open=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_sqlite3_sqlite3_open" >&5
+echo "${ECHO_T}$ac_cv_lib_sqlite3_sqlite3_open" >&6; }
+if test $ac_cv_lib_sqlite3_sqlite3_open = yes; then
+  with_included_sqlite3=no
+else
+  with_included_sqlite3=yes
+fi
+
+fi
+
+
+# Check whether --with-tcl-sqlite3 was given.
+if test "${with_tcl_sqlite3+set}" = set; then
+  withval=$with_tcl_sqlite3; mp_sqlite3_dir=$withval
+else
+  mp_sqlite3_dir=/usr/lib/sqlite3
+fi
+
+
+# If sqlite3 package isn't installed, configure and install sqlite3 package.
+if test "$with_included_sqlite3" = "yes"; then
+	OUR_INCLUDED_PACKAGES="$OUR_INCLUDED_PACKAGES sqlite-3.1.3"
+	subdirs="$subdirs src/sqlite-3.1.3"
+
+	# Extract sqlite3 package
+	(cd src/; gzip -d < sqlite-3.1.3.tar.gz | tar xf -)
+	# patch sqlite3 with desired configure options
+	patch -p0 < src/sqlite-3.1.3.diff
+	# the new tclinstaller.tcl needs to have substitution occur
+	mv src/sqlite-3.1.3/tclinstaller.tcl src/sqlite-3.1.3/tclinstaller.tcl.in
+	SQLITE3_LIBS=`pwd`"/src/sqlite-3.1.3/.libs/libsqlite3.a"
+	if test "x$prefix" = "xNONE" ; then
+		SQLITE3_DIR=$ac_default_prefix/share/macports/Tcl/sqlite3
+	else
+		SQLITE3_DIR=$prefix/share/macports/Tcl/sqlite3
+	fi
+else
+	SQLITE3_LIBS="-lsqlite3"
+
+	{ echo "$as_me:$LINENO: checking for Tcl sqlite3 location" >&5
+echo $ECHO_N "checking for Tcl sqlite3 location... $ECHO_C" >&6; }
+if test "${mp_cv_sqlite3_dir+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  mp_cv_sqlite3_dir=
+		test -r "${mp_sqlite3_dir}/pkgIndex.tcl" && mp_cv_sqlite3_dir=$mp_sqlite3_dir
+
+fi
+{ echo "$as_me:$LINENO: result: $mp_cv_sqlite3_dir" >&5
+echo "${ECHO_T}$mp_cv_sqlite3_dir" >&6; }
+
+	SQLITE3_DIR=$mp_cv_sqlite3_dir
+fi
+
+
+
+
+
+
 # Allows building of shared libraries
 
     { echo "$as_me:$LINENO: checking how to build libraries" >&5
@@ -10285,7 +10391,6 @@
 EXTRA_PROGS!$EXTRA_PROGS$ac_delim
 PORTSDIR!$PORTSDIR$ac_delim
 MPCONFIGDIR!$MPCONFIGDIR$ac_delim
-SQLITE3_DIR!$SQLITE3_DIR$ac_delim
 DSTUSR!$DSTUSR$ac_delim
 DSTGRP!$DSTGRP$ac_delim
 DSTMODE!$DSTMODE$ac_delim
@@ -10299,6 +10404,7 @@
 X_PRE_LIBS!$X_PRE_LIBS$ac_delim
 X_LIBS!$X_LIBS$ac_delim
 X_EXTRA_LIBS!$X_EXTRA_LIBS$ac_delim
+TCL_VERSION!$TCL_VERSION$ac_delim
 _ACEOF
 
   if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
@@ -10340,7 +10446,6 @@
 ac_delim='%!_!# '
 for ac_last_try in false false false false false :; do
   cat >conf$$subs.sed <<_ACEOF
-TCL_VERSION!$TCL_VERSION$ac_delim
 TCL_BIN_DIR!$TCL_BIN_DIR$ac_delim
 TCL_SRC_DIR!$TCL_SRC_DIR$ac_delim
 TCL_LIB_FILE!$TCL_LIB_FILE$ac_delim
@@ -10356,6 +10461,8 @@
 CFLAGS_LIBCURL!$CFLAGS_LIBCURL$ac_delim
 LDFLAGS_LIBCURL!$LDFLAGS_LIBCURL$ac_delim
 subdirs!$subdirs$ac_delim
+SQLITE3_LIBS!$SQLITE3_LIBS$ac_delim
+SQLITE3_DIR!$SQLITE3_DIR$ac_delim
 OUR_INCLUDED_PACKAGES!$OUR_INCLUDED_PACKAGES$ac_delim
 INCLUDES!$INCLUDES$ac_delim
 CFLAGS_DEBUG!$CFLAGS_DEBUG$ac_delim
@@ -10374,7 +10481,7 @@
 LTLIBOBJS!$LTLIBOBJS$ac_delim
 _ACEOF
 
-  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 32; then
+  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 33; then
     break
   elif $ac_last_try; then
     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5

Modified: branches/dp2mp-move/base/configure.ac
===================================================================
--- branches/dp2mp-move/base/configure.ac	2007-06-01 18:02:49 UTC (rev 25782)
+++ branches/dp2mp-move/base/configure.ac	2007-06-01 18:48:14 UTC (rev 25783)
@@ -58,7 +58,6 @@
 AC_PREFIX_DEFAULT(/opt/local)
 MP_PATH_PORTSDIR([$PORTS_DIR_DEFAULT])
 MP_PATH_MPCONFIGDIR
-MP_PATH_SQLITE3
 
 # Check for install ownership
 MP_CHECK_INSTALLUSER
@@ -135,7 +134,8 @@
 ## Thread package.
 AC_ARG_WITH(
 		included-tclthread,
-		[  --with-included-tclthread install included Thread package.],
+		AS_HELP_STRING([--with-included-tclthread],
+			[install included Thread package.]),
 		[with_included_tclthread=$withval],
 		[with_included_tclthread="unspecified"])
 
@@ -157,6 +157,58 @@
 	patch -p0 < src/thread2.6.diff
 fi
 
+## sqlite3 package.
+AC_ARG_WITH(
+		included-sqlite3,
+		AS_HELP_STRING([--with-included-sqlite3],
+			[build using bundled sqlite3 package]),
+		[with_included_sqlite3=$withval],
+		[with_included_sqlite3="unspecified"])
+
+# Check if sqlite3 package is already installed.
+if test "x$with_included_sqlite3" = "xunspecified" ; then
+	AC_CHECK_LIB([sqlite3],[sqlite3_open],
+		[with_included_sqlite3=no],
+		[with_included_sqlite3=yes])
+fi
+
+AC_ARG_WITH(
+		tcl-sqlite3,
+		AS_HELP_STRING([--with-tcl-sqlite3=DIR],
+			[directory for Tcl sqlite3 (default /usr/lib/sqlite3)]),
+		[mp_sqlite3_dir=$withval],
+		[mp_sqlite3_dir=/usr/lib/sqlite3])
+
+# If sqlite3 package isn't installed, configure and install sqlite3 package.
+if test "$with_included_sqlite3" = "yes"; then
+	OUR_INCLUDED_PACKAGES="$OUR_INCLUDED_PACKAGES sqlite-3.1.3"
+	AC_CONFIG_SUBDIRS([src/sqlite-3.1.3])
+	# Extract sqlite3 package
+	(cd src/; gzip -d < sqlite-3.1.3.tar.gz | tar xf -)
+	# patch sqlite3 with desired configure options
+	patch -p0 < src/sqlite-3.1.3.diff
+	# the new tclinstaller.tcl needs to have substitution occur
+	mv src/sqlite-3.1.3/tclinstaller.tcl src/sqlite-3.1.3/tclinstaller.tcl.in
+	SQLITE3_LIBS=`pwd`"/src/sqlite-3.1.3/.libs/libsqlite3.a"
+	if test "x$prefix" = "xNONE" ; then
+		SQLITE3_DIR=$ac_default_prefix/share/macports/Tcl/sqlite3
+	else
+		SQLITE3_DIR=$prefix/share/macports/Tcl/sqlite3
+	fi
+else
+	SQLITE3_LIBS="-lsqlite3"
+
+	AC_CACHE_CHECK([for Tcl sqlite3 location], [mp_cv_sqlite3_dir],
+		[mp_cv_sqlite3_dir=
+		test -r "${mp_sqlite3_dir}/pkgIndex.tcl" && mp_cv_sqlite3_dir=$mp_sqlite3_dir
+		])
+
+	SQLITE3_DIR=$mp_cv_sqlite3_dir
+fi
+
+AC_SUBST(SQLITE3_LIBS)
+AC_SUBST(SQLITE3_DIR)
+
 AC_SUBST(OUR_INCLUDED_PACKAGES)
 
 # Allows building of shared libraries

Modified: branches/dp2mp-move/base/src/Makefile.in
===================================================================
--- branches/dp2mp-move/base/src/Makefile.in	2007-06-01 18:02:49 UTC (rev 25782)
+++ branches/dp2mp-move/base/src/Makefile.in	2007-06-01 18:48:14 UTC (rev 25783)
@@ -1,5 +1,5 @@
-TCLPKG=		macports1.0 port1.0 package1.0 pextlib1.0 registry1.0 \
-			darwintracelib1.0 @OUR_INCLUDED_PACKAGES@
+TCLPKG=		@OUR_INCLUDED_PACKAGES@ macports1.0 port1.0 package1.0 \
+			pextlib1.0 registry1.0 darwintracelib1.0 
 SUBDIR=		${TCLPKG} port programs
 
 all::

Added: branches/dp2mp-move/base/src/sqlite-3.1.3.diff
===================================================================
--- branches/dp2mp-move/base/src/sqlite-3.1.3.diff	                        (rev 0)
+++ branches/dp2mp-move/base/src/sqlite-3.1.3.diff	2007-06-01 18:48:14 UTC (rev 25783)
@@ -0,0 +1,45 @@
+diff -ru src/sqlite-3.1.3/Makefile.in src/sqlite-3.1.3.mine/Makefile.in
+--- src/sqlite-3.1.3/Makefile.in	2005-02-19 19:11:19.000000000 -0500
++++ src/sqlite-3.1.3.mine/Makefile.in	2007-05-31 17:34:02.000000000 -0400
+@@ -605,7 +605,7 @@
+ 	mkdir -p doc
+ 	mv $(DOC) doc
+ 
+-install:	sqlite3 libsqlite3.la sqlite3.h ${HAVE_TCL:1=tcl_install}
++dont_install:	sqlite3 libsqlite3.la sqlite3.h ${HAVE_TCL:1=tcl_install}
+ 	$(INSTALL) -d $(DESTDIR)$(libdir)
+ 	$(LTINSTALL) libsqlite3.la $(DESTDIR)$(libdir)
+ 	$(INSTALL) -d $(DESTDIR)$(exec_prefix)/bin
+@@ -615,7 +615,7 @@
+ 	$(INSTALL) -d $(DESTDIR)$(libdir)/pkgconfig; 
+ 	$(INSTALL) -m 0644 sqlite3.pc $(DESTDIR)$(libdir)/pkgconfig; 
+ 
+-tcl_install:	libtclsqlite3.la
++install:	libtclsqlite3.la
+ 	tclsh $(TOP)/tclinstaller.tcl $(VERSION)
+ 
+ clean:	
+diff -ru src/sqlite-3.1.3/configure src/sqlite-3.1.3.mine/configure
+--- src/sqlite-3.1.3/configure	2005-02-19 09:30:48.000000000 -0500
++++ src/sqlite-3.1.3.mine/configure	2007-05-31 17:39:49.000000000 -0400
+@@ -20343,7 +20343,7 @@
+ #########
+ # Generate the output files.
+ #
+-                    ac_config_files="$ac_config_files Makefile sqlite3.pc"
++                    ac_config_files="$ac_config_files Makefile sqlite3.pc tclinstaller.tcl"
+ cat >confcache <<\_ACEOF
+ # This file is a shell script that caches the results of configure
+ # tests run on this system so they can be shared between configure
+diff -ru src/sqlite-3.1.3/tclinstaller.tcl src/sqlite-3.1.3.mine/tclinstaller.tcl
+--- src/sqlite-3.1.3/tclinstaller.tcl	2005-01-30 17:10:01.000000000 -0500
++++ src/sqlite-3.1.3.mine/tclinstaller.tcl	2007-05-31 17:33:32.000000000 -0400
+@@ -7,7 +7,7 @@
+ set VERSION [lindex $argv 0]
+ set LIBFILE .libs/libtclsqlite3[info sharedlibextension]
+ if { ![info exists env(DESTDIR)] } { set env(DESTDIR) "" }
+-set LIBDIR $env(DESTDIR)[lindex $auto_path 0]
++set LIBDIR @prefix@/share/macports/Tcl
+ set LIBNAME [file tail $LIBFILE]
+ set LIB $LIBDIR/sqlite3/$LIBNAME
+ 

Added: branches/dp2mp-move/base/src/sqlite-3.1.3.tar.gz
===================================================================
(Binary files differ)


Property changes on: branches/dp2mp-move/base/src/sqlite-3.1.3.tar.gz
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20070601/f95a76e9/attachment.html


More information about the macports-changes mailing list