ports/139276: [Update] databases/sqlite3 to 3.6.18 release

Alex Dupre ale at FreeBSD.org
Thu Oct 1 09:00:03 UTC 2009


>Number:         139276
>Category:       ports
>Synopsis:       [Update] databases/sqlite3 to 3.6.18 release
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Thu Oct 01 09:00:02 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     Alex Dupre
>Release:        FreeBSD 7.2-STABLE i386
>Organization:
>Environment:
System: FreeBSD freefall.freebsd.org 7.2-STABLE FreeBSD 7.2-STABLE #39 r196005: Fri Jul 31 21:51:38 UTC 2009 simon at freefall.freebsd.org:/usr/src/sys/i386/compile/FREEFALL i386


	
>Description:
Update sqlite3 to 3.6.18 release:
- fix thread-safe support (does it make sense to have an option to disable it?)
- rework/simplify the port
	
>How-To-Repeat:
	
>Fix:

	

--- sqlite3.diff begins here ---
Index: Makefile
===================================================================
RCS file: /home/pcvs/ports/databases/sqlite3/Makefile,v
retrieving revision 1.38
diff -u -r1.38 Makefile
--- Makefile	2 Aug 2009 19:32:50 -0000	1.38
+++ Makefile	22 Sep 2009 18:27:48 -0000
@@ -6,7 +6,7 @@
 #
 
 PORTNAME=	sqlite3
-PORTVERSION=	3.6.14.2
+PORTVERSION=	3.6.18
 CATEGORIES=	databases
 MASTER_SITES=	http://www.sqlite.org/
 DISTNAME=	sqlite-${PORTVERSION}
@@ -18,28 +18,33 @@
 
 USE_GMAKE=	YES
 USE_GNOME=	pkgconfig
-USE_AUTOTOOLS=	libtool:22
 USE_LDCONFIG=	YES
 GNU_CONFIGURE=	YES
-CONFIGURE_ARGS=		--prefix=${PREFIX}
-CONFIGURE_ENV+=	TCLLIBDIR=${PREFIX}/lib/${PORTNAME}
+USE_GNOME=	gnomehack
+USE_TCL_BUILD=	84+
+CONFIGURE_ENV+=	TCLSH_CMD="${TCLSH}" \
+		TCLLIBDIR="${PREFIX}/lib/${PORTNAME}" \
+		ac_cv_search_pthread_create=""
 
 OPTIONS=	DEBUG		"Enable debugging & verbose explain"	off \
 		FTS3		"Enable FTS3 (Full Text Search) module"	off \
 		RAMTABLE	"Store temporary tables in RAM"		off \
 		TCLWRAPPER	"Enable TCL wrapper"			off \
 		METADATA	"Enable column metadata"		on \
-		THREADS		"Enable threads support"		on
+		THREADSAFE	"Build thread-safe library"		on
 
 .include <bsd.port.pre.mk>
 
+.if ${OSVERSION} < 700000
+EXTRA_PATCHES+=		${FILESDIR}/pthread_equal_stub
+.endif
+
 .if defined(WITH_DEBUG)
 CONFIGURE_ARGS+=	--enable-debug
 .endif
 
 .if defined(WITH_FTS3)
-CFLAGS+=		-DSQLITE_CORE=1 -DSQLITE_ENABLE_FTS3=1
-EXTRA_PATCHES+=		${FILESDIR}/fts3_patch-Makefile.in
+CFLAGS+=		-DSQLITE_ENABLE_FTS3=1
 .endif
 
 .if defined(WITH_RAMTABLE)
@@ -47,14 +52,13 @@
 .endif
 
 .if defined(WITH_TCLWRAPPER)
-USE_TCL=		84+
-.include		"${PORTSDIR}/Mk/bsd.tcl.mk"
-MAKE_ARGS+=		TCLSH=${TCLSH}
-MAKE_ENV+=		TCL_VER=${TCL_VER}
 CATEGORIES+=		lang tcl
 COMMENT+=		with TCL Wrapper
+USE_TCL_RUN=		84+
 CONFIGURE_ARGS+=	--with-tcl=${TCL_LIBDIR}
 PLIST_SUB+=		WITH_TCLWRAPPER=""
+ALL_TARGET=		all tclsqlite3
+INSTALL_TARGET=		install tcl_install
 .else
 CONFIGURE_ARGS+=	--disable-tcl
 PLIST_SUB+=		WITH_TCLWRAPPER="@comment "
@@ -64,7 +68,7 @@
 CFLAGS+=		-DSQLITE_ENABLE_COLUMN_METADATA=1
 .endif
 
-.if !defined(WITHOUT_THREADS)
+.if !defined(WITHOUT_THREADSAFE)
 CONFIGURE_ARGS+=	--enable-threadsafe \
 			--enable-cross-thread-connections \
 			--enable-threads-override-locks
@@ -72,29 +76,8 @@
 CONFIGURE_ARGS+=	--disable-threadsafe
 .endif
 
-post-patch:
-	@${REINPLACE_CMD} -e "s|tclsh \$$(TOP)|\$$(TCLSH) \$$(TOP)|g" \
-		-e "s|./libtool|${LIBTOOL}|g" \
-		-e "s|--mode=link|--mode=link --tag=CC|g" \
-		-e "s|\$${HAVE_TCL:1=tcl_install}||" \
-			${WRKSRC}/Makefile.in
-.if !defined(WITHOUT_THREADS)
-	@${REINPLACE_CMD} -e "s|-lpthread|${PTHREAD_LIBS}|g" \
-		${WRKSRC}/configure ${WRKSRC}/sqlite.pc.in \
-		${WRKSRC}/sqlite3.pc.in
-.else
-	@${REINPLACE_CMD} -E -e "s|-lpthread||g" \
-		${WRKSRC}/sqlite.pc.in ${WRKSRC}/sqlite3.pc.in
-.endif
-	@${REINPLACE_CMD} -e "s|fts3.c||g" \
-		-e "s|fts3_expr.c||g" ${WRKSRC}/tool/mksqlite3c.tcl
-
-post-install:
 .if defined(WITH_TCLWRAPPER)
-	@${MKDIR} ${PREFIX}/lib/sqlite3
-	@(cd ${WRKSRC} && ${LIBTOOL} --mode=install ${INSTALL_DATA} \
-		libtclsqlite3.la ${PREFIX}/lib/sqlite3/)
-	@${INSTALL_DATA} ${FILESDIR}/pkgIndex.tcl ${PREFIX}/lib/sqlite3/
+post-install:
 	@${INSTALL_PROGRAM} ${WRKSRC}/.libs/tclsqlite3 ${PREFIX}/bin
 	@${MKDIR} ${EXAMPLESDIR}
 	@${INSTALL_DATA} ${FILESDIR}/example.tcl ${EXAMPLESDIR}
Index: distinfo
===================================================================
RCS file: /home/pcvs/ports/databases/sqlite3/distinfo,v
retrieving revision 1.27
diff -u -r1.27 distinfo
--- distinfo	9 Jun 2009 02:40:43 -0000	1.27
+++ distinfo	22 Sep 2009 18:27:48 -0000
@@ -1,3 +1,3 @@
-MD5 (sqlite-3.6.14.2.tar.gz) = 4c074691b48cd45854899ae4fece6301
-SHA256 (sqlite-3.6.14.2.tar.gz) = 94a5b9dcc841baeb000971b15c6b66f50add7bc160030de5aea8622db3e7060e
-SIZE (sqlite-3.6.14.2.tar.gz) = 2896850
+MD5 (sqlite-3.6.18.tar.gz) = 54fa7782a56edf0bf6016a2548b86c4c
+SHA256 (sqlite-3.6.18.tar.gz) = 6239e12ab86644072e9dbd5e85b8656813690254dae2c2762da127b569b5ca0e
+SIZE (sqlite-3.6.18.tar.gz) = 2892345
Index: pkg-plist
===================================================================
RCS file: /home/pcvs/ports/databases/sqlite3/pkg-plist,v
retrieving revision 1.13
diff -u -r1.13 pkg-plist
--- pkg-plist	23 Mar 2009 05:31:15 -0000	1.13
+++ pkg-plist	22 Sep 2009 18:27:48 -0000
@@ -7,8 +7,6 @@
 lib/libsqlite3.so
 lib/libsqlite3.so.8
 libdata/pkgconfig/sqlite3.pc
-%%WITH_TCLWRAPPER%%lib/sqlite3/libtclsqlite3.a
-%%WITH_TCLWRAPPER%%lib/sqlite3/libtclsqlite3.la
 %%WITH_TCLWRAPPER%%lib/sqlite3/libtclsqlite3.so
 %%WITH_TCLWRAPPER%%lib/sqlite3/pkgIndex.tcl
 %%WITH_TCLWRAPPER%%@dirrm lib/sqlite3
Index: files/fts3_patch-Makefile.in
===================================================================
RCS file: files/fts3_patch-Makefile.in
diff -N files/fts3_patch-Makefile.in
--- files/fts3_patch-Makefile.in	27 Jan 2009 02:16:09 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,35 +0,0 @@
---- Makefile.in.orig	2009-01-15 12:01:45.000000000 -0200
-+++ Makefile.in	2009-01-26 19:43:24.000000000 -0200
-@@ -184,6 +184,8 @@
- LIBOBJ = $(OBJS$(USE_AMALGAMATION))
- 
- 
-+LIBOBJ += fts3.lo fts3_expr.lo fts3_hash.lo fts3_porter.lo fts3_tokenizer.lo fts3_tokenizer1.lo
-+
- # All of the source code files.
- #
- SRC = \
-@@ -734,6 +736,23 @@
-                 -DSQLITE_SERVER=1 -DSQLITE_PRIVATE="" -DSQLITE_CORE $(TEMP_STORE) \
- 		-o $@ $(TESTFIXTURE_SRC) $(LIBTCL) $(TLIBS)
- 
-+fts3.lo:	$(TOP)/ext/fts3/fts3.c $(HDR)
-+	$(LTCOMPILE) -c $(TOP)/ext/fts3/fts3.c
-+
-+fts3_expr.lo:	$(TOP)/ext/fts3/fts3_expr.c $(HDR)
-+	$(LTCOMPILE) -c $(TOP)/ext/fts3/fts3_expr.c
-+
-+fts3_hash.lo:	$(TOP)/ext/fts3/fts3_hash.c $(HDR)
-+	$(LTCOMPILE) -c $(TOP)/ext/fts3/fts3_hash.c
-+
-+fts3_porter.lo:	$(TOP)/ext/fts3/fts3_porter.c $(HDR)
-+	$(LTCOMPILE) -c $(TOP)/ext/fts3/fts3_porter.c
-+
-+fts3_tokenizer.lo:	$(TOP)/ext/fts3/fts3_tokenizer.c $(HDR)
-+	$(LTCOMPILE) -c $(TOP)/ext/fts3/fts3_tokenizer.c
-+
-+fts3_tokenizer1.lo:	$(TOP)/ext/fts3/fts3_tokenizer1.c $(HDR)
-+	$(LTCOMPILE) -c $(TOP)/ext/fts3/fts3_tokenizer1.c
- 
- fulltest:	testfixture$(TEXE) sqlite3$(TEXE)
- 	./testfixture$(TEXE) $(TOP)/test/all.test
Index: files/patch-Makefile.in
===================================================================
RCS file: /home/pcvs/ports/databases/sqlite3/files/patch-Makefile.in,v
retrieving revision 1.8
diff -u -r1.8 patch-Makefile.in
--- files/patch-Makefile.in	25 Apr 2009 02:44:12 -0000	1.8
+++ files/patch-Makefile.in	22 Sep 2009 18:27:48 -0000
@@ -1,20 +1,11 @@
---- Makefile.in.orig	2008-10-14 15:07:37.000000000 -0300
-+++ Makefile.in	2008-10-29 11:06:53.000000000 -0200
-@@ -135,7 +135,7 @@
- prefix = @prefix@
- exec_prefix = @exec_prefix@
- libdir = @libdir@
--pkgconfigdir = $(libdir)/pkgconfig
-+pkgconfigdir = $(exec_prefix)/libdata/pkgconfig
- bindir = @bindir@
- includedir = @includedir@
- INSTALL = @INSTALL@
-@@ -426,7 +426,7 @@
- # This is the default Makefile target.  The objects listed here
- # are what get build when you type just "make" with no arguments.
- #
--all:	sqlite3.h libsqlite3.la sqlite3$(TEXE) $(HAVE_TCL:1=libtclsqlite3.la)
-+all:	sqlite3.h libsqlite3.la sqlite3$(TEXE) $(HAVE_TCL:1=libtclsqlite3.la tclsqlite3)
+--- Makefile.in.orig	2009-09-17 13:41:21.000000000 +0200
++++ Makefile.in	2009-09-17 13:45:38.000000000 +0200
+@@ -687,7 +687,7 @@
+ 	$(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/status.c
  
- Makefile: $(TOP)/Makefile.in
- 	./config.status
+ sqlite3.h:	$(TOP)/src/sqlite.h.in $(TOP)/manifest.uuid $(TOP)/VERSION
+-	tclsh $(TOP)/tool/mksqlite3h.tcl $(TOP) >sqlite3.h
++	$(TCLSH_CMD) $(TOP)/tool/mksqlite3h.tcl $(TOP) >sqlite3.h
+ 
+ table.lo:	$(TOP)/src/table.c $(HDR)
+ 	$(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/table.c
Index: files/patch-src__main.c
===================================================================
RCS file: files/patch-src__main.c
diff -N files/patch-src__main.c
--- files/patch-src__main.c	5 Apr 2008 14:49:37 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,11 +0,0 @@
---- src/main.c.orig	2008-03-04 00:22:33.000000000 -0300
-+++ src/main.c	2008-03-04 00:22:45.000000000 -0300
-@@ -19,7 +19,7 @@
- #include "sqliteInt.h"
- #include <ctype.h>
- #ifdef SQLITE_ENABLE_FTS3
--# include "fts3.h"
-+# include "../ext/fts3/fts3.h"
- #endif
- 
- /*
Index: files/pkgIndex.tcl
===================================================================
RCS file: files/pkgIndex.tcl
diff -N files/pkgIndex.tcl
--- files/pkgIndex.tcl	31 Aug 2004 19:06:39 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1 +0,0 @@
-package ifneeded sqlite 0.0 [list load [file join $dir libtclsqlite3.so] sqlite]
Index: files/pthread_equal_stub
===================================================================
RCS file: files/pthread_equal_stub
diff -N files/pthread_equal_stub
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/pthread_equal_stub	22 Sep 2009 18:27:48 -0000
@@ -0,0 +1,11 @@
+--- src/mutex_unix.c.orig	2009-09-18 12:39:33.000000000 +0200
++++ src/mutex_unix.c	2009-09-18 12:39:04.000000000 +0200
+@@ -326,4 +326,8 @@
+   return &sMutex;
+ }
+ 
++int pthread_equal() __attribute__ ((weak));
++
++#define pthread_equal(a,b) ((pthread_equal) ? pthread_equal(a,b) : 1)
++
+ #endif /* SQLITE_MUTEX_PTHREAD */
--- sqlite3.diff ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list